:root {
  --red: #b3202a;
  --red-dark: #8c1820;
  --green: #1f6b45;
  --green-dark: #165234;
  --cream: #fbf6ef;
  --ink: #2b2118;
  --muted: #7a6a5a;
  --line: #eadfd2;
  --card: #fff;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--green); }
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; max-width: 860px; margin: 0 auto;
}
.logo { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--red); }
.top nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); font-size: .95rem; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-btn { border: 0; background: transparent; padding: 5px 10px; cursor: pointer; font-weight: 600; color: var(--muted); }
.lang-btn.active { background: var(--red); color: #fff; }
main { max-width: 860px; margin: 0 auto; padding: 0 20px 40px; }
.hero { text-align: center; padding: 26px 0 10px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 10px; line-height: 1.15; }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto 16px; font-size: 1.05rem; }
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.features span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 14px 0; box-shadow: 0 2px 10px rgba(80, 50, 20, .05); }
.card h2 { margin: 0 0 12px; font-size: 1.15rem; color: var(--red); }
label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
input, textarea, select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #d9cbbb; border-radius: 10px; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid #f0b5ba; border-color: var(--red); }
textarea { min-height: 70px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.note { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }
.row { display: grid; grid-template-columns: 26px 1fr 1.3fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.row .num { color: var(--muted); font-weight: 700; text-align: right; }
.excl { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.excl span { font-size: .85rem; color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .row { grid-template-columns: 22px 1fr auto; }
  .row input[type=email] { grid-column: 2 / 3; }
  .excl { grid-template-columns: 1fr auto; }
  .excl span { grid-column: 1 / -1; text-align: left; }
}
button { font: inherit; cursor: pointer; }
.btn { border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 700; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.big { width: 100%; font-size: 1.1rem; padding: 15px; }
.btn.red { background: var(--red); }
.btn.red:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--green); border: 1px dashed var(--green); }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.icon-btn { border: 0; background: #f5ece2; border-radius: 8px; padding: 8px 10px; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.msg { border-radius: 10px; padding: 12px 14px; margin: 12px 0; display: none; }
.msg.show { display: block; }
.msg.error { background: #fde8e9; color: #8c1820; }
.msg.ok { background: #e4f3ea; color: #165234; }
.copybox { display: flex; gap: 8px; margin: 10px 0; }
.copybox input { font-family: monospace; font-size: .85rem; }
.hidden { display: none !important; }
.pin-input { font-size: 2rem; letter-spacing: 10px; text-align: center; font-family: monospace; max-width: 260px; margin: 8px auto; display: block; }
.center { text-align: center; }
.reveal-name {
  font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 800; color: var(--red); margin: 10px 0;
  animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.gift { font-size: 4rem; display: inline-block; animation: shake 1s ease-in-out 2; }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.wish { white-space: pre-wrap; background: var(--cream); border-radius: 10px; padding: 12px; text-align: left; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: .93rem; vertical-align: middle; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
td .sub { color: var(--muted); font-size: .8rem; }
.progress { height: 10px; background: #f0e6da; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.progress div { height: 100%; background: var(--green); }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 20px; }
.ad-slot { margin: 18px 0; min-height: 0; } /* aquí irá la publicidad de AdSense */

/* ---- v2 ---- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .modes { grid-template-columns: 1fr; } }
.mode { position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; display: block; font-weight: 400; margin: 0; }
.mode input { position: absolute; opacity: 0; width: auto; }
.mode b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.mode span { color: var(--muted); font-size: .88rem; }
.mode.sel { border-color: var(--red); background: #fff6f6; }
.badge { display: inline-block; background: var(--green); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; }
.row.me .pname, .row.me .pemail { background: #fff6f6; }
.me-tag { font-size: .75rem; color: var(--red); font-weight: 700; }
.field-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.field-row.h input { font-weight: 700; background: #fbf6ef; }
.field-row label.mini { display: flex; align-items: center; gap: 4px; margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.field-row label.mini input { width: auto; }
.pin-list { margin-top: 10px; }
.pin-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pin-row .pin { font-family: monospace; font-size: 1.05rem; letter-spacing: 2px; min-width: 76px; text-align: center; }
.btn.wa { background: #25d366; }
.btn.wa:hover { background: #1da851; }
.me-box { background: #fff6f6; border: 2px dashed var(--red); border-radius: 12px; padding: 14px; margin: 16px 0; }
.me-box .big-pin { font-family: monospace; font-size: 2rem; letter-spacing: 6px; font-weight: 800; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 10px; }
.names button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 8px; font-weight: 700; font-size: 1rem; }
.names button:hover { border-color: var(--red); background: #fff6f6; }
.wl dt { font-weight: 700; margin-top: 10px; }
.wl dd { margin: 2px 0 0; white-space: pre-wrap; }
.wl .sec { margin-top: 16px; font-weight: 800; color: var(--green); }
.wl .warn { background: #fde8e9; border-left: 4px solid var(--red); border-radius: 8px; padding: 8px 10px; margin-top: 10px; }
.wl .warn dt { margin-top: 0; color: var(--red-dark); }
.wl-form .sec { margin: 18px 0 2px; font-weight: 800; color: var(--green); }
.wl-form label.warn { color: var(--red-dark); }
.banner { background: #fde8e9; color: var(--red-dark); border-radius: 10px; padding: 12px; font-weight: 700; margin: 10px 0; }
.btn.danger { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; z-index: 50; max-width: 90vw; }

a.btn { text-decoration: none; display: inline-block; }
.mode b span { color: var(--ink); font-size: inherit; }
.mode b .badge { color: #fff; font-size: .7rem; }
@media (max-width: 600px) {
  .field-row label.mini span { display: none; }   /* en celular solo se ve el ⚠️ */
  .field-row .mini.note { display: none; }
}

.linkish { border: 0; background: none; color: var(--green); font-weight: 700; padding: 4px 0; text-decoration: underline; font-size: .85rem; }
tr.wlrow td { background: var(--cream); border-radius: 8px; }
tr.wlrow .wl { margin: 0; }

/* ---- asistente paso a paso ---- */
.stepper { display: flex; justify-content: space-between; gap: 4px; margin: 6px 0 4px; position: relative; }
.stepper::before { content: ""; position: absolute; left: 6%; right: 6%; top: 17px; height: 3px; background: var(--line); z-index: 0; }
.st { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; z-index: 1; cursor: pointer; }
.st:disabled { cursor: not-allowed; }
.st .dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800;
  background: #fff; border: 3px solid var(--line); color: var(--muted); transition: all .25s; }
.st .lbl { font-size: .72rem; font-weight: 700; color: var(--muted); }
.st.ok .dot { background: var(--green); border-color: var(--green); color: #fff; }
.st.cur .dot { background: var(--red); border-color: var(--red); color: #fff; transform: scale(1.12); box-shadow: 0 0 0 5px #f8d6d9; }
.st.cur .lbl { color: var(--red); }
.st.locked .dot { opacity: .55; }
.st.locked .dot::after { content: ""; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.wiz-nav .btn { flex: 1; padding: 14px; font-size: 1.05rem; }
.wiz-nav .btn:disabled { opacity: .4; cursor: not-allowed; }
.hint { color: var(--red-dark); font-weight: 600; font-size: .92rem; min-height: 1.3em; margin: 10px 2px 0; }
.step { animation: stepIn .3s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) { .st .lbl { font-size: .62rem; } .st .dot { width: 30px; height: 30px; } .stepper::before { top: 14px; } }

/* ---- acordeón: cada paso se despliega hacia abajo ---- */
.step:not(.hidden) { animation: unfold .45s ease both; transform-origin: top; }
@keyframes unfold { from { opacity: 0; transform: translateY(-14px) scaleY(.92); } to { opacity: 1; transform: none; } }
.step h2 { display: flex; align-items: center; gap: 8px; }
.step h2::before { content: attr(data-n); }
.step.done h2::after { content: "✓"; margin-left: auto; background: var(--green); color: #fff; border-radius: 50%;
  width: 26px; height: 26px; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.step.done { border-color: #cfe6d8; }
#submit:not(.hidden) { animation: unfold .45s ease both; }

input.bad { border-color: var(--red); background: #fff6f6; }
.field-err { color: var(--red-dark); font-size: .82rem; font-weight: 600; margin: 4px 0 0; }

/* sin correos: los participantes solo llevan nombre */
.no-emails .row .pemail { display: none; }
.no-emails .row { grid-template-columns: 26px 1fr auto; }
.no-emails .grid2:has(#oname) { grid-template-columns: 1fr; }
