/* ========== Carta a Santa · vistas de participante ========== */

.hero { text-align: center; padding-top: 10px; }
.hero .santa { font-size: 64px; display: inline-block; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.event-info { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 0; }
.event-info .pill { background: var(--paper); border: 2px dashed #e2c98b; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #6b4a00; }

/* ----- lista de deseos ----- */
.wish { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }
.wish .num {
  flex: 0 0 34px; height: 34px; margin-top: 8px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; color: #fff; background: var(--red); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
}
.wish:nth-child(even) .num { background: var(--ok); }
.wish .fields { flex: 1; min-width: 0; }
.wish .link-in { margin-top: 6px; font-size: 14px; padding: 8px 12px; }
.wish .extra-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--pine); }
.wish .clothing-chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.wish .clothing-chk input { width: 16px; height: 16px; accent-color: var(--ok); cursor: pointer; }
.wish .size-in { flex: 1; min-width: 130px; font-size: 13px; padding: 6px 10px; border-radius: 10px; }
.wish .x { flex: 0 0 auto; margin-top: 6px; border: 0; background: none; font-size: 22px; cursor: pointer; opacity: .55; padding: 6px; }
.wish .x:hover { opacity: 1; transform: scale(1.2); }
.wish .toggle-link { background: none; border: 0; color: var(--ok); font-weight: 800; font-size: 13px; cursor: pointer; padding: 0; }
.wish-tag { display: inline-block; background: #f3e6c8; color: #7a6a45; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; margin-left: 6px; vertical-align: middle; }

.counter { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.counter .bar { flex: 1; }
.counter b { white-space: nowrap; font-size: 15px; }
.counter b.done { color: var(--ok); }

.msg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.msg-chips button { border: 2px solid #e6d7b3; background: var(--paper); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: #6b4a00; }
.msg-chips button:hover { background: #fbe6b0; }
.char { text-align: right; font-size: 12px; color: var(--muted); }

/* ----- estado de espera ----- */
.waiting .gift-box { font-size: 80px; display: inline-block; animation: shake 2.6s ease-in-out infinite; transform-origin: bottom center; }
@keyframes shake { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-9deg); } 70% { transform: rotate(9deg); } 75% { transform: rotate(-7deg); } 80% { transform: rotate(6deg); } 85% { transform: rotate(0); } }
.mini-list { text-align: left; background: var(--paper); border-radius: 14px; padding: 12px 14px 12px 34px; margin: 12px 0; }
.mini-list li { margin: 5px 0; }

/* ----- sobre ----- */
.envelope-wrap { display: grid; place-items: center; padding: 14px 0 6px; perspective: 900px; }
.envelope {
  position: relative; width: min(300px, 78vw); height: min(200px, 52vw); cursor: pointer;
  background: linear-gradient(#e9d8a6, #d9c183); border-radius: 8px; box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  animation: float 3.4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
.envelope .flap {
  position: absolute; top: 0; left: 0; right: 0; height: 58%; transform-origin: top; z-index: 4;
  background: linear-gradient(#cdb36c, #e0c98c); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .7s ease .1s, z-index 0s .4s;
}
.envelope .pocket {
  position: absolute; inset: 0; z-index: 3; border-radius: 8px;
  background: linear-gradient(135deg, #e9d8a6 50%, transparent 50%) left/51% 100% no-repeat, linear-gradient(225deg, #e4d095 50%, transparent 50%) right/51% 100% no-repeat;
}
.envelope .seal {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 6; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px; background: radial-gradient(circle at 35% 30%, #e84c58, var(--red-2)); box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
  transition: opacity .3s, transform .4s;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(198, 40, 51, .25), 0 4px 10px rgba(0, 0, 0, .4); } }
.envelope .paper {
  position: absolute; left: 8%; right: 8%; top: 8%; height: 80%; background: #fff; border-radius: 6px; z-index: 2; transition: transform .8s ease .6s;
}
.envelope.open { animation: none; cursor: default; }
.envelope.open .flap { transform: rotateX(180deg); z-index: 1; }
.envelope.open .seal { opacity: 0; transform: translate(-50%, -50%) scale(2); animation: none; }
.envelope.open .paper { transform: translateY(-55%); }
.tap-hint { text-align: center; font-weight: 800; color: var(--red); animation: pulse2 1.6s ease-in-out infinite; }
@keyframes pulse2 { 50% { transform: scale(1.08); } }

.reveal { text-align: center; animation: rise .8s both; }
.reveal .who {
  font-family: var(--font-title); font-size: clamp(40px, 11vw, 66px); color: var(--red); margin: 6px 0 2px; line-height: 1.05;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .08); animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow { 50% { text-shadow: 0 0 22px rgba(244, 197, 66, .9); } }
.wish-show { text-align: left; list-style: none; padding: 0; margin: 12px 0; counter-reset: w; }
.wish-show li {
  counter-increment: w; background: var(--paper); border-radius: 14px; padding: 11px 14px 11px 52px; margin: 8px 0; position: relative; font-weight: 700;
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; word-break: break-word;
}
.wish-show li::before {
  content: counter(w); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center; font-size: 14px;
}
.wish-show li:nth-child(even)::before { background: var(--ok); }
.wish-show a { color: var(--ok); font-size: 13px; margin-left: 6px; }
.love-note { text-align: left; background: #fff; border-left: 5px solid var(--red); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; font-style: italic; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.secret-banner { background: #fbd9dc; color: #7d1019; border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 14px; margin-top: 14px; }

/* ----- chat anónimo ----- */
.chat { background: var(--paper); border-radius: 16px; padding: 12px; margin-top: 10px; }
.chat-log { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; animation: pop .3s both; }
.bubble.mine { align-self: flex-end; background: var(--ok); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 2px solid #e6d7b3; border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; }
.empty-chat { text-align: center; color: var(--muted); font-size: 14px; padding: 10px; }

.notfound { text-align: center; padding: 20px 0; }
.notfound .big { font-size: 70px; }

.logout-link { text-align: center; margin-top: 18px; }
.logout-link button { background: none; border: 0; color: rgba(255, 255, 255, .7); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
