/* V&J Tiendas — panel v2. Diseño de app móvil (modo «Operar»): tamaños de teléfono, barra inferior, cabecera oscura legible.
   Marca V&J: tinta y papel. Movimiento: entradas cortas con ease-out, solo transform/opacity, todo apagado con prefers-reduced-motion. */
:root {
	--bg: #f4f3ef; --card: #fff; --ink: #0a0a0a; --mute: #67646b; --line: #e6e3dc; --acc: #0a0a0a; --acc-ink: #fff;
	--warn: #8a5200; --warn-bg: #fff1d6; --bad: #b3261e; --ok: #1d6b3a;
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); --r: 16px;
	--sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
	--tabbar: 64px;
	font: 400 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	color-scheme: light;
	-webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: clip; overflow-wrap: anywhere; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid #2f6fdf; outline-offset: 2px; }
[hidden] { display: none !important; }
/* «Sitio de escritorio» de Chrome Android: el script de la cabecera calcula --zf (ancho de diseño / ancho real de pantalla) */
html.zoomfix body { zoom: var(--zf); }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
h2 { font-size: 1.2rem; line-height: 1.25; margin-bottom: 1rem; text-wrap: balance; }
.muted { color: var(--mute); font-size: 0.92rem; }
small { display: block; color: var(--mute); font-size: 0.85rem; margin-top: 0.35rem; line-height: 1.4; }
code { background: #efede8; padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.85em; }

/* Entradas (un solo vocabulario: subir 12–14 px y aparecer) */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { opacity: 0; transform: translateY(28px); } }

/* Botones, controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 52px; padding: 0.7rem 1.4rem; border-radius: 999px; border: 1px solid var(--acc); background: var(--acc); color: var(--acc-ink); font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease, opacity 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn--ghost { background: transparent; color: var(--ink); border-color: #cfcbc2; }
.icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; font-size: 1.5rem; line-height: 1; transition: transform 160ms var(--ease-out); }
.icon:active { transform: scale(0.92); }
.icon:disabled { opacity: 0.35; cursor: default; }
.icon svg { width: 20px; height: 20px; }
.link { background: none; border: 0; padding: 0.5rem 0; min-height: 48px; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.danger { color: var(--bad); }
input, select, textarea { width: 100%; min-height: 52px; padding: 0.7rem 0.9rem; border: 1px solid #d6d2c9; border-radius: 12px; background: #fff; font: inherit; color: var(--ink); caret-color: var(--ink); transition: border-color 200ms ease, box-shadow 200ms ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.12); }
textarea { resize: vertical; line-height: 1.45; }
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 1rem; }
label > input, label > select, label > textarea { margin-top: 0.4rem; font-weight: 400; }

/* Cabecera: oscura, una línea, nunca desborda */
.top { position: sticky; top: 0; z-index: 20; background: #0a0a0a; color: #fff; padding-top: var(--sat); }
.top-in { display: flex; align-items: center; gap: 0.75rem; min-height: 60px; padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left)); max-width: 960px; margin: 0 auto; }
.shop { flex: 1; min-width: 0; font-family: inherit; font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-btn { flex: none; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 0.95rem; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; color: #fff; text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.top-btn:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.12); }
.top-btn svg { width: 19px; height: 19px; }
.offline { margin: 0; padding: 0.65rem 1rem; background: var(--warn-bg); color: #5c3600; font-size: 0.92rem; text-align: center; }

/* Estructura */
main { max-width: 960px; margin: 0 auto; padding: 1rem max(1rem, env(safe-area-inset-right)) calc(var(--tabbar) + var(--sab) + 6.5rem) max(1rem, env(safe-area-inset-left)); }
[role=tabpanel]:not([hidden]) { animation: rise 280ms var(--ease-out); }
.bar { margin-bottom: 0.9rem; }

/* Barra inferior (como una app): iconos grandes y nombre */
.tabbar { display: none; }
.in-app .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--tabbar) + var(--sab)); padding-bottom: var(--sab); background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; border: 0; background: none; color: var(--mute); font-family: inherit; font-weight: 600; font-size: 0.78rem; line-height: 1; cursor: pointer; transition: color 200ms ease, transform 160ms var(--ease-out); }
.tabbar button:active { transform: scale(0.94); }
.tabbar svg { width: 26px; height: 26px; transition: transform 300ms var(--ease-out); }
.tabbar button[aria-selected="true"] { color: var(--ink); }
.tabbar button[aria-selected="true"] svg { transform: translateY(-1px) scale(1.06); }
.tabbar button[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ink); animation: fade 250ms ease; }
.tabbar b { position: absolute; top: 7px; left: calc(50% + 8px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #b8142c; color: #fff; font-family: inherit; font-weight: 700; font-size: 0.72rem; line-height: 20px; text-align: center; }
.fab { display: none; }
.in-app .fab { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(var(--tabbar) + var(--sab) + 1rem); z-index: 25; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 56px; padding: 0 1.3rem 0 1.05rem; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1; box-shadow: 0 10px 26px rgba(10, 10, 10, 0.32); cursor: pointer; animation: rise 400ms var(--ease-out) 250ms both; transition: transform 160ms var(--ease-out); }
.in-app .fab:active { transform: scale(0.96); }
.fab svg { width: 22px; height: 22px; }

/* Productos */
.list, .orders, .cats, .ph-list { list-style: none; }
.list { display: grid; gap: 0.7rem; }
.item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; width: 100%; padding: 0.75rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform 160ms var(--ease-out), border-color 200ms ease; }
.item:active { transform: scale(0.985); }
.thumb { width: 72px; height: 90px; border-radius: 10px; background: #eceae4; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-t { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.item-t strong { font-size: 1.05rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-t .muted { font-size: 0.9rem; }
.item-s { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.price { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tag { font-size: 0.78rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; background: #eceae4; }
.tag--warn { background: var(--warn-bg); color: var(--warn); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--mute); }
.list.enter > li, .orders.enter > li { animation: rise 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }

/* Tarjetas, ajustes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem; margin-bottom: 1rem; }
.form { max-width: 560px; }
.form .btn, .account .btn { width: 100%; }
.acct-email { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.4rem; }
.acct-actions { display: grid; gap: 0.6rem; margin-top: 1rem; }
.cats li { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.6rem; }
.inline { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.inline .btn { flex: none; padding-inline: 1.1rem; }

/* Pedidos */
.chips { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 0.9rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; min-height: 46px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid #d6d2c9; background: #fff; font-family: inherit; font-weight: 500; font-size: 0.95rem; line-height: 1.2; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.chip-btn:active { transform: scale(0.96); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.orders { display: grid; gap: 0.7rem; }
.order p { margin: 0.45rem 0; }
.o-head { display: flex; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; align-items: baseline; }
.o-head strong { font-size: 1.1rem; }
.o-items { margin: 0.6rem 0; padding-left: 1.15rem; }
.o-items li { margin-bottom: 0.25rem; }
.o-foot { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 0.8rem; }
.o-foot select { width: auto; flex: 1; min-width: 160px; }
.o-foot .btn { width: 100%; }

/* Editor de producto: hoja a pantalla completa en el teléfono */
.editor { border: 0; padding: 0; width: min(100%, 640px); max-height: min(94svh, 900px); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28); background: #fff; color: var(--ink); }
.editor::backdrop { background: rgba(10, 10, 10, 0.5); }
.editor[open] { animation: sheet 340ms var(--ease-drawer); }
.editor[open]::backdrop { animation: fade 300ms ease; }
.editor form { display: flex; flex-direction: column; max-height: inherit; height: 100%; }
.ed-head, .ed-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); }
.ed-head { padding-top: calc(0.8rem + var(--sat)); }
.ed-head h2 { margin: 0; }
.ed-foot { border-bottom: 0; border-top: 1px solid var(--line); padding-bottom: calc(0.8rem + var(--sab)); }
.ed-foot .btn { min-width: 140px; }
.ed-body { overflow-y: auto; padding: 1.1rem; flex: 1; overscroll-behavior: contain; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.opt-preview p { margin: -0.4rem 0 0.9rem; font-size: 0.92rem; }
.chip { display: inline-block; margin: 0.15rem 0.25rem 0.15rem 0; padding: 0.2rem 0.65rem; border-radius: 999px; background: #efede8; }
.toggles { display: flex; flex-wrap: wrap; gap: 0.2rem 1.6rem; margin-bottom: 1rem; }
.switch { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; margin: 0; font-weight: 400; cursor: pointer; }
.switch input { width: 24px; min-height: 0; height: 24px; accent-color: var(--ink); margin: 0; flex: none; }
.photos { border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem; margin: 0; min-width: 0; }
.photos legend { font-weight: 600; font-size: 0.95rem; padding: 0 0.3rem; }
.ph-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; margin-bottom: 0.9rem; }
.ph-list li { position: relative; display: grid; gap: 0.45rem; min-width: 0; }
.ph-list img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: #eceae4; display: block; }
.ph-list .main { position: absolute; top: 0.45rem; left: 0.45rem; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; }
.ph-tools { display: flex; gap: 0.4rem; justify-content: center; }
.ph-list input { min-height: 44px; font-size: 0.9rem; }
.upload { cursor: pointer; width: 100%; }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--sab) + 5.2rem); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 0.85rem 1.2rem; border-radius: 999px; font-size: 0.95rem; transition: opacity 200ms ease, transform 300ms var(--ease-out); max-width: calc(100% - 2rem); width: max-content; text-align: center; z-index: 100; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
body:not(.in-app) .toast { bottom: 1.5rem; }

/* Acceso: la tarjeta sube y sus elementos entran en cascada */
.gate { min-height: var(--vh, 100svh); display: grid; place-items: center; padding: max(1.2rem, var(--sat)) 1.2rem max(1.2rem, var(--sab)); background: var(--bg); }
.gate-card { width: min(100%, 420px); background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 2rem 1.4rem 1.5rem; text-align: center; box-shadow: 0 20px 60px rgba(10, 10, 10, 0.08); animation: rise 480ms var(--ease-out); }
.gate-card > *, .gate-card form > * { animation: rise 460ms var(--ease-out) both; }
.gate-card > :nth-child(1) { animation-delay: 80ms; } .gate-card > :nth-child(2) { animation-delay: 140ms; } .gate-card > :nth-child(3) { animation-delay: 200ms; }
.gate-card form > :nth-child(1) { animation-delay: 220ms; } .gate-card form > :nth-child(2) { animation-delay: 270ms; } .gate-card form > :nth-child(3) { animation-delay: 320ms; }
.gate-card h1 { font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0.8rem 0 0.9rem; text-wrap: balance; }
.gate-card .btn { width: 100%; }
.gate-card label { text-align: left; }
.gate-logo { border-radius: 18px; }
.gate input.code { font-size: 2rem; letter-spacing: 0.45em; text-align: center; padding-left: 0.45em; font-variant-numeric: tabular-nums; }
.gate-links { display: flex; justify-content: space-between; gap: 1rem; margin: 0.4rem 0 0; }
.gate-err { color: var(--bad); min-height: 1.5em; margin: 0.6rem 0 0; font-size: 0.95rem; }
.gate-foot { margin: 0.4rem 0 0; }
.shops { list-style: none; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.shops .btn { width: 100%; }

/* Ayuda iPhone */
.ios-help { border: 0; border-radius: 20px; padding: 1.5rem; width: min(100% - 2rem, 440px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28); }
.ios-help::backdrop { background: rgba(10, 10, 10, 0.5); }
.ios-help[open] { animation: sheet 320ms var(--ease-drawer); }
.ios-help ol { padding-left: 1.2rem; }
.ios-help li { margin-bottom: 0.6rem; }
.ios-help .btn { width: 100%; margin-top: 0.6rem; }

/* Teléfono (por dispositivo, no por ancho): el editor ocupa toda la pantalla */
html.phone .editor { width: 100%; max-width: 100%; height: var(--vh, 100svh); max-height: var(--vh, 100svh); margin: 0; border-radius: 0; }
html.phone .row { grid-template-columns: 1fr; gap: 0; }
html.phone .top-btn span { display: none; }
html.phone .top-btn { width: 44px; padding: 0; justify-content: center; }
@media (max-width: 360px) { .ph-list { grid-template-columns: 1fr 1fr; } .item { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 0.7rem; } .thumb { width: 64px; height: 80px; } }

/* Escritorio: pestañas arriba, sin barra inferior (solo si no es un teléfono) */
@media (min-width: 900px) {
	html:not(.phone) body.in-app { display: grid; grid-template-rows: auto auto 1fr; }
	html:not(.phone) .in-app .tabbar { position: static; grid-row: 2; width: min(100%, 960px); margin: 0 auto; height: 52px; padding: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0.5rem; }
	html:not(.phone) .tabbar button { flex-direction: row; gap: 0.5rem; padding: 0 1rem; font-size: 0.95rem; }
	html:not(.phone) .tabbar svg { width: 22px; height: 22px; }
	html:not(.phone) .tabbar button[aria-selected="true"]::before { top: auto; bottom: -1px; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; }
	html:not(.phone) .tabbar b { position: static; margin-left: 0.2rem; }
	html:not(.phone) main { grid-row: 3; width: 100%; padding-bottom: 6rem; }
	html:not(.phone) .in-app .fab { bottom: 1.5rem; }
	html:not(.phone) .toast { bottom: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* Tarjeta «Pantalla» */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.9rem 0 1rem; }
.seg button { min-height: 52px; border: 1px solid #d6d2c9; border-radius: 14px; background: #fff; color: var(--ink); font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out); }
.seg button:active { transform: scale(0.97); }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.display .switch { margin-top: 0.4rem; }
.display .link { margin-top: 0.3rem; }
.diag { margin-top: 0.4rem; font-size: 0.8rem; word-break: break-word; }
@media (min-width: 640px) { html:not(.phone) .seg { grid-template-columns: repeat(4, 1fr); } }
/* «Reducir animaciones» elegido en la app: mismo efecto que el ajuste del sistema */
html.calm *, html.calm *::before, html.calm *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }

/* ───── v8: catálogos grandes (búsqueda, filtros, selección, carga rápida) */
.find-bar { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 640px) { .find-bar { grid-template-columns: 1.2fr 1fr; } }
.chip-btn.small { min-height: 38px; font-size: 0.88rem; padding: 0 0.9rem; }
.list-meta { margin: -0.2rem 0 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; min-height: 1.5rem; }
.list-meta .link { min-height: 36px; padding: 0; }
.more { text-align: center; margin: 1.1rem 0 0.4rem; }
.tag--wa { background: #e5f6ec; color: #0e5a2c; }
.item .chk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #b9b5ab; background: #fff; display: grid; place-items: center; }
.item.sel-mode { grid-template-columns: 30px 72px minmax(0, 1fr) auto; }
.item.picked { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #faf9f6; }
.item.picked .chk { background: var(--ink); border-color: var(--ink); }
.item.picked .chk::after { content: ""; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.selbar { position: sticky; top: calc(60px + var(--sat)); z-index: 15; background: #fff; border: 1px solid var(--ink); border-radius: var(--r); padding: 0.7rem 0.9rem 0.9rem; margin-bottom: 0.8rem; box-shadow: 0 10px 28px rgba(10, 10, 10, 0.14); animation: rise 260ms var(--ease-out); }
.selbar-top { display: flex; align-items: center; gap: 0.4rem 1rem; flex-wrap: wrap; }
.selbar-top b { margin-right: auto; }
.selbar-top .link { min-height: 40px; padding: 0; }
.selbar-act { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-top: 0.4rem; }
@media (min-width: 640px) { .selbar-act { grid-template-columns: 1fr auto auto; } }
.selbar-act .btn { min-height: 52px; }
.cats .kids, .cats.kids { margin: 0 0 0 1.1rem; padding-left: 0.8rem; border-left: 2px solid var(--line); }
.cats .grp input { font-weight: 700; }
.cats .cnt { flex: none; min-width: 2ch; text-align: right; }
.grp-wrap { margin-bottom: 1.1rem; list-style: none; }
.inline.mini { margin: 0.1rem 0 0 1.9rem; }
.inline.mini input { min-height: 46px; }
.inline.mini .btn { min-height: 46px; font-size: 0.92rem; }

/* Carga rápida */
.quick { width: min(100%, 720px); }
.qk-step { margin-bottom: 1.4rem; }
.qk-step h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.1rem; margin-bottom: 0.4rem; }
.qk-step h3 .muted { margin-left: auto; font-weight: 600; }
.qk-step h3 .muted.good { color: var(--ok); }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.9rem; }
.cutline { margin: 0.2rem 0 0.8rem; }
.qk-photos { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.7rem; margin-bottom: 0.8rem; }
.qk-photos:empty { display: none; }
.qk-ph { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #eceae4; border: 1px solid var(--line); }
.qk-ph img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.qk-ph .main { position: absolute; top: 0.4rem; left: 0.4rem; background: var(--ink); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; }
.qk-ph .wait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0.5rem; background: rgba(255, 255, 255, 0.82); font-size: 0.85rem; font-weight: 600; }
.qk-ph .wait.bad { color: var(--bad); }
.qk-ph.work .wait::before { content: ""; width: 22px; height: 22px; border: 3px solid #cfcbc2; border-top-color: var(--ink); border-radius: 50%; animation: spin 800ms linear infinite; margin-bottom: 0.4rem; }
.qk-ph .wait { align-content: center; }
.qk-ph .note { position: absolute; top: 0.4rem; right: 0.4rem; background: var(--warn-bg); color: var(--warn); font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; }
.qk-ph .ph-tools { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.3rem; gap: 0.25rem; background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0)); }
.qk-ph .icon { width: 36px; height: 36px; }
.qk-ph .bgtoggle { position: absolute; left: 0.4rem; right: 0.4rem; bottom: 2.8rem; min-height: 32px; border: 1px solid #cfcbc2; border-radius: 999px; background: rgba(255, 255, 255, 0.94); font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }
.drop { display: flex; align-items: center; gap: 1rem; margin: 0; padding: 1.1rem 1.2rem; border: 2px dashed #b9b5ab; border-radius: var(--r); background: #fbfaf7; cursor: pointer; font-weight: 400; transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out); }
.drop:active { transform: scale(0.99); }
.drop svg { width: 40px; height: 40px; flex: none; color: var(--ink); }
.drop b { display: block; font-size: 1.05rem; }
.drop small { margin: 0; }
.sizes { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.sizes legend { font-weight: 600; font-size: 0.95rem; padding: 0; margin-bottom: 0.5rem; }
.size-sets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.size-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size { min-width: 52px; min-height: 48px; padding: 0 0.9rem; border: 1.5px solid #cfcbc2; border-radius: 12px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.size:active { transform: scale(0.94); }
.size[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.qk-ask { align-self: end; margin-bottom: 1rem; }
.qk-status { min-height: 1.4em; font-size: 0.95rem; font-weight: 600; }
.qk-status.bad { color: var(--bad); }
.qk-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.qk-foot .link { grid-column: 1 / -1; justify-self: center; min-height: 40px; padding: 0; }
.qk-foot .btn { min-width: 0; width: 100%; padding-inline: 0.8rem; }
@media (min-width: 700px) { .qk-foot { grid-template-columns: auto 1fr 1fr; } .qk-foot .link { grid-column: auto; justify-self: start; } }
html.phone .quick { width: 100%; }
.photos .cutline { margin-top: 0; }
.qk-ph { aspect-ratio: auto; display: grid; align-content: start; gap: 0.35rem; padding-bottom: 0.4rem; background: #fff; }
.qk-ph img { aspect-ratio: 4 / 5; }
.qk-ph .ph-tools { position: static; padding: 0 0.3rem; background: none; }
.qk-ph .bgtoggle { position: static; margin: 0 0.4rem; min-height: 34px; }
.qk-ph .wait { inset: 0 0 auto 0; aspect-ratio: 4 / 5; }

/* ───── v10: stock y pedidos */
.tag--stock { background: #e8eef8; color: #1c3d73; }
.tag--bad { background: #fde7e5; color: var(--bad); }
.stockbox { margin-bottom: 1rem; }
.stockbox > label { margin-bottom: 0.5rem; }
.stockbox .moves { list-style: none; margin-top: 0.4rem; font-size: 0.88rem; display: grid; gap: 0.15rem; }
.moves .plus { color: var(--ok); } .moves .minus { color: var(--bad); }
.badge { display: inline-block; padding: 0.1rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #eceae4; }
.badge.st-nuevo { background: #fff1d6; color: var(--warn); }
.badge.st-confirmado { background: #e8eef8; color: #1c3d73; }
.badge.st-pagado, .badge.st-enviado, .badge.st-entregado { background: #e5f6ec; color: #0e5a2c; }
.badge.st-cancelado { background: #fde7e5; color: var(--bad); }
.order.st-cancelado { opacity: 0.72; }
.o-total { font-weight: 700; font-size: 1.05rem; }
.o-stock { font-size: 0.9rem; color: var(--mute); background: #f6f4ef; border-radius: 10px; padding: 0.5rem 0.7rem; }
.o-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.7rem; }
.o-acts .btn { min-height: 50px; padding-inline: 0.6rem; font-size: 0.95rem; }
.o-acts .btn.danger { border-color: #e3b9b5; }

/* ───── v11: tallas y colores */
.variants { border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem; margin: 0 0 1rem; min-width: 0; }
.variants legend { font-weight: 600; font-size: 0.95rem; padding: 0 0.3rem; }
.ve-block { margin-bottom: 0.9rem; }
.ve-block > b { display: block; margin-bottom: 0.4rem; }
.ve-sets, .ve-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.5rem; }
.ve-add { display: flex; gap: 0.5rem; }
.ve-add input { min-height: 46px; }
.ve-add .btn { min-height: 46px; flex: none; padding-inline: 1rem; font-size: 0.92rem; }
.ve-rows { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.ve-head { display: grid; gap: 0.5rem; margin-bottom: 0.6rem; }
.ve-all { display: flex; gap: 0.5rem; }
.ve-all input { min-height: 46px; }
.ve-all .btn { min-height: 46px; flex: none; padding-inline: 0.9rem; font-size: 0.9rem; }
.ve-list { list-style: none; display: grid; gap: 0.5rem; }
.ve-list li { display: grid; grid-template-columns: 1fr 120px 44px; gap: 0.5rem; align-items: center; }
.ve-lab { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ve-list input { min-height: 46px; }
.ph-color { min-height: 44px; font-size: 0.85rem; }
.qk-step .variants { border: 0; padding: 0; }
.qk-step .variants legend { padding: 0; margin-bottom: 0.5rem; }

/* ───── v13: primeros pasos, plantilla y Safari */
.onboard .steps { list-style: none; display: grid; gap: 0.6rem; }
.onboard li { display: grid; grid-template-columns: 30px 1fr auto; gap: 0.7rem; align-items: center; }
.onboard .tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #b9b5ab; display: grid; place-items: center; font-weight: 700; color: #fff; }
.onboard li.done .tick { background: var(--ok); border-color: var(--ok); }
.onboard li.done .txt { color: var(--mute); text-decoration: line-through; }
.onboard .btn { min-height: 44px; padding: 0.4rem 1rem; font-size: 0.9rem; }
.ed-foot { flex-wrap: wrap; }
.ed-foot .link { min-height: 44px; }
@supports (-webkit-touch-callout: none) { input, select, textarea { font-size: 16px; } }   /* iOS: con menos de 16 px Safari amplía al enfocar */

/* v14: pie compacto de «Cargar prenda» (el enlace de borrador pasó al final del formulario) */
.qk-foot { grid-template-columns: 1fr 1fr !important; }
.qk-draft { display: block; margin: 0.2rem auto 0; }

/* v16: ahorro de peso de las fotos */
.qk-saving { font-size: 0.9rem; color: var(--ok); font-weight: 600; margin: -0.2rem 0 0.8rem; }
.qk-saving:empty { display: none; }

/* v17: botones de galería y cámara */
.drop-row { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 560px) { .drop-row { grid-template-columns: 1fr 1fr; } }
.drop--cam { border-style: solid; border-color: var(--ink); background: var(--ink); color: #fff; }
.drop--cam small { color: rgba(255, 255, 255, 0.75); }
.drop--cam svg { color: #fff; }
.upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.upload-row .upload { margin: 0; }

/* v19: Ajustes se encogía a media pantalla en Android (Chrome reduce toda la página cuando algo es más ancho que la pantalla).
   Causa: los campos de los formularios «en línea» no podían achicarse (min-width automático) y empujaban el botón fuera. */
input, select, textarea { min-width: 0; max-width: 100%; }
.inline > input { flex: 1 1 0; }
.inline .btn { flex: none; }
.inline.mini { margin-left: 0.6rem; flex-wrap: wrap; }
.inline.mini input { flex: 1 1 11rem; }
.inline.mini .btn { flex: 1 1 auto; }
.cats li > input { flex: 1 1 0; min-width: 0; }
.cats .kids, .cats.kids { margin-left: 0.5rem; padding-left: 0.6rem; }
main, .card, .form { min-width: 0; max-width: 100%; }
/* Causa real: «.cats li { display: flex }» también alcanzaba a cada grupo (li.grp-wrap) y ponía en FILA el grupo, sus tipos y su formulario */
.cats > li.grp-wrap { display: block; margin-bottom: 1.1rem; }
.grp-wrap > ul { display: grid; gap: 0.1rem; margin: 0; }
