/* ==========================================================================
   COSTOCRAFT v3 · "Taller de impresión"
   THE FOME STUDIO
   Tablero de bloques + asistente por pasos. Paleta fría tipo tintas CMYK:
   cian, magenta, amarillo y tinta azul noche, sobre gris azulado claro.
   ========================================================================== */
:root {
  --bg: #EEF2F8;
  --ink: #0E1A2B;
  --ink-2: #1B2A41;
  --muted: #5B6B82;
  --line: #D7DFEB;
  --card: #FFFFFF;

  --cyan: #00A6D6;
  --cyan-soft: #D6F1FA;
  --magenta: #E0287D;
  --magenta-soft: #FCE1EE;
  --yellow: #FFD23F;
  --yellow-soft: #FFF3C4;

  --ok: #0C8A5E;
  --bad: #C0322B;
  --mpago: #009EE3;
  --paypal: #003087;

  --font: "Avenir Next", "Segoe UI Variable Display", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.ic {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

/* ---------------------------------------------------------------------- */
/* Pantallas                                                               */
/* ---------------------------------------------------------------------- */
.screen {
  display: none;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px calc(48px + env(safe-area-inset-bottom));
}

.screen.active {
  display: block;
  animation: entrar 0.26s ease;
}

.screen.con-dock {
  padding-bottom: calc(130px + env(safe-area-inset-bottom));
}

@keyframes entrar {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

/* Barra superior de las pantallas internas */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 12px;
  background: linear-gradient(var(--bg) 82%, rgba(238, 242, 248, 0));
}

.topbar-titles {
  flex: 1;
  min-width: 0;
}

.topbar-title {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-sub {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.1s, background 0.15s;
}

.icon-btn .ic {
  width: 20px;
  height: 20px;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--yellow-soft);
}

.icon-btn.sm {
  width: 36px;
  height: 36px;
}

.icon-btn.sm .ic {
  width: 17px;
  height: 17px;
}

/* ---------------------------------------------------------------------- */
/* Tipografía y bloques                                                    */
/* ---------------------------------------------------------------------- */
.display {
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 8px 0 8px;
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 28px 0 6px;
}

.sec-head h2,
.sec-title {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sec-title {
  margin: 22px 0 10px;
}

/* Cabecera del inicio */
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(16px + env(safe-area-inset-top)) 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--line);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-name b {
  color: var(--cyan);
  font-weight: 800;
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-actions select {
  width: auto;
  height: 42px;
  padding: 0 28px 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background-position: right 11px center;
}

/* ---------------------------------------------------------------------- */
/* Mosaico del inicio                                                      */
/* ---------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  padding: 18px;
  min-height: 150px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.12s;
}

.tile:active {
  transform: scale(0.97);
}

/* trama de puntos tipo impresión (media tinta) */
.tile::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 170px;
  height: 170px;
  background-image: radial-gradient(rgba(14, 26, 43, 0.2) 2px, transparent 2.4px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 70% 70%, #000 0, transparent 68%);
  mask-image: radial-gradient(circle at 70% 70%, #000 0, transparent 68%);
  pointer-events: none;
}

.tile > * {
  position: relative;
  z-index: 1;
}

.tile-wide {
  grid-column: 1 / -1;
  min-height: 168px;
}

.tile-yellow  { background: var(--yellow);  color: var(--ink); }
.tile-cyan    { background: var(--cyan);    color: var(--ink); }
.tile-magenta { background: var(--magenta); color: #fff; }
.tile-magenta::after { background-image: radial-gradient(rgba(255, 255, 255, 0.28) 2px, transparent 2.4px); }

.tile-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.tile-big {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.tile-num {
  display: block;
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.tile-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.8;
  margin-top: 2px;
}

.tile-go {
  position: absolute !important;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
}

.tile-go .ic {
  width: 20px;
  height: 20px;
}

/* ---------------------------------------------------------------------- */
/* Lista de productos del inicio                                           */
/* ---------------------------------------------------------------------- */
.prod-list {
  display: flex;
  flex-direction: column;
}

.prod {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  padding: 15px 2px;
  text-align: left;
}

.prod:active {
  background: rgba(255, 255, 255, 0.7);
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.a-cyan    { background: var(--cyan);    color: var(--ink); }
.a-magenta { background: var(--magenta); color: #fff; }
.a-yellow  { background: var(--yellow);  color: var(--ink); }

.prod-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.prod-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prod-sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.prod-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.prod-price strong {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.prod-price small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prod > .ic {
  color: var(--muted);
}

.vacio {
  text-align: center;
  padding: 34px 16px;
  color: var(--muted);
  border: 2px dashed var(--line);
  border-radius: 24px;
  margin-top: 8px;
}

.vacio strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.vacio .ic {
  width: 34px;
  height: 34px;
  color: var(--cyan);
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------------- */
/* Formularios                                                             */
/* ---------------------------------------------------------------------- */
label.lbl,
.lbl {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--card);
  color: var(--ink);
}

input::placeholder, textarea::placeholder {
  color: #9AA7BA;
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230E1A2B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(0, 166, 214, 0.28);
}

textarea {
  resize: vertical;
  min-height: 110px;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.form-group {
  margin-bottom: 14px;
  width: 100%;
}

.row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}

.row > * {
  min-width: 0;
}

/* Campo grande (nombre del producto) */
.input-big {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  border: 0;
  border-bottom: 3px solid var(--ink);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
}

.input-big:focus {
  box-shadow: none;
  border-bottom-color: var(--cyan);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}

.btn:active {
  transform: scale(0.96);
  background: var(--ink-2);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-ghost:active {
  background: var(--yellow-soft);
}

.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn-cyan {
  background: var(--cyan);
  color: var(--ink);
}

.btn-soft {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn-sm {
  padding: 9px 15px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.btn-mpago  { background: var(--mpago);  color: #fff; }
.btn-paypal { background: var(--paypal); color: #fff; }

/* Selector rápido de ideas / unidades */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 700;
  font-size: 0.88rem;
}

.pill.sel {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pill:active {
  transform: scale(0.95);
}

/* Contador (− valor +) */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-btn {
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--card);
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.step-btn.main {
  background: var(--ink);
  color: #fff;
}

.step-btn:active {
  transform: scale(0.9);
  background: var(--yellow);
  color: var(--ink);
}

.step-btn .ic {
  width: 20px;
  height: 20px;
}

.stepper input {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 8px 4px;
  min-width: 0;
  flex: 1;
  border-radius: 16px;
  font-variant-numeric: tabular-nums;
}

.stepper .unit {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 34px;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Interruptor */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  margin-bottom: 10px;
  cursor: pointer;
}

.sw-text b {
  display: block;
  font-size: 0.92rem;
}

.sw-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

input.sw {
  -webkit-appearance: none;
  appearance: none;
  width: 52px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  flex-shrink: 0;
  transition: background 0.18s;
}

input.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s;
}

input.sw:checked {
  background: var(--cyan);
}

input.sw:checked::after {
  transform: translateX(22px);
}

input.sw:focus {
  box-shadow: 0 0 0 4px rgba(0, 166, 214, 0.28);
}

/* Barras deslizantes */
.range-block {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px 18px;
  margin-bottom: 10px;
}

.range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.range-head b {
  display: block;
  font-size: 0.92rem;
}

.range-head small {
  color: var(--muted);
  font-size: 0.78rem;
}

.chip-val {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.range-big {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

input[type="range"] {
  --pct: 50%;
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) var(--pct), var(--line) var(--pct));
}

input[type="range"]:focus {
  box-shadow: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--magenta);
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(14, 26, 43, 0.35);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--magenta);
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(14, 26, 43, 0.35);
}

/* ---------------------------------------------------------------------- */
/* Asistente (wizard)                                                      */
/* ---------------------------------------------------------------------- */
.progress {
  display: flex;
  gap: 6px;
  margin: 2px 0 22px;
}

.progress i {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s;
}

.progress i.hecho   { background: var(--ink); }
.progress i.actual  { background: var(--cyan); }

.paso {
  display: none;
}

.paso.activo {
  display: block;
  animation: entrar 0.24s ease;
}

.paso-t {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin-bottom: 8px;
}

.paso-s {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

/* Materiales como fichas */
.mat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mat-chip {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 13px 13px 12px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  transition: transform 0.1s, border-color 0.15s;
}

.mat-chip:active {
  transform: scale(0.96);
}

.mat-chip.lleva {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.mat-chip.nuevo {
  border-style: dashed;
  border-color: var(--ink);
  background: transparent;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  gap: 4px;
}

.mat-chip .m-nombre {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-right: 22px;
}

.mat-chip .m-precio {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}

.mat-chip .m-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
}

.mat-chip .m-dot.empaque {
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px var(--ink);
}

.mat-chip .m-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 7px;
}

.linea {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1.5px dashed var(--line);
  font-size: 0.92rem;
}

.linea .l-nombre {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.linea .l-nombre small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.linea strong {
  font-variant-numeric: tabular-nums;
}

.nota-vacia {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 14px 0;
}

/* Equipos */
.equip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.equip button {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 16px 6px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1.15;
  text-align: center;
  transition: transform 0.1s;
}

.equip button .ic {
  width: 28px;
  height: 28px;
}

.equip button.sel {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.equip button.sel .ic {
  color: var(--yellow);
}

.equip button:active {
  transform: scale(0.95);
}

/* ---------------------------------------------------------------------- */
/* Barra inferior con el costo en vivo                                     */
/* ---------------------------------------------------------------------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  justify-content: center;
  pointer-events: none;
}

.dock.visible {
  display: flex;
}

.dock-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  background: var(--card);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(14, 26, 43, 0.12);
}

.dock-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dock-info span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dock-info strong {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dock .icon-btn {
  width: 52px;
  height: 52px;
}

.dock .btn {
  padding: 16px 24px;
}

/* ---------------------------------------------------------------------- */
/* Resultado: ticket (asistente) y tarjeta de precio (detalle)             */
/* ---------------------------------------------------------------------- */
.ticket {
  background: var(--ink);
  color: #fff;
  border-radius: 26px;
  padding: 20px 18px 22px;
  margin: 18px 0 8px;
  position: relative;
  overflow: hidden;
}

.ticket::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 170px;
  height: 170px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 2px, transparent 2.4px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 68%);
  mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 68%);
  pointer-events: none;
}

.ticket > * {
  position: relative;
  z-index: 1;
}

.t-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #C2CEDF;
}

.t-row strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.t-row.ok strong {
  color: #6EE7B7;
}

.t-cut {
  border-top: 2px dashed rgba(255, 255, 255, 0.22);
  margin: 14px 0;
}

.t-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9FB0C8;
}

.t-total {
  font-size: 2.9rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.t-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: #C2CEDF;
}

.t-foot b {
  color: #fff;
}

.t-note {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #9FB0C8;
}

/* Detalle: barra de dónde se va el precio */
.stack {
  display: flex;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  margin: 6px 0 14px;
}

.stack i {
  display: block;
  height: 100%;
  min-width: 4px;
  transition: width 0.25s ease;
}

.s-mat  { background: var(--cyan); }
.s-maq  { background: var(--yellow); }
.s-trab { background: var(--magenta); }
.s-gan  { background: var(--ink); }

.legend {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1.5px solid var(--line);
  font-size: 0.92rem;
  font-weight: 600;
}

.legend li span {
  flex: 1;
}

.legend li strong {
  font-variant-numeric: tabular-nums;
}

.legend li span.dot {
  flex: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}

.panel {
  background: var(--card);
  border-radius: 24px;
  padding: 16px;
  margin-top: 14px;
  border: 1.5px solid var(--line);
}

.acciones {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.acciones .btn {
  flex-direction: column;
  gap: 5px;
  padding: 13px 6px;
  font-size: 0.78rem;
  border-radius: 20px;
}

.acciones .btn .ic {
  width: 20px;
  height: 20px;
}

.acciones .peligro {
  color: var(--bad);
}

/* ---------------------------------------------------------------------- */
/* Lista de materiales                                                     */
/* ---------------------------------------------------------------------- */
.mrow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 2px;
  border-bottom: 1.5px solid var(--line);
}

.mrow .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--cyan);
}

.mrow .dot.empaque {
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px var(--ink);
}

.mrow-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mrow-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mrow-detail {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.mrow-detail strong {
  color: var(--ink);
}

.mrow-date {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 3px;
}

.mrow-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #05576F;
  vertical-align: middle;
  margin-left: 4px;
}

.badge.empaque {
  background: var(--yellow-soft);
  color: #6B5100;
}

.precio-viejo { color: #B45309; font-weight: 700; }
.sube { color: var(--bad); font-weight: 800; }
.baja { color: var(--ok); font-weight: 800; }

/* ---------------------------------------------------------------------- */
/* Avisos                                                                  */
/* ---------------------------------------------------------------------- */
.notice,
.aviso-precios,
.aviso-respaldo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--yellow-soft);
  border-radius: 18px;
  padding: 11px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  margin: 10px 0;
}

.aviso-txt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.aviso-txt .ic {
  margin-top: 2px;
  color: #B45309;
}

.notice {
  display: block;
  background: var(--cyan-soft);
}

.aviso-ios-titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.precio-fila {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: 18px;
  padding: 11px 12px;
}

.precio-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
}

.precio-info span {
  color: var(--muted);
  font-size: 0.78rem;
}

.precio-fila input {
  width: 112px;
  flex-shrink: 0;
  font-weight: 800;
}

.lista-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------------------------------------------------------------------- */
/* Pantalla "Más"                                                          */
/* ---------------------------------------------------------------------- */
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  padding: 15px 2px;
  text-align: left;
}

.list-row:active {
  background: rgba(255, 255, 255, 0.7);
}

.list-ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.list-ic .ic {
  width: 21px;
  height: 21px;
}

.list-ic.c1 { background: var(--cyan-soft);    color: #05576F; }
.list-ic.c2 { background: var(--magenta-soft); color: #9B1457; }
.list-ic.c3 { background: var(--yellow-soft);  color: #6B5100; }

.list-text {
  flex: 1;
  min-width: 0;
}

.list-text b {
  display: block;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.list-text small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.list-row > .ic {
  color: var(--muted);
}

.list-row select {
  width: auto;
  padding: 9px 32px 9px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 999px;
}

.apoyo-precio {
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.creadora {
  text-align: center;
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  padding: 26px 20px 22px;
  margin-top: 28px;
  position: relative;
  overflow: hidden;
}

.creadora::after {
  content: "";
  position: absolute;
  left: -30px;
  bottom: -30px;
  width: 190px;
  height: 190px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 2px, transparent 2.4px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 30% 70%, #000 0, transparent 68%);
  mask-image: radial-gradient(circle at 30% 70%, #000 0, transparent 68%);
  pointer-events: none;
}

.creadora > * {
  position: relative;
  z-index: 1;
}

.avatar-container {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  border: 3px solid var(--yellow);
  background: var(--magenta);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creator-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.creator-bio {
  font-size: 0.86rem;
  color: #C2CEDF;
  margin: 6px 0 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.social-links .btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.b2b {
  background: var(--yellow);
  color: var(--ink);
  border-radius: 22px;
  padding: 16px;
  text-align: left;
}

.b2b b {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.b2b p {
  font-size: 0.84rem;
  margin: 6px 0 12px;
  font-weight: 600;
}

.version-app {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 6px;
}

.nota-publicidad {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 18px;
}

/* ---------------------------------------------------------------------- */
/* Ventanas inferiores                                                     */
/* ---------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, 0.58);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 200;
  width: 100%;
}

.modal-overlay.open {
  display: flex;
}

.modal-sheet {
  background: var(--card);
  width: 100%;
  max-width: 560px;
  border-radius: 30px 30px 0 0;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: abrir 0.22s ease;
}

.modal-sheet::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 44px;
  height: 5px;
  margin-left: -22px;
  background: var(--line);
  border-radius: 999px;
}

@keyframes abrir {
  from { transform: translateY(26px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.sheet-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.sheet-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin: -6px 0 14px;
}

.big-field input {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  padding: 14px 10px;
  border-radius: 22px;
  margin-bottom: 12px;
}

.big-field .pills {
  justify-content: center;
  margin-bottom: 16px;
}

.preview-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 18px;
  margin-bottom: 14px;
  font-weight: 700;
}

.preview-line strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.help-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1.5px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.45;
}

.help-num {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--ink);
}

.help-step:nth-child(1) .help-num { background: var(--cyan); }
.help-step:nth-child(2) .help-num { background: var(--yellow); }
.help-step:nth-child(3) .help-num { background: var(--magenta); color: #fff; }
.help-step:nth-child(4) .help-num { background: var(--ink); color: #fff; }

.help-step b {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

/* ---------------------------------------------------------------------- */
/* Avisos flotantes y publicidad                                           */
/* ---------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  display: none;
  z-index: 300;
  max-width: 92%;
  text-align: center;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.35);
}

.toast.show {
  display: block;
}

.aviso-actualizacion {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 300;
  max-width: 94%;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.35);
}

.anuncio {
  text-align: center;
  margin: 26px auto 8px;
}

.anuncio[hidden] {
  display: none;
}

.anuncio-etiqueta {
  display: block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.anuncio-marco {
  width: 320px;
  max-width: 100%;
  height: 50px;
  margin: 0 auto;
  overflow: hidden;
}

.anuncio-marco iframe {
  border: 0;
  width: 320px;
  height: 50px;
  max-width: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
