:root {
  --bg: #f4f2fb;
  --bg2: #eae6f7;
  --surface: #ffffff;
  --surface2: #f6f5fb;
  --border: #e6e3f0;
  --text: #1a1630;
  --text-dim: #6b6786;
  --brand: #6d28d9;
  --brand-strong: #5b21b6;
  --brand-soft: #f1ebfd;
  --green: #16a34a;
  --red: #e11d48;
  --shadow: 0 12px 40px rgba(76, 40, 130, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b1a;
    --bg2: #141024;
    --surface: #191527;
    --surface2: #211c33;
    --border: #2c2640;
    --text: #ece9f6;
    --text-dim: #9a94b3;
    --brand: #a78bfa;
    --brand-strong: #c4b5fd;
    --brand-soft: #251d3d;
    --green: #4ade80;
    --red: #fb7185;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 32px 32px 28px;
}

.card-head { margin-bottom: 22px; }
.logo { height: 30px; display: block; }

h1 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.client-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 24px;
}

/* ── Escala 0–10 horizontal completa ─────────────────────────── */
.scale {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.score-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s, color 0.15s, border-color 0.15s;
}
.score-btn:hover { border-color: var(--brand); transform: translateY(-2px); }
.score-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.score-btn.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.35);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.score-error { color: var(--red); font-size: 13px; margin: 10px 0 0; }

/* ── Bloque de participación (P2 + datos) ────────────────────── */
.q2 {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  transition: opacity 0.2s;
}
.q2.locked { opacity: 0.5; pointer-events: none; }

.gift {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.gift-emoji { font-size: 26px; line-height: 1; }
.gift strong { display: block; font-size: 15px; margin-bottom: 2px; }
.gift span { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.gift em { font-style: normal; font-weight: 600; color: var(--text); }

.names {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.names input { flex: 1 1 0; min-width: 0; }

input[type="text"], textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
}
input[type="text"]::placeholder, textarea::placeholder { color: var(--text-dim); }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
}

.q2-label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
textarea { min-height: 92px; resize: vertical; margin-bottom: 16px; }

.submit {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.submit:hover { background: var(--brand-strong); }
.submit:disabled { opacity: 0.55; cursor: not-allowed; }

.skip {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  padding: 12px;
  margin-top: 4px;
  cursor: pointer;
  text-decoration: underline;
}
.skip:disabled { opacity: 0.5; cursor: not-allowed; text-decoration: none; }

/* ── Agradecimiento ──────────────────────────────────────────── */
.thanks { text-align: center; padding: 48px 32px; }
.thanks-icon { font-size: 46px; margin-bottom: 14px; }
.subtitle { color: var(--text-dim); font-size: 15px; line-height: 1.5; margin: 0; }

.hidden { display: none !important; }

@media (max-width: 480px) {
  .card { padding: 24px 18px 22px; border-radius: 18px; }
  h1 { font-size: 19px; }
  .scale { gap: 4px; }
  .score-btn { height: 46px; font-size: 14px; border-radius: 10px; }
  .names { flex-direction: column; gap: 10px; }
  .scale-labels { font-size: 11px; }
}
