/* WISHLY — identidad visual propia: ciruela noche, coral deseo, oro estrella, menta y nube lavanda */
:root {
  --plum: #2B1745;
  --plum-2: #43275F;
  --plum-soft: #6B5A82;
  --coral: #FF5E5B;
  --coral-dark: #E8403D;
  --coral-soft: #FFE3E2;
  --gold: #FFC145;
  --gold-soft: #FFF3D6;
  --mint: #2EC4A6;
  --mint-soft: #DDF7F1;
  --lav: #F6F1FF;
  --lav-2: #ECE3FB;
  --white: #FFFFFF;
  --ink: #241337;
  --muted: #74678A;
  --line: #E6DDF3;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(43, 23, 69, .25);
  --shadow-sm: 0 3px 12px -4px rgba(43, 23, 69, .18);
  --font-title: 'Fraunces', Georgia, serif;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --top-h: 64px;
  --bottom-h: 66px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--lav);
  line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--coral-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; margin: 0 0 .4em; color: var(--plum); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--plum); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 16px; padding: 0 clamp(14px, 3vw, 32px);
  background: rgba(43, 23, 69, .96); backdrop-filter: blur(10px); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-name { font-family: var(--font-title); font-weight: 700; font-size: 1.35rem; letter-spacing: .06em; }
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav a {
  color: #E9DEFA; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .94rem;
}
.topnav a:hover, .topnav a.active { background: rgba(255, 255, 255, .12); color: #fff; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.15rem;
}
.icon-btn:hover { background: rgba(255, 255, 255, .2); }
.badge {
  position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--coral); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  border: 2px solid rgba(255, 255, 255, .7); cursor: pointer; text-decoration: none; flex: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: .78rem; border-width: 0; }
.lang-switch { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 600; font-size: .82rem; }

/* ---------- Navegación inferior (móvil) ---------- */
.bottomnav { display: none; }
@media (max-width: 760px) {
  .topnav { display: none; }
  body.authed .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); justify-content: space-around; align-items: center;
  }
  body.authed .view { padding-bottom: calc(var(--bottom-h) + 30px); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; padding: 6px 8px; }
  .bottomnav a .ico { font-size: 1.3rem; }
  .bottomnav a.active { color: var(--coral-dark); }
  .bottomnav a.fab .ico { width: 50px; height: 50px; margin-top: -26px; border-radius: 50%; background: linear-gradient(135deg, var(--coral), #FF8A5B); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); font-size: 1.6rem; }
  .brand-name { font-size: 1.15rem; }
}

/* ---------- Estructura ---------- */
.view { max-width: 1180px; margin: 0 auto; padding: clamp(16px, 3vw, 34px) clamp(14px, 3vw, 32px) 60px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section { margin: 30px 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section h2 { margin: 0; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; border: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s;
  background: var(--coral); color: #fff; box-shadow: 0 6px 16px -8px rgba(255, 94, 91, .9); white-space: nowrap;
}
.btn:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--plum); box-shadow: none; }
.btn.secondary:hover { background: var(--plum-2); }
.btn.ghost { background: transparent; color: var(--plum); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--lav-2); }
.btn.mint { background: var(--mint); box-shadow: none; }
.btn.mint:hover { background: #22a98f; }
.btn.gold { background: var(--gold); color: var(--plum); box-shadow: none; }
.btn.gold:hover { background: #f5b22c; }
.btn.danger { background: transparent; color: #C0302D; border: 1.5px solid #F3C4C3; box-shadow: none; }
.btn.danger:hover { background: #FFF0F0; }
.btn.sm { padding: 7px 13px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 28px; font-size: 1.05rem; }
.link-btn { background: none; border: 0; color: var(--coral-dark); font-weight: 700; cursor: pointer; padding: 0; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--plum); }
.field { margin-bottom: 14px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; outline: none; transition: border .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--coral); margin-top: 2px; flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--lav-2); padding: 4px; border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--plum-soft); font-size: .88rem; }
.seg button.on { background: #fff; color: var(--plum); box-shadow: var(--shadow-sm); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--plum); }
.chip.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: .76rem; font-weight: 700; background: var(--lav-2); color: var(--plum); }
.pill.mint { background: var(--mint-soft); color: #0F7A65; }
.pill.gold { background: var(--gold-soft); color: #8A5A00; }
.pill.coral { background: var(--coral-soft); color: #B0302D; }
.pill.dark { background: var(--plum); color: #fff; }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 6vw, 70px);
  background: radial-gradient(1200px 400px at 100% 0%, rgba(255, 193, 69, .35), transparent 60%),
              radial-gradient(800px 500px at 0% 100%, rgba(46, 196, 166, .25), transparent 60%),
              linear-gradient(135deg, var(--plum) 0%, #4A2470 60%, #6E2E6E 100%);
  color: #fff;
}
.hero h1 { color: #fff; max-width: 14ch; }
.hero p { color: #EADCF9; font-size: clamp(1rem, 2vw, 1.2rem); max-width: 44ch; }
.hero .tag { display: inline-block; background: rgba(255, 255, 255, .14); color: var(--gold); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; margin-bottom: 16px; letter-spacing: .04em; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.hero-visual { position: relative; height: 360px; }
.float-card {
  position: absolute; background: #fff; color: var(--ink); border-radius: 18px; padding: 14px; width: 220px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
  animation: floaty 6s ease-in-out infinite;
}
.float-card .fc-img { height: 92px; border-radius: 12px; display: grid; place-items: center; font-size: 2.6rem; margin-bottom: 10px; }
.float-card b { display: block; font-size: .95rem; }
.float-card:nth-child(1) { top: 10px; left: 10px; transform: rotate(-6deg); }
.float-card:nth-child(2) { top: 90px; right: 0; animation-delay: -2s; transform: rotate(5deg); }
.float-card:nth-child(3) { bottom: 0; left: 60px; animation-delay: -4s; transform: rotate(-2deg); }
@keyframes floaty { 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .float-card { animation: none; } }
.stars { position: absolute; inset: 0; pointer-events: none; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 30px; }
.feature { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.feature .fi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 12px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { position: relative; padding: 22px 22px 22px 70px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--plum); font-weight: 800; display: grid; place-items: center; font-family: var(--font-title); }
.occasions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.occasions span { background: #fff; border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.cta-band { margin-top: 40px; border-radius: 26px; padding: 36px; background: linear-gradient(120deg, var(--coral), #FF8A5B 60%, var(--gold)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 30px 0 10px; }

/* ---------- Tarjetas de lista ---------- */
.list-card { position: relative; display: block; text-decoration: none; color: inherit; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.list-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.list-cover { height: 110px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px; color: #fff; }
.list-cover .emoji { font-size: 2.4rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.list-body { padding: 14px 16px 16px; }
.list-body h3 { margin: 0 0 4px; }
.list-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); }
.new-card { display: grid; place-items: center; min-height: 200px; border: 2px dashed #D6C8EC; border-radius: var(--radius); color: var(--plum-soft); font-weight: 700; text-decoration: none; background: rgba(255,255,255,.6); }
.new-card:hover { border-color: var(--coral); color: var(--coral-dark); }
.new-card .plus { font-size: 2.2rem; display: block; text-align: center; }

/* Temas de portada */
.t-coral { background: linear-gradient(135deg, #FF5E5B, #FF9A5B); }
.t-plum { background: linear-gradient(135deg, #2B1745, #6B3E8F); }
.t-mint { background: linear-gradient(135deg, #2EC4A6, #74D9A8); }
.t-sun { background: linear-gradient(135deg, #FFC145, #FF8A5B); }
.t-sky { background: linear-gradient(135deg, #5B8CFF, #8EC5FF); }
.t-rose { background: linear-gradient(135deg, #FF8FAB, #FFC2D1); }
.t-aurora { background: linear-gradient(135deg, #2B1745 0%, #7B5CFA 45%, #2EC4A6 100%); }
.t-gold { background: linear-gradient(135deg, #8A5A00, #FFC145 55%, #FFE7A3); }
.t-midnight { background: radial-gradient(circle at 20% 20%, #FFC145 0 2px, transparent 3px), radial-gradient(circle at 70% 40%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 40% 80%, #fff 0 1px, transparent 2px), linear-gradient(135deg, #0F0820, #2B1745); }
.theme-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-pick button { width: 46px; height: 46px; border-radius: 14px; border: 3px solid transparent; cursor: pointer; position: relative; }
.theme-pick button.on { border-color: var(--plum); box-shadow: 0 0 0 3px #fff inset; }
.theme-pick button .lock { position: absolute; right: -6px; top: -6px; font-size: .8rem; background: var(--gold); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }

/* ---------- Vista de lista ---------- */
.list-hero { border-radius: 26px; padding: clamp(20px, 4vw, 36px); color: #fff; position: relative; overflow: hidden; margin-bottom: 20px; }
.list-hero h1 { color: #fff; margin-bottom: 6px; }
.list-hero .emoji { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.list-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; opacity: .95; font-weight: 600; font-size: .9rem; }
.list-hero .meta .pill { background: rgba(255,255,255,.2); color: #fff; }
.list-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.list-hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.list-hero .btn.ghost:hover { background: rgba(255,255,255,.15); }
.list-hero .btn.white { background: #fff; color: var(--plum); box-shadow: none; }
.countdown { position: absolute; right: 24px; top: 24px; background: rgba(255,255,255,.18); border-radius: 18px; padding: 10px 16px; text-align: center; backdrop-filter: blur(6px); }
.countdown b { display: block; font-family: var(--font-title); font-size: 1.8rem; line-height: 1; }
@media (max-width: 600px) { .countdown { position: static; display: inline-block; margin-bottom: 10px; } }
.surprise-note { display: flex; gap: 12px; align-items: center; background: var(--gold-soft); border: 1px solid #F8DF9F; border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-weight: 600; color: #6B4700; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.total-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.total-box b { display: block; font-family: var(--font-title); font-size: 1.35rem; color: var(--plum); }
.total-box span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 260px; }
.toolbar select { width: auto; }
.wish-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.wish { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: box-shadow .15s, transform .15s; }
.wish:hover { box-shadow: var(--shadow); }
.wish-img { aspect-ratio: 4/3; background: var(--lav-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; position: relative; }
.wish-img img { width: 100%; height: 100%; object-fit: cover; }
.wish-img .ph { font-size: 2.8rem; }
.wish-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wish-title { font-weight: 700; color: var(--plum); line-height: 1.3; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wish-price { font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.wish-store { font-size: .8rem; color: var(--muted); font-weight: 600; }
.wish-actions { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; }
.prio { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.95); border-radius: 999px; padding: 3px 9px; font-size: .78rem; font-weight: 800; color: #B07700; z-index: 2; }
.qty-tag { position: absolute; top: 10px; right: 10px; background: var(--plum); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: .75rem; font-weight: 700; z-index: 2; }
.wish.reserved .wish-img::after { content: ''; position: absolute; inset: 0; background: rgba(43, 23, 69, .35); backdrop-filter: blur(2px); }
.res-banner { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; background: var(--mint); color: #fff; font-weight: 700; font-size: .82rem; text-align: center; padding: 6px; border-radius: 10px; }
.res-banner.bought { background: var(--plum); }
.res-banner.mine { background: var(--coral); }
.progress { height: 9px; background: var(--lav-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--gold)); border-radius: 999px; transition: width .4s; }
.drag-handle { cursor: grab; color: var(--muted); padding: 2px 6px; user-select: none; }
.wish.dragging { opacity: .5; }
.empty { text-align: center; padding: 50px 20px; background: #fff; border-radius: var(--radius); border: 2px dashed var(--line); }
.empty .big { font-size: 3rem; margin-bottom: 10px; }

/* ---------- Panel ---------- */
.welcome { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.upcoming { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.up-card { flex: 0 0 210px; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; }
.up-card .days { font-family: var(--font-title); font-size: 1.6rem; color: var(--coral-dark); font-weight: 700; line-height: 1; }
.up-card .days small { font-size: .8rem; font-family: var(--font); color: var(--muted); }
.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-item { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; text-decoration: none; color: inherit; }
.mini-item .thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--lav-2); flex: none; display: grid; place-items: center; overflow: hidden; font-size: 1.4rem; }
.mini-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: linear-gradient(120deg, var(--plum), #5A2D7A); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin-top: 30px; }
.plan-bar b { color: var(--gold); }

/* ---------- Ideas IA ---------- */
.ai-hero { background: linear-gradient(135deg, #FFF3D6, #FFE3E2 60%, #ECE3FB); border-radius: 26px; padding: clamp(20px, 4vw, 34px); margin-bottom: 20px; }
.idea { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.idea .cat { font-size: 1.6rem; }
.idea .price { font-family: var(--font-title); font-weight: 700; }
.source-tag { font-size: .78rem; font-weight: 700; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--lav-2); border-top-color: var(--coral); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Planes ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; }
.plan { background: #fff; border: 2px solid var(--line); border-radius: 26px; padding: 28px; position: relative; }
.plan.premium { border-color: var(--gold); box-shadow: 0 20px 50px -25px rgba(255, 193, 69, .9); }
.plan .price { font-family: var(--font-title); font-size: 2.6rem; font-weight: 700; color: var(--plum); }
.plan .price small { font-size: 1rem; color: var(--muted); font-family: var(--font); }
.plan ul { list-style: none; padding: 0; margin: 18px 0; }
.plan li { padding: 7px 0 7px 30px; position: relative; border-bottom: 1px dashed var(--line); }
.plan li::before { content: '✓'; position: absolute; left: 4px; color: var(--mint); font-weight: 800; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: '—'; color: #C9BEDB; }
.ribbon { position: absolute; top: -14px; right: 20px; background: var(--gold); color: var(--plum); padding: 5px 14px; border-radius: 999px; font-weight: 800; font-size: .8rem; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(27, 12, 44, .55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 24px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.5); animation: pop .18s; }
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.close-x { border: 0; background: var(--lav-2); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; flex: none; }
@media (max-width: 560px) { .modal-back { align-items: flex-end; padding: 0; } .modal { border-radius: 24px 24px 0 0; max-height: 92vh; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.wish-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wish-detail .img { border-radius: 16px; overflow: hidden; background: var(--lav-2); aspect-ratio: 1; display: grid; place-items: center; font-size: 4rem; }
.wish-detail .img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 620px) { .wish-detail { grid-template-columns: 1fr; } }
.share-box { display: flex; gap: 8px; }
.share-box input { flex: 1; }
.qr { width: 200px; height: 200px; margin: 10px auto; background: #fff; border-radius: 16px; padding: 10px; border: 1px solid var(--line); }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }

/* ---------- Avisos ---------- */
.notif { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.notif:hover { background: var(--lav); }
.notif.unread { background: var(--coral-soft); }
.notif .ni { font-size: 1.3rem; }

/* ---------- Avisos flotantes ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
body.authed .toasts { bottom: calc(var(--bottom-h) + 24px); }
.toast { background: var(--plum); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); animation: pop .2s; pointer-events: auto; max-width: 90vw; }
.toast.ok { background: #138A72; }
.toast.err { background: #C0302D; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: #0F7A65; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(46,196,166,.7); animation: pulse 2s infinite; }
.list-hero .live-dot { color: #fff; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(46,196,166,0); } 100% { box-shadow: 0 0 0 0 rgba(46,196,166,0); } }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 440px; margin: 20px auto; }
.auth-wrap .card { padding: 28px; }
.divider { text-align: center; color: var(--muted); font-size: .85rem; margin: 16px 0; }

/* ---------- Admin ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* ---------- Impresión (PDF, Premium) ---------- */
@media print {
  .topbar, .bottomnav, .toolbar, .wish-actions, .list-hero .actions, .toasts, .no-print, .surprise-note { display: none !important; }
  body { background: #fff; }
  .view { padding: 0; max-width: none; }
  .list-hero { color: var(--plum); background: none !important; border: 2px solid var(--plum); }
  .list-hero h1 { color: var(--plum); }
  .wish-grid { grid-template-columns: repeat(3, 1fr); }
  .wish { break-inside: avoid; }
  .print-url { display: block !important; }
}
.print-url { display: none; }

/* Ajustes para móviles pequeños */
@media (max-width: 480px) {
  body:not(.authed) .brand-name { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .btn.sm { padding: 7px 11px; font-size: .8rem; }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar input[type=search] { max-width: none; grid-column: 1 / -1; }
  .toolbar select, .toolbar input { width: 100%; max-width: none !important; }
  .wish-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wish-body { padding: 10px; }
  .wish-actions .btn.sm { padding: 6px 10px; font-size: .78rem; }
  .list-hero .actions .btn { padding: 9px 14px; font-size: .88rem; }
}
@media (max-width: 480px) { .toolbar input[type=checkbox] { width: 20px !important; } .toolbar .check { grid-column: 1 / -1; } }
.ad-box { margin: 24px 0; padding: 10px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-sm); min-height: 90px; }
