/* Layout: una columna tipo app (máx. 520px) sobre un cielo casi negro con estrellas tenues.
   Firma: burbujas de neón translúcidas, una por momento del día (mañana, comida, tarde, cena, fiesta).
   Un solo tema oscuro, elegido a propósito: fondo y colores siempre explícitos. */
:root {
  --bg: #09080B;
  --glow-top: rgb(169 139 255 / 0.16);
  --card: rgb(255 255 255 / 0.045);
  --card-2: rgb(255 255 255 / 0.075);
  --surface: #17151C;
  --line: rgb(255 255 255 / 0.09);
  --ink: #F4F1F6;
  --muted: #9C96A3;
  --on-light: #0B0A0D;

  --manana: #6EE3A0;  /* monte */
  --comida: #FFB547;
  --tarde: #FF7A59;
  --noche: #A98BFF;  /* acento */
  --cena: #5FB2FF;
  --fiesta: #FF5FD2;

  --yes: #6EE3A0;
  --maybe: #FFB547;
  --no: #FF6B6B;

  --f-display: 'Unbounded', 'Arial Rounded MT Bold', 'Avenir Next', system-ui, sans-serif;
  --f-sans: 'Manrope', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  font: 500 16px/1.5 var(--f-sans);
  background: radial-gradient(70% 380px at 50% 0%, var(--glow-top), transparent 75%), var(--bg);
  background-repeat: no-repeat;
}
/* estrellas */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 78% 9%, #fff, transparent),
    radial-gradient(1px 1px at 44% 32%, #fff, transparent), radial-gradient(1.4px 1.4px at 88% 41%, #fff, transparent),
    radial-gradient(1px 1px at 23% 56%, #fff, transparent), radial-gradient(1px 1px at 63% 64%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 8% 82%, #fff, transparent), radial-gradient(1px 1px at 52% 88%, #fff, transparent),
    radial-gradient(1px 1px at 93% 76%, #fff, transparent), radial-gradient(1px 1px at 35% 7%, #fff, transparent);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }

.wrap { max-width: 520px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 4px 72px; display: grid; gap: 22px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.display { font: 600 clamp(1.6rem, 7vw, 2.1rem)/1.12 var(--f-display); letter-spacing: -0.02em; text-align: center; }
h1 { font: 600 1.8rem/1.15 var(--f-display); }
h2 { font: 700 1.05rem/1.3 var(--f-sans); }
h3 { font: 700 1rem/1.3 var(--f-sans); }
p { margin: 0; }
a { color: var(--noche); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--noche); outline-offset: 3px; border-radius: 10px; }
.muted { color: var(--muted); }
.hint { font-size: 0.9rem; color: var(--muted); }
.center { text-align: center; justify-content: center; }
.center-items { justify-items: center; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }
.label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 800; }

/* ---------- barra ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(14px); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 600 1rem/1 var(--f-display); letter-spacing: -0.02em; }
.brand svg { width: 24px; height: 24px; }
.b-ticket { fill: var(--noche); }
.b-hole { fill: var(--bg); }
.b-check { stroke: var(--on-light); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.who { font-size: 0.86rem; color: var(--muted); min-width: 0; }
.who button { background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; font-weight: 800; }

/* ---------- burbujas ---------- */
.c-manana { --c: var(--manana); }
.c-comida { --c: var(--comida); }
.c-tarde { --c: var(--tarde); }
.c-noche { --c: var(--noche); }
.c-cena { --c: var(--cena); }
.c-fiesta { --c: var(--fiesta); }
.c-quedada { --c: #E9E4EF; }
.bubble {
  --c: var(--noche); --s: 64px;
  position: relative; flex: none; display: grid; place-items: center; align-content: center; gap: 2px;
  width: var(--s); height: var(--s); border-radius: 50%; padding: 0; color: #fff; text-align: center;
  border: 1px solid color-mix(in srgb, var(--c) 70%, white);
  background:
    radial-gradient(circle at 32% 26%, rgb(255 255 255 / 0.5), transparent 26%),
    radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--c) 70%, transparent) 0%, color-mix(in srgb, var(--c) 30%, transparent) 62%, color-mix(in srgb, var(--c) 55%, transparent) 100%);
  box-shadow:
    0 0 calc(var(--s) * 0.4) color-mix(in srgb, var(--c) 50%, transparent),
    inset 0 0 calc(var(--s) * 0.22) color-mix(in srgb, var(--c) 70%, white);
  transition: transform .25s cubic-bezier(.3,1.5,.5,1), scale .25s cubic-bezier(.3,1.5,.5,1), filter .2s ease, opacity .2s ease;
}
.bubble.c-manana { --c: var(--manana); } .bubble.c-comida { --c: var(--comida); }
.bubble.c-tarde { --c: var(--tarde); } .bubble.c-noche { --c: var(--noche); }
.bubble.c-cena { --c: var(--cena); } .bubble.c-fiesta { --c: var(--fiesta); }
.bubble-emoji { font-size: calc(var(--s) * 0.4); line-height: 1; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .35)); }
.bubble.sm { --s: 46px; } .bubble.md { --s: 58px; } .bubble.lg { --s: 96px; } .bubble.xl { --s: 150px; }
.bubble-label { font: 700 0.86rem/1.1 var(--f-sans); text-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.bubble-n { font-size: 0.7rem; font-weight: 800; opacity: .75; }

.cluster { position: relative; width: min(100%, 330px); height: 300px; margin: 0 auto; }
.cluster .bubble { position: absolute; }
.cluster .b-0 { --s: 112px; left: 2%; top: 10px; }
.cluster .b-1 { --s: 100px; right: 6%; top: 0; }
.cluster .b-2 { --s: 104px; left: 34%; top: 112px; }
.cluster .b-3 { --s: 92px; left: 0; bottom: 0; }
.cluster .b-4 { --s: 96px; right: 2%; bottom: 6px; }
.cluster.deco .bubble { animation: float 6s ease-in-out infinite; }
.cluster.deco .b-1 { animation-delay: -1.2s; } .cluster.deco .b-2 { animation-delay: -2.4s; }
.cluster.deco .b-3 { animation-delay: -3.6s; } .cluster.deco .b-4 { animation-delay: -4.8s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.cluster.pick .bubble { cursor: pointer; }
.cluster.pick .bubble:active { scale: .94; }
.cluster.pick .bubble.off { filter: saturate(.1) brightness(.5); opacity: .7; scale: .88; box-shadow: none; }
.cluster.pick .bubble.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), 0 0 calc(var(--s) * .5) color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 calc(var(--s) * .22) color-mix(in srgb, var(--c) 70%, white); }

.bubble.wobble { animation: wobble .22s ease-in-out infinite alternate; }
@keyframes wobble { from { transform: scale(.95) rotate(-4deg); } to { transform: scale(1.05) rotate(4deg); } }
.bubble.pop { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
.tick { animation: tick .16s ease-out; }
@keyframes tick { from { transform: translateY(-35%); opacity: .2; } to { transform: none; opacity: 1; } }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--card-2); color: var(--ink); font-weight: 800;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn-glow, .btn-primary { background: var(--ink); color: var(--on-light); border-color: var(--ink); box-shadow: 0 0 28px rgb(255 255 255 / .18); }
.btn-ghost { background: var(--card-2); }
.btn-big { width: 100%; min-height: 58px; font-size: 1.05rem; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }
.link-btn { background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--muted); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.link-btn.accent { color: var(--ink); }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); color: var(--ink); font-size: 1.1rem; font-weight: 800; text-decoration: none;
}
.round-btn:disabled { opacity: .35; cursor: default; }
.round-spacer { width: 40px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.row > .grow { flex: 1 1 160px; min-width: 0; }
.stack { display: grid; gap: 10px; min-width: 0; }

/* ---------- inicio ---------- */
.home-hero { display: grid; gap: 18px; padding-top: 8px; }
.cta { display: grid; gap: 4px; justify-items: center; }
.cta .btn-big { min-height: 64px; font-size: 1.12rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plans { display: grid; gap: 10px; }
.plan-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 16px 12px 12px; border-radius: 24px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: transform .15s ease, background-color .15s ease;
}
.plan-card:hover { background: var(--card-2); }
.plan-card:active { transform: scale(.98); }
.plan-card.closed { opacity: .65; }
.plan-card-body { display: grid; gap: 2px; min-width: 0; }
.plan-card-body h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.going { display: grid; justify-items: center; line-height: 1; }
.going b { font: 600 1.25rem/1 var(--f-display); }
.going span { font-size: 0.7rem; color: var(--muted); font-weight: 700; margin-top: 3px; }
.empty { padding: 22px; border: 1px dashed var(--line); border-radius: 24px; color: var(--muted); text-align: center; }

.card, .panel, .fold {
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: 18px; display: grid; gap: 14px; min-width: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fold:not([open]) { gap: 0; }
.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .hint { margin-left: auto; }
.fold > summary::after { content: '+'; font-size: 1.2rem; color: var(--muted); }
.fold[open] > summary::after { content: '–'; }

/* ---------- asistente ---------- */
.wizard { display: grid; gap: 20px; padding-top: 4px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wiz-head { display: grid; justify-items: center; gap: 12px; }
.reels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reel {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 12px 12px 12px; border-radius: 26px; background: var(--card);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.reel-text { display: grid; gap: 2px; min-width: 0; }
.reel-name { font: 700 1.08rem/1.25 var(--f-sans); overflow-wrap: anywhere; display: block; }
.reveal { display: grid; justify-items: center; gap: 10px; text-align: center; }
.reveal-name { overflow-wrap: anywhere; }
.wizard.done .stack { width: 100%; }

.classic {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; cursor: pointer;
  padding: 14px 16px; border-radius: 20px; background: color-mix(in srgb, var(--comida) 10%, transparent);
  border: 1px dashed color-mix(in srgb, var(--comida) 60%, transparent); color: var(--ink); font-weight: 800; text-align: left;
}
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.9rem;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
}
.cat-chip[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); }

/* ---------- desglose: línea de tiempo ---------- */
.reel-place { font-size: 0.82rem; color: var(--muted); font-weight: 600; min-height: 1em; overflow-wrap: anywhere; }
.reel-place:empty { display: none; }
.reel-drop {
  justify-self: start; background: none; border: 0; padding: 4px 0 0; cursor: pointer;
  color: var(--muted); font-size: 0.78rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.reel-drop:hover { color: var(--ink); }
.reel-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.reel-pick { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 4px; }
.idea-choice {
  min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.88rem;
  background: var(--card-2); border: 1px solid var(--line); color: var(--ink);
}
.idea-choice.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.title-row.propose { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; }
.adjust { padding-top: 6px; border-top: 1px solid var(--line); }
.moments { display: flex; flex-wrap: wrap; gap: 8px; }
.moment {
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.9rem;
  background: var(--card-2); border: 1px dashed var(--line); color: var(--muted);
}
.moment.on { color: var(--ink); border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.moment:disabled { opacity: .5; cursor: default; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-item { display: grid; grid-template-columns: 52px 18px minmax(0, 1fr); gap: 0 10px; position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-time { font: 600 0.92rem/1.5 var(--f-display); font-variant-numeric: tabular-nums; text-align: right; letter-spacing: -0.02em; }
.tl-dot { position: relative; display: block; }
.tl-dot::before {
  content: ""; position: absolute; left: 4px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 70%, transparent);
}
.tl-item:not(:last-child) .tl-dot::after {
  content: ""; position: absolute; left: 8px; top: 20px; bottom: -14px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 10%, transparent));
}
.tl-body { display: grid; gap: 2px; min-width: 0; }
.tl-title { font-weight: 800; overflow-wrap: anywhere; }
.tl-place { color: var(--muted); font-size: 0.88rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.tl-place:hover { color: var(--ink); text-decoration: underline; }
.wizard.done .card { width: 100%; text-align: left; }

/* editor de paradas */
.step-editor { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.step-row {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 40px; gap: 10px; align-items: start;
  padding: 10px; border-radius: 22px; background: var(--card);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.step-emoji { font-size: 1.3rem; line-height: 1; text-align: center; }
.step-grip {
  display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 0 8px; align-self: stretch;
  background: none; border: 0; border-radius: 12px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.step-grip:active { cursor: grabbing; }
.grip-dots { font-size: 1.1rem; line-height: 1; letter-spacing: -1px; }
.step-row.dragging { z-index: 3; box-shadow: 0 18px 40px rgb(0 0 0 / .55), 0 0 0 2px var(--c); background: var(--card-2); }
.step-editor.sorting .step-row:not(.dragging) { transition: transform .15s ease; }
.step-fields { display: grid; gap: 6px; min-width: 0; }
.step-line { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 6px; }
.step-time { text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; padding-inline: 6px !important; }
.step-time::-webkit-calendar-picker-indicator { display: none; }
.step-row .input { min-height: 46px; padding: 10px 12px; border-radius: 14px; }
.step-row .round-btn { margin-top: 3px; }

/* ---------- formularios ---------- */
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--ink);
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--noche); outline-offset: 0; border-color: transparent; }
select.input { appearance: none; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 800; font-size: 0.9rem; }
.title-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.emoji-input { text-align: center; padding: 0 6px; font-size: 1.3rem; }
.date-rows { display: grid; gap: 8px; }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.join-form { width: 100%; }
.link-code {
  display: block; font: 600 0.84rem/1.4 var(--f-sans); background: var(--card-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px; overflow-wrap: anywhere; user-select: all; color: var(--muted);
}

/* ---------- ideas ---------- */
.idea-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.idea {
  display: inline-flex; align-items: center; border-radius: 999px; max-width: 100%;
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.idea.off { opacity: .4; border-style: dashed; background: transparent; }
.idea-toggle { background: none; border: 0; padding: 7px 4px 7px 12px; cursor: pointer; font-weight: 700; font-size: 0.9rem; text-align: left; overflow-wrap: anywhere; }
.idea-del { background: none; border: 0; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.idea-del:hover { color: var(--no); }
.idea-add { display: grid; gap: 8px; }

/* ---------- personas ---------- */
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; max-width: 100%;
  background: var(--card-2); border: 1px solid var(--line); font-size: 0.88rem; font-weight: 700; color: var(--ink); cursor: default;
}
button.person { cursor: pointer; }
.person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 0.7rem; font-weight: 800; color: #fff; }

/* ---------- plan ---------- */
.plan-head { display: grid; justify-items: center; gap: 12px; text-align: center; }
.plan-head .bubble.xl { --s: 128px; margin-block: 8px 4px; }
.plan-head h1 { overflow-wrap: anywhere; }
.plan-head .desc {
  justify-self: stretch; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px;
}
.share-box > summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.share-box > summary::-webkit-details-marker { display: none; }
.share-box > summary::after { content: '↗'; }
.share-box:not([open]) { gap: 0; }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; background: var(--card-2); color: var(--muted); }
.chip.open { color: var(--noche); background: color-mix(in srgb, var(--noche) 16%, transparent); }
.chip.closed { color: var(--comida); background: color-mix(in srgb, var(--comida) 16%, transparent); }
.chip.best { color: var(--yes); background: color-mix(in srgb, var(--yes) 16%, transparent); }
.decided {
  display: grid; gap: 4px; padding: 18px; border-radius: 26px; text-align: center;
  background: color-mix(in srgb, var(--comida) 12%, transparent); border: 1px solid color-mix(in srgb, var(--comida) 55%, transparent);
}
.decided strong { font: 600 1.15rem/1.25 var(--f-display); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--card-2); }
.seg button { min-height: 46px; border-radius: 999px; border: 0; background: transparent; font-weight: 800; cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.seg button[aria-pressed="true"] { color: var(--on-light); }
.seg button[aria-pressed="true"].si { background: var(--yes); box-shadow: 0 0 18px color-mix(in srgb, var(--yes) 45%, transparent); }
.seg button[aria-pressed="true"].quiza { background: var(--maybe); box-shadow: 0 0 18px color-mix(in srgb, var(--maybe) 45%, transparent); }
.seg button[aria-pressed="true"].no { background: var(--no); box-shadow: 0 0 18px color-mix(in srgb, var(--no) 45%, transparent); }
.rsvp-groups { display: grid; gap: 12px; }
.rsvp-groups > div { display: grid; gap: 6px; }

.dates { display: grid; gap: 10px; }
.date-card { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 14px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.date-card.best { border-color: color-mix(in srgb, var(--yes) 60%, transparent); }
.date-card.chosen { border-color: var(--comida); }
.date-stub { display: grid; place-content: center; text-align: center; gap: 2px; border-right: 1px dashed var(--line); padding-right: 10px; }
.date-stub .dow, .date-stub .mon { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }
.date-stub .day { font: 600 1.4rem/1 var(--f-display); }
.date-main { display: grid; gap: 8px; min-width: 0; }
.date-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--card-2); }
.bar i { display: block; height: 100%; }
.bar .y { background: var(--yes); } .bar .m { background: var(--maybe); } .bar .n { background: var(--no); }
.vote3 { display: flex; gap: 6px; flex-wrap: wrap; }
.vote3 button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.vote3 button[aria-pressed="true"] { color: var(--on-light); border-color: transparent; }
.vote3 button[aria-pressed="true"][data-v="2"] { background: var(--yes); }
.vote3 button[aria-pressed="true"][data-v="1"] { background: var(--maybe); }
.vote3 button[aria-pressed="true"][data-v="0"] { background: var(--no); }
.tally { font-size: 0.84rem; color: var(--muted); overflow-wrap: anywhere; }
.tally b.y { color: var(--yes); } .tally b.m { color: var(--maybe); } .tally b.n { color: var(--no); }

.places { display: grid; gap: 8px; }
.place { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.place.mine { border-color: var(--noche); }
.place.chosen { border-color: var(--comida); }
.place-name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.place .tally { grid-column: 1 / -1; }
.votes-n { font: 600 1.2rem/1 var(--f-display); }

.comments { display: grid; gap: 14px; }
.comment { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.comment .avatar { width: 28px; height: 28px; font-size: 0.78rem; }
.comment-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 0.84rem; }
.comment-head b { font-size: 0.94rem; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }

details.adder > summary { list-style: none; cursor: pointer; font-weight: 800; color: var(--ink); padding: 6px 0; min-height: 36px; display: inline-flex; align-items: center; }
details.adder > summary::-webkit-details-marker { display: none; }
details.adder[open] > summary { margin-bottom: 8px; }
.confirm { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: color-mix(in srgb, var(--no) 12%, transparent); border: 1px solid color-mix(in srgb, var(--no) 50%, transparent); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  background: var(--ink); color: var(--on-light); padding: 12px 20px; border-radius: 999px; font-weight: 800;
  max-width: calc(100% - 32px); text-align: center; box-shadow: 0 0 30px rgb(255 255 255 / .15);
}
.toast.err { background: var(--no); color: #fff; }

@media (max-width: 380px) {
  .cluster.pick .b-0 { --s: 118px; } .cluster.pick .b-1 { --s: 104px; } .cluster.pick .b-2 { --s: 114px; } .cluster.pick .b-3 { --s: 98px; }
  .step-line { grid-template-columns: 78px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- logística: coches y encargos ---------- */
.cars { display: grid; gap: 8px; }
.car { display: grid; gap: 10px; padding: 12px 14px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--line); }
.car.mine { border-color: color-mix(in srgb, var(--yes) 60%, transparent); }
.car-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.car-emoji, .task-emoji { font-size: 1.5rem; line-height: 1; }
.car-who { display: grid; gap: 2px; min-width: 0; }
.car-who strong { overflow-wrap: anywhere; }
.input.seats { width: auto; min-width: 0; flex: 1 1 180px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); }
.task.mine { border-color: color-mix(in srgb, var(--yes) 60%, transparent); }
.task-body { display: grid; gap: 6px; min-width: 0; }
.task-label { font-weight: 700; overflow-wrap: anywhere; }
.task-acts { display: flex; align-items: center; gap: 4px; }

/* ---------- calendario de la portada ---------- */
.label.center { text-align: center; }
.cal { padding: 14px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-title { font: 600 1rem/1.2 var(--f-display); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow span { text-align: center; font-size: 0.7rem; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; }
.cal-day {
  position: relative; aspect-ratio: 1; min-height: 40px; border-radius: 14px; border: 1px solid transparent; cursor: pointer;
  display: grid; place-items: center; align-content: center; gap: 1px; padding: 0;
  background: transparent; color: var(--ink); font: 700 0.95rem/1 var(--f-sans); font-variant-numeric: tabular-nums;
  transition: background-color .15s ease, box-shadow .2s ease, transform .15s ease;
}
.cal-day.weekend { background: var(--card-2); }
.cal-day.today { border-color: var(--line); }
.cal-day:disabled { color: color-mix(in srgb, var(--muted) 45%, transparent); background: transparent; cursor: default; }
.cal-n { font-size: 0.62rem; font-weight: 800; color: var(--muted); line-height: 1; }
.cal-day.busy::after { content: ''; position: absolute; right: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--comida); }
.cal-day.mine { background: color-mix(in srgb, var(--yes) 26%, transparent); border-color: color-mix(in srgb, var(--yes) 70%, transparent); }
.cal-day.mine .cal-n { color: var(--ink); }
.cal-day.all { background: var(--yes); color: var(--on-light); border-color: var(--yes); box-shadow: 0 0 18px color-mix(in srgb, var(--yes) 60%, transparent); }
.cal-day.all .cal-n { color: var(--on-light); }
.cal-day.chosen { outline: 2px solid var(--ink); outline-offset: 2px; }
.cal-day:not(:disabled):active { transform: scale(.92); }
.cal-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 0.74rem; color: var(--muted); font-weight: 700; padding-top: 2px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg.mine { background: color-mix(in srgb, var(--yes) 26%, transparent); border: 1px solid var(--yes); }
.lg.all { background: var(--yes); }
.lg.busy { background: var(--comida); border-radius: 50%; }
.invite { display: grid; justify-items: center; gap: 8px; text-align: center; }
.best-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.best-day { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.best-day.all { border-color: color-mix(in srgb, var(--yes) 70%, transparent); }
.best-day.chosen { box-shadow: 0 0 0 2px var(--ink); }
.best-when { display: grid; gap: 4px; min-width: 0; }
.best-when strong { font: 600 1rem/1.2 var(--f-display); }
.step-plan { padding-top: 10px; scroll-margin-top: 70px; }
.saved-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.center-btn { text-align: center; }

/* ---------- fases ---------- */
.phase-card { gap: 14px; }
.phase-card h2.display { margin: 0; font-size: clamp(1.5rem, 6vw, 2rem); }
.display.center, .center { text-align: center; }
.phases { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.phases li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.ph-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); font-size: 0.72rem; }
.phases li.now { color: var(--ink); background: color-mix(in srgb, var(--noche) 22%, transparent); }
.phases li.now .ph-n { background: var(--noche); color: var(--on-light); }
.phases li.done { color: var(--yes); }
.phases li.done .ph-n { background: color-mix(in srgb, var(--yes) 25%, transparent); }
.proposal { display: grid; gap: 10px; padding: 18px; border-radius: 26px; background: var(--card); border: 1px solid color-mix(in srgb, var(--noche) 45%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--noche) 18%, transparent); }
.proposal.fixed { border-color: color-mix(in srgb, var(--yes) 60%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--yes) 22%, transparent); justify-items: center; text-align: center; }
.seg.seg-2 { grid-template-columns: repeat(2, 1fr); }
.cal-day.proposed { outline: 2px solid var(--noche); outline-offset: 2px; }
.lg.prop { background: transparent; border: 2px solid var(--noche); }

/* ---------- novedades ---------- */
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.day-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.9rem; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.day-chip.on { color: var(--ink); border-color: var(--noche); background: color-mix(in srgb, var(--noche) 22%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--noche) 35%, transparent); }

/* ---------- mapa: pin de ubicación ---------- */
.where-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.map-btn { font-size: 1rem; }
.map-btn.pinned { border-color: var(--comida); box-shadow: 0 0 12px color-mix(in srgb, var(--comida) 45%, transparent); }
body.no-scroll { overflow: hidden; }
.map-sheet { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .6); display: grid; align-items: end; justify-items: center; }
.map-panel {
  width: min(100%, 640px); height: min(100dvh, 860px); display: flex; flex-direction: column; gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: var(--bg); border: 1px solid var(--line); border-radius: 24px 24px 0 0;
}
.map-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.map-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.map-results { flex: none; list-style: none; margin: 0; padding: 4px; max-height: 32dvh; overflow: auto; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.map-results[hidden] { display: none; }
.map-results li.hint { padding: 8px 10px; }
.map-result { width: 100%; display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.map-result:hover { background: var(--card-2); }
.map-box { flex: 1 1 auto; min-height: 240px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #111; display: grid; place-items: center; }
.map-box.leaflet-container { display: block; }
.map-hint { margin: 0; }
.map-bottom { display: grid; gap: 8px; }
.map-bottom .row > .grow { flex: 1 1 auto; }
.leaflet-container { font: 600 0.75rem/1.2 var(--f-sans); background: #111; }
.leaflet-control-attribution { background: rgb(0 0 0 / .55) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--ink) !important; }
.pin span {
  display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--comida); border: 2px solid #fff; box-shadow: 0 0 16px color-mix(in srgb, var(--comida) 70%, transparent);
}
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.7); }
.seg.seg-3 { grid-template-columns: repeat(3, 1fr); }
.map-layers button { min-height: 36px; font-size: 0.82rem; }

/* ---------- ranking de pekas ---------- */
.ranking { display: grid; gap: 10px; padding: 16px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); }
.ranking h2 { margin: 0; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-row { display: grid; grid-template-columns: 30px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; }
.rank-row.me { background: var(--card-2); }
.rank-row.first { background: color-mix(in srgb, var(--comida) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--comida) 45%, transparent); }
.rank-pos { text-align: center; font: 700 1.05rem/1 var(--f-display); color: var(--muted); }
.rank-body { display: grid; gap: 4px; min-width: 0; }
.rank-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rank-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-xp { font: 600 0.95rem/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--comida); white-space: nowrap; }
.rank-bar { height: 6px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--noche), var(--comida)); box-shadow: 0 0 10px color-mix(in srgb, var(--comida) 50%, transparent); }
.rank-body .hint { font-size: 0.78rem; }

/* ---------- nivel de peka: avatar con anillo ---------- */
.me-chip { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.me-text { display: grid; text-align: right; line-height: 1.15; min-width: 0; }
.me-text strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { font-size: 0.72rem; color: var(--comida); font-weight: 800; white-space: nowrap; }
.lv-avatar {
  --s: 40px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; padding: 3px;
  background: conic-gradient(var(--comida) var(--p), var(--card-2) 0); box-shadow: 0 0 14px color-mix(in srgb, var(--comida) 35%, transparent);
}
.lv-avatar.sm { --s: 38px; }
.lv-avatar.xl { --s: 112px; padding: 6px; }
.lv-face { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * 0.38); border: 2px solid var(--bg); }
.lv-badge {
  position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--comida); color: var(--on-light); font: 700 0.68rem/1 var(--f-display); border: 2px solid var(--bg);
}
.lv-avatar.xl .lv-badge { min-width: 34px; height: 34px; font-size: 1rem; right: 0; bottom: 0; }
.me-card { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 20px 16px; border-radius: 28px; background: var(--card); border: 1px solid color-mix(in srgb, var(--comida) 40%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--comida) 14%, transparent); }
.me-card h1 { margin: 0; }
.me-xp { margin: 0; font: 600 1.3rem/1 var(--f-display); color: var(--comida); }
.rank-bar.big { width: min(100%, 320px); height: 10px; }
.rank-level { font-size: 0.78rem; font-weight: 800; color: var(--ink); }
.xp-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.xp-rules li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.xp-rules strong { color: var(--comida); font-family: var(--f-display); }
.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.levels li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card-2); color: var(--muted); font-weight: 700; }
.levels li.done { color: var(--ink); }
.levels li.now { color: var(--on-light); background: var(--comida); }
.levels li.now .hint { color: var(--on-light); }

/* ---------- campanita de novedades ---------- */
.who { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--card-2); border: 1px solid var(--line); font-size: 1.1rem; }
.bell[aria-expanded="true"] { border-color: var(--comida); }
.bell-n {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--no); color: #fff; font: 800 0.68rem/1 var(--f-sans); border: 2px solid var(--bg); box-shadow: 0 0 10px color-mix(in srgb, var(--no) 60%, transparent);
}
.bell-panel {
  position: fixed; z-index: 40; top: calc(env(safe-area-inset-top, 0px) + 64px); right: max(12px, calc((100vw - 520px) / 2 + 16px)); width: min(360px, calc(100vw - 24px));
  max-height: min(70dvh, 520px); overflow: auto; display: grid; gap: 10px; padding: 14px; border-radius: 22px;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 20px 50px rgb(0 0 0 / .6);
}
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.news-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: 14px; }
.news-list li.fresh { background: color-mix(in srgb, var(--comida) 12%, transparent); box-shadow: inset 3px 0 0 var(--comida); }
.news-list li > div { display: grid; gap: 2px; min-width: 0; }
.news-list a, .news-text { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; text-decoration: none; }
.news-list .hint { font-size: 0.76rem; }
.news-icon { font-size: 1.15rem; line-height: 1.3; }
@media (max-width: 360px) { .me-text { display: none; } }
/* Día al que has dicho «No puedo»: rojo, como el botón */
.cal-day.nope { background: color-mix(in srgb, var(--no) 24%, transparent); border-color: color-mix(in srgb, var(--no) 75%, transparent); color: var(--ink); }
.lg.nope { background: color-mix(in srgb, var(--no) 24%, transparent); border: 1px solid var(--no); }

/* ---------- crear grupo nuevo / tus grupos ---------- */
.panel.locked { opacity: .85; border-style: dashed; }
.panel.unlocked { border-color: color-mix(in srgb, var(--yes) 55%, transparent); box-shadow: 0 0 26px color-mix(in srgb, var(--yes) 15%, transparent); }
.group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.group-list li a, .group-now { display: block; padding: 10px 12px; border-radius: 14px; background: var(--card-2); color: var(--ink); text-decoration: none; font-weight: 700; }
.group-now { color: var(--yes); }
