/* ==========================================================================
   GestIA · «Conóceme» con Dewi: tarjeta del inicio, cuestionario, respuestas y burbuja de Dewi
   ========================================================================== */

/* ---------- Burbuja de Dewi ---------- */
.dewi-bubble {
  position: relative;
  margin: 0;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 6px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.dewi-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 10px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: inherit;
  transform: rotate(45deg);
}
.dewi-bubble.is-new { animation: pop .35s var(--spring); }

/* ---------- Tarjeta del inicio ---------- */
.dewi-card {
  --dewi-size: 150px;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 24px;
  padding: 18px 26px 18px 18px;
  overflow: hidden;
  background: var(--grad-dewi-card);
  border-color: var(--violet-100);
}
.dewi-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--grad-ai);
  opacity: .08;
  pointer-events: none;
  animation: spin 24s linear infinite;
}
.dewi-card-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--dewi-glow);
  cursor: pointer;
  transition: transform .35s var(--spring);
}
.dewi-card-art:hover { transform: translateY(-3px) rotate(-2deg); }
.dewi-card-art:active { transform: scale(.96); }
.dewi-card-art:focus-visible { outline: 3px solid var(--ring-focus); outline-offset: 4px; }
.dewi-card-body { position: relative; z-index: 1; display: grid; gap: 10px; min-width: 0; }
.dewi-card .dewi-bubble { justify-self: start; max-width: 680px; }
.dewi-card-body h3 { font-size: clamp(18px, 1.7vw, 22px); font-weight: 800; letter-spacing: -.02em; }
.dewi-card-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dewi-card-progress small, .dewi-card-actions small { font-size: 12.5px; color: var(--ink-muted); }
.dewi-dots { display: inline-flex; gap: 6px; }
.dewi-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--violet-200); animation: pop .3s var(--spring) both; animation-delay: calc(.25s + var(--i) * 45ms); }
.dewi-dots i.is-done { background: var(--grad-violet); box-shadow: none; }
.dewi-card-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .dewi-card { --dewi-size: 112px; grid-template-columns: 1fr; justify-items: center; padding: 16px; text-align: center; }
  .dewi-card-body { justify-items: center; }
  .dewi-bubble { border-radius: 18px; }
  .dewi-bubble::before { left: 50%; top: -6px; bottom: auto; margin-left: -7px; }
  .dewi-card-actions { justify-content: center; }
}

/* ---------- Cuestionario ---------- */
.modal-about { --dewi-size: 120px; }
.about-card { position: relative; }
.about-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 56px 16px 18px;
  background: var(--grad-dewi-card);
}
.about-dewi { display: grid; place-items: center; border-radius: 50%; background: var(--dewi-glow); }
.about-talk { display: grid; gap: 8px; min-width: 0; }
.about-close { position: absolute; top: 12px; right: 12px; }
.about-progress { height: 5px; background: var(--line-soft); overflow: hidden; }
.about-progress span { display: block; height: 100%; background: var(--grad-violet); transform-origin: left center; transform: scaleX(0); transition: transform .45s var(--ease); }
.about-body { min-height: 230px; align-content: start; }
.about-body.is-entering .about-step { animation: slide-in .35s var(--ease); }
.about-step { display: grid; align-content: start; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.about-step legend { display: grid; gap: 4px; padding: 0; }
.about-step h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.about-count { font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-700); }
.about-hint, .about-intro p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.about-privacy { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); }
.about-privacy .i { width: 15px; height: 15px; flex: none; color: var(--teal-500); }
.about-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-top: 14px; }
.about-options.is-colors { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.about-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 14px 10px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: center;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  animation: pop .3s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 25ms);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.about-option input { position: absolute; opacity: 0; pointer-events: none; }
.about-option-label { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.about-emoji { font-size: 28px; line-height: 1; transition: transform .3s var(--spring); }
.about-option:hover { transform: translateY(-2px); border-color: var(--violet-200); box-shadow: var(--shadow-sm); }
.about-option:hover .about-emoji, .about-option:hover .about-swatch { transform: scale(1.12) rotate(-6deg); }
.about-option:active { transform: scale(.96); }
.about-option:has(input:checked) { color: var(--violet-700); border-color: var(--violet-500); background: var(--violet-50); box-shadow: 0 0 0 3px var(--violet-100); }
.about-option:has(input:checked) .about-emoji { transform: scale(1.12); }
.about-option:has(input:focus-visible) { outline: 3px solid var(--ring-focus); outline-offset: 2px; }
.about-option:has(input:disabled) { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.about-tick {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--on-color);
  background: var(--violet-500);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s var(--ease), transform .25s var(--spring);
}
.about-tick .i { width: 12px; height: 12px; stroke-width: 3; }
.about-option:has(input:checked) .about-tick { opacity: 1; transform: none; }
.about-swatch { width: 34px; height: 34px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-xs); transition: transform .3s var(--spring); }
.swatch-azul { background: var(--blue-600); }
.swatch-celeste { background: var(--cyan-500); }
.swatch-turquesa { background: var(--teal-400); }
.swatch-verde { background: var(--green-500); }
.swatch-amarillo { background: var(--yellow-400); }
.swatch-naranja { background: var(--orange-500); }
.swatch-rojo { background: var(--red-500); }
.swatch-rosado { background: var(--pink-500); }
.swatch-morado { background: var(--violet-500); }
.swatch-negro { background: var(--navy-950); }
.swatch-blanco { background: var(--surface); }
.about-text { display: grid; gap: 6px; margin-top: 14px; }
.about-hint + .about-options, .about-hint + .about-text { margin-top: 0; }
.about-text-field { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.about-text-field:focus-within { border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
.about-text-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); }
.about-text-field input::placeholder { color: var(--ink-4); font-weight: 500; }
.about-counter { justify-self: end; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.about-foot-gap { flex: 1; }
@media (max-width: 560px) {
  .modal-about { --dewi-size: 84px; }
  .about-hero { gap: 10px; padding: 14px 48px 12px 12px; }
  .about-foot .btn { flex: 1 1 auto; }
  .about-foot-gap { display: none; }
  .about-options, .about-options.is-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .about-option { min-height: 76px; gap: 6px; padding: 10px 6px 8px; font-size: 12.5px; }
  .about-emoji { font-size: 22px; }
  .about-swatch { width: 28px; height: 28px; }
  .about-tick { top: 5px; right: 5px; width: 18px; height: 18px; }
}

/* ---------- Respuestas compartidas ---------- */
.about-facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.about-facts li { display: grid; gap: 4px; }
.about-facts small { font-size: 12px; color: var(--ink-3); }
.about-facts span { display: flex; flex-wrap: wrap; gap: 6px; }
.about-fact { padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--violet-700); background: var(--violet-50); }
.about-panel { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.about-panel .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.about-panel .eyebrow .i { width: 13px; height: 13px; color: var(--pink-500); }

/* Mi perfil · Sobre mí */
.my-about { margin-top: 20px; --dewi-size: 104px; }
.about-mine { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 4px 22px 22px; }
.about-mine-dewi { display: grid; place-items: center; border-radius: 50%; background: var(--dewi-glow); }
.about-mine-body { display: grid; gap: 14px; min-width: 0; }
.about-mine-body .about-facts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 20px; }
.about-mine-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) {
  .about-mine { grid-template-columns: 1fr; justify-items: center; padding: 4px 16px 18px; }
  .my-about { --dewi-size: 88px; }
}
