/* Vielora Atelier · mundo: el taller de resina de la compradora. Crema, vino, rosa de orquídea y dorado (del logo).
   Títulos en Cormorant Garamond (con itálica para el acento), interfaz en DM Sans.
   Molde: app.css de Agenda Semana Llena (mismas clases base: .vista, .btn, .hoja, .toast, .tabbar, .candado-mini, .bloque). */
:root {
  --tinta: #3A2230;
  --tinta-2: #6B4B5A;
  --tinta-3: #8A6F7B;
  --vino: #7A1F33;
  --vino-2: #5E1627;
  --noche: #3E1522;
  --rosa: #D9A3B8;
  --blush: #F6E3EA;
  --blush-2: #FBF0F3;
  --crema: #FBF3EA;
  --papel: #FFFFFF;
  --dorado: #B98B4E;
  --dorado-t: #8A6530;
  --dorado-s: #F5EAD6;
  --verde: #6F9A7A;
  --verde-t: #3E6B4A;
  --verde-s: #E6F0E8;
  --coral: #D9644E;
  --coral-t: #A8412D;
  --coral-s: #FBE4DE;
  --linea: #EEDCE0;
  --linea-2: #E3C9D0;

  --f-d: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-s: 10px; --r: 16px; --r-l: 22px; --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(62, 21, 34, .05), 0 4px 14px rgba(62, 21, 34, .06);
  --sh-2: 0 2px 6px rgba(62, 21, 34, .08), 0 14px 34px rgba(62, 21, 34, .12);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-hoja: cubic-bezier(.32, .72, 0, 1);
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; background: var(--crema); }
body { margin: 0; min-height: 100dvh; background: var(--crema); color: var(--tinta); font: 400 15px/1.5 var(--f); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body.con-hoja { overflow: hidden; }
::selection { background: var(--blush); color: var(--vino-2); }
input, select, textarea, button { font: inherit; color: inherit; caret-color: var(--vino); }
input, select, textarea { font-size: 16px; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button, a, [role="button"], label.btn { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--vino); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--f-d); font-weight: 600; text-wrap: balance; letter-spacing: 0; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--vino); }
h1 { font-size: 34px; line-height: 1.05; }
h2 { font-size: 25px; line-height: 1.15; }
h3 { font: 600 16px/1.3 var(--f); }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 17px; height: 17px; }
.lead { color: var(--tinta-2); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.nota { color: var(--tinta-2); font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.nota.centro { text-align: center; margin-top: 12px; }
.centro { text-align: center; }

/* ---------- app, vistas y cabecera ---------- */
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; }
.vista { padding: calc(var(--sa-t) + 8px) 16px 0; animation: vista-entra 240ms var(--ease); }
@keyframes vista-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vista { overflow-x: clip; }
.pie-espacio { height: calc(var(--tab-h) + var(--sa-b) + 92px); }
.cab { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; }
.cab-t { flex: 1; min-width: 0; }
.cab h1 { font-size: 34px; }
.cab-t p { color: var(--tinta-2); font-size: 14px; margin-top: 2px; }
.btn-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--tinta); flex: none; transition: transform 120ms var(--ease), background 160ms; }
.btn-ic:active { transform: scale(.94); background: var(--blush); }
.btn-ic.on { color: var(--vino); background: var(--blush); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; background: var(--vino); color: #FFF6F0; font-weight: 600; font-size: 15px; transition: transform 120ms var(--ease), background 160ms, box-shadow 160ms; box-shadow: 0 1px 1px rgba(62, 21, 34, .12), 0 6px 16px rgba(122, 31, 51, .22); flex: 1; white-space: nowrap; }
.btn:active { transform: scale(.97); background: var(--vino-2); }
.btn.grande { width: 100%; min-height: 54px; font-size: 16px; border-radius: 16px; margin-top: 10px; }
.btn.suave { background: var(--blush); color: var(--vino); box-shadow: none; }
.btn.suave:active { background: #EFD3DD; }
.btn.linea { background: transparent; color: var(--vino); box-shadow: inset 0 0 0 1.5px var(--linea-2); }
.btn.dorado { background: var(--dorado); color: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .15), 0 8px 20px rgba(185, 139, 78, .28); }
.btn.dorado:active { background: #A67A40; }
.btn.verde { background: var(--verde-t); box-shadow: none; }
.btn.peligro { background: var(--coral-t); box-shadow: none; }
.btn.chico { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; flex: none; }
.btn[disabled], .btn.apagado { opacity: .55; pointer-events: none; }
.btn small { font-weight: 500; opacity: .85; }
.link { color: var(--vino); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.link:active { opacity: .6; }
.link.rojo { color: var(--coral-t); }
.fila-btn { display: flex; gap: 10px; margin-top: 12px; }
.fila-btn .btn { margin-top: 0; }

/* ---------- chips y tarjetas ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--blush); color: var(--vino); white-space: nowrap; }
.chip.verde { background: var(--verde-s); color: var(--verde-t); }
.chip.dorado { background: var(--dorado-s); color: var(--dorado-t); }
.chip.coral { background: var(--coral-s); color: var(--coral-t); }
.chip.candado { background: var(--noche); color: var(--dorado); }
.chip .ic { width: 14px; height: 14px; }
.bloque { margin-top: 26px; }
.bloque > h2 { margin-bottom: 10px; }
.bloque > .nota { margin-bottom: 12px; }
.bloque-t { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bloque-t h2 { flex: 1; }
.tarjeta { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border-radius: var(--r-l); background: var(--papel); box-shadow: var(--sh-1); transition: transform 140ms var(--ease); width: 100%; }
.tarjeta:active { transform: scale(.985); }
.tarjeta > div { flex: 1; min-width: 0; }
.tarjeta img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.tarjeta h3 { font-size: 16px; }
.tarjeta p { font-size: 13px; color: var(--tinta-2); margin-top: 2px; }
.tarjeta.vino { background: var(--vino); color: #FFF6F0; box-shadow: var(--sh-2); }
.tarjeta.vino p { color: rgba(255, 246, 240, .8); }
.tarjeta.vino .ic { color: var(--rosa); }
.vacio { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--blush-2); }
.vacio img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; }
.vacio p { font-size: 14px; color: var(--tinta-2); }
.vacio b { color: var(--tinta); }
.vacio.chico { padding: 14px 16px; }
.aviso { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--dorado-s); color: var(--dorado-t); font-size: 13px; font-weight: 500; margin-top: 12px; }
.aviso .ic { margin-top: 1px; }
.aviso.bien { background: var(--verde-s); color: var(--verde-t); }
.aviso.ojo { background: var(--coral-s); color: var(--coral-t); }
.aviso-mem { display: flex; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--coral-s); color: var(--coral-t); font-size: 13px; font-weight: 600; margin-top: 10px; }
.en-camino { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--blush-2); color: var(--tinta-2); font-size: 13px; margin-top: 12px; box-shadow: inset 0 0 0 1px var(--linea); }
.en-camino .ic { color: var(--dorado-t); }
.incluidos { display: flex; flex-direction: column; gap: 8px; }
.inc { display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 10px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sh-1); width: 100%; }
.inc img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; flex: none; }
.inc span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.inc b { font-weight: 600; }
.inc small { font-size: 12px; color: var(--tinta-2); line-height: 1.35; }
.inc.hecha { box-shadow: inset 0 0 0 1.5px var(--verde); }
.inc .tilde { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--blush-2); color: var(--tinta-3); }
.inc.hecha .tilde { background: var(--verde-s); color: var(--verde-t); }

/* ---------- inicio ---------- */
.vista[data-ruta="inicio"] { padding-top: 0; }
.cabecera-inicio { position: relative; padding: calc(var(--sa-t) + 18px) 0 6px; display: flex; align-items: center; gap: 12px; }
.cabecera-inicio img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.cabecera-inicio .marca { margin: 0; }
.cabecera-inicio h1 { font-size: 30px; }
.cabecera-inicio .btn-ic { margin-left: auto; }
.saludo { margin-top: 10px; }
.progresos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.prog { padding: 14px; border-radius: var(--r-l); background: var(--papel); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 6px; }
.prog small { font-size: 12px; color: var(--tinta-2); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.prog b { font: 600 28px/1 var(--f-d); color: var(--vino); }
.prog b i { font-style: normal; font-size: 16px; color: var(--tinta-3); }
.barra { height: 6px; border-radius: 3px; background: var(--blush); overflow: hidden; }
.barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--rosa), var(--vino)); border-radius: 3px; transition: width 400ms var(--ease); }
.accesos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.acceso { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sh-1); font-size: 12px; font-weight: 600; text-align: center; color: var(--tinta-2); transition: transform 140ms var(--ease); }
.acceso:active { transform: scale(.96); }
.acceso .ic { width: 26px; height: 26px; color: var(--vino); }

/* ---------- listas de flores y joyas ---------- */
.grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.ficha { position: relative; display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--papel); box-shadow: var(--sh-1); overflow: hidden; transition: transform 140ms var(--ease); }
.ficha:active { transform: scale(.975); }
.ficha img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ficha > span { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.ficha b { font-weight: 600; font-size: 14px; }
.ficha small { font-size: 12px; color: var(--tinta-2); }
.ficha .tilde { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--tinta-3); box-shadow: var(--sh-1); }
.ficha.hecha .tilde { background: var(--verde-t); color: #fff; }
.ficha .num { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(62, 21, 34, .55); color: #FFF6F0; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }

/* ---------- detalle (flor, joya, bono, módulo) ---------- */
.vista[data-ruta="flor"], .vista[data-ruta="joya"], .vista[data-ruta="bono"], .vista[data-ruta="modulo"] { padding-top: 0; }
.hero { position: relative; margin: 0 -16px; height: 42svh; min-height: 240px; max-height: 360px; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--blush-2); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .btn-ic { position: absolute; top: calc(var(--sa-t) + 10px); left: 12px; color: #FFF6F0; background: rgba(62, 21, 34, .32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero .btn-ic.der { left: auto; right: 12px; }
.hero .chips { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.hero .chips .chip { background: rgba(255, 255, 255, .92); }
.det-t { padding: 18px 0 0; }
.det-t h1 { font-size: 36px; }
.det-t .lead { margin-top: 6px; }
.bq-h { margin-top: 22px; margin-bottom: 8px; }
.bq-p { color: var(--tinta); font-size: 15px; line-height: 1.55; margin-top: 10px; text-wrap: pretty; }
.bq-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bq-lista li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.bq-lista .ic { color: var(--verde-t); margin-top: 1px; }
.bq-foto { margin: 14px 0 0; }
.bq-foto img { border-radius: var(--r); width: 100%; }
.bq-foto figcaption { font-size: 12px; color: var(--tinta-3); margin-top: 6px; }
.bq-tabla { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; background: var(--papel); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-1); }
.bq-tabla th, .bq-tabla td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.bq-tabla th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-2); background: var(--blush-2); }
.bq-tabla tr:last-child td { border-bottom: 0; }
.pasos { counter-reset: p; display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pasos li { counter-increment: p; display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; }
.pasos li::before { content: counter(p); grid-row: span 4; width: 28px; height: 28px; border-radius: 50%; background: var(--vino); color: #FFF6F0; display: grid; place-items: center; font: 600 15px/1 var(--f-d); }
.pasos b { font-weight: 600; }
.pasos span { font-size: 14px; color: var(--tinta-2); line-height: 1.45; }
.pasos .paso-foto { border-radius: 12px; margin-top: 6px; }
.pasos .btn-timer { margin-top: 6px; justify-self: start; }
.btn-timer { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px; background: var(--dorado-s); color: var(--dorado-t); font-weight: 700; font-size: 13px; }
.btn-timer:active { background: #EBDCBF; }
.btn-timer .ic { width: 16px; height: 16px; }
.btn-timer.activo { background: var(--vino); color: #FFF6F0; }
.materiales { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.materiales li { padding: 6px 11px; border-radius: 999px; background: var(--papel); box-shadow: inset 0 0 0 1px var(--linea-2); font-size: 13px; }
.practica { margin-top: 18px; padding: 14px; border-radius: var(--r-l); background: var(--blush-2); box-shadow: inset 0 0 0 1px var(--linea); }
.practica h2 { font-size: 22px; }
.practica > p { margin-top: 4px; }
.tilde-fila { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sh-1); width: 100%; text-align: left; }
.tilde-fila .tilde { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blush-2); color: var(--tinta-3); flex: none; }
.tilde-fila.on .tilde { background: var(--verde-t); color: #fff; }
.tilde-fila b { flex: 1; font-weight: 600; }
.tilde-fila small { color: var(--tinta-3); font-size: 12px; }
textarea.in { min-height: 90px; resize: vertical; line-height: 1.45; }
.nav-det { display: flex; gap: 10px; margin-top: 18px; }
.nav-det a { flex: 1; display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sh-1); font-size: 13px; font-weight: 600; color: var(--tinta-2); min-width: 0; }
.nav-det a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-det a.der { justify-content: flex-end; text-align: right; }

/* ---------- temporizador ---------- */
.timer-pill { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--sa-b) + 12px); width: calc(100% - 32px); max-width: 440px; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--noche); color: #FFF6F0; box-shadow: var(--sh-2); }
.timer-pill[hidden] { display: none; }
.timer-pill .tp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.timer-pill .tp-t b { font: 600 24px/1 var(--f-d); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer-pill .tp-t small { font-size: 12px; color: rgba(255, 246, 240, .75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-pill .btn-ic { color: #FFF6F0; width: 40px; height: 40px; }
.timer-pill .btn-ic:active { background: rgba(255, 255, 255, .14); }
.timer-pill.listo { background: var(--verde-t); }
.timer-grande { margin-top: 16px; padding: 18px; border-radius: var(--r-l); background: var(--noche); color: #FFF6F0; text-align: center; }
.timer-grande b { display: block; font: 600 54px/1 var(--f-d); font-variant-numeric: tabular-nums; }
.timer-grande small { display: block; margin-top: 4px; color: rgba(255, 246, 240, .75); }
.timer-grande .fila-btn { justify-content: center; }
.timer-grande .btn { flex: none; min-width: 120px; }

/* ---------- doctor ---------- */
.buscar { position: relative; margin-top: 4px; }
.buscar .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tinta-3); }
.buscar .in { padding-left: 42px; }
.sintomas { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sintoma { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-l); background: var(--papel); box-shadow: var(--sh-1); width: 100%; text-align: left; transition: transform 140ms var(--ease); }
.sintoma:active { transform: scale(.985); }
.sintoma .dc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--coral-s); color: var(--coral-t); flex: none; }
.sintoma > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sintoma b { font-weight: 600; }
.sintoma small { font-size: 12px; color: var(--tinta-2); }
.dc-sec { margin-top: 16px; }
.dc-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-2); margin-bottom: 6px; }

/* ---------- calculadora ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.form label small { font-weight: 400; color: var(--tinta-3); }
.in { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 0; background: var(--papel); box-shadow: inset 0 0 0 1px var(--linea-2); color: var(--tinta); outline: none; transition: box-shadow 160ms; -webkit-appearance: none; appearance: none; }
.in:focus { box-shadow: inset 0 0 0 1.5px var(--vino), 0 0 0 4px rgba(122, 31, 51, .1); }
.in::placeholder { color: var(--tinta-3); }
select.in { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B4B5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
.in-pre { position: relative; display: flex; align-items: center; background: var(--papel); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--linea-2); padding: 0 12px; gap: 4px; }
.in-pre:focus-within { box-shadow: inset 0 0 0 1.5px var(--vino); }
.in-pre i { font-style: normal; font-weight: 600; color: var(--tinta-3); flex: none; }
.in-pre .in { box-shadow: none !important; padding: 10px 0; background: transparent; min-width: 0; font-variant-numeric: tabular-nums; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-2 label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.form h3 { margin-top: 8px; }
.resultado { margin-top: 16px; padding: 16px; border-radius: var(--r-l); background: var(--vino); color: #FFF6F0; box-shadow: var(--sh-2); }
.resultado small { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 246, 240, .75); font-weight: 600; }
.resultado b { display: block; font: 600 40px/1.05 var(--f-d); margin-top: 4px; }
.resultado ul { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.resultado li { display: flex; justify-content: space-between; gap: 10px; }
.resultado li em { font-style: normal; font-variant-numeric: tabular-nums; }
.resultado li.g { color: var(--rosa); font-weight: 700; border-top: 1px solid rgba(255, 246, 240, .2); padding-top: 6px; margin-top: 4px; }
.piezas { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pieza { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sh-1); }
.pieza > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pieza b { font-weight: 600; }
.pieza small { font-size: 12px; color: var(--tinta-2); }
.pieza .btn-ic { width: 36px; height: 36px; color: var(--tinta-3); }

/* ---------- etiquetas ---------- */
.etiq-prev { margin-top: 14px; border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sh-2); background: var(--papel); }
.etiq-prev canvas { width: 100%; height: auto; display: block; }
.hoja-etiq { background: #fff; color: #3A2230; padding: 10mm; }
.hoja-etiq .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
.hoja-etiq .grid img { width: 100%; border: 1px dashed #c9b8bf; }
.hoja-etiq .ayuda { font-size: 13px; color: var(--tinta-2); margin: 10px 0 14px; }
@media print {
  body { background: #fff; }
  .tabbar, .timer-pill, .toast, .hoja, .fondo, .no-imprimir, .cab { display: none !important; }
  #app { max-width: none; }
  .vista { padding: 0; animation: none; }
  .hoja-etiq { padding: 0; }
  .hoja-etiq .grid { gap: 4mm; }
}

/* ---------- tienda y candados ---------- */
.sello-lock { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--noche); color: var(--dorado); font-size: 13px; font-weight: 700; }
.candado-mini { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--noche); color: #FFF6F0; transition: transform 140ms var(--ease); text-align: left; }
.candado-mini:active { transform: scale(.985); }
.candado-mini .cm-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 246, 240, .1); color: var(--dorado); flex: none; }
.candado-mini > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.candado-mini b { font-weight: 600; font-size: 14px; }
.candado-mini small { font-size: 12px; color: rgba(255, 246, 240, .74); line-height: 1.35; }
.candado-mini em { font-style: normal; font-weight: 700; color: var(--dorado); font-size: 13px; white-space: nowrap; }
.candado-mini.abierto { background: var(--papel); color: var(--tinta); box-shadow: var(--sh-1); }
.candado-mini.abierto .cm-ic { background: var(--verde-s); color: var(--verde-t); }
.candado-mini.abierto small { color: var(--tinta-2); }
.candado-mini.abierto em { color: var(--verde-t); }
.hoja-img { position: relative; height: 190px; border-radius: var(--r-l); overflow: hidden; background: var(--blush-2); }
.hoja-img img { width: 100%; height: 100%; object-fit: cover; }
.incluye { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 6px; }
.incluye li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.incluye .ic { color: var(--verde-t); margin-top: 1px; }
.candado-pasos { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.candado-pasos p { display: flex; gap: 8px; font-size: 13px; color: var(--tinta-2); }
.candado-pasos .ic { color: var(--verde-t); flex: none; margin-top: 2px; }
.hoja-c .btn.linea { width: 100%; margin-top: 10px; }

/* ---------- ajustes ---------- */
.aj-sec { margin-top: 14px; padding: 0 14px; border-radius: var(--r-l); background: var(--papel); box-shadow: var(--sh-1); }
.aj-sec summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; }
.aj-sec summary::-webkit-details-marker { display: none; }
.aj-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blush); color: var(--vino); flex: none; }
.aj-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.aj-t b { font-weight: 600; }
.aj-t small { font-size: 12px; color: var(--tinta-2); }
.aj-sec > summary > .ic:last-child { color: var(--tinta-3); transition: transform 200ms var(--ease); }
.aj-sec[open] > summary > .ic:last-child { transform: rotate(90deg); }
.aj-sec > :not(summary) { margin-bottom: 14px; }
.aj-sec .form { margin-top: 2px; }
.nube-est { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--verde-t); margin-top: 8px; }
.nube-est.pend { color: var(--dorado-t); }
.zona-peligro { margin-top: 18px; }
.zona-peligro summary { color: var(--tinta-3); font-size: 13px; cursor: pointer; }
.archivo input { display: none; }

/* ---------- entrada ---------- */
.ob { padding: 0 0 calc(40px + var(--sa-b)); min-height: 100dvh; }
.ob0 { padding: 0; display: flex; flex-direction: column; }
.ob0-img { height: 46svh; min-height: 280px; max-height: 440px; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl); background: #FBF3EA; display: grid; place-items: center; }
.ob0-img img { width: 70%; max-width: 320px; height: auto; object-fit: contain; }
.ob0-t { padding: 22px 22px calc(24px + var(--sa-b)); }
.marca { font-size: 12px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--dorado-t); margin-bottom: 10px; }
.ob0 h1 { font-size: 44px; line-height: 1; }
.ob0 .lead { margin: 12px 0 10px; }
.ob0 .nota { margin-top: 10px; }
.ob-err { color: var(--coral-t); font-size: 14px; font-weight: 600; min-height: 20px; margin-top: 10px; }
.cargando { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--blush); border-top-color: var(--vino); animation: girar 800ms linear infinite; margin: 16px auto; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 20; display: grid; grid-template-columns: repeat(var(--ntabs, 5), 1fr); padding: 6px 4px calc(6px + var(--sa-b)); background: rgba(251, 243, 234, .92); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-top: 1px solid var(--linea); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; color: var(--tinta-3); font-size: 11px; font-weight: 600; letter-spacing: .01em; transition: color 160ms; }
.tab .ic { width: 24px; height: 24px; padding: 2px; box-sizing: content-box; border-radius: 12px; transition: background 200ms var(--ease), transform 160ms var(--ease); }
.tab.on { color: var(--vino); }
.tab.on .ic { background: var(--blush); width: 40px; }
.tab:active .ic { transform: scale(.9); }

/* ---------- hoja (bottom sheet) y toast ---------- */
.fondo { position: fixed; inset: 0; z-index: 40; background: rgba(62, 21, 34, .42); opacity: 0; transition: opacity 240ms var(--ease); }
.fondo.on { opacity: 1; }
.hoja { position: fixed; z-index: 41; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 90dvh; display: flex; flex-direction: column; background: var(--crema); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -10px 40px rgba(62, 21, 34, .2); transform: translate(-50%, 104%); transition: transform 300ms var(--ease-hoja); visibility: hidden; }
.hoja.abierta { transform: translate(-50%, 0); visibility: visible; }
.hoja.alta { height: 90dvh; }
.hoja-asa { width: 40px; height: 5px; border-radius: 3px; background: var(--linea-2); margin: 8px auto 0; flex: none; }
.hoja-cab { display: flex; align-items: center; gap: 8px; padding: 6px 10px 4px 20px; flex: none; }
.hoja-titulo { flex: 1; font-size: 24px; }
.hoja-c { overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px calc(24px + var(--sa-b)); flex: 1; }
.hoja-c > h2 { margin-top: 14px; }
.hoja-c > .lead { margin-top: 6px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + var(--sa-b) + 12px); transform: translate(-50%, 16px); width: calc(100% - 32px); max-width: 440px; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--tinta); color: #FFF6F0; font-size: 14px; font-weight: 500; box-shadow: var(--sh-2); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), transform 260ms var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast > span { flex: 1; min-width: 0; }
.toast-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: rgba(255, 246, 240, .8); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.06); }
  .tarjeta:hover, .inc:hover, .ficha:hover, .sintoma:hover { background-color: #FFFCFA; }
  .tab:hover { color: var(--vino); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .vista { transform: none; animation: none; }
}
@media (min-width: 700px) {
  .grilla { grid-template-columns: 1fr 1fr 1fr; }
}
