/* Estilos de v0.2: intercambio, mascotitas, premium, huevos y secciones de Nosotros. */

.subtitle { font-family: 'Titan One', 'Fredoka', sans-serif; font-weight: 400; font-size: 1.25rem; color: var(--pink-dark); margin: 6px 0 0; }
.pill-gems { color: #6b3fd1; }
.back-btn { align-self: flex-start; border: none; background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; box-shadow: 0 3px 0 #e6d8ee; color: var(--pink-dark); }
.x-btn { border: none; background: #f5f0fa; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; color: var(--muted); font-size: 0.8rem; }
.warn-note { background: #fff4e0; border-radius: 12px; padding: 8px 10px; color: #8a5a00; }
.stage-up { font-size: 1.05rem; }

.segmented { display: flex; background: #fff; border-radius: 16px; padding: 4px; gap: 4px; box-shadow: 0 3px 0 #e6d8ee; }
.segmented button { flex: 1; border: none; background: none; border-radius: 12px; padding: 9px 6px; font-weight: 600; font-size: 0.88rem; color: var(--muted); min-width: 0; }
.segmented button.active { background: var(--pink); color: #fff; }

textarea, select {
  width: 100%; border: 2px solid var(--line); background: #fbf8fd; border-radius: 14px; padding: 12px 14px;
  font: inherit; font-size: 1rem; outline: none; resize: vertical; margin-bottom: 10px; color: inherit;
}
textarea:focus { border-color: var(--pink-light); background: #fff; }
input[type=range] { width: 100%; accent-color: var(--pink); margin: 4px 0 12px; }
.modal-form { display: flex; flex-direction: column; gap: 4px; }
.modal-form .chips { margin-bottom: 10px; }
.chip-input { cursor: pointer; position: relative; }
.chip-input input { position: absolute; opacity: 0; pointer-events: none; }
.chip-input span { display: inline-block; border: 2px solid var(--line); background: #fbf8fd; border-radius: 999px; padding: 6px 12px; font-size: 0.88rem; font-weight: 500; }
.chip-input input:checked + span { border-color: var(--pink); background: #fff0f7; color: var(--pink-dark); font-weight: 600; }
.chip-input input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }
.file-input { display: block; border: 2px dashed var(--line); border-radius: 14px; padding: 12px; text-align: center; color: var(--muted); font-weight: 600; margin-bottom: 10px; cursor: pointer; position: relative; }
.file-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.row-inputs { display: flex; gap: 8px; }
.emoji-input { width: 64px !important; flex-shrink: 0; text-align: center; }

/* ───────── Inicio: intercambio, globo, mascotita ───────── */
.care-banner { background: #fff; border-radius: 16px; padding: 10px 14px; font-size: 0.9rem; box-shadow: var(--shadow); }
.care-banner.swap { background: linear-gradient(90deg, #fff0f7, #f1ebff); border: 2px solid #f3d3ea; }
.care-note { margin: 0; background: #f1ebff; border-radius: 14px; padding: 10px 12px; font-size: 0.9rem; }
.bubble {
  position: absolute; z-index: 3; left: 50%; top: 74px; transform: translateX(-50%);
  max-width: 78%; background: #fff; color: var(--ink); border-radius: 18px; padding: 8px 14px; font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 6px 16px rgba(58, 42, 74, 0.15);
}
.bubble[hidden] { display: none; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble.pop { animation: bubblePop 0.35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bubblePop { from { transform: translateX(-50%) scale(0.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.companion { position: absolute; right: 8px; bottom: 30px; width: 86px; height: 86px; border: none; background: none; padding: 0; z-index: 2; }
.companion.jump { animation: jump 0.6s cubic-bezier(.3, 1.6, .5, 1); }
.critter { width: 100%; height: 100%; display: block; overflow: visible; }
.critter-hop { transform-box: fill-box; transform-origin: 50% 100%; animation: hop 3.2s ease-in-out infinite; }
@keyframes hop {
  0%, 70%, 100% { transform: translateY(0) scale(1, 1); }
  78% { transform: translateY(0) scale(1.06, 0.94); }
  86% { transform: translateY(-7px) scale(0.97, 1.03); }
  94% { transform: translateY(0) scale(1.03, 0.97); }
}
.aura { transform-box: fill-box; transform-origin: center; animation: auraPulse 2.4s ease-in-out infinite; }
@keyframes auraPulse { 0%, 100% { opacity: 0.7; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.05); } }
.sparkle { transform-box: fill-box; transform-origin: center; animation: twinkle 1.8s ease-in-out infinite; }
.sparkle:nth-of-type(2n) { animation-delay: 0.9s; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.1); } }
.pet-wrap.shake { animation: shake 0.5s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px) rotate(-3deg); } 40%, 80% { transform: translateX(8px) rotate(3deg); } }
.spotlight-mini { display: flex; gap: 12px; align-items: center; border: none; text-align: left; width: 100%; padding: 12px 16px; }
.spotlight-mini > span:first-child { font-size: 1.8rem; }
.spotlight-mini > span:last-child { display: flex; flex-direction: column; min-width: 0; }

/* ───────── Misiones secretas ───────── */
.secret-box { background: linear-gradient(160deg, #2e2350, #4a2f7a); color: #fff; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.secret-box .muted { color: rgba(255, 255, 255, 0.72); }
.secret-box .mission { color: var(--ink); }
.secret-box .mission .muted { color: var(--muted); }
.gem-tag { background: #efe6ff !important; color: #6b3fd1 !important; }

/* ───────── Tienda premium y huevos ───────── */
.tag-gems { background: #efe6ff; color: #6b3fd1; }
.tag-gems.poor { color: #b9a7d8; }
.item-card.premium { background: linear-gradient(180deg, #fff, #f7f1ff); outline: 2px solid #e3d3ff; }
.collection { display: flex; flex-direction: column; gap: 6px; }
.egg-list { display: flex; flex-direction: column; gap: 10px; }
.egg-card { display: flex; gap: 12px; align-items: center; }
.egg-art { width: 90px; height: 90px; flex-shrink: 0; }
.egg { width: 100%; height: 100%; display: block; overflow: visible; }
.egg-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.odds { display: flex; flex-wrap: wrap; gap: 4px; }
.rarity-chip { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--r); white-space: nowrap; }
.rarity-chip.big { font-size: 0.95rem; padding: 4px 14px; }
.hatch { height: 210px; display: grid; place-items: center; }
.hatch .egg { width: 160px; height: 160px; }
.egg.shaking .egg-body { transform-box: fill-box; transform-origin: 50% 100%; animation: eggShake 0.45s ease-in-out infinite; }
@keyframes eggShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.hatch.revealed .critter { width: 190px; height: 190px; animation: pop 0.5s cubic-bezier(.3, 1.6, .5, 1); }

/* ───────── Armario de mascotitas ───────── */
.critter-stage { height: 200px; border-radius: 28px; background: linear-gradient(180deg, #fff6d6, #fff); box-shadow: var(--shadow); padding: 14px; }
.critter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.critter-item {
  border: 3px solid transparent; background: #fff; border-radius: 16px; padding: 4px; display: flex; flex-direction: column; align-items: center;
  box-shadow: inset 0 -4px 0 var(--r), var(--shadow); min-width: 0; font-size: 0.72rem; font-weight: 600;
}
.critter-item svg { height: 58px; }
.critter-item.selected { border-color: var(--pink); }

/* ───────── Nosotros ───────── */
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hub-tile { position: relative; border: none; background: #fff; border-radius: 22px; padding: 16px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; box-shadow: var(--shadow); min-width: 0; }
.hub-tile:active { transform: scale(0.97); }
.hub-icon { font-size: 2rem; margin-bottom: 4px; }
.hub-tile small { color: var(--muted); line-height: 1.2; }
.hub-tile .badge { top: 10px; right: 10px; }
.spotlight { display: flex; flex-direction: column; gap: 8px; background: linear-gradient(160deg, #fff, #fff5e0); }

.like-list { display: flex; flex-direction: column; gap: 6px; }
.like-item { display: flex; gap: 10px; align-items: center; background: #fbf8fd; border-radius: 14px; padding: 9px 10px; }
.like-item > span { font-size: 1.3rem; }
.like-item p { margin: 0; flex: 1; min-width: 0; word-break: break-word; }

.wish-list { display: flex; flex-direction: column; gap: 10px; }
.wish-card { display: flex; gap: 12px; background: #fff; border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
.spotlight .wish-card { box-shadow: none; padding: 0; background: none; }
.wish-card.is-new { outline: 3px solid #ffd27a; }
.wish-media { width: 84px; height: 84px; flex-shrink: 0; border-radius: 14px; overflow: hidden; background: #f3ecff; display: grid; place-items: center; font-size: 2.2rem; }
.wish-media img { width: 100%; height: 100%; object-fit: cover; }
.wish-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.wish-body b { word-break: break-word; }
.wish-body p { margin: 0; font-size: 0.88rem; }
.wish-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.wish-links a { text-decoration: none; }
.tag-new { align-self: flex-start; background: #fff1cc; color: #8a5a00; }

.wheel-wrap { position: relative; width: min(320px, 86vw); aspect-ratio: 1; margin: 18px auto 10px; }
.wheel { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 0 0 6px #fff, 0 0 0 10px var(--pink), 0 12px 30px rgba(58, 42, 74, 0.2); }
.wheel-pointer {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%); z-index: 2; width: 0; height: 0;
  border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--ink);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.2));
}
.wheel-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%;
  border: 5px solid #fff; background: linear-gradient(180deg, var(--pink-light), var(--pink)); color: #fff;
  font-family: 'Titan One', sans-serif; font-size: 0.85rem; box-shadow: 0 4px 0 var(--pink-dark), 0 6px 14px rgba(0, 0, 0, 0.2); z-index: 2;
}
.wheel-btn:disabled { opacity: 0.8; }
.spin-result { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; background: #fff7e6; border-radius: 20px; }
.spin-result span { font-size: 3.2rem; }
.spin-result b { font-size: 1.3rem; text-align: center; }

.letter-list { display: flex; flex-direction: column; gap: 10px; }
.letter-card { display: flex; gap: 12px; align-items: center; border: none; background: #fff; border-radius: 18px; padding: 12px 14px; text-align: left; box-shadow: var(--shadow); width: 100%; }
.letter-card.ready { outline: 3px solid var(--pink-light); }
.letter-card.locked { opacity: 0.8; }
.envelope { font-size: 2rem; flex-shrink: 0; }
.letter-info { display: flex; flex-direction: column; min-width: 0; }
.letter-info small { color: var(--muted); }
.paper { background-color: #fffaf0; border-radius: 16px; padding: 20px 18px; background-image: repeating-linear-gradient(180deg, transparent 0 27px, #f1e4cc 27px 28px); font-size: 1rem; }
.paper-when { font-family: 'Titan One', sans-serif; color: var(--pink-dark); font-size: 1.2rem; margin: 0 0 4px; }
.paper-meta { color: var(--muted); font-size: 0.82rem; margin: 0 0 14px !important; }
.paper-body { line-height: 28px; word-break: break-word; }
.paper-sign { text-align: right; font-weight: 600; margin: 14px 0 0 !important; }

.agree-list { display: flex; flex-direction: column; gap: 10px; }
.agree { display: flex; flex-direction: column; gap: 6px; }
.agree.agreed { outline: 3px solid #bfeec4; }
.agree-text { margin: 0; font-weight: 600; word-break: break-word; }
.agree-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.check-pill { border: 2px solid var(--line); background: #fbf8fd; border-radius: 999px; padding: 5px 10px; font-size: 0.82rem; font-weight: 600; }
button.check-pill { cursor: pointer; }
.check-pill.on { border-color: #6bd968; background: #ecfbe9; color: #2e8a3a; }

.feel-entry { display: flex; flex-direction: column; gap: 6px; }
.feel-text { margin: 0; line-height: 1.5; word-break: break-word; }
.locked-box { text-align: center; color: var(--muted); font-weight: 600; background: repeating-linear-gradient(45deg, #fff, #fff 10px, #faf6fd 10px, #faf6fd 20px); }

/* ───────── v0.3: autores, notificaciones, carga ───────── */
.author-badge { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; flex-shrink: 0; min-width: 34px; }
.author-badge small { font-size: 0.62rem; color: var(--muted); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-avatar { width: 28px; height: 30px; display: block; }
.mini-avatar.initial { width: 26px; height: 26px; border-radius: 50%; background: var(--pink-light); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.8rem; }
.author-app { font-size: 1.2rem; }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.push-actions [hidden] { display: none; }
.screen-loading { min-height: 80dvh; justify-content: center; align-items: center; }
.loading-egg { font-size: 4rem; animation: eggShake 0.6s ease-in-out infinite; }
