:root {
  --bg: #fff8f2;
  --paper: #ffffff;
  --ink: #262730;
  --muted: #74717c;
  --mint: #69cbb7;
  --mint2: #3ca58f;
  --peach: #f7aaa0;
  --peach2: #ed7f76;
  --lav: #b78bc5;
  --butter: #f7e49c;
  --sky: #c7edf0;
  --rose: #f8b9c7;
  --shadow: 0 18px 45px rgba(47, 42, 64, .11);
  --r: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.dragging-patch,
body.dragging-patch {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(105, 203, 183, .26), transparent 28rem),
    radial-gradient(circle at top right, rgba(248, 185, 199, .32), transparent 28rem),
    linear-gradient(180deg, #fffdf7 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

img {
  max-width: 100%;
  display: block;
}

.hero {
  width: min(1120px, calc(100% - 28px));
  margin: 18px auto 0;
  padding: 18px;
  border-radius: 30px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .72)),
    linear-gradient(135deg, var(--sky), var(--rose) 50%, var(--butter));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .72);
}

.logo {
  width: min(210px, 54vw);
  height: auto;
  max-height: 118px;
  object-fit: contain;
  margin: 0 auto 10px;
  filter: drop-shadow(0 8px 14px rgba(68, 46, 72, .12));
}

.hero-copy {
  margin: 6px auto 0;
  color: var(--muted);
  font-weight: 760;
  max-width: 720px;
  font-size: clamp(1rem, 2.7vw, 1.25rem);
  line-height: 1.35;
}

.app {
  width: min(1120px, calc(100% - 28px));
  margin: 16px auto 34px;
}

.card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.intro {
  margin-bottom: 16px;
  color: #4d4a56;
  line-height: 1.52;
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: start;
}

.side {
  display: grid;
  gap: 16px;
}

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

.head.compact {
  margin-bottom: 12px;
}

.head span,
.eyebrow {
  display: block;
  margin: 0 0 5px;
  color: var(--peach2);
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: .78rem;
}

.stage-head span,
.text-head span {
  font-size: .86rem;
}

.head h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -.02em;
}

.stage-head h2 {
  color: #2e2d34;
  font-size: clamp(1.02rem, 2.6vw, 1.25rem);
  font-weight: 500;
  line-height: 1.3;
  max-width: 560px;
}

.text-head h2 {
  color: #2e2d34;
  font-size: clamp(.84rem, 2.2vw, .96rem);
  font-weight: 850;
  line-height: 1.18;
}

.section-instruction {
  margin: 8px 0 0;
  color: #4d4a56;
  font-weight: 500;
  line-height: 1.35;
}

.switch {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: #f6f2f3;
  border-radius: 999px;
  flex: 0 0 auto;
}

.switch button,
.collection-tabs button,
.group-tabs button,
.tabs button {
  border-radius: 999px;
  padding: 10px 14px;
  color: #706d78;
  background: transparent;
  font-weight: 950;
  font-size: .88rem;
  white-space: nowrap;
  min-height: 44px;
}

.switch button.active,
.collection-tabs button.active,
.group-tabs button.active,
.tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--mint), var(--peach));
  box-shadow: 0 8px 18px rgba(237, 127, 118, .2);
}

.stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .82), transparent 20rem),
    linear-gradient(150deg, #d8f4f3 0%, #f9e9da 58%, #f7cbd5 100%);
  border: 1px solid rgba(255, 255, 255, .88);
  touch-action: pan-y;
}

#svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  user-select: none;
}

.node {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.node:active {
  cursor: grabbing;
}

.controls {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #fff7f5;
  border: 1px solid #ffe1dd;
}

.controls strong {
  display: block;
  margin-bottom: 8px;
  color: #564d58;
  font-size: .9rem;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.control-grid button,
.actions button {
  min-height: 44px;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 950;
  color: #625e69;
  background: #f3f0f2;
}

.control-grid .danger {
  color: #fff;
  background: #ef6262;
}

label {
  display: block;
  margin: 10px 0 6px;
  font-size: .84rem;
  font-weight: 950;
  color: #5f5a66;
}

.input {
  width: 100%;
  min-height: 46px;
  border: 2px solid rgba(183, 139, 197, .2);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  font-weight: 850;
}

.input:focus {
  border-color: var(--lav);
  box-shadow: 0 0 0 4px rgba(183, 139, 197, .14);
}

.name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.primary,
.wa {
  border-radius: 15px;
  padding: 10px 16px;
  min-height: 46px;
  color: #fff;
  background: linear-gradient(135deg, var(--mint), var(--mint2));
  font-weight: 950;
  white-space: nowrap;
}

.note {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.4;
  margin: 10px 0 0;
}


.collection-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  margin: 4px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.collection-tabs::-webkit-scrollbar {
  display: none;
}

.collection-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: .82rem;
}

.group-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  margin: 12px 0 10px;
  background: #f6f2f3;
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.group-tabs::-webkit-scrollbar {
  display: none;
}

.tabs,
.letter-preview {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
}

.tabs::-webkit-scrollbar,
.letter-preview::-webkit-scrollbar,
.patch-grid::-webkit-scrollbar {
  display: none;
}

.patch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}

.patch-item {
  touch-action: manipulation;
  aspect-ratio: 1;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .7)),
    linear-gradient(135deg, var(--sky), var(--rose));
  border: 1px solid rgba(70, 56, 82, .1);
  display: grid;
  place-items: center;
  padding: 8px;
  box-shadow: 0 10px 22px rgba(47, 42, 64, .07);
  scroll-snap-align: start;
}

.patch-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.letter-preview .patch-item {
  flex: 0 0 62px;
  width: 62px;
  padding: 7px;
}

.patch-item:active,
.primary:active,
.actions button:active {
  transform: scale(.98);
}

.summary {
  margin-top: 16px;
}

.summary p {
  color: #57525d;
  line-height: 1.45;
  margin: 0 0 14px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 10px;
}

.actions .wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 14px 28px rgba(37, 211, 102, .22);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 14px;
  width: min(430px, calc(100% - 34px));
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(38, 39, 48, .96);
  color: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
  font-weight: 750;
  font-size: .86rem;
  line-height: 1.25;
  transition: opacity .18s, transform .18s;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .actions .wa {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .side .card {
    width: 100%;
    overflow: hidden;
  }

  .group-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    padding: 4px;
  }

  .tabs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    overflow: visible;
    padding: 2px 2px 12px;
    touch-action: manipulation;
  }

  .tabs button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: .78rem;
  }

  .patch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
    max-width: 100%;
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 2px 10px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .patch-grid .patch-item {
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 1;
    padding: 8px;
  }
}

@media (max-width: 520px) {
  .hero {
    width: calc(100% - 20px);
    margin-top: 10px;
    border-radius: 22px;
    padding: 14px;
  }

  .logo {
    width: min(176px, 58vw);
    max-height: 96px;
    margin-bottom: 8px;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.36;
  }

  .app {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  .card {
    padding: 12px;
    border-radius: 20px;
  }

  .intro {
    font-size: .96rem;
  }

  .head {
    flex-direction: column;
    align-items: flex-start;
  }

  .stage-head h2 {
    font-size: 1.02rem;
  }

  .switch {
    width: 100%;
  }

  .switch button {
    flex: 1;
  }

  .stage {
    border-radius: 22px;
    min-height: 440px;
    touch-action: pan-y;
  }

  .name-row {
    grid-template-columns: 1fr;
  }

  .primary {
    width: 100%;
  }

  .letter-preview .patch-item {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    height: 56px;
    padding: 6px;
  }

  .control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  .actions {
    grid-template-columns: 1fr;
  }

  .actions .wa {
    grid-column: auto;
  }
}

/* === Ajuste gestos Paz Kids: caneca, menú plegable y edición táctil === */
.stage-card {
  position: relative;
}

.trash-zone {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 54px;
  margin: 12px auto 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: #7a6d76;
  background: rgba(255, 255, 255, .78);
  border: 2px dashed rgba(237, 127, 118, .40);
  box-shadow: 0 10px 24px rgba(47, 42, 64, .08);
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  user-select: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.trash-zone.visible {
  display: flex;
}

.trash-zone.hot {
  transform: scale(1.04);
  color: #fff;
  background: linear-gradient(135deg, #ef6262, #ed7f76);
  border-color: transparent;
}

.trash-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.trash-copy {
  font-size: .92rem;
  line-height: 1.15;
}

.controls {
  overflow: hidden;
}

.controls-toggle {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #564d58;
  background: #fff;
  border: 1px solid #ffe1dd;
  font-weight: 950;
}

.controls-toggle .chevron {
  font-size: 1.15rem;
  transition: transform .15s ease;
}

.controls.open .controls-toggle .chevron {
  transform: rotate(180deg);
}

.controls-body {
  margin-top: 10px;
}

.controls:not(.open) .controls-body {
  display: none;
}

.gesture-hint {
  margin: 0 0 10px;
  color: #6d6670;
  font-size: .86rem;
  line-height: 1.35;
}

.node image {
  pointer-events: none;
}

.node rect {
  pointer-events: auto;
}

.node {
  pointer-events: auto;
}

/* En escritorio el menú queda abierto como herramienta de precisión */
@media (min-width: 721px) {
  .controls {
    display: block;
  }

  .controls .controls-body {
    display: block !important;
  }

  .controls-toggle .chevron {
    display: none;
  }
}

@media (max-width: 720px) {
  .trash-zone {
    position: sticky;
    bottom: 10px;
    z-index: 40;
    width: min(330px, calc(100% - 14px));
    min-height: 52px;
    margin-top: 10px;
  }

  .controls {
    padding: 8px;
  }

  .gesture-hint {
    font-size: .82rem;
  }
}


/* === Ajuste fino: posiciones iniciales y estabilidad al arrastrar === */
html.dragging-patch,
html.dragging-patch body {
  overscroll-behavior: none;
  touch-action: none;
}

html.dragging-patch .stage,
html.dragging-patch #svg,
html.dragging-patch .node {
  touch-action: none !important;
}

html.dragging-patch .app,
html.dragging-patch .card {
  overscroll-behavior: contain;
}


/* === Ajuste 2026-05: caneca más accesible y arrastre menos rígido === */
html.dragging-patch,
html.dragging-patch body {
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  touch-action: auto !important;
}

html.dragging-patch .stage,
html.dragging-patch #svg,
html.dragging-patch .node {
  touch-action: none !important;
}

@media (max-width: 720px) {
  .trash-zone {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    z-index: 9998 !important;
    display: flex !important;
    width: min(360px, calc(100vw - 28px)) !important;
    margin: 0 !important;
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
    pointer-events: none;
  }

  .trash-zone.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .trash-zone.hot {
    transform: translateX(-50%) translateY(0) scale(1.05);
  }
}


/* === Ajuste 2026-05 final: arrastre estable sin dejar la página pegada === */
html.dragging-patch,
body.dragging-patch {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

.stage,
#svg {
  touch-action: pan-y !important;
}

.node,
.node * {
  touch-action: none !important;
  -webkit-user-select: none;
  user-select: none;
}

html.dragging-patch .stage,
html.dragging-patch #svg,
html.dragging-patch .node,
html.dragging-patch .node * {
  touch-action: none !important;
}

.node .hit-rect {
  pointer-events: all;
}


/* === Ajuste video: posición correcta de letras y arrastre estable === */
html.dragging-patch,
body.dragging-patch {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

body.dragging-patch {
  max-width: 100vw !important;
}

.stage,
#svg {
  touch-action: pan-y !important;
}

.node,
.node *,
.node .hit-rect {
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

html.dragging-patch .stage,
html.dragging-patch #svg,
html.dragging-patch .node,
html.dragging-patch .node * {
  touch-action: none !important;
}

@media (max-width: 720px) {
  .trash-zone {
    bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  }
}

/* === Ajuste grande 2: limpieza móvil, orden espalda, catálogo y acciones === */
.how-it-works {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
}

.how-it-works summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  color: #4d4a56;
  font-weight: 950;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.how-it-works summary::-webkit-details-marker { display: none; }

.how-it-works summary::after {
  content: '⌄';
  margin-left: auto;
  color: var(--peach2);
  font-size: 1.15rem;
  transition: transform .18s ease;
}

.how-it-works[open] summary::after { transform: rotate(180deg); }

.how-it-works p {
  margin: 0;
  padding: 0 16px 16px;
  color: #4d4a56;
  line-height: 1.55;
  font-size: .96rem;
}

.how-icon { font-size: 1.1rem; }

.stage-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.stage-head span {
  margin: 0;
  font-size: clamp(.94rem, 2.7vw, 1.08rem);
  line-height: 1.2;
}

.reset-top {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--mint), var(--peach));
  box-shadow: 0 10px 20px rgba(237, 127, 118, .18);
  font-weight: 950;
  font-size: 1.3rem;
  line-height: 1;
}

.reset-top:active { transform: scale(.96); }

.stacked-label {
  margin-top: 8px;
  margin-bottom: 7px;
}

.stacked-label span {
  display: block;
  font-size: .86rem;
  font-weight: 950;
  color: #5f5a66;
}

.stacked-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.custom-note {
  font-size: .86rem;
  color: #3f3d45 !important;
  line-height: 1.42;
  margin-bottom: 12px !important;
}

.patch-grid .patch-item img,
.letter-preview .patch-item img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.patch-grid .patch-item {
  overflow: hidden;
  padding: 12px;
}

.letter-preview .patch-item {
  padding: 7px;
}

.actions {
  grid-template-columns: 1fr 1.25fr;
}

.actions .wa {
  grid-column: auto;
}

@media (max-width: 720px) {
  .app,
  .hero {
    width: calc(100% - 20px);
  }

  .grid,
  .side {
    gap: 12px;
  }

  .stage-head {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .stage-head .switch {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }

  .reset-top {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .stage-card,
  .letters-card,
  .patches-card,
  .summary {
    margin-left: 0;
    margin-right: 0;
  }

  .patch-grid .patch-item {
    flex: 0 0 84px;
    width: 84px;
    min-width: 84px;
    height: 84px;
    padding: 12px;
  }

  .patch-grid .patch-item.detail-card {
    flex-basis: 92px;
    width: 92px;
    min-width: 92px;
    height: 92px;
  }

  .letter-preview .patch-item {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    height: 56px;
    padding: 6px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .actions button,
  .actions .wa {
    width: 100%;
  }
}


/* === Ajuste: botón de reinicio en la vista previa y resumen visual oculto === */
.design-summary,
#summary[hidden] {
  display: none !important;
}

.stage-card {
  position: relative;
}

.reset-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .reset-top {
    justify-self: end;
    align-self: center;
  }

  .summary .custom-note {
    margin-bottom: 14px !important;
  }
}


/* === Consolidado 2026-05: tacto natural, caneca solo al arrastrar y zona segura === */
.stage,
#svg {
  touch-action: pan-y !important;
}

.node,
.node *,
.node .hit-rect {
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

html.dragging-patch,
body.dragging-patch {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

body.dragging-patch {
  max-width: 100vw !important;
}

html.dragging-patch .stage,
html.dragging-patch #svg,
html.dragging-patch .node,
html.dragging-patch .node * {
  touch-action: none !important;
}

@media (max-width: 720px) {
  .trash-zone {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(18px + env(safe-area-inset-bottom)) !important;
    z-index: 9998 !important;
    display: flex !important;
    width: min(390px, calc(100vw - 24px)) !important;
    min-height: 64px !important;
    margin: 0 !important;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
  }

  .trash-zone.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .trash-zone.hot {
    transform: translateX(-50%) translateY(0) scale(1.07);
  }
}

/* === Ajuste v22: descarga separada de frente y espalda con respaldo móvil === */
.download-fallback {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  border: 1px dashed rgba(237, 127, 118, .32);
}

.download-fallback p {
  margin: 0 0 10px;
  color: #5f5a66;
  font-size: .82rem;
  line-height: 1.35;
  font-weight: 750;
}

.download-fallback-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.download-fallback a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--mint), var(--peach));
}

@media (max-width: 520px) {
  .download-fallback-row {
    grid-template-columns: 1fr;
  }
}


/* === Ajuste v27: caneca flotante, compacta y sin ocupar espacio en la página === */
.trash-zone {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  z-index: 9998 !important;
  display: flex !important;
  width: min(315px, calc(100vw - 42px)) !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(18px);
  pointer-events: none !important;
}

.trash-zone.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.trash-zone.hot {
  transform: translateX(-50%) translateY(0) scale(1.04);
}

.trash-icon {
  font-size: 1.15rem !important;
}

.trash-copy {
  font-size: .82rem !important;
  line-height: 1.1 !important;
}

/* === Ajuste v27: catálogo más limpio en móvil === */
.group-tabs {
  margin-top: 14px;
  margin-bottom: 10px;
}

.tabs {
  margin-top: 2px;
  padding-bottom: 10px;
}

.patches-card .text-head {
  margin-bottom: 4px;
}

@media (max-width: 520px) {
  .group-tabs button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: .78rem;
  }

  .tabs button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: .78rem;
  }

  .toast {
    bottom: 10px;
    width: min(360px, calc(100% - 38px));
    padding: 8px 11px;
    font-size: .8rem;
  }
}

/* === v32 embellecimiento visual PazKids === */
body {
  background:
    radial-gradient(circle at 12% 5%, rgba(105, 203, 183, .30), transparent 24rem),
    radial-gradient(circle at 88% 0%, rgba(248, 185, 199, .36), transparent 26rem),
    radial-gradient(circle at 50% 100%, rgba(247, 228, 156, .22), transparent 24rem),
    linear-gradient(180deg, #fffdf9 0%, #fff8f2 48%, #fff4f7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(237, 127, 118, .075) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(105, 203, 183, .075) 1px, transparent 1.6px);
  background-position: 0 0, 14px 14px;
  background-size: 28px 28px;
  opacity: .46;
  z-index: -1;
}

.hero {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 22px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .76)),
    radial-gradient(circle at 18% 18%, rgba(105, 203, 183, .30), transparent 18rem),
    radial-gradient(circle at 90% 18%, rgba(248, 185, 199, .42), transparent 18rem),
    linear-gradient(135deg, #eefaf8, #fff0f4 58%, #fff7df);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 22px 58px rgba(47, 42, 64, .12);
}

.hero-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  right: -60px;
  top: -80px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(247, 170, 160, .44), transparent 68%);
}

.hero-main {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.logo {
  width: min(190px, 42vw);
  margin: 0;
}

.hero-eyebrow {
  margin: 0 0 6px;
  color: var(--peach2);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #292731;
  font-size: clamp(1.7rem, 4.6vw, 3rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.hero-copy {
  max-width: 610px;
  margin: 10px 0 0;
  color: #5d5964;
  font-size: clamp(.95rem, 2.1vw, 1.08rem);
  line-height: 1.42;
  font-weight: 720;
}

.hero-chips,
.trust-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-chips span,
.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(105, 203, 183, .18);
  color: #615d68;
  font-size: .78rem;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(47, 42, 64, .055);
}

.hero-chips span::before,
.trust-row span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--mint2);
  font-weight: 950;
}

.card {
  background: rgba(255, 255, 255, .90);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 18px 46px rgba(47, 42, 64, .09);
}

.intro.how-it-works {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 248, 250, .90)),
    linear-gradient(135deg, rgba(105, 203, 183, .12), rgba(247, 170, 160, .12));
}

.how-it-works summary {
  font-size: 1rem;
  color: #45414d;
}

.stage-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.90)),
    radial-gradient(circle at 50% 0%, rgba(105,203,183,.12), transparent 18rem);
}

.stage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 10px;
}

.stage-head h2 {
  font-weight: 900;
  letter-spacing: -.025em;
}

.section-instruction {
  margin-top: 5px;
  color: #6a6570;
  font-size: .84rem;
  font-weight: 650;
}

.stage {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 22px 44px rgba(47, 42, 64, .08);
}

.reset-top {
  box-shadow: 0 10px 22px rgba(105, 203, 183, .18);
  transition: transform .16s ease, box-shadow .16s ease;
}

.reset-top:active {
  transform: scale(.96) rotate(-12deg);
}

.switch,
.group-tabs {
  background: rgba(246, 242, 243, .78);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

.switch button.active,
.collection-tabs button.active,
.group-tabs button.active,
.tabs button.active {
  background: linear-gradient(135deg, #65cbb7, #f4a39a);
  box-shadow: 0 10px 24px rgba(237, 127, 118, .22);
}

.letters-card,
.patches-card,
.summary {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.91)),
    radial-gradient(circle at 100% 0%, rgba(248,185,199,.10), transparent 16rem);
}

.text-head h2 {
  color: #383541;
  font-size: clamp(.92rem, 2.5vw, 1.06rem);
  letter-spacing: -.015em;
}

.stacked-label span,
label {
  color: #625d69;
}

.collection-tabs button,
.tabs button {
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.collection-tabs button:active,
.tabs button:active {
  transform: scale(.97);
}

.patch-grid {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.34));
  padding: 8px;
}

.patch-item {
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.76)),
    linear-gradient(135deg, rgba(199,237,240,.72), rgba(248,185,199,.62));
  border: 1px solid rgba(70, 56, 82, .08);
  box-shadow: 0 12px 22px rgba(47, 42, 64, .06);
  transition: transform .14s ease, box-shadow .14s ease;
}

.patch-item:active {
  transform: scale(.965);
  box-shadow: 0 8px 15px rgba(47, 42, 64, .08);
}

.input {
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96);
}

.primary,
.wa {
  box-shadow: 0 12px 24px rgba(60, 165, 143, .18);
}

.actions button {
  background: linear-gradient(135deg, #f7f4f6, #ebe8ec);
}

.actions .wa {
  color: #fff;
  background: linear-gradient(135deg, #2cd96f, #078f76);
}

.summary {
  border: 1px solid rgba(105, 203, 183, .13);
}

.custom-note {
  margin-top: 2px !important;
}

.trust-row {
  margin: 8px 0 14px;
}

.trust-row span {
  background: rgba(248, 249, 247, .88);
  font-size: .76rem;
}

.controls-toggle {
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.trash-zone {
  box-shadow: 0 18px 44px rgba(239, 98, 98, .18);
}

@media (max-width: 720px) {
  .hero {
    padding: 16px;
    border-radius: 26px;
  }

  .hero-main {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .logo {
    width: 92px;
  }

  .hero h1 {
    font-size: 1.35rem;
    line-height: 1.02;
  }

  .hero-eyebrow {
    font-size: .66rem;
    letter-spacing: .13em;
  }

  .hero-copy {
    font-size: .84rem;
    line-height: 1.34;
  }

  .hero-chips {
    margin-top: 12px;
    gap: 6px;
  }

  .hero-chips span,
  .trust-row span {
    min-height: 30px;
    padding: 6px 9px;
    font-size: .70rem;
  }

  .stage-head {
    grid-template-columns: 1fr auto;
  }

  .stage-head .switch {
    grid-column: 1 / -1;
    width: 100%;
  }

  .section-instruction {
    font-size: .78rem;
  }

  .patch-grid {
    border-radius: 18px;
    padding: 7px;
  }

  .text-head h2 {
    font-size: .98rem;
  }

  .actions {
    gap: 9px;
  }
}

@media (max-width: 420px) {
  .hero-main {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .logo {
    width: 78px;
  }

  .hero h1 {
    font-size: 1.18rem;
  }

  .hero-copy {
    font-size: .78rem;
  }

  .hero-chips span:nth-child(3) {
    display: none;
  }
}


/* === v33 limpieza comercial y valores PazKids === */
.hero-main {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
}

.hero-copy {
  max-width: 760px;
  font-size: clamp(1.02rem, 2.6vw, 1.28rem);
  line-height: 1.38;
  font-weight: 800;
  color: #403d49;
}

.stage-head span,
.text-head span {
  display: inline-block;
  font-size: clamp(.95rem, 2.8vw, 1.12rem);
  letter-spacing: .16em;
  line-height: 1.14;
}

.stage-head {
  align-items: center;
}

.letters-card .text-head,
.patches-card .text-head {
  margin-bottom: 12px;
}

.letters-card label[for="name"] {
  margin-top: 12px;
  color: #3d3945;
  font-size: .95rem;
  font-weight: 900;
}

.summary .text-head h2 {
  margin-top: 6px;
  font-size: clamp(1.03rem, 2.8vw, 1.2rem);
}

.values-note {
  margin: 12px 0 0;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,246,249,.88)),
    radial-gradient(circle at 0% 0%, rgba(105,203,183,.12), transparent 16rem);
  border: 1px solid rgba(105,203,183,.18);
  box-shadow: 0 12px 26px rgba(47,42,64,.06);
  overflow: hidden;
}

.values-note summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #3d3945;
  font-weight: 950;
  font-size: .98rem;
}

.values-note summary::-webkit-details-marker {
  display: none;
}

.values-note summary::after {
  content: "⌄";
  color: var(--peach2);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .18s ease;
}

.values-note[open] summary::after {
  transform: rotate(180deg);
}

.values-content {
  padding: 0 16px 15px;
}

.values-content p {
  margin: 0 0 12px;
  color: #55515e;
  font-size: .88rem;
  line-height: 1.45;
}

.values-content p:last-child {
  margin-bottom: 0;
}

.values-final {
  padding-top: 10px;
  border-top: 1px dashed rgba(237,127,118,.28);
  font-weight: 800;
}

.actions.final-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}

.actions.final-actions button {
  min-height: 56px;
}

.actions.final-actions #download {
  background: #f4f2f4;
  color: #5f5b66;
  box-shadow: none;
}

.actions.final-actions #whatsapp {
  font-size: 1rem;
}

.price-guide {
  margin-top: 12px;
}

.site-footer {
  max-width: 1120px;
  margin: 8px auto 26px;
  padding: 0 18px 24px;
  text-align: center;
  color: #77727f;
  font-size: .68rem;
  line-height: 1.35;
}

.site-footer p {
  margin: 0;
}

.site-footer .footer-dev {
  margin-bottom: 3px;
}

.site-footer strong {
  color: #4b4652;
  font-weight: 800;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #5d5863;
  font-weight: 800;
  text-decoration: none;
}

.ig-mini {
  width: 11px;
  height: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ig-mini svg {
  width: 11px;
  height: 11px;
  display: block;
}

.ig-mini rect,
.ig-mini circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ig-mini circle:last-child {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 720px) {
  .hero-main {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .hero-copy {
    font-size: .92rem;
    line-height: 1.36;
  }

  .stage-head span,
  .text-head span {
    font-size: .96rem;
    letter-spacing: .14em;
  }

  .values-note summary {
    padding: 13px 14px;
  }

  .values-content {
    padding: 0 14px 14px;
  }

  .values-content p {
    font-size: .82rem;
  }
}

@media (max-width: 420px) {
  .hero-main {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .hero-copy {
    font-size: .86rem;
  }

  .stage-head span,
  .text-head span {
    font-size: .90rem;
    letter-spacing: .12em;
  }
}

/* === Ajuste v36: letras en cuadrícula más compacta === */
.letter-preview {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 7px !important;
  width: 100% !important;
  max-height: 220px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 7px !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.34)) !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: none !important;
  touch-action: pan-y !important;
}

.letter-preview::-webkit-scrollbar {
  display: none !important;
}

.letter-preview .patch-item,
.letter-preview .patch-item.letter-card {
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  aspect-ratio: 1 !important;
  flex: initial !important;
  padding: 5px !important;
  border-radius: 14px !important;
}

@media (max-width: 720px) {
  .letter-preview {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    max-height: 238px !important;
    overflow-y: auto !important;
    padding: 6px !important;
    gap: 7px !important;
    touch-action: pan-y !important;
  }

  .letter-preview .patch-item,
  .letter-preview .patch-item.letter-card {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    padding: 5px !important;
  }
}

@media (max-width: 380px) {
  .letter-preview {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    max-height: 250px !important;
  }
}

.trash-zone {
  bottom: calc(86px + env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) translateY(8px) !important;
}

.trash-zone.visible {
  transform: translateX(-50%) translateY(0) !important;
}

.trash-zone.hot {
  transform: translateX(-50%) translateY(0) scale(1.05) !important;
}

@media (max-width: 720px) {
  .trash-zone {
    bottom: calc(104px + env(safe-area-inset-bottom)) !important;
    width: min(330px, calc(100vw - 32px)) !important;
    min-height: 50px !important;
  }
}

@media (max-width: 520px) {
  .trash-zone {
    bottom: calc(112px + env(safe-area-inset-bottom)) !important;
  }
}

/* === v39: ajuste exclusivo para escritorio / ordenador === */
@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(circle at 8% 8%, rgba(105, 203, 183, .28), transparent 26rem),
      radial-gradient(circle at 92% 4%, rgba(248, 185, 199, .34), transparent 30rem),
      radial-gradient(circle at 54% 100%, rgba(247, 228, 156, .18), transparent 28rem),
      linear-gradient(180deg, #fffdf9 0%, #fff8f2 48%, #fff4f7 100%);
  }

  .hero,
  .app,
  .site-footer {
    width: min(1220px, calc(100% - 72px));
  }

  .hero {
    margin-top: 28px;
    padding: 24px 30px;
    border-radius: 34px;
  }

  .hero-main {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 26px;
  }

  .logo {
    width: 150px;
    max-height: 96px;
  }

  .hero-copy {
    max-width: 850px;
    font-size: 1.16rem;
    line-height: 1.38;
  }

  .app {
    margin-top: 18px;
    margin-bottom: 18px;
  }

  .how-it-works {
    max-width: 1220px;
    margin: 0 auto 18px;
  }

  .how-it-works summary {
    padding: 15px 20px;
  }

  .how-it-works p {
    padding: 0 20px 18px;
    max-width: 980px;
  }

  .grid {
    display: grid;
    grid-template-columns: minmax(560px, 1.15fr) minmax(380px, .85fr);
    gap: 22px;
    align-items: start;
  }

  .stage-card,
  .letters-card,
  .patches-card,
  .summary {
    border-radius: 30px;
    padding: 20px;
  }

  .stage-card {
    position: sticky;
    top: 22px;
    align-self: start;
    min-width: 0;
  }

  .stage-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    margin-bottom: 14px;
  }

  .stage-head span,
  .text-head span {
    font-size: .98rem;
    letter-spacing: .15em;
  }

  .reset-top {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .switch button {
    min-height: 38px;
    padding: 8px 15px;
    font-size: .82rem;
  }

  .stage {
    max-width: 690px;
    border-radius: 30px;
    margin-inline: auto;
  }

  .controls {
    margin-top: 14px;
    padding: 12px;
    border-radius: 22px;
  }

  .controls-toggle {
    min-height: 42px;
    border-radius: 16px;
  }

  .gesture-hint {
    font-size: .80rem;
  }

  .control-grid button {
    min-height: 40px;
    border-radius: 14px;
    font-size: .84rem;
  }

  .side {
    display: grid;
    gap: 18px;
    min-width: 0;
  }

  .letters-card,
  .patches-card {
    overflow: hidden;
  }

  .letters-card .text-head,
  .patches-card .text-head {
    margin-bottom: 10px;
  }

  .text-head h2 {
    font-size: .98rem;
  }

  .stacked-label span,
  label,
  .letters-card label[for="name"] {
    font-size: .84rem;
  }

  .collection-tabs {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    gap: 7px;
    padding: 3px 0 6px;
  }

  .collection-tabs button,
  .tabs button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: .76rem;
  }

  .letter-preview {
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
    max-height: 156px !important;
    padding: 7px !important;
    gap: 6px !important;
  }

  .letter-preview .patch-item,
  .letter-preview .patch-item.letter-card {
    border-radius: 13px !important;
    padding: 5px !important;
  }

  .name-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .input {
    min-height: 42px;
    border-radius: 14px;
    font-size: .88rem;
  }

  .primary {
    min-height: 42px;
    border-radius: 14px;
    padding-inline: 14px;
    font-size: .82rem;
  }

  .group-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    overflow: visible;
    border-radius: 22px;
  }

  .group-tabs button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: .76rem;
  }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    gap: 7px;
    padding: 4px 0 12px;
    margin-top: 4px;
    touch-action: manipulation;
  }

  .patch-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    max-height: 460px;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .patch-grid .patch-item {
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 1;
    padding: 9px;
    border-radius: 17px;
  }

  .summary {
    max-width: 820px;
    margin: 22px auto 0;
  }

  .summary .text-head h2 {
    font-size: 1.06rem;
  }

  .actions.final-actions {
    grid-template-columns: .85fr 1.15fr;
    gap: 12px;
  }

  .actions.final-actions button {
    min-height: 50px;
    border-radius: 16px;
  }

  .values-note summary {
    min-height: 50px;
    padding: 13px 16px;
    font-size: .94rem;
  }

  .values-content p {
    font-size: .84rem;
  }

  .site-footer {
    margin-top: 10px;
    margin-bottom: 28px;
  }
}

@media (min-width: 1280px) {
  .hero,
  .app,
  .site-footer {
    width: min(1260px, calc(100% - 96px));
  }

  .grid {
    grid-template-columns: minmax(620px, 1.18fr) minmax(420px, .82fr);
    gap: 26px;
  }

  .stage {
    max-width: 720px;
  }

  .patch-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-height: 500px;
  }
}


/* === v40: estética integrada con PazKids web + cotización por país === */
.home-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 34px;
  padding: 8px 13px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .90);
  color: #5d5863;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(47, 42, 64, .055);
}

.home-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 26px rgba(47, 42, 64, .09);
}

.quote-panel {
  margin: 10px 0 14px;
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72)),
    radial-gradient(circle at 16% 20%, rgba(105, 203, 183, .20), transparent 13rem),
    radial-gradient(circle at 88% 18%, rgba(248, 185, 199, .24), transparent 13rem);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 12px 34px rgba(47, 42, 64, .07);
}

.quote-title {
  margin: 0 0 10px;
  color: #5f5b66;
  font-size: .86rem;
  font-weight: 950;
  text-align: center;
}

.quote-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quote-country {
  position: relative;
  overflow: hidden;
  min-height: 62px;
  border-radius: 999px;
  padding: 11px 16px;
  color: #27303a;
  text-align: center;
  box-shadow: 0 14px 34px rgba(47, 42, 64, .10);
  border: 1px solid rgba(255,255,255,.82);
}

.quote-country::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,0));
}

.quote-country span,
.quote-country strong {
  position: relative;
  z-index: 1;
  display: block;
}

.quote-small {
  font-size: .78rem;
  font-weight: 850;
  opacity: .83;
  margin-bottom: 2px;
}

.quote-country strong {
  font-size: 1.04rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .02em;
}

.quote-panama {
  background:
    linear-gradient(90deg,
      rgba(255,255,255,.95) 0 25%,
      rgba(246, 186, 202, .72) 25% 50%,
      rgba(255,255,255,.95) 50% 75%,
      rgba(198, 220, 235, .82) 75% 100%);
}

.quote-colombia {
  background:
    linear-gradient(180deg,
      rgba(255, 235, 146, .92) 0 48%,
      rgba(207, 225, 240, .82) 48% 72%,
      rgba(248, 185, 199, .82) 72% 100%);
}

.quote-country:active {
  transform: translateY(1px) scale(.992);
}

.actions.final-actions #download {
  min-height: 52px;
}

@media (max-width: 720px) {
  .home-link {
    min-height: 32px;
    padding: 7px 11px;
    margin-bottom: 10px;
    font-size: .72rem;
  }

  .quote-panel {
    padding: 11px;
    border-radius: 20px;
  }

  .quote-title {
    font-size: .80rem;
  }

  .quote-country {
    min-height: 56px;
    padding: 10px 13px;
  }

  .quote-small {
    font-size: .72rem;
  }

  .quote-country strong {
    font-size: .96rem;
  }
}

@media (min-width: 760px) {
  .quote-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .home-link {
    margin-bottom: 14px;
  }

  .summary {
    max-width: 880px;
  }

  .quote-panel {
    padding: 16px 18px;
  }

  .quote-buttons {
    gap: 14px;
  }

  .quote-country {
    min-height: 70px;
  }
}

@media (min-width: 1024px) { .actions.final-actions { grid-template-columns: 1fr; } .actions.final-actions #download { max-width: 520px; width: 100%; justify-self: center; } }

/* === v41: capa estética de integración con la web principal PazKids === */
:root {
  --ink: #243043;
  --muted: #697181;
  --mint: #86c9bd;
  --mint2: #4f7788;
  --peach: #eba2a8;
  --peach2: #d9828a;
  --lav: #b7a8c6;
  --butter: #f8edbd;
  --sky: #dcecf3;
  --rose: #f8dce2;
  --shadow: 0 22px 54px rgba(38, 48, 67, .075);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 2%, rgba(237, 221, 195, .48), transparent 21rem),
    radial-gradient(circle at 10% 7%, rgba(134, 201, 189, .22), transparent 24rem),
    radial-gradient(circle at 60% 100%, rgba(248, 220, 226, .30), transparent 26rem),
    linear-gradient(180deg, #fffdfa 0%, #fbf7f1 48%, #fff7f8 100%);
}

body::before {
  opacity: .22;
  background-size: 34px 34px;
  background-image:
    radial-gradient(circle, rgba(79, 119, 136, .055) 1px, transparent 1.7px),
    radial-gradient(circle, rgba(217, 130, 138, .052) 1px, transparent 1.7px);
}

.hero,
.card,
.values-note,
.quote-panel {
  box-shadow: 0 22px 54px rgba(38, 48, 67, .075);
  border-color: rgba(255, 255, 255, .94);
}

.hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(255,255,255,.78)),
    radial-gradient(circle at 10% 12%, rgba(134,201,189,.20), transparent 17rem),
    radial-gradient(circle at 94% 18%, rgba(235,162,168,.26), transparent 18rem),
    linear-gradient(135deg, #f9fcfb 0%, #fff7f6 58%, #fbf2df 100%);
}

.hero-glow {
  background: radial-gradient(circle, rgba(235, 162, 168, .34), transparent 70%);
}

.home-link {
  color: #526072;
  font-weight: 780;
  background: rgba(255,255,255,.80);
  border-color: rgba(79,119,136,.10);
  box-shadow: 0 10px 22px rgba(38,48,67,.055);
}

.logo {
  filter: drop-shadow(0 8px 14px rgba(38,48,67,.10));
}

.hero-copy {
  color: #2b3445;
  font-weight: 680;
  letter-spacing: -.01em;
}

.head span,
.eyebrow,
.stage-head span,
.text-head span {
  color: #d9828a;
  font-weight: 900;
  letter-spacing: .17em;
}

.stage-head h2,
.text-head h2,
.summary .text-head h2 {
  color: #253043;
  font-weight: 740;
  letter-spacing: -.025em;
}

.section-instruction,
.note,
.gesture-hint,
.values-content p {
  color: #687083;
  font-weight: 560;
}

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88)),
    radial-gradient(circle at 100% 0%, rgba(248,220,226,.09), transparent 16rem);
}

.stage-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.90)),
    radial-gradient(circle at 50% 0%, rgba(134,201,189,.12), transparent 20rem);
}

.stage {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.84), transparent 20rem),
    linear-gradient(150deg, #edf8f6 0%, #faeee0 58%, #f8dce2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 20px 40px rgba(38,48,67,.07);
}

.switch,
.group-tabs {
  background: rgba(246, 242, 242, .74);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

.switch button,
.collection-tabs button,
.group-tabs button,
.tabs button {
  color: #5f6776;
  font-weight: 820;
}

.switch button.active,
.collection-tabs button.active,
.group-tabs button.active,
.tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #5a7d8b 0%, #86c9bd 60%, #e6a2a3 100%);
  box-shadow: 0 12px 24px rgba(79, 119, 136, .16);
}

.primary,
.wa,
.reset-top {
  background: linear-gradient(135deg, #4f7788, #86c9bd);
  box-shadow: 0 13px 28px rgba(79,119,136,.18);
}

.controls,
.controls-toggle,
.input,
.actions button {
  border-color: rgba(217,130,138,.14);
}

.controls {
  background: rgba(255, 249, 248, .82);
}

.controls-toggle,
.input,
.actions button {
  background: rgba(255,255,255,.88);
}

.control-grid button,
.actions button {
  color: #5f6776;
  font-weight: 820;
}

.control-grid .danger {
  color: #fff;
  background: linear-gradient(135deg, #e36f76, #d9828a);
}

.patch-grid,
.letter-preview {
  background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.44)) !important;
  border: 1px solid rgba(79,119,136,.06);
}

.patch-item {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.80)),
    linear-gradient(135deg, rgba(220,236,243,.66), rgba(248,220,226,.58));
  border-color: rgba(38,48,67,.075);
  box-shadow: 0 12px 23px rgba(38,48,67,.055);
}

.stacked-label span,
label,
.letters-card label[for="name"] {
  color: #566071;
  font-weight: 820;
}

.stacked-label small {
  color: #7d8492;
  font-weight: 620;
}

.quote-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,255,255,.78)),
    radial-gradient(circle at 14% 15%, rgba(134,201,189,.18), transparent 13rem),
    radial-gradient(circle at 90% 14%, rgba(235,162,168,.21), transparent 13rem);
}

.quote-title {
  color: #566071;
  font-weight: 820;
}

.quote-country {
  box-shadow: 0 14px 34px rgba(38,48,67,.085);
}

.quote-country strong {
  color: #263344;
  font-weight: 860;
}

.quote-small {
  color: #566071;
  font-weight: 740;
}

.values-note {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,249,249,.88)),
    radial-gradient(circle at 0% 0%, rgba(134,201,189,.10), transparent 16rem);
  border-color: rgba(79,119,136,.11);
}

.values-note summary {
  color: #253043;
  font-weight: 820;
}

.values-note summary::after,
.how-it-works summary::after {
  color: #d9828a;
}

.actions.final-actions #download {
  color: #5e6573;
  background: linear-gradient(135deg, #f7f4f3, #ece8ea);
}

.site-footer {
  color: #7a8190;
}

.site-footer strong,
.footer-socials a {
  color: #4e5968;
}

/* Ajuste fino para escritorio: que se sienta como extensión de la web principal, no como otra app */
@media (min-width: 1024px) {
  .hero,
  .app,
  .site-footer {
    width: min(1180px, calc(100% - 88px));
  }

  .hero {
    margin-top: 26px;
    padding: 24px 32px;
  }

  .hero-main {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .hero-copy {
    max-width: 780px;
    font-size: 1.08rem;
    line-height: 1.48;
  }

  .grid {
    grid-template-columns: minmax(560px, 1.12fr) minmax(390px, .88fr);
    gap: 24px;
  }

  .stage-card,
  .letters-card,
  .patches-card,
  .summary {
    border-radius: 28px;
  }

  .stage-head span,
  .text-head span {
    font-size: .88rem;
    letter-spacing: .18em;
  }

  .stage {
    max-width: 700px;
  }

  .text-head h2,
  .summary .text-head h2 {
    font-size: 1rem;
  }

  .patch-grid {
    max-height: 440px;
  }

  .summary {
    max-width: 860px;
  }

  .quote-country {
    min-height: 66px;
  }
}

/* En móvil se conserva la estructura ya aprobada; solo se suavizan pesos y colores */
@media (max-width: 720px) {
  .hero-copy {
    font-weight: 680;
  }

  .stage-head span,
  .text-head span {
    letter-spacing: .14em;
    color: #d9828a;
  }

  .switch button,
  .collection-tabs button,
  .group-tabs button,
  .tabs button,
  .control-grid button,
  .actions button {
    font-weight: 820;
  }

  .quote-title,
  .values-note summary {
    font-weight: 820;
  }
}

/* === v42: embellecimiento final de Guardar diseño y Guía de Precios === */
.actions.final-actions {
  margin: 14px 0 14px;
}

.actions.final-actions #download {
  min-height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(79, 119, 136, .12);
  color: #4e5968;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,244,243,.92)),
    radial-gradient(circle at 12% 20%, rgba(134,201,189,.16), transparent 10rem),
    radial-gradient(circle at 92% 30%, rgba(235,162,168,.14), transparent 10rem);
  box-shadow:
    0 14px 32px rgba(38,48,67,.075),
    inset 0 1px 0 rgba(255,255,255,.94);
  font-weight: 860;
  letter-spacing: .01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.actions.final-actions #download:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(38,48,67,.095),
    inset 0 1px 0 rgba(255,255,255,.96);
}

.actions.final-actions #download:active {
  transform: translateY(1px) scale(.992);
}

.price-guide {
  margin-top: 16px;
  border-radius: 26px;
  border: 1px solid rgba(79,119,136,.11);
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(255,250,249,.90)),
    radial-gradient(circle at 14% 16%, rgba(134,201,189,.12), transparent 14rem),
    radial-gradient(circle at 92% 14%, rgba(235,162,168,.15), transparent 14rem);
  box-shadow:
    0 18px 40px rgba(38,48,67,.07),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.price-guide summary {
  min-height: 56px;
  padding: 0 18px 0 20px;
  border-radius: 26px;
  color: #4e5968;
  font-weight: 860;
  letter-spacing: .005em;
}

.price-guide summary::after {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(134,201,189,.22), rgba(235,162,168,.24));
  color: #d9828a;
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.price-guide[open] summary {
  border-bottom: 1px solid rgba(79,119,136,.08);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.price-guide .values-content {
  padding: 14px 20px 18px;
}

.price-guide .values-content p {
  color: #687083;
  font-weight: 560;
}

.price-guide .values-content strong {
  color: #253043;
  font-weight: 860;
}

.price-guide .values-final {
  color: #4e5968;
  font-weight: 740;
}

@media (max-width: 720px) {
  .actions.final-actions #download {
    min-height: 52px;
    font-size: .92rem;
  }

  .price-guide {
    border-radius: 22px;
    margin-top: 13px;
  }

  .price-guide summary {
    min-height: 52px;
    padding: 0 14px 0 16px;
    font-size: .88rem;
  }

  .price-guide summary::after {
    width: 26px;
    height: 26px;
    font-size: .95rem;
  }

  .price-guide .values-content {
    padding: 12px 15px 15px;
  }
}
