.app {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100dvh;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  animation: fade 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.grow { flex: 1; min-height: 8px; }

.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.top .shop { font-size: 20px; font-weight: 600; }
.top .title { font-size: 16px; font-weight: 500; }
.top .spacer { width: 44px; }

.progress { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--mute); }
.progress i { display: block; width: 24px; height: 5px; border-radius: 3px; background: var(--panel); }
.progress i.on { background: var(--green); }
.progress span { margin-right: 4px; }

h1 { font-size: 32px; font-weight: 500; line-height: 1.12; letter-spacing: -0.8px; }

.ded-box textarea { min-height: 116px; }
.ded-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ia-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--green);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
}
.ia-btn .i { width: 16px; height: 16px; }
.count { font-size: 12px; color: var(--mute); }

.consent { display: flex; align-items: center; gap: 14px; }
.consent b { display: block; font-size: 15px; font-weight: 500; }
.consent small { display: block; font-size: 12.5px; font-weight: 300; color: var(--mute); line-height: 1.35; }

.live {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 13px;
  color: var(--mute);
}
.live .dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--panel); }
.live.on { color: var(--ink); }
.live.on .dot { background: var(--pop); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(214, 51, 108, 0.18); } }

.error { color: var(--pop); font-size: 13px; font-weight: 500; }

/* Ayuda IA */
.props { display: flex; flex-direction: column; gap: 10px; }
.prop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--white);
  text-align: left;
  box-shadow: inset 0 0 0 2px transparent;
}
.prop[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--green); }
.prop .script { font-size: 24px; line-height: 1.15; }
.prop .use { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 13px; font-weight: 500; }
.prop .use .i { width: 16px; height: 16px; }
.skel { height: 84px; border-radius: var(--r-md); background: linear-gradient(90deg, #fff 30%, #f4f7f4 50%, #fff 70%) 0 0 / 300% 100%; animation: sh 1.2s linear infinite; }
@keyframes sh { to { background-position: -300% 0; } }

/* Catálogo */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.tile .img { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-lg); background: var(--panel) center / cover no-repeat; overflow: hidden; }
.tile .name { font-size: 14px; font-weight: 500; padding: 0 4px; }
.tile .price { font-size: 17px; font-weight: 600; padding: 0 4px; margin-top: -6px; }
.tile.out { opacity: 0.45; }
.tile .out-tag { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: var(--white); font-size: 12px; font-weight: 600; }
.tile .few { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); font-size: 12px; font-weight: 500; }
.empty { padding: 40px 10px; text-align: center; color: var(--mute); font-size: 14px; }

/* Ficha */
.hero { position: relative; height: 46dvh; min-height: 300px; background: var(--panel) center / cover no-repeat; }
.hero .round { position: absolute; left: 20px; top: calc(20px + env(safe-area-inset-top)); background: rgba(255, 255, 255, 0.92); }
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 54dvh;
  margin-top: -28px;
  padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--white);
}
.sheet .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sheet .head b { font-size: 24px; font-weight: 500; }
.sheet .head span { font-size: 24px; font-weight: 600; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.size { display: flex; flex-direction: column; align-items: center; padding: 10px 0; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1.5px var(--panel); font-size: 13px; font-weight: 500; }
.size small { font-weight: 400; color: var(--mute); }
.size[aria-pressed='true'] { background: var(--bg); box-shadow: inset 0 0 0 2px var(--green); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg); font-size: 12.5px; font-weight: 500; }
.fact .i { width: 16px; height: 16px; color: var(--green); }
.compo { font-size: 15px; line-height: 1.45; }

/* Entrega y pago */
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1.5px var(--panel);
  text-align: left;
}
.opt[aria-pressed='true'] { background: var(--white); box-shadow: inset 0 0 0 2px var(--green); }
.opt .ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--bg); color: var(--green); }
.opt .ic .i { width: 18px; height: 18px; }
.opt .tx { flex: 1; }
.opt b { display: block; font-size: 15px; font-weight: 500; }
.opt small { font-size: 12.5px; font-weight: 300; color: var(--mute); }
.opt .radio { width: 22px; height: 22px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--panel); }
.opt[aria-pressed='true'] .radio { box-shadow: inset 0 0 0 7px var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.check { display: flex; align-items: flex-start; gap: 12px; text-align: left; font-size: 13.5px; line-height: 1.35; }
.check .box { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--panel); background: var(--white); color: var(--white); }
.check[aria-checked='true'] .box { background: var(--green); box-shadow: none; }
.check .box .i { width: 16px; height: 16px; }
.check a { color: var(--green); }

.note-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.note-line .i { width: 16px; height: 16px; color: var(--green); }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.row span { color: var(--mute); }
.row b { font-weight: 500; text-align: right; }
.row.total { padding-top: 8px; border-top: 1.5px solid var(--panel); }
.row.total b { font-weight: 600; }

.wallet { min-height: 52px; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.sep { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--mute); }
.sep::before, .sep::after { content: ''; flex: 1; height: 1.5px; background: var(--panel); }

/* Resultado */
.result { align-items: center; text-align: center; padding-top: calc(60px + env(safe-area-inset-top)); }
.big-ic { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--green); color: var(--white); }
.big-ic .i { width: 46px; height: 46px; }
.big-ic.bad { background: var(--pop-soft); color: var(--pop); }
.result p { font-size: 15px; font-weight: 300; color: var(--mute); line-height: 1.4; max-width: 340px; }
.result .card { width: 100%; text-align: left; }

.warn-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r-md); background: var(--pop-soft); }
.warn-card b { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.warn-card b .i { color: var(--pop); }
.warn-card p { font-size: 14px; line-height: 1.4; }
.ded-card .script { font-size: 26px; line-height: 1.15; }

.saved { display: flex; align-items: center; gap: 12px; }
.saved .thumb { width: 56px; height: 56px; flex: none; border-radius: 14px; background: var(--panel) center / cover no-repeat; }
.saved b { display: block; font-size: 14px; font-weight: 500; }
.saved small { font-size: 12.5px; font-weight: 300; color: var(--mute); }

@media (min-width: 560px) {
  body { background: #e4ebe5; }
  .app { box-shadow: 0 0 0 1px rgba(31, 58, 46, 0.06); }
}
