:root {
  /* Paleta de la marca: Acelga, Brote, Morrón, Masa y Papel.
     (Los nombres viejos de las variables se mantienen para no tocar el resto.) */
  --berenjena: #1D3A26;
  --berenjena-2: #2F5A3D;
  --lima: #C2EA4D;
  --lima-suave: #EAF6C8;
  --hoja: #2F6B2A;
  --tomate: #DB4429;
  --tomate-suave: #FBE3DC;
  --zapallo: #D98A1C;
  --zapallo-suave: #FCEFD8;
  --fondo: #FAF4E4;
  --papel: #FFFDF7;
  --tinta: #16281C;
  --tinta-2: #4F604F;
  --linea: #E7DFC9;
  --fijos: #8FB09A;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --top-h: 56px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font: 16px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, label, [role=button] { touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--berenjena-2); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
[hidden] { display: none !important; }

/* ---------- Encabezado ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 10px; height: var(--top-h);
  padding: 0 6px 0 14px; background: var(--berenjena); color: #fff;
}
.top::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 60px; background: var(--berenjena); }
.top::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 12px; pointer-events: none;
  background: var(--rep-acelga) repeat-x left center / auto 100%; transform: scaleY(-1);
}
.brand { flex: none; }
.brand img { height: 36px; width: auto; display: block; }
.top h1 { flex: 1; min-width: 0; margin: 0; font: 700 1.06rem/1.2 var(--sans); color: #F3E7C9; padding-left: 11px; border-left: 1px solid rgba(255,255,255,.18); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: inherit; border-radius: 50%; cursor: pointer; text-decoration: none; font-size: 1.1rem; flex: none; }
.iconbtn:hover { background: rgba(255,255,255,.1); }
.iconbtn.dark:hover, .iconbtn.dark:active { background: var(--fondo); }

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 18px; outline: none; }
main.wide { max-width: 1120px; }
main.has-fab { padding-bottom: 92px; }

/* ---------- Navegación inferior ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--papel); border-top: 1px solid var(--linea);
  padding-bottom: var(--safe-b);
  box-shadow: 0 -6px 20px -14px rgba(29,58,38,.35);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tab-h); text-decoration: none; color: var(--tinta-2); font-size: .76rem; font-weight: 600; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; padding: 3px 14px; border-radius: 999px; transition: background .15s; }
.tabs a.on { color: var(--berenjena); font-weight: 700; }
.tabs a.on svg { background: var(--lima); }
.tabs a:active svg { background: var(--lima-suave); }
@media (min-width: 900px) { .tabs { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border: 1px solid var(--linea); border-bottom: 0; border-radius: 20px 20px 0 0; } }

/* ---------- Tipografía ---------- */
h2.sec { font: 700 1.6rem/1.15 var(--serif); margin: 4px 0 14px; color: var(--berenjena); letter-spacing: -.01em; }
h3 { font: 700 1.2rem/1.25 var(--serif); margin: 28px 0 10px; color: var(--berenjena); }
h2.sec, h3, .hero .big, .stat b, .promo h4, .sheet-head h2, .quick b { font-variation-settings: "SOFT" 100, "WONK" 0; }
.muted { color: var(--tinta-2); }
.small { font-size: .88rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
p { margin: 0 0 10px; }

/* ---------- Panel ---------- */
.quick { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.quick button, .quick a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 92px;
  padding: 12px; border-radius: var(--r-m); border: 1px solid var(--linea); background: var(--papel);
  text-align: left; text-decoration: none; cursor: pointer; color: var(--berenjena);
}
.quick svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quick b { font: 700 1rem/1.15 var(--serif); }
.quick .main { background: var(--lima); border-color: var(--lima); }
.quick button:active, .quick a:active { transform: scale(.98); }
.hero {
  background: var(--berenjena); color: #fff; border-radius: var(--r-l);
  padding: 20px; margin-bottom: 12px;
}
.hero .big { font: 700 2.4rem/1.05 var(--serif); color: var(--lima); }
.hero .lbl { color: rgba(243,231,201,.78); font-size: .92rem; }
.cover { margin-top: 16px; }
.cover-bar { height: 12px; background: rgba(255,255,255,.14); border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.cover-bar i { display: block; height: 100%; background: var(--lima); border-radius: 999px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 12px 14px; text-decoration: none; display: block; }
a.stat:active { background: var(--fondo); }
.stat b { display: block; font: 700 1.35rem/1.2 var(--serif); color: var(--berenjena); }
.stat span { font-size: .85rem; color: var(--tinta-2); }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: block; width: 100%; text-align: left; background: var(--papel);
  border: 1px solid var(--linea); border-radius: var(--r-m); padding: 13px 14px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.row:hover { border-color: #D3CAB2; }
.row:active { background: #F6F0DE; }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.row-title { font-weight: 700; font-size: 1.03rem; min-width: 0; }
.row-sub { color: var(--tinta-2); font-size: .9rem; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.row-acts { display: flex; gap: 8px; margin-top: 10px; }
.row-acts .btn { flex: 1; }
.group-h { font: 700 .95rem/1.2 var(--sans); color: var(--tinta-2); margin: 18px 2px 8px; display: flex; justify-content: space-between; }
.group-h:first-child { margin-top: 2px; }

/* Barra de composición del precio (costo / fijos / ganancia) */
.plato { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 10px; background: var(--linea); }
.plato i { display: block; height: 100%; }
.plato .v { background: var(--berenjena); }
.plato .f { background: var(--fijos); }
.plato .g { background: var(--lima); }
.plato .p { background: var(--tomate); }
.leyenda { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--tinta-2); margin-top: 6px; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Chips ---------- */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.chip.ok { background: var(--lima-suave); color: var(--hoja); }
.chip.warn { background: var(--zapallo-suave); color: #8A5208; }
.chip.bad { background: var(--tomate-suave); color: #B23218; }
.chip.neu { background: #ECE5D2; color: var(--berenjena-2); }

/* ---------- Alertas ---------- */
.alerta { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-m); background: var(--papel); border-left: 5px solid var(--zapallo); margin-bottom: 8px; font-size: .95rem; }
.alerta.bad { border-left-color: var(--tomate); }
.alerta.info { border-left-color: var(--berenjena-2); }
.alerta a { font-weight: 700; display: inline-block; padding: 2px 0; }
.alerta .btn { flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; background: var(--lima); color: var(--berenjena); text-align: center; line-height: 1.2;
  transition: transform .08s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sec { background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--berenjena); }
.btn.ghost { background: transparent; color: var(--berenjena-2); padding: 10px 12px; }
.btn.danger { background: var(--tomate-suave); color: #B23218; }
.btn.dark { background: var(--berenjena); color: var(--lima); }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 7px 14px; font-size: .92rem; }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 15;
  min-height: 54px; padding: 12px 22px; font-size: 1.02rem;
  box-shadow: 0 8px 22px -6px rgba(29,58,38,.45);
}
@media (min-width: 900px) { .fab { right: calc(50% - 360px); } }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--berenjena-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Filtros y selectores ---------- */
.seg { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg a { flex: none; min-height: 42px; border: 1.5px solid var(--linea); background: var(--papel); border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on, .seg a.on { background: var(--berenjena); border-color: var(--berenjena); color: var(--lima); }
.seg .n { font-size: .78rem; font-weight: 700; background: rgba(29,58,38,.1); border-radius: 999px; padding: 0 7px; min-width: 22px; }
.seg .on .n { background: rgba(194,234,77,.22); }
/* Segmentado de ancho completo: todas las opciones a la vista */
.seg.fill { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; overflow: visible; }
.seg.fill button, .seg.fill a { border: 0; background: transparent; border-radius: 12px; padding: 8px 4px; font-size: .9rem; min-width: 0; white-space: normal; line-height: 1.15; }
.seg.fill button.on, .seg.fill a.on { background: var(--berenjena); color: var(--lima); }
.search { width: 100%; margin-bottom: 12px; }

/* Opciones de una sola elección (medio de pago, estado) */
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.opts button { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--papel); font-weight: 600; cursor: pointer; }
.opts button[aria-pressed="true"] { background: var(--berenjena); border-color: var(--berenjena); color: var(--lima); }
.opts.full { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px) { .opts.full.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Formularios ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span, .flabel { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
label.f small, .fhint { display: block; color: var(--tinta-2); font-size: .82rem; margin-top: 4px; font-weight: 500; }
.flabel .fhint { display: inline; margin-left: 4px; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 11px 13px; border: 1.5px solid var(--linea);
  border-radius: var(--r-s); background: var(--papel); font-size: 16px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background: var(--papel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231D3A26' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; }
input:focus, select:focus, textarea:focus { border-color: var(--berenjena-2); outline: none; box-shadow: 0 0 0 3px #DCEBC4; }
textarea { min-height: 76px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 600; min-height: 44px; cursor: pointer; }
.check input { width: 24px; min-height: 24px; height: 24px; accent-color: var(--berenjena); flex: none; }
/* Interruptor (sí / no) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 14px; border: 1.5px solid var(--linea); border-radius: var(--r-s); background: var(--papel); margin-bottom: 14px; cursor: pointer; font-weight: 700; }
.switch input { appearance: none; -webkit-appearance: none; width: 52px; min-height: 0; height: 32px; padding: 0; border: 0; border-radius: 999px; background: #D8D0BA; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--berenjena); }
.switch input:checked::after { transform: translateX(20px); background: var(--lima); }
.switch input:focus { box-shadow: 0 0 0 3px #DCEBC4; }
.lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
/* Línea de receta: arriba el insumo, abajo cantidad y unidad */
.line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px; grid-template-areas: "ins ins x" "cant uni x"; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--linea); border-radius: 14px; background: var(--fondo); }
.line [name=ins] { grid-area: ins; }
.line [name=cant] { grid-area: cant; }
.line [name=uni] { grid-area: uni; }
.line .x { grid-area: x; }
@media (min-width: 560px) { .line { grid-template-columns: minmax(0, 1fr) 90px 84px 44px; grid-template-areas: "ins cant uni x"; } }
.line input, .line select { min-height: 46px; padding: 8px 10px; }
.line select { padding-right: 30px; background-position: right 10px center; }
.line .x { width: 44px; height: 44px; border: 0; background: var(--tomate-suave); color: #B23218; border-radius: 50%; cursor: pointer; font-weight: 700; font-size: 1rem; }
.preview { background: var(--fondo); border-radius: var(--r-m); padding: 12px 14px; margin: 6px 0 14px; }
.preview .tot { display: flex; justify-content: space-between; font-weight: 700; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--linea); }
.kv:last-child { border-bottom: 0; }
.kv.strong { font-weight: 700; }

/* Elegir fecha con un toque */
.dates { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 8px; padding-bottom: 2px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.dates button { flex: none; min-height: 52px; padding: 6px 14px; border-radius: 14px; border: 1.5px solid var(--linea); background: var(--papel); cursor: pointer; text-align: left; line-height: 1.15; }
.dates button b { display: block; font-size: .95rem; }
.dates button span { font-size: .8rem; color: var(--tinta-2); }
.dates button[aria-pressed="true"] { background: var(--berenjena); border-color: var(--berenjena); color: var(--lima); }
.dates button[aria-pressed="true"] span { color: rgba(194,234,77,.8); }

/* Elegir productos del pedido */
.pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pick-it { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 10px 10px 14px; border: 1.5px solid var(--linea); border-radius: 16px; background: var(--papel); }
.pick-it.on { border-color: var(--berenjena); background: #F4F8E6; }
.pick-n b { display: block; font-size: 1rem; line-height: 1.25; }
.pick-n span { font-size: .84rem; color: var(--tinta-2); }
.pick-n .warn { color: #8A5208; font-weight: 700; }
.pick-pr { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--tinta-2); }
.pick-pr input { width: 120px; min-height: 40px; padding: 6px 10px; }
.step { display: flex; align-items: center; gap: 2px; background: var(--fondo); border-radius: 999px; padding: 3px; }
.step button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--papel); font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer; color: var(--berenjena); box-shadow: 0 1px 2px rgba(29,58,38,.18); }
.step button.plus { background: var(--berenjena); color: var(--lima); }
.step button:active { transform: scale(.92); }
.step input { width: 46px; min-height: 40px; height: 40px; padding: 0; text-align: center; border: 0; background: transparent; font-weight: 700; font-size: 1.1rem; box-shadow: none; }
.step input:focus { box-shadow: none; }

/* ---------- Hoja inferior ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(17,34,26,.5); animation: velo .2s ease-out; }
@keyframes velo { from { opacity: 0; } }
.sheet-panel {
  position: relative; width: 100%; max-width: 640px;
  max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px)); max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column;
  background: var(--papel); border-radius: var(--r-l) var(--r-l) 0 0;
  animation: sube .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes sube { from { transform: translateY(60px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-grab { position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; background: #D8D0BA; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 8px 10px 18px; border-bottom: 1px solid var(--linea); flex: none; }
.sheet-head h2 { margin: 0; font: 700 1.3rem/1.2 var(--serif); color: var(--berenjena); min-width: 0; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px calc(22px + var(--safe-b)); flex: 1 1 auto; }
.sheet-body.con-pie { padding-bottom: 18px; }
.sheet-foot { flex: none; padding: 10px 14px calc(10px + var(--safe-b)); border-top: 1px solid var(--linea); background: var(--papel); display: flex; flex-direction: column; gap: 8px; }
.sheet-foot .btns { margin: 0; }
.sheet-foot .btns .btn { flex: 1 1 0; }
.foot-tot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px; font-weight: 700; }
.foot-tot b { font: 700 1.35rem/1 var(--serif); color: var(--berenjena); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-panel { border-radius: var(--r-l); max-height: 88vh; } .sheet-grab { display: none; } .sheet-foot { border-radius: 0 0 var(--r-l) var(--r-l); } }

/* Detalle de un pedido */
.ped-head { display: grid; gap: 4px; margin-bottom: 12px; }
.ped-head b { font-size: 1.15rem; }
.ped-head a { font-weight: 700; color: var(--berenjena-2); }

/* ---------- Vacío ---------- */
.vacio { text-align: center; padding: 34px 16px; background: var(--papel); border: 1.5px dashed #D3CAB2; border-radius: var(--r-l); }
.vacio p { max-width: 36ch; margin: 0 auto 14px; color: var(--tinta-2); }
.vacio h3 { margin-top: 0; }

/* ---------- Gráfico semanal ---------- */
.chart { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 14px; }
.chart svg { width: 100%; height: auto; display: block; }

/* ---------- Promos ---------- */
.promo { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 16px; margin-bottom: 10px; }
.promo-tipo { font-size: .84rem; font-weight: 700; color: var(--berenjena-2); }
.promo h4 { font: 700 1.2rem/1.25 var(--serif); margin: 4px 0 6px; color: var(--berenjena); }
.promo .btns .btn:first-child { flex: 1 1 100%; }
.promo .btns .btn { flex: 1 1 0; }
.precios { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; }
.precios s { color: var(--tinta-2); }
.precios b { font: 700 1.5rem/1 var(--serif); color: var(--hoja); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 84px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--berenjena); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; text-align: center; width: max-content;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); box-shadow: 0 8px 22px -8px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.editando .toast { bottom: calc(var(--safe-b) + 90px); }
.right { text-align: right; }
hr { border: 0; border-top: 1px solid var(--linea); margin: 18px 0; }

/* ---------- Ajustes ---------- */
.card { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r-l); padding: 18px 16px 6px; margin-bottom: 14px; }
.card h2.sec { font-size: 1.35rem; margin-top: 0; }

/* ---------- Redes: secciones ---------- */
.seg.sub { margin-bottom: 18px; }

/* El editor de flyers ocupa toda la pantalla: se ocultan encabezado y pestañas */
body.editando { padding-bottom: 0; overflow: hidden; }
body.editando .top, body.editando .tabs { visibility: hidden; }
.line.gasto { grid-template-columns: minmax(0, 1fr) 118px 44px; grid-template-areas: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.guardar-fijo { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 5; margin-bottom: 18px; box-shadow: 0 8px 20px -8px rgba(29,58,38,.5); }
/* En pantallas angostas, la cantidad va abajo del nombre del filtro */
.seg.fill button { flex-direction: column; gap: 3px; min-height: 52px; }
.seg.fill .n { line-height: 1.5; }
.seg.fill button, .seg.fill a { white-space: nowrap; font-size: clamp(.78rem, 3.5vw, .92rem); }
