/* Wonder Groove — póster soul/funk 70-80. Plano, alto contraste, sin sombras ni blur.
   Fuentes alojadas localmente (sin Google Fonts). */
@font-face { font-family: "Bungee"; src: url("/fonts/bungee-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --wg-yellow: #FFD21F;
  --wg-orange: #FF8A00;
  --wg-red: #F2471C;
  --wg-pink: #E8344E;
  --wg-ink: #140C0A;
  --wg-cream: #F5E9CF;
  --wg-cream-2: #EDE6D8;
  --wg-surface: #241915;
  --wg-hover: #1D1411;
  --wg-muted: #B9A88C;
  --wg-sunset: linear-gradient(180deg, #FFD21F 0%, #FF8A00 55%, #F2471C 100%);
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --ui: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --app-w: 440px;
  --tab-h: calc(58px + max(env(safe-area-inset-bottom), 12px));

  /* Tokens semánticos: modo oscuro (por defecto) */
  --page: #0B0706;
  --bg: #140C0A;
  --text: #F5E9CF;
  --surface: #241915;
  --hover: #1D1411;
  --muted: #B9A88C;
  --chip-border: #241915;
  --edge: transparent;
  --accent: #FFD21F;
  --accent-2: #FF8A00;
  --field: #F5E9CF;
  --star-off: #5E4A3E;
  --star-on-stroke: #FFD21F;
  --rings-soft: #241915;
  color-scheme: dark;
}

/* Modo claro (del handoff): fondo crema, bordes ink de 2px, superficie #EDE6D8.
   Se aplica si el sistema está en claro, o si se eligió "Claro" en Mi discoteca. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --page: #E9DCBF; --bg: #F5E9CF; --text: #140C0A; --surface: #EDE6D8; --hover: #EDE0C4; --muted: #5E4C38;
    --chip-border: #140C0A; --edge: #140C0A; --accent: #B8330F; --accent-2: #A34A00; --field: #FFF8EA;
    --star-off: #B9A88C; --star-on-stroke: #140C0A; --rings-soft: #E4D6B8; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --page: #E9DCBF; --bg: #F5E9CF; --text: #140C0A; --surface: #EDE6D8; --hover: #EDE0C4; --muted: #5E4C38;
  --chip-border: #140C0A; --edge: #140C0A; --accent: #B8330F; --accent-2: #A34A00; --field: #FFF8EA;
  --star-off: #B9A88C; --star-on-stroke: #140C0A; --rings-soft: #E4D6B8; color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); }
body {
  font-family: var(--ui); color: var(--text); -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.45;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Marco de la app ---------- */
.app {
  position: relative; max-width: var(--app-w); min-height: 100vh; min-height: 100dvh;
  margin: 0 auto; background: var(--bg); overflow-x: clip;
}
@media (min-width: 480px) { .app { border-left: 2px solid var(--chip-border); border-right: 2px solid var(--chip-border); } }
.scroll { padding: max(env(safe-area-inset-top), 8px) 0 calc(var(--tab-h) + 90px); }
.view { animation: wg-in 220ms ease-out; }

/* ---------- Tipografía y motivos ---------- */
.d { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0; margin: 0; }
.h-screen { font-size: 30px; line-height: 1.05; }
.h-section { font-size: 17px; line-height: 1.1; }
.muted { color: var(--muted); }
.pad { padding-left: 20px; padding-right: 20px; }

.stripes { display: flex; flex-direction: column; gap: 5px; }
.stripes i { display: block; }
.stripes i:nth-child(1) { height: 4px; background: var(--wg-yellow); }
.stripes i:nth-child(2) { height: 7px; background: var(--wg-orange); }
.stripes i:nth-child(3) { height: 10px; background: var(--wg-pink); }
.stripes.ink i { background: var(--wg-ink); }
.stripes.base { position: absolute; left: 0; right: 0; bottom: 0; }
.stripes.mini { gap: 2px; width: 44px; }
.stripes.mini i:nth-child(1) { height: 2px; }
.stripes.mini i:nth-child(2) { height: 3px; }
.stripes.mini i:nth-child(3) { height: 5px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 28px 20px 12px; }
.section-head .d { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wg-pink); animation: wg-pulse 1.6s ease-in-out infinite; flex: none; }

/* ---------- Botones ---------- */
.pill {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 12px; letter-spacing: .8px; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  transition: background 150ms ease-out, color 150ms ease-out;
}
.pill svg { width: 15px; height: 15px; }
.pill-primary { background: var(--wg-orange); color: var(--wg-ink); }
.pill-primary:hover:not(:disabled) { background: var(--wg-yellow); }
.pill-surface { background: var(--surface); color: var(--text); }
.pill-surface:hover:not(:disabled) { background: #2f211c; }
.pill-surface.on { background: var(--wg-yellow); color: var(--wg-ink); }
.pill-danger { background: transparent; color: var(--wg-pink); box-shadow: inset 0 0 0 2px var(--wg-pink); }
.pill-danger:hover:not(:disabled) { background: var(--wg-pink); color: var(--wg-ink); }
.pill:disabled { opacity: .45; cursor: not-allowed; }

.circle {
  border-radius: 999px; border: 0; display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: background 150ms ease-out;
}
.circle-yellow { background: var(--wg-yellow); color: var(--wg-ink); }
.circle-yellow:hover { background: var(--wg-orange); }
.circle-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--chip-border); }
.circle-outline:hover { background: var(--hover); }
.circle-ink { background: var(--wg-ink); color: var(--wg-yellow); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.icon-btn:hover { background: var(--hover); }

/* ---------- Chips ---------- */
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 20px 4px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--chip-border);
  background: transparent; color: var(--text); font-weight: 700; font-size: 13px;
  transition: background 150ms ease-out, border-color 150ms ease-out;
}
.chip:hover { border-color: #3a2922; }
.chip[aria-checked="true"], .chip[aria-pressed="true"] { background: var(--wg-yellow); border-color: var(--wg-yellow); color: var(--wg-ink); }
.chip.veto { border-style: dashed; }
.chip.veto:hover { border-color: var(--wg-pink); color: var(--wg-pink); }
.sub-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); padding: 14px 20px 8px; text-transform: uppercase; }

/* ---------- Header de Inicio ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 6px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; display: block; }
.brand .d { font-size: 15px; letter-spacing: .2px; }
.brand .d span, .y { color: var(--accent); }
.avatar {
  width: 38px; height: 38px; border-radius: 999px; border: 0; background: var(--wg-yellow); color: var(--wg-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar svg { width: 20px; height: 20px; }
.greet { padding: 18px 20px 16px; }
.greet p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Tarjeta destacada (sunset) ---------- */
.featured {
  position: relative; margin: 0 20px; height: 268px; border-radius: 12px; overflow: hidden;
  background: var(--wg-sunset); color: var(--wg-ink); cursor: pointer; display: block; width: calc(100% - 40px);
  border: 0; text-align: left; padding: 0;
}
.featured .rings {
  position: absolute; right: -150px; top: -190px; width: 360px; height: 360px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 16px, var(--wg-ink) 16px 19px);
}
.featured .rec {
  position: absolute; right: 18px; top: 18px; width: 84px; height: 84px; border-radius: 50%; background: var(--wg-ink);
  display: flex; align-items: center; justify-content: center;
}
.featured .rec::after { content: ""; width: 30px; height: 30px; border-radius: 50%; background: var(--wg-cream); border: 9px solid var(--wg-pink); box-sizing: content-box; }
.badge {
  display: inline-block; background: var(--wg-ink); color: var(--wg-yellow); font-weight: 700; font-size: 11px;
  letter-spacing: 1px; padding: 5px 10px; border-radius: 999px; text-transform: uppercase;
}
.featured .top { position: absolute; left: 0; top: 0; padding: 18px; }
.featured .info { position: absolute; left: 18px; right: 88px; bottom: 44px; }
.featured .title { font-size: 34px; line-height: 1; overflow-wrap: normal; text-wrap: balance; }
.featured .title.long { font-size: 26px; }
.featured .title.xlong { font-size: 21px; }
.featured .meta { margin-top: 8px; font-size: 14px; font-weight: 500; }
.featured .go {
  position: absolute; right: 16px; bottom: 38px; width: 58px; height: 58px; border-radius: 999px;
  border: 3px solid var(--wg-ink); background: var(--wg-yellow); color: var(--wg-ink);
  display: flex; align-items: center; justify-content: center;
}
.featured:hover .go { background: var(--wg-cream); }
.featured.empty { cursor: default; }
.featured.empty .info { right: 96px; bottom: 96px; }
.featured.empty .cta { position: absolute; left: 18px; bottom: 36px; }
.featured .cta .pill { background: var(--wg-ink); color: var(--wg-yellow); height: 46px; padding: 0 20px; font-size: 13px; }
.featured .cta .pill:hover:not(:disabled) { background: #2a1c17; }
.featured .cta .pill.loading svg { animation: wg-spin .9s linear infinite; }

.below-featured { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 0; }
.motivo { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Portadas ---------- */
.cover { position: relative; overflow: hidden; border-radius: 12px; background: var(--c-bg); flex: none; }
.cover::before { content: ""; position: absolute; inset: 0; background-image: var(--c-motif); }
.cover .lbl { position: absolute; left: 10px; top: 10px; font-family: var(--display); font-size: 13px; color: var(--c-fg); line-height: 1.05; right: 10px; }
.cover.sm { border-radius: 8px; }
.cover.sm .lbl, .cover.xs .lbl { display: none; }
.cover.xs { border-radius: 8px; background: var(--c-solid); }
.cover.xs::before { background-image: linear-gradient(to bottom, transparent 0 50%, #140C0A 50% 56%, transparent 56% 64%, #140C0A 64% 74%, transparent 74% 82%, #140C0A 82% 96%, transparent 96%); }

/* ---------- Grillas y filas ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; padding: 0 20px; }
.card { background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.card .cover { width: 100%; aspect-ratio: 1; }
.card .t { margin-top: 9px; font-family: var(--display); font-size: 14px; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
.card .stripes { margin-top: 7px; }
.card .s { margin-top: 7px; font-size: 12px; color: var(--muted); }
.card:hover .cover { outline: 2px solid var(--accent); outline-offset: 2px; }

.rows { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent;
  width: 100%; text-align: left; color: inherit; transition: background 150ms ease-out;
}
.row:hover { background: var(--hover); }
.row .body { flex: 1; min-width: 0; }
.row .rt { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .rt.d { font-weight: 400; font-size: 15px; white-space: normal; line-height: 1.15; }
.row .rs { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .idx { width: 22px; text-align: right; font-size: 13px; font-weight: 500; color: var(--muted); flex: none; }
.row.current .idx, .row.current .rt, .row.playing .idx, .row.playing .rt { color: var(--accent); }
.row .end { font-size: 13px; color: var(--muted); flex: none; }
.row .chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.row .heart { width: 16px; height: 16px; flex: none; }
.row .tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; background: var(--wg-yellow); color: var(--wg-ink); padding: 3px 7px; border-radius: 999px; flex: none; }
.stars-inline { color: var(--accent); letter-spacing: 1px; }
.pending { color: var(--accent-2); font-weight: 700; font-size: 11px; letter-spacing: .8px; }

.surface-card {
  display: flex; gap: 12px; align-items: center; margin: 0 20px; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 0; width: calc(100% - 40px); text-align: left; color: inherit;
  transition: background 150ms ease-out;
}
button.surface-card:hover { background: #2f211c; }
.surface-card .t { font-weight: 700; font-size: 14px; }
.surface-card .s { font-size: 13px; color: var(--muted); margin-top: 2px; }

.empty-note { padding: 8px 20px; font-size: 14px; color: var(--muted); }

/* ---------- Inputs ---------- */
.field {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 16px; border-radius: 999px;
  background: var(--field); color: var(--wg-ink); margin: 0 20px;
}
.field svg { width: 20px; height: 20px; flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 500; color: var(--wg-ink); }
.field input::placeholder { color: #7a6a58; }
.field:focus-within { box-shadow: 0 0 0 3px var(--accent); }
.field .clear { border: 0; background: var(--wg-ink); color: var(--wg-cream); width: 24px; height: 24px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex: none; margin-right: 6px; }
.field .clear svg { width: 12px; height: 12px; }
.field .pill { height: 36px; background: var(--wg-ink); color: var(--wg-yellow); }
.field .pill:hover { background: #2a1c17; }

.veto-opts { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--wg-yellow); width: 16px; height: 16px; }
.veto-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; margin: 0 20px 6px; border-radius: 12px; background: var(--surface); }
.veto-item .body { flex: 1; min-width: 0; }
.veto-item .vt { font-weight: 700; font-size: 14px; }
.veto-item .vs { font-size: 12px; color: var(--muted); }
.veto-item .icon-btn { width: 36px; height: 36px; color: var(--wg-pink); }
.veto-list { margin-top: 12px; }

textarea {
  display: block; width: calc(100% - 40px); margin: 0 20px; min-height: 84px; resize: vertical; border-radius: 12px;
  border: 2px solid var(--chip-border); background: var(--hover); color: var(--text); padding: 12px 14px; font-size: 15px;
}
textarea:focus { outline: none; border-color: var(--accent); }
textarea::placeholder { color: #8a7a64; }

/* ---------- Ficha del álbum ---------- */
.back { padding: 8px 12px; }
.album-head { display: flex; gap: 16px; padding: 0 20px; align-items: flex-end; }
.album-head .cover { width: 138px; height: 138px; }
.album-head .cover .lbl { font-size: 14px; }
.album-head .t { font-size: 25px; line-height: 1.02; text-wrap: balance; overflow-wrap: normal; }
.album-head .t.long { font-size: 20px; }
.album-head .s { margin-top: 8px; font-size: 13px; color: var(--muted); }
.album-head .s b { color: var(--text); font-weight: 700; }
.album-motivo { padding: 14px 20px 0; font-size: 14px; color: var(--accent); margin: 0; }
.genre-line { padding: 10px 20px 0; font-size: 13px; color: var(--muted); margin: 0; }
.stripes.full { padding: 16px 20px 0; }
.pillars { padding: 4px 20px 0; display: grid; gap: 4px; }
.pillar h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; font-size: 13px; }
.pillar h3 .n { width: 22px; height: 22px; border-radius: 999px; background: var(--wg-yellow); color: var(--wg-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.pillar p { margin: 0; font-size: 14px; line-height: 1.5; text-wrap: pretty; }

.rate { padding: 0 0 4px; }
.stars { display: flex; gap: 6px; padding: 0 20px 6px; align-items: center; }
.star { width: 46px; height: 46px; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; transition: transform 120ms ease-out; }
.star svg { width: 34px; height: 34px; fill: none; stroke: var(--star-off); stroke-width: 2.25; stroke-linejoin: round; transition: fill 120ms, stroke 120ms; }
.star:hover { transform: scale(1.08); }
.star.on svg { fill: var(--wg-yellow); stroke: var(--star-on-stroke); }
.star-cap { padding: 0 20px 12px; font-size: 13px; color: var(--accent); min-height: 1.4em; margin: 0; }
.rate-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px 0; }
.rate-actions .note { font-size: 12px; color: var(--muted); }

.remove-link { display: block; margin: 26px auto 0; background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.remove-link:hover { color: var(--wg-pink); }

/* ---------- Hoja del tema (reproductor) ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column;
  max-width: var(--app-w); margin: 0 auto; background: var(--bg); overflow-y: auto;
  animation: wg-up 250ms ease-out;
}
.sheet-top {
  position: relative; height: 440px; flex: none; overflow: hidden; background: var(--wg-sunset); color: var(--wg-ink);
  padding-top: max(env(safe-area-inset-top), 10px);
}
@media (max-height: 740px) { .sheet-top { height: 380px; } .sheet-top .disc-wrap { top: 230px; transform: scale(.86); } .sheet-top .rings-big { top: 230px; } }
.rings-big {
  position: absolute; left: 50%; top: 270px; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 22px, var(--wg-ink) 22px 25px);
}
.sheet-bar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; }
.from-pill { text-align: center; background: var(--wg-ink); color: var(--wg-cream); border-radius: 999px; padding: 6px 14px; max-width: 250px; }
.from-pill small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--wg-yellow); }
.from-pill span { display: block; font-family: var(--display); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.disc-wrap { position: absolute; left: 50%; top: 270px; width: 268px; height: 268px; margin: -134px 0 0 -134px; }
.disc {
  width: 268px; height: 268px; border-radius: 50%; border: 6px solid var(--wg-ink);
  background: repeating-radial-gradient(circle, #140C0A 0 2px, #241915 2px 4px);
  display: flex; align-items: center; justify-content: center; animation: wg-spin 6s linear infinite;
}
.disc.paused { animation-play-state: paused; }
.disc .label { position: relative; width: 108px; height: 108px; border-radius: 50%; border: 4px solid var(--wg-cream); background: var(--disc-label); }
.disc .label::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--wg-ink); box-shadow: 0 0 0 3px var(--wg-cream); }
.sheet-body { flex: 1; padding: 18px 24px calc(34px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.song-head { display: flex; align-items: flex-start; gap: 12px; }
.song-head .t { font-size: 24px; line-height: 1.08; overflow-wrap: normal; }
.song-head .s { margin-top: 4px; font-size: 15px; color: var(--muted); }
.like { width: 44px; height: 44px; color: var(--wg-pink); }
.like svg { width: 22px; height: 22px; }
.song-sec h3 { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--accent); margin: 22px 0 6px; text-transform: uppercase; font-family: var(--ui); }
.song-sec p { margin: 0; font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.song-note { margin-top: 18px; font-size: 13px; color: var(--muted); }
.sheet-foot { margin-top: 24px; }
.sheet-foot .surface-card { margin: 0; width: 100%; }
.sheet-foot .surface-card .t { font-weight: 400; font-size: 12px; color: var(--muted); }
.sheet-foot .surface-card .t b { color: var(--text); font-weight: 700; }
.spin-toggle { margin-top: 10px; align-self: center; }

/* ---------- Buscar ---------- */
.genre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; }
.tile {
  position: relative; height: 92px; border-radius: 12px; overflow: hidden; background: var(--g-color); color: var(--wg-ink);
  padding: 12px; border: 0; text-align: left;
}
.tile .stripes { position: absolute; left: 0; right: 0; bottom: 0; gap: 4px; }
.tile .stripes i { background: var(--wg-ink); }
.tile .stripes i:nth-child(1) { height: 3px; }
.tile .stripes i:nth-child(2) { height: 5px; }
.tile .stripes i:nth-child(3) { height: 8px; }
.tile .gn { position: relative; font-family: var(--display); font-size: 17px; line-height: 1.05; }
.tile .gc { position: relative; font-size: 12px; font-weight: 700; margin-top: 2px; }
.tile:hover { filter: brightness(1.06); }
.result-label { padding: 20px 20px 8px; font-size: 13px; color: var(--muted); }
.no-results { padding: 48px 32px; text-align: center; }
.no-results .d { font-size: 22px; color: var(--accent); }
.no-results p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.search-screen .h-screen { padding: 18px 20px 14px; }
.search-screen .chip-row { padding-top: 14px; }

/* ---------- Mi discoteca ---------- */
.profile-hero { position: relative; overflow: hidden; padding: 26px 20px 22px; }
.profile-hero .rings {
  position: absolute; right: -90px; top: -70px; width: 260px; height: 260px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 14px, var(--rings-soft) 14px 17px);
}
.profile-hero > * { position: relative; }
.avatar.lg { width: 78px; height: 78px; }
.avatar.lg svg { width: 38px; height: 38px; }
.profile-hero .name { margin-top: 14px; font-size: 28px; }
.profile-hero .role { margin-top: 4px; font-size: 14px; color: var(--muted); }
.stats { margin-top: 18px; display: flex; gap: 10px; }
.stat { flex: 1; background: var(--surface); border-radius: 12px; padding: 12px; }
.stat .v { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--muted); }
.stat:nth-child(1) .v { color: var(--accent); }
.stat:nth-child(2) .v { color: var(--accent-2); }
.stat:nth-child(3) .v { color: var(--wg-pink); }
.privacy { margin: 0 20px; padding: 14px; border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--muted); display: flex; gap: 10px; }
.privacy svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.privacy b { color: var(--text); }
.data-actions { display: flex; gap: 10px; padding: 12px 20px 0; flex-wrap: wrap; }

/* ---------- Mini barra ---------- */
.mini-bar {
  position: fixed; z-index: 15; bottom: calc(var(--tab-h) + 6px); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 20px), calc(var(--app-w) - 20px)); height: 62px; border-radius: 12px; border: 0;
  background: var(--surface); color: var(--text); display: flex; align-items: center; gap: 12px; padding: 0 8px; text-align: left; overflow: hidden;
}
.mini-bar .cover { width: 46px; height: 46px; }
.mini-bar .body { flex: 1; min-width: 0; }
.mini-bar .t { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar .circle { width: 44px; height: 44px; }
.mini-bar .circle svg { width: 20px; height: 20px; }
.mini-bar .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--wg-ink); }
.mini-bar .bar i { display: block; height: 100%; background: var(--wg-orange); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; z-index: 16; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, var(--app-w)); height: var(--tab-h); background: var(--bg); border-top: 2px solid var(--chip-border);
  display: flex; padding: 0 12px max(env(safe-area-inset-bottom), 12px);
}
.tab {
  position: relative; flex: 1; border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.tab::before { content: ""; position: absolute; top: -2px; width: 32px; height: 4px; border-radius: 0 0 4px 4px; background: transparent; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::before { background: var(--accent); }
.tab svg { width: 24px; height: 24px; }

/* ---------- Toast y confirmación ---------- */
.toast {
  position: fixed; z-index: 40; top: calc(max(env(safe-area-inset-top), 0px) + 60px); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 40px), calc(var(--app-w) - 40px)); background: var(--wg-yellow); color: var(--wg-ink);
  border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 14px; animation: wg-in 180ms ease-out;
}
.toast.error { background: var(--wg-red); }
.confirm {
  border: 0; border-radius: 12px; background: var(--surface); color: var(--text); padding: 22px;
  width: min(360px, calc(100vw - 40px));
}
.confirm::backdrop { background: rgba(11, 7, 6, .82); }
.confirm h2 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 8px; color: var(--accent); }
.confirm p { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.confirm label { display: block; font-size: 13px; margin-bottom: 8px; }
.confirm input { width: 100%; height: 44px; border-radius: 999px; border: 0; padding: 0 16px; background: var(--field); color: var(--wg-ink); font-weight: 700; }
.confirm input:focus { outline: 3px solid var(--accent); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------- Motion ---------- */
@keyframes wg-spin { to { transform: rotate(360deg); } }
@keyframes wg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes wg-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes wg-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Bordes ink en modo claro (en oscuro --edge es transparente) ---------- */
.surface-card, .veto-item, .stat, .privacy, .mini-bar, .confirm, .pill-surface:not(.on), .field { box-shadow: inset 0 0 0 2px var(--edge); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--edge), 0 0 0 3px var(--accent); }
.side-brand { display: none; }
.theme-note { padding: 8px 20px 0; font-size: 12px; color: var(--muted); }

/* ---------- Estructura de Inicio: una columna en móvil, dos en escritorio ---------- */
.home-grid { display: flex; flex-direction: column; }
.home-main, .home-side { display: contents; }
.home-main > .greet { order: 1; }
.home-main > .featured { order: 2; }
.home-main > .below-featured { order: 3; }
.home-side > * { order: 4; }
.home-main > .alt-block { order: 5; }
.home-main > .recent-block { order: 6; }

/* ---------- Escritorio / ventana de PC: ocupa toda la pantalla ---------- */
@media (min-width: 900px) {
  :root { --side-w: 248px; }
  .app { max-width: none; border: 0 !important; padding-left: var(--side-w); }
  .scroll { max-width: 1280px; margin: 0 auto; padding: 28px 20px 120px; }

  .tabbar {
    left: 0; top: 0; bottom: 0; transform: none; width: var(--side-w); height: auto;
    flex-direction: column; justify-content: flex-start; gap: 4px; padding: 26px 14px;
    border-top: 0; border-right: 2px solid var(--chip-border);
  }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; }
  .side-brand img { width: 40px; height: 40px; }
  .side-brand .d { font-size: 16px; line-height: 1.05; }
  .side-brand .d span { color: var(--accent); display: block; }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; height: 50px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
  .tab:hover { background: var(--hover); }
  .tab::before { top: 13px; left: -14px; width: 4px; height: 24px; border-radius: 0 4px 4px 0; }

  .topbar { display: none; }
  .greet { padding: 4px 20px 22px; }
  .h-screen { font-size: 44px; }

  .home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); gap: 0 12px; align-items: start; }
  .home-main, .home-side { display: block; }
  .home-side { position: sticky; top: 20px; padding-top: 70px; }
  .home-side > .section-head:first-child { padding-top: 12px; }
  .home-side .chip-row { flex-wrap: wrap; overflow: visible; }
  .featured { height: 380px; }
  .featured .rings { width: 520px; height: 520px; right: -200px; top: -260px; }
  .featured .rec { width: 124px; height: 124px; right: 26px; top: 26px; }
  .featured .rec::after { width: 44px; height: 44px; border-width: 13px; }
  .featured .info { left: 26px; right: 120px; bottom: 54px; }
  .featured .meta { font-size: 16px; }
  .featured .go { width: 72px; height: 72px; right: 24px; bottom: 44px; }
  .grid2 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .album-head { align-items: flex-end; gap: 26px; }
  .album-head .cover { width: 230px; height: 230px; }
  .album-head .cover .lbl { font-size: 18px; left: 14px; top: 14px; }
  .album-head .s { font-size: 15px; }
  .album-motivo { font-size: 15px; }
  .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .pillar p { font-size: 15px; }
  .album-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }

  .search-screen .h-screen { font-size: 44px; }
  .search-screen .field { max-width: 640px; }
  .search-screen .chip-row { flex-wrap: wrap; overflow: visible; }
  .genre-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .tile { height: 120px; }
  .tile .gn { font-size: 20px; }
  .search-screen .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .profile-hero { padding-top: 10px; }
  .profile-hero .name { font-size: 40px; }
  .stats { max-width: 620px; }
  .profile-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 0 24px; align-items: start; }

  .sheet { max-width: none; left: var(--side-w); flex-direction: row; overflow: hidden; }
  .sheet-top { height: auto !important; width: 50%; min-height: 100%; }
  .sheet-top .rings-big, .sheet-top .disc-wrap { top: 50% !important; }
  .sheet-top .disc-wrap { transform: scale(1.3) !important; }
  .sheet-body { overflow-y: auto; padding: 56px 48px 48px; }
  .song-sec p { font-size: 16px; max-width: 62ch; }

  .mini-bar { left: auto; right: 24px; bottom: 24px; transform: none; width: 420px; }
  .toast { left: calc(50% + var(--side-w) / 2); width: min(460px, calc(100% - var(--side-w) - 40px)); }
}

/* ---------- Temas del disco: estrellas por canción + botón ⓘ ---------- */
.row.track { padding: 8px 6px 8px 10px; gap: 8px; cursor: default; }
.row.track:hover { background: var(--hover); }
.tstars { display: flex; flex: none; }
.tstar {
  width: 25px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--star-off);
  display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; transition: transform 120ms ease-out, color 120ms;
}
.tstar.on { color: var(--accent); }
.tstar:hover { transform: scale(1.15); color: var(--accent); }
.tstars.big { gap: 4px; }
.tstars.big .tstar { width: 40px; height: 40px; }
.row.track .body.playable { cursor: pointer; border-radius: 8px; }
.row.track .body.playable:hover .rt { color: var(--accent); }
.row.track .body.playable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-like {
  flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--star-off);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 120ms ease-out, color 120ms;
}
.row-like:hover { color: var(--text); transform: scale(1.12); }
.row-like:active { transform: scale(.9); }
.row-like:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.info-btn { width: 36px; height: 36px; color: var(--text); }
.info-btn:hover { color: var(--accent); }
.track-note { padding: 6px 20px 0; margin: 0; font-size: 12px; color: var(--muted); }
.song-note a { color: var(--accent); }
@media (max-width: 370px) { .row.track .idx { display: none; } .tstar { width: 22px; } }

/* ---------- Escuchar / análisis con IA ---------- */
.album-actions { padding: 16px 20px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.song-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.pill.listen { height: 44px; padding: 0 18px; }
.pill.listen svg { width: 16px; height: 16px; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; padding: 5px 10px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--edge); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.credits { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.credits dt { color: var(--muted); font-weight: 700; }
.credits dd { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Animaciones (capa visual, solo CSS) ---------- */
@keyframes wg-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wg-stripe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wg-drop { 0% { opacity: 0; scale: .55; rotate: -120deg; } 70% { opacity: 1; scale: 1.04; } 100% { scale: 1; rotate: 0deg; } }
@keyframes wg-ripple-in { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes wg-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
@keyframes wg-pop { 0% { scale: 1; } 40% { scale: 1.28; } 100% { scale: 1; } }
@keyframes wg-toast { 0% { opacity: 0; translate: 0 -16px; scale: .96; } 60% { opacity: 1; translate: 0 3px; scale: 1.01; } 100% { translate: 0 0; scale: 1; } }
@keyframes wg-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes wg-eq {
  0%   { background-size: 4px 40%, 4px 90%, 4px 60%; }
  25%  { background-size: 4px 85%, 4px 45%, 4px 100%; }
  50%  { background-size: 4px 55%, 4px 100%, 4px 35%; }
  75%  { background-size: 4px 100%, 4px 60%, 4px 75%; }
  100% { background-size: 4px 40%, 4px 90%, 4px 60%; }
}
@keyframes wg-halo { 0% { box-shadow: 0 0 0 0 rgba(20,12,10,.55); } 100% { box-shadow: 0 0 0 14px rgba(20,12,10,0); } }
@keyframes wg-tab { 0% { translate: 0 0; } 40% { translate: 0 -4px; } 100% { translate: 0 0; } }
@keyframes wg-bar { from { width: 0; } to { width: 32px; } }

/* Entradas escalonadas de listas y grillas */
.grid2 > *, .rows > *, .genre-grid > *, .stats > *, .chip-row > *, .chip-wrap > *, .veto-list > *, .pillars > * {
  animation: wg-rise 360ms cubic-bezier(.2,.8,.2,1) both;
}
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(2) { animation-delay: 40ms; }
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(3) { animation-delay: 80ms; }
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(4) { animation-delay: 120ms; }
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(5) { animation-delay: 160ms; }
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(6) { animation-delay: 200ms; }
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(7) { animation-delay: 240ms; }
:is(.grid2, .rows, .genre-grid, .stats, .chip-row, .chip-wrap, .veto-list, .pillars) > :nth-child(n+8) { animation-delay: 280ms; }

/* Franjas del logo: se "pintan" de izquierda a derecha */
.stripes i { transform-origin: left center; animation: wg-stripe 520ms cubic-bezier(.6,0,.2,1) both; }
.stripes i:nth-child(2) { animation-delay: 70ms; }
.stripes i:nth-child(3) { animation-delay: 140ms; }

/* Tarjeta destacada: anillos que respiran, disco que gira, contenido que sube */
.featured { animation: wg-rise 420ms cubic-bezier(.2,.8,.2,1) both; }
.featured .rings { animation: wg-ripple-in 700ms cubic-bezier(.2,.8,.2,1) both, wg-breathe 5s ease-in-out 700ms infinite; }
.featured .rec { background: repeating-radial-gradient(circle, #140C0A 0 2px, #241915 2px 4px); animation: wg-spin 7s linear infinite; }
.featured .rec::before { content: ""; position: absolute; left: 50%; top: 8px; width: 6px; height: 14px; margin-left: -3px; border-radius: 3px; background: rgba(245,233,207,.18); }
.featured .info { animation: wg-rise 460ms 120ms cubic-bezier(.2,.8,.2,1) both; }
.featured .go { transition: background 150ms ease-out, scale 200ms cubic-bezier(.3,1.6,.5,1); }
.featured:hover .go { scale: 1.08; animation: wg-halo 1.2s ease-out infinite; }

/* Punto en vivo con onda */
.live-dot { position: relative; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wg-pink); animation: wg-ping 1.6s ease-out infinite; }

/* Portadas: leve levante al pasar */
.card .cover, .album-head .cover { transition: transform 220ms cubic-bezier(.2,.8,.2,1), outline-color 150ms; }
.card:hover .cover { transform: translateY(-4px) rotate(-1deg); }
.album-head .cover { animation: wg-rise 420ms cubic-bezier(.2,.8,.2,1) both; }
.album-head > :last-child { animation: wg-rise 420ms 80ms cubic-bezier(.2,.8,.2,1) both; }
.tile { transition: transform 200ms cubic-bezier(.2,.8,.2,1), filter 150ms; }
.tile:hover { transform: translateY(-3px); }

/* Feedback al tocar */
.pill, .circle, .chip, .tile, .card, .icon-btn, .star, .tstar, .avatar, .tab, .mini-bar .circle {
  transition-property: background, color, border-color, transform, scale; transition-duration: 150ms; transition-timing-function: ease-out;
}
.pill:active:not(:disabled), .circle:active, .chip:active, .icon-btn:active, .avatar:active, .mini-bar .circle:active { scale: .92; }
.card:active, .tile:active, .featured:active, .surface-card:active { scale: .98; }
.row:active { scale: .99; }
.chip[aria-checked="true"], .chip[aria-pressed="true"] { animation: wg-pop 260ms ease-out; }

/* Estrellas: rebote al encenderse */
.star.on svg, .tstar.on svg { animation: wg-pop 280ms cubic-bezier(.3,1.6,.5,1); }

/* Tema sonando (según los controles multimedia de Windows): ecualizador en lugar del número */
.row.playing .idx {
  color: transparent; position: relative; height: 16px;
  background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-position: 6px 100%, 11px 100%, 16px 100%;
  background-size: 4px 40%, 4px 90%, 4px 60%; animation: wg-eq 900ms ease-in-out infinite;
}

/* Tab bar: ícono que salta e indicador que crece */
.tab[aria-current="page"] svg { animation: wg-tab 320ms cubic-bezier(.3,1.6,.5,1); }
.tab[aria-current="page"]::before { animation: wg-bar 260ms cubic-bezier(.2,.8,.2,1) both; }
@media (min-width: 900px) { .tab[aria-current="page"]::before { animation: none; } }

/* Reproductor: anillos que se expanden y disco que cae girando */
.rings-big { animation: wg-ripple-in 700ms cubic-bezier(.2,.8,.2,1) both, wg-breathe 6s ease-in-out 700ms infinite; }
.disc-wrap { animation: wg-drop 620ms 80ms cubic-bezier(.2,.8,.2,1) both; }
.from-pill { animation: wg-rise 360ms 160ms cubic-bezier(.2,.8,.2,1) both; }
.sheet-body > * { animation: wg-rise 380ms cubic-bezier(.2,.8,.2,1) both; }
.sheet-body > :nth-child(1) { animation-delay: 180ms; }
.sheet-body > :nth-child(2) { animation-delay: 230ms; }
.sheet-body > :nth-child(3) { animation-delay: 280ms; }
.sheet-body > :nth-child(n+4) { animation-delay: 330ms; }
.like:active svg { animation: wg-pop 300ms cubic-bezier(.3,1.6,.5,1); }

/* Toast con resorte */
.toast { animation: wg-toast 360ms cubic-bezier(.2,.8,.2,1); }

/* Stats: el número sube */
.stat .v { animation: wg-rise 420ms 120ms cubic-bezier(.2,.8,.2,1) both; }
.profile-hero .rings { animation: wg-ripple-in 700ms cubic-bezier(.2,.8,.2,1) both, wg-breathe 6s ease-in-out 700ms infinite; }
.profile-hero .avatar.lg { animation: wg-drop 560ms cubic-bezier(.2,.8,.2,1) both; }

/* ---------- Tapas reales ---------- */
.cover .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms ease-out; }
.cover.has-img .cover-img { opacity: 1; }
.cover.has-img .lbl { display: none; }
.cover.has-img::before { display: none; }

/* ---------- Discos descubiertos ---------- */
.disc-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--wg-pink); color: var(--wg-ink); font-size: 11px; font-weight: 700; letter-spacing: .3px; vertical-align: 1px; }

/* ---------- Fuera del catálogo / Tus artistas ---------- */
.online-search .row { cursor: default; }
.online-search .pill { flex: none; }
.artist-chips .chip { white-space: nowrap; }

/* ---------- Lo aprendido de tus reseñas ---------- */
.chip.learned { cursor: default; display: inline-flex; align-items: center; }
.chip.learned.like { border-color: var(--wg-pink); }
.chip.learned.dislike { border-style: dashed; color: var(--muted); }

/* ---------- Spotify ---------- */
.pill.spotify { background: #1DB954; color: var(--wg-ink); }
.pill.spotify:hover:not(:disabled) { background: var(--wg-yellow); }
.pill.listen .brand-icon { width: 20px; height: 20px; flex: none; }
.pill.listen { gap: 8px; padding-left: 12px; }

/* ---------- Clima ---------- */
.weather-line { margin: 4px 0 0; font-size: 14px; color: var(--accent); font-weight: 700; }

/* ---------- Placa para historias ---------- */
.story-dialog {
  border: 0; border-radius: 12px; background: var(--surface); color: var(--text); padding: 18px;
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: inset 0 0 0 2px var(--edge);
}
.story-dialog::backdrop { background: rgba(11, 7, 6, .82); }
.story-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.story-head .d { font-size: 20px; color: var(--accent); }
.story-preview { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--wg-ink); }
.story-dialog .theme-note { padding: 10px 0 0; }

/* ---------- Búsqueda con estrellas rápidas ---------- */
.row.search-row { padding: 6px 8px 6px 4px; gap: 8px; }
.row-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; text-align: left; padding: 4px 6px; border-radius: 10px; }
.row-open .body { min-width: 0; }
.row-open:hover .rt { color: var(--accent); }
.tstars.quick.busy { opacity: .5; pointer-events: none; }
.online-search .row .pill { height: 34px; padding: 0 12px; }
@media (max-width: 420px) { .tstars.quick .tstar { width: 21px; } }

/* ---------- Primeros pasos ---------- */
.onboarding { order: 1; margin: 0 20px 18px; padding: 16px 0 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--edge); }
.onboarding .badge { margin-left: 18px; background: var(--wg-yellow); color: var(--wg-ink); }
.onboarding .onb-title { font-family: var(--display); font-size: 20px; margin: 10px 18px 0; text-transform: uppercase; }
.onboarding .theme-note { padding: 6px 18px 10px; }
.onboarding .onb-chips { padding: 0 18px 10px; }
.onboarding .field { margin: 0 14px; }

/* ---------- Historial por género ---------- */
.genre-group { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.genre-group .gg-name { font-family: var(--display); font-size: 14px; color: var(--accent); }
.genre-group .gg-count { font-size: 12px; font-weight: 700; color: var(--wg-ink); background: var(--wg-yellow); border-radius: 999px; padding: 1px 8px; }
.genre-group::after { content: ""; flex: 1; height: 2px; background: var(--chip-border); opacity: .6; }

/* Invitar personas (solo administración) */
.invite-link { margin: 12px 20px 0; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.invite-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.invite-link code { display: block; font-size: 12px; word-break: break-all; user-select: all; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.invite-link .data-actions { padding: 10px 0 0; }
.invite-list { margin: 12px 20px 0; display: grid; gap: 6px; }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); font-size: 14px; }
.invite-row span { color: var(--muted); }
.invite-row.muted { opacity: .7; }
.invite-row .pill { height: 34px; }
