/* Tienda del condominio · cliente. Móvil primero.
   Tokens semánticos; sin fuentes externas (CSP). Puntos de corte: 640 / 1024. */
:root {
  --bg: #fbf5ea;
  --surface: #ffffff;
  --ink: #1e2b22;
  --ink-2: #4a5a4f;
  --line: #e6dcc8;
  --line-2: #efe7d6;
  --brand: #166534;
  --brand-d: #124d28;
  --brand-soft: #dcf0e1;
  --on-brand: #ffffff;
  --promo: #b0400f;
  --promo-soft: #fde7d9;
  --warn-bg: #fff0c9;
  --warn-ink: #6b4200;
  --bad-bg: #fbe1da;
  --bad-ink: #84240d;
  --ok-ink: #14532d;
  --ring: #0b5ed7;
  --r-card: 16px;
  --r-ctl: 12px;
  --shadow-1: 0 1px 2px rgb(30 43 34 / .06), 0 2px 8px rgb(30 43 34 / .06);
  --shadow-2: 0 8px 28px rgb(30 43 34 / .18);
  --dur-1: 150ms; --dur-2: 220ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tone-0: #d9eedf; --tone-1: #fde7c2; --tone-2: #d6e8f7; --tone-3: #f3e0cf; --tone-4: #e6dff5;
  --tone-0-i: #14532d; --tone-1-i: #7a4a06; --tone-2-i: #0f4c75; --tone-3-i: #7a3e14; --tone-4-i: #4a2f87;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.5 var(--font); min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
svg { display: block; }
[data-icon] { display: inline-flex; width: 24px; height: 24px; flex: none; }
[data-icon] svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ───── Encabezado ───── */
.top { position: sticky; top: 0; z-index: 40; background: var(--brand); color: var(--on-brand); box-shadow: 0 2px 10px rgb(0 0 0 / .15); }
.top__in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-height: 44px; margin-right: auto; }
.brand__logo { width: 40px; height: 40px; border-radius: 12px; background: rgb(255 255 255 / .16); display: grid; place-items: center; }
.brand__logo--img { width: auto; height: 60px; background: #f6efdf; padding: 2px 6px; border-radius: 10px; }
.brand__logo--img img { height: 56px; width: auto; display: block; }
.brand__name { font-weight: 700; font-size: 1.125rem; letter-spacing: .1px; line-height: 1.15; }

.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / .16); font-size: .875rem; font-weight: 600; }
.pill__dot { width: 10px; height: 10px; border-radius: 50%; background: #86efac; box-shadow: 0 0 0 3px rgb(134 239 172 / .3); }
.pill[data-state="after_hours"] .pill__dot { background: #fcd34d; box-shadow: 0 0 0 3px rgb(252 211 77 / .3); }
.pill[data-state="closure"] .pill__dot { background: #fca5a5; box-shadow: 0 0 0 3px rgb(252 165 165 / .3); }

/* ───── Botones ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border: 0; border-radius: var(--r-ctl); font-weight: 700; transition: transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-1); }

.btn--soft { background: var(--brand-soft); color: var(--ok-ink); }

.btn--ghost { background: rgb(255 255 255 / .16); color: inherit; }

.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); }


.cart-open { position: relative; min-height: 44px; padding: 8px 14px; white-space: nowrap; }
/* Móvil: nombre + botón de pedido en una fila, estado debajo */
@media (max-width: 639px) {
  .top__in { gap: 8px 12px; padding-top: 8px; padding-bottom: 10px; }
  .pill { order: 3; flex: 1 0 100%; justify-content: center; }
  .cart-open { padding: 8px 12px; }
  .orders-open { padding: 8px 12px; }
  .orders-open__label, .cart-open__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand { flex: 1 1 0; min-width: 0; margin-right: 0; }
  .brand__name { font-size: 1rem; }
}
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--brand); font-size: .8125rem; font-weight: 800; display: inline-grid; place-items: center; }

/* ───── Avisos ───── */
.notice { background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid #f0d98c; }
.notice[data-kind="closure"] { background: var(--bad-bg); color: var(--bad-ink); border-bottom-color: #f2b9aa; }
.notice[data-kind="open"] { background: var(--brand-soft); color: var(--ok-ink); border-bottom-color: #b5dcc0; }
.notice__in { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; }
.notice__icon { margin-top: 1px; }
.notice p { font-size: .9375rem; font-weight: 600; line-height: 1.45; }

/* ───── Estructura ───── */
.layout { max-width: 1240px; margin: 0 auto; padding: 16px 16px 120px; display: block; }
.catalog { min-width: 0; }

.tools { display: grid; gap: 12px; margin-bottom: 8px; }
.search { position: relative; display: block; }
.search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search input { width: 100%; min-height: 52px; padding: 12px 14px 12px 46px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 1rem; }
.search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgb(22 101 52 / .15); }
.search input::placeholder { color: #6b7a70; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9375rem; transition: transform var(--dur-1) var(--ease); }

.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.count { margin: 12px 2px 12px; color: var(--ink-2); font-size: .9375rem; min-height: 1.5em; }

/* ───── Tarjetas ───── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); display: flex; flex-direction: column; overflow: hidden; transition: transform var(--dur-1) var(--ease); }

.card[data-soldout="true"] .card__art { filter: grayscale(.85); opacity: .75; }
.card__art { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--tone-0); color: var(--tone-0-i); }
.card__art[data-tone="1"] { background: var(--tone-1); color: var(--tone-1-i); }
.card__art[data-tone="2"] { background: var(--tone-2); color: var(--tone-2-i); }
.card__art[data-tone="3"] { background: var(--tone-3); color: var(--tone-3-i); }
.card__art[data-tone="4"] { background: var(--tone-4); color: var(--tone-4-i); }
.card__art img { width: 100%; height: 100%; object-fit: cover; }
.card__mono { font-size: clamp(2rem, 9vw, 3rem); font-weight: 800; letter-spacing: -1px; opacity: .85; }
.tag { position: absolute; top: 8px; left: 8px; padding: 4px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 800; background: var(--promo); color: #fff; }
.tag--off { background: #3b4a40; }
.card__body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__brand { font-size: .8125rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-2); }
.card__name { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size { min-height: 44px; min-width: 44px; padding: 6px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .9375rem; }

.size[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--ok-ink); }
.size:disabled { color: #7b857e; text-decoration: line-through; cursor: not-allowed; background: #f4f0e6; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: auto; }
.price__now { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.price__now--promo { color: var(--promo); }
.price__was { color: var(--ink-2); text-decoration: line-through; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.stock { font-size: .875rem; font-weight: 600; min-height: 1.3em; }
.stock--low { color: var(--warn-ink); }
.stock--out { color: var(--bad-ink); }
.card__act { padding: 0 12px 12px; }
.add { width: 100%; }
.step { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; background: var(--brand-soft); border-radius: var(--r-ctl); }
.step button { height: 48px; border: 0; background: transparent; color: var(--ok-ink); border-radius: var(--r-ctl); display: grid; place-items: center; }

.step button:disabled { opacity: .35; cursor: not-allowed; }
.step output { text-align: center; font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; color: var(--ok-ink); }

.empty { text-align: center; padding: 56px 16px; display: grid; justify-items: center; gap: 8px; color: var(--ink-2); }
.empty__icon { width: 48px; height: 48px; color: var(--brand); }
.empty h2 { color: var(--ink); font-size: 1.25rem; }
.empty .btn { margin-top: 8px; }
.skel { aspect-ratio: 3 / 4; border-radius: var(--r-card); background: var(--line-2); }

/* ───── Pedido ───── */
.scrim { position: fixed; inset: 0; background: rgb(15 25 18 / .5); z-index: 50; }
.cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 90dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-2); transform: translateY(105%); opacity: 0; pointer-events: none; transition: transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.cart.open { transform: none; opacity: 1; pointer-events: auto; transition-duration: var(--dur-2); }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--line-2); }
.cart__head h2 { font-size: 1.25rem; }
.cart__body { overflow-y: auto; padding: 8px 20px; flex: 1; overscroll-behavior: contain; }
.cart__foot { padding: 12px 20px 16px; border-top: 1px solid var(--line-2); display: grid; gap: 12px; background: var(--surface); overflow-y: auto; }
.cart__empty { text-align: center; padding: 32px 8px; color: var(--ink-2); display: grid; gap: 8px; justify-items: center; }
.cart__empty [data-icon] { width: 48px; height: 48px; color: var(--brand); }
.cart__empty strong { color: var(--ink); font-size: 1.0625rem; }

.line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.line:last-child { border-bottom: 0; }
.line__name { font-weight: 700; line-height: 1.25; }
.line__meta { color: var(--ink-2); font-size: .875rem; }
.line__sum { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; min-width: 4.5ch; order: 3; }
.line .step { grid-template-columns: 44px 32px 44px; order: 2; }
.line .step output { font-size: 1rem; }
.line .step button { height: 44px; }
.line__issue { grid-column: 1 / -1; font-size: .875rem; font-weight: 600; color: var(--bad-ink); }

.totals { margin: 0; display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.totals__total { padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--line); font-size: 1.25rem; }
.totals__total dt { color: var(--ink); font-weight: 700; }
.totals__total dd { font-weight: 800; }
.free { color: var(--ok-ink); }

.pay { border: 0; padding: 0; margin: 0; min-width: 0; }
.pay legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pay__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay__opt { display: grid; grid-template-columns: 20px 1fr; column-gap: 10px; align-items: center; min-height: 56px; padding: 8px 12px; font-weight: 700; border: 2px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; }
.pay__opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pay__opt--off { opacity: .55; cursor: not-allowed; }
.pay__opt input { width: 20px; height: 20px; accent-color: var(--brand); }
.pay__sub { grid-column: 2; font-weight: 600; font-size: .8125rem; color: var(--ink-2); line-height: 1.2; }
.pay__opt input { grid-row: 1 / span 2; }
.agree { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--warn-bg); color: var(--warn-ink); font-size: .9375rem; cursor: pointer; }
.agree input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--brand); }
.hint { font-size: .9375rem; font-weight: 600; color: var(--ink-2); text-align: center; }
.hint:empty { display: none; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgb(251 245 234 / 0)); }
.dock__btn { justify-content: space-between; max-width: 560px; margin: 0 auto; min-height: 56px; font-size: 1.0625rem; box-shadow: var(--shadow-2); }

.toast { position: fixed; left: 0; right: 0; bottom: 96px; width: max-content; margin-inline: auto; z-index: 90; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow-2); }


/* ───── Tablet ───── */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .layout { padding: 24px 24px 120px; }
  .top__in, .notice__in { padding-left: 24px; padding-right: 24px; }
  .cart { left: 50%; right: auto; width: min(560px, 100%); margin-left: calc(min(560px, 100%) / -2); }
  .tools { grid-template-columns: minmax(260px, 380px) 1fr; align-items: start; }
  .card__art { aspect-ratio: 3 / 2; }
  .top__in { flex-wrap: nowrap; }
  .brand { min-width: 0; }
  .brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pill { white-space: nowrap; }
}

/* ───── Escritorio: el pedido queda fijo a la derecha ───── */
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding-bottom: 48px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart { position: sticky; top: 88px; left: auto; right: auto; bottom: auto; width: auto; margin: 0; max-height: calc(100dvh - 112px); border-radius: var(--r-card); border: 1px solid var(--line); transform: none; opacity: 1; pointer-events: auto; transition: none; box-shadow: var(--shadow-1); padding-bottom: 0; }
  .cart__close, .scrim, .dock, .cart-open { display: none !important; }
  .cart { overflow-y: auto; }
  .cart__body { overflow: visible; flex: none; }
  .cart__foot { overflow: visible; border-top: 1px solid var(--line-2); }
  .cart__head { padding: 14px 20px; }
  .tools { grid-template-columns: 1fr; }
}
@media (min-width: 1360px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }


/* Tablet: «Mis pedidos» solo con icono para que quepa el nombre de la tienda */
@media (max-width: 1023px) { .orders-open__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .orders-open { padding: 8px 12px; } }

/* ───── Hojas de compra (cuenta, domicilio, confirmar, mis pedidos) ───── */
.orders-open { min-height: 44px; padding: 8px 14px; white-space: nowrap; }
.ck { border: 0; padding: 0; width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
.ck::backdrop { background: rgb(15 25 18 / .55); }
.ck__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 20px; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.ck__head h2 { font-size: 1.1875rem; line-height: 1.25; }
.ck__x { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; font-size: 1.75rem; line-height: 1; color: var(--ink-2); }

.ck__body { display: grid; gap: 14px; padding: 16px 20px calc(22px + env(safe-area-inset-bottom)); align-content: start; }
@media (min-width: 640px) { .ck { width: 520px; max-width: 94vw; margin: auto; border-radius: 22px; } }
.ck-form { display: grid; gap: 12px; } .ck-box { padding: 12px; border: 2px dashed var(--line); border-radius: var(--r-ctl); }
.ck-field { display: grid; gap: 6px; min-width: 0; } .ck-field label { font-weight: 700; font-size: .9375rem; }
.ck-field input, .ck-field select { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); font-size: 1rem; }
.ck-field input:focus, .ck-field select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgb(22 101 52 / .15); }
.ck-hint { font-size: .9375rem; color: var(--ink-2); } .ck-error { color: var(--bad-ink); font-weight: 600; min-height: 1.4em; } .ck-error:empty { display: none; }
.ck-bad { color: var(--bad-ink); font-weight: 700; }
.ck-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--line-2); border-radius: 14px; }
.ck-tabs button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: var(--ink-2); }
.ck-tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-1); }
.ck-sum { display: grid; gap: 8px; padding: 14px; background: var(--bg); border-radius: var(--r-ctl); } .ck-sum h3 { font-size: 1rem; }
.ck-sum ul, .ck-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ck-sum li, .ck-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; } .ck-sum li span:last-child, .ck-list li span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.ck-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 1.125rem; } .ck-total strong { font-size: 1.375rem; }
.ck-pay { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--brand-soft); color: var(--ok-ink); font-size: .9375rem; }
.ck-warn { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; font-size: .9375rem; }
.ck-ok { display: grid; justify-items: center; gap: 4px; padding: 12px 0; } .ck-ok__n { font-size: 2.5rem; font-weight: 800; color: var(--brand); letter-spacing: -1px; } .ck-ok strong { font-size: 1.125rem; }
.ck-order { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.ck-order summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; min-height: 56px; padding: 8px 14px; cursor: pointer; }
.ck-order summary::-webkit-details-marker { display: none; } .ck-order__n { font-weight: 800; font-size: 1.0625rem; }
.ck-order__body { display: grid; gap: 10px; padding: 4px 14px 14px; }
.ck-chip { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 800; background: var(--line-2); }
.ck-chip--aceptado, .ck-chip--en_preparacion, .ck-chip--en_camino { background: var(--warn-bg); color: var(--warn-ink); } .ck-chip--entregado { background: var(--brand-soft); color: var(--ok-ink); } .ck-chip--cancelado { background: var(--bad-bg); color: var(--bad-ink); }
.ck-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .ck-tl li { display: flex; justify-content: space-between; gap: 10px; font-size: .875rem; } .ck-tl span { color: var(--ink-2); }
.ck-skel { height: 96px; border-radius: var(--r-card); background: var(--line-2); }

/* ───── Pago por transferencia ───── */
.ck-transfer { display: grid; gap: 12px; padding: 14px; border: 2px solid var(--brand); border-radius: var(--r-card); background: #f4fbf6; }
.ck-transfer h3 { font-size: 1.0625rem; } .ck-transfer dl { margin: 0; display: grid; gap: 6px; }
.ck-transfer dl div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; } .ck-transfer dt { color: var(--ink-2); font-size: .9375rem; } .ck-transfer dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.ck-mono { font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.ck-ref { display: grid; gap: 4px; justify-items: center; padding: 14px; border-radius: var(--r-ctl); background: var(--surface); border: 2px dashed var(--brand); text-align: center; font-weight: 600; }
.ck-ref strong { font-size: 2.25rem; letter-spacing: 3px; color: var(--brand); font-variant-numeric: tabular-nums; }

.ck-account { display: grid; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.btn--ghost-l { background: transparent; border: 2px solid var(--line); color: var(--ink); } 

/* ───── Movimiento: solo transform y opacity; sin capas permanentes ───── */
/* El velo de los controles suaviza el tono mediante opacity, sin animar colores. */
:where(.btn, .icon-btn, .chip, .size, .ck__x, .bell, .who, .nav__more, .nav a, .step button, .ck-tabs button) {
  position: relative;
  isolation: isolate;
  transition: transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease);
}
:where(.btn, .icon-btn, .chip, .size, .ck__x, .bell, .who, .nav__more, .nav a, .step button, .ck-tabs button)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: currentColor; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-1) var(--ease);
}
:where(.btn, .icon-btn, .chip, .size, .ck__x, .bell, .who, .nav__more, .nav a, .step button, .ck-tabs button):focus-visible::before { opacity: .07; }
@media (hover: hover) {
  :where(.btn, .icon-btn, .chip, .size, .ck__x, .bell, .who, .nav__more, .nav a, .step button, .ck-tabs button):hover:not(:disabled)::before { opacity: .07; }
}
:where(button, .nav a):active:not(:disabled) { transform: scale(.97); }
:where(.card, .pcard, .ocard, .posrow, .ck-order) { transition: transform var(--dur-1) var(--ease); }
:where(.card, .pcard, .ocard, .posrow, .ck-order):active:not(:has(button:active)) { transform: scale(.97); }

.skel, .ck-skel { position: relative; overflow: hidden; }
.skel::after, .ck-skel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  /* Dos pasadas breves; después queda estático para ahorrar batería. */
  animation: motion-shimmer calc(var(--dur-1) * 2) var(--ease) 2;
}
@keyframes motion-shimmer {
  from { transform: translateX(-100%); opacity: 0; }
  50% { opacity: .35; }
  to { transform: translateX(100%); opacity: 0; }
}
@keyframes motion-enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes motion-sheet-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes motion-out { to { opacity: 0; transform: translateY(10px); } }
@keyframes motion-fade-in { from { opacity: 0; } }
@keyframes motion-fade-out { to { opacity: 0; } }

.ck[open] { animation: motion-sheet-in var(--dur-2) var(--ease); }
.ck[open]::backdrop { animation: motion-fade-in var(--dur-2) var(--ease); }
.ck[open].is-leaving { animation: motion-out var(--dur-1) var(--ease) both; }
.ck[open].is-leaving::backdrop { animation: motion-fade-out var(--dur-1) var(--ease) both; }
.toast, .dock:not([hidden]) { animation: motion-enter var(--dur-2) var(--ease); }
.toast.is-leaving { animation: motion-out var(--dur-1) var(--ease) both; }
.scrim:not([hidden]) { animation: motion-fade-in var(--dur-2) var(--ease); }
.scrim.is-leaving { animation: motion-fade-out var(--dur-1) var(--ease) both; }
#dockCount, #dockTotal { display: inline-block; font-variant-numeric: tabular-nums; }
@media (max-width: 1023px) { body.cart-is-open { overflow: hidden; } }

:is(.grid > .card, .ck__body > .ck-order) { animation: motion-enter var(--dur-2) var(--ease) backwards; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(2) { animation-delay: 35ms; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(3) { animation-delay: 70ms; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(4) { animation-delay: 105ms; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(5) { animation-delay: 140ms; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(6) { animation-delay: 175ms; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(7) { animation-delay: 210ms; }
:is(.grid > .card, .ck__body > .ck-order):nth-child(8) { animation-delay: 245ms; }

.motion-still, .motion-still > :is(.pcard, .ocard, .posrow, .tline) { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, *::backdrop {
    animation: none !important; transition: none !important;
    scroll-behavior: auto !important;
  }
  :where(button, .nav a, .card, .pcard, .ocard, .posrow, .ck-order):active { transform: none !important; }
}

.ck-q { font-weight: 700; margin: 0 0 8px; }
