/* MyPrompTribe · diseño 2026 («tribe»). Capa visual sobre los estilos de siempre: no cambia ninguna función.
   La web usa solo la gama del logo (violetas e índigo). El degradado cálido (naranja → rosa → violeta) queda para
   Coqueta Studio y sus herramientas (.studio-page y las páginas de herramienta). */
html:root {
  --bg: #0a0b10;
  --bg-raised: #0f1117;
  --surface: #14161e;
  --surface-2: #1a1d27;
  --surface-3: #232736;
  --text: #f1f2f8;
  --text-soft: #bcc1d2;
  --muted: #8c93a8;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.15);
  --brand: #7c5cff;
  --brand-strong: #6a48ff;
  --brand-ink: #c3b4ff;
  --brand-soft: rgba(124, 92, 255, 0.16);
  --action: #7c5cff;
  --hot: #a48bff;
  --grad: linear-gradient(120deg, #c4b5ff 0%, #8f73ff 45%, #5b3ff0 100%);
  --grad-btn: linear-gradient(120deg, #8a6dff 0%, #6243f5 100%);
  --grad-btn-hover: linear-gradient(120deg, #9a80ff 0%, #6f52ff 100%);
  --glass: rgba(20, 22, 30, 0.72);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 22px 60px rgba(0, 0, 0, 0.4);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --sidebar-width: 248px;
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
html[data-theme="light"] {
  --bg: #f6f5fb;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f1fa;
  --surface-3: #e9e5f5;
  --text: #17141f;
  --text-soft: #4f4a5c;
  --muted: #736d80;
  --border: rgba(23, 20, 31, 0.08);
  --border-strong: rgba(23, 20, 31, 0.16);
  --brand: #6a48ff;
  --brand-strong: #5636ea;
  --brand-ink: #5233d6;
  --brand-soft: rgba(106, 72, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 6px 20px rgba(40, 28, 90, 0.07);
  --shadow-md: 0 22px 60px rgba(40, 28, 90, 0.12);
}

/* fondo con dos luces suaves de la gama del logo, fijas detrás de todo */
body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 92, 255, 0.16), transparent 62%),
    radial-gradient(760px 480px at 96% 4%, rgba(91, 63, 240, 0.12), transparent 60%),
    var(--bg) fixed;
  letter-spacing: -0.005em;
}
html[data-theme="light"] body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 92, 255, 0.1), transparent 62%),
    radial-gradient(760px 480px at 96% 4%, rgba(91, 63, 240, 0.07), transparent 60%),
    var(--bg) fixed;
}
/* Coqueta Studio y las herramientas: su degradado cálido propio */
body.studio-page, body.tool-page {
  --hot: #ff5f8f;
  --grad: linear-gradient(120deg, #ffb36b 0%, #ff5f8f 48%, #7c5cff 100%);
  --grad-btn: linear-gradient(120deg, #ff5f8f 0%, #7c5cff 100%);
  --grad-btn-hover: linear-gradient(120deg, #ff6f9a 0%, #8a6cff 100%);
}
h1, h2, h3 { letter-spacing: -0.025em; }

/* ---------------------------------------------------------------- barra lateral */
.sidebar {
  background: color-mix(in srgb, var(--bg-raised) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-right-color: var(--border);
}
.nav-item {
  border-radius: 14px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.is-active {
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.24), rgba(91, 63, 240, 0.1));
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.35);
  color: var(--text);
}
.sidebar .eyebrow { letter-spacing: 0.12em; }
.sidebar-profile {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ---------------------------------------------------------------- botones */
.button { border-radius: 14px; font-weight: 700; letter-spacing: -0.01em; }
.button--primary,
.social-create-button {
  background: var(--grad-btn);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.button--primary:hover,
.social-create-button:hover {
  background: var(--grad-btn-hover);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.button--ghost, .button--secondary {
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  border: 1px solid var(--border-strong);
}

/* ---------------------------------------------------------------- carrusel de novedades */
.tribe-hero {
  position: relative;
  margin: 6px 0 22px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  isolation: isolate;
}
.tribe-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 18px;
  min-height: 330px;
  padding: 34px 36px 64px;
  position: relative;
  animation: tribe-in 520ms cubic-bezier(.2, .8, .2, 1);
}
.tribe-slide[hidden] { display: none; }
.tribe-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 320px at 85% 40%, rgba(124, 92, 255, 0.38), transparent 70%),
    radial-gradient(420px 260px at 10% 110%, rgba(91, 63, 240, 0.22), transparent 70%),
    linear-gradient(135deg, #171427, #0f1018);
}
.tribe-slide--relight::before {
  background:
    radial-gradient(520px 340px at 80% 30%, rgba(164, 139, 255, 0.3), transparent 70%),
    radial-gradient(420px 260px at 0% 100%, rgba(98, 67, 245, 0.25), transparent 70%),
    linear-gradient(135deg, #18142a, #0f1018);
}
.tribe-slide--tools::before {
  background:
    radial-gradient(520px 340px at 85% 50%, rgba(110, 120, 255, 0.26), transparent 70%),
    radial-gradient(420px 260px at 0% 100%, rgba(124, 92, 255, 0.25), transparent 70%),
    linear-gradient(135deg, #131529, #0f1018);
}
html[data-theme="light"] .tribe-slide::before { filter: none; }
.tribe-slide__copy { color: #f6f5fb; min-width: 0; }
.tribe-slide__copy h1, .tribe-slide__copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #fff;
}
.tribe-slide__copy h2 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tribe-slide__copy p { margin: 0 0 22px; max-width: 46ch; color: rgba(246, 245, 251, 0.82); font-size: 16px; line-height: 1.55; }
.tribe-slide .button--ghost { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); }
.tribe-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.tribe-badge--new { background: var(--grad-btn); border: 0; color: #fff; }
.tribe-slide__art img { width: 100%; max-height: 270px; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45)); }
.tribe-slide__photo {
  justify-self: end;
  width: min(100%, 290px);
  aspect-ratio: 4 / 4.4;
  border-radius: 24px;
  overflow: hidden;
  transform: rotate(2.5deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.tribe-slide__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tribe-slide__icons { display: grid; grid-template-columns: repeat(2, 96px); gap: 16px; justify-content: center; }
.tribe-slide__icons img { width: 96px; height: 96px; padding: 14px; border-radius: 26px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); }
.tribe-slide__icons img:nth-child(2) { transform: translateY(18px); }
.tribe-slide__icons img:nth-child(3) { transform: translateY(-10px); }
.tribe-hero__nav {
  position: absolute;
  left: 36px;
  right: 22px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tribe-hero__dots { display: flex; gap: 7px; margin-right: auto; order: -1; }
.tribe-hero__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease;
}
.tribe-hero__dots button[aria-current="true"] { width: 28px; background: var(--grad); }
.tribe-hero__arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 11, 16, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.tribe-hero__arrow:hover { background: rgba(255, 255, 255, 0.14); }
@keyframes tribe-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- herramientas como «historias» */
.tribe-stories { margin: 0 0 18px; }
.tribe-stories .home-section-heading { margin-bottom: 12px; }
.tribe-stories__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.tribe-story {
  flex: 0 0 auto;
  width: 86px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-soft);
  scroll-snap-align: start;
}
.tribe-story__ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(var(--surface-3), var(--surface-3));
  display: grid;
  place-items: center;
  transition: transform 160ms ease;
}
.tribe-story--new .tribe-story__ring { background: var(--grad); }
.tribe-story__ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 11px;
  background: var(--surface);
  border: 2px solid var(--bg);
  object-fit: contain;
}
.tribe-story:hover .tribe-story__ring { transform: translateY(-2px) scale(1.04); }
.tribe-story__name { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.25; }
.tribe-story--new .tribe-story__name::after { content: " •"; color: var(--hot); }

/* ---------------------------------------------------------------- caja para publicar (abre el editor de siempre) */
.social-compose-launcher {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
}
.social-compose-launcher:hover { border-color: rgba(124, 92, 255, 0.55); background: var(--surface-2); }
.social-compose-launcher__icon { background: var(--grad-btn); border: 0; color: #fff; border-radius: 50%; }
.social-compose-launcher .tribe-compose-chips { margin-left: auto; display: flex; gap: 6px; }
.tribe-compose-chips span {
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- tarjetas del inicio y del muro */
.mission-card, .quest-board, .rail-card, .about-card, .post-card, .home-challenge-teaser, .daily-challenge, .language-strip {
  border-radius: var(--radius-lg);
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.post-card { transition: border-color 160ms ease, transform 160ms ease; }
.post-card:hover { border-color: var(--border-strong); }
.feed-tabs {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 5px;
}
.feed-tab { border-radius: 13px; font-weight: 650; }
.feed-tab.is-active { background: var(--grad-btn); color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.3); }
.feed-tab.is-active .pt-icon { filter: brightness(0) invert(1); }
.home-section-heading h2, .feed-heading h2 { font-size: 20px; }
.rail-card h2 { font-size: 18px; }
.trend-list a span { font-weight: 700; color: var(--brand-ink); }

/* ---------------------------------------------------------------- perfil */
.social-profile-card { border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-md); }
.social-profile-cover {
  height: 170px;
  background:
    radial-gradient(420px 220px at 80% 20%, rgba(196, 181, 255, 0.35), transparent 70%),
    radial-gradient(520px 260px at 20% 100%, rgba(124, 92, 255, 0.55), transparent 70%),
    linear-gradient(120deg, #2a1f4a, #1a1530);
}
.social-profile-cover::after { border-color: rgba(255, 255, 255, 0.18); }
.social-profile-avatar {
  width: 112px;
  height: 112px;
  border: 0;
  padding: 4px;
  background: var(--grad);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.social-profile-avatar img { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; }
.social-profile-identity { margin-top: -50px; }
.social-profile-stats { gap: 10px; }
.social-profile-stats > span, .social-stat-button {
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--surface-2);
  min-width: 108px;
}
.social-section-title { font-size: 21px; }

/* ---------------------------------------------------------------- ventanas (acceso, publicar, comentarios) */
.modal { border-radius: var(--radius-xl); }
.modal::backdrop { background: rgba(5, 6, 10, 0.62); backdrop-filter: blur(6px); }
.modal__surface { border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); }
#auth-modal .modal__surface { position: relative; overflow: hidden; }
#auth-modal .modal__surface::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad);
}
#auth-signed-out .button--primary { min-height: 52px; font-size: 15px; }
.social-composer .modal__surface { padding: 22px 24px; }
.social-composer-content { border-radius: 16px; font-size: 17px; }
.tribe-media-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tribe-media-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.tribe-media-button:disabled { cursor: not-allowed; opacity: 0.7; }
.tribe-media-button:not(:disabled):hover { border-color: var(--brand); color: var(--text); }
.tribe-media-note { flex-basis: 100%; font-size: 12px; color: var(--muted); }
/* Vista previa de la imagen o vídeo elegido en «Crear publicación» */
.tribe-media-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface-2);
}
.tribe-media-preview[hidden] { display: none; }
.tribe-media-preview img,
.tribe-media-preview video {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-raised);
}
.tribe-media-meta { display: grid; gap: 6px; min-width: 0; }
.tribe-media-state { font-size: 12px; color: var(--text-soft); overflow-wrap: anywhere; }
.tribe-media-progress { width: 100%; height: 6px; accent-color: var(--brand); }
.tribe-media-progress[hidden] { display: none; }
.result-media--video video {
  display: block;
  width: 100%;
  max-height: min(72vh, 760px);
  border-radius: calc(var(--radius-md) - 5px);
  background: #000;
}

/* ---------------------------------------------------------------- móvil */
.mobile-header { background: var(--glass); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.mobile-nav { background: var(--glass); backdrop-filter: blur(18px) saturate(1.2); border-top: 1px solid var(--border); }
.mobile-nav__create { background: var(--grad-btn) !important; color: #fff !important; }
@media (max-width: 760px) {
  .tribe-hero { border-radius: 24px; margin-top: 4px; }
  .tribe-slide { grid-template-columns: 1fr; padding: 24px 20px 62px; min-height: 0; gap: 6px; }
  .tribe-slide__art, .tribe-slide__icons { display: none; }
  .tribe-slide__photo { position: absolute; right: -24px; top: 18px; width: 120px; opacity: 0.55; z-index: -1; }
  .tribe-slide__copy p { font-size: 14.5px; }
  .tribe-hero__nav { left: 20px; right: 14px; bottom: 14px; }
  .social-compose-launcher .tribe-compose-chips { display: none; }
  .social-profile-avatar { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .tribe-slide { animation: none; }
  .button--primary:hover, .social-create-button:hover { transform: none; }
}

/* ---------------------------------------------------------------- columna derecha en el inicio (pantallas grandes) */
@media (min-width: 1280px) {
  .app-shell:has([data-active-view="home"]) { grid-template-columns: var(--sidebar-width) minmax(0, 820px) 320px; max-width: 1440px; }
  .app-shell:has([data-active-view="home"]) .right-rail { display: grid; }
  [data-active-view="home"] { max-width: 820px; padding: 22px 26px 48px; }
}
.right-rail { padding-top: 22px; }
.tribe-news { display: grid; gap: 6px; }
.tribe-news h2 { margin: 0 0 6px; }
.tribe-news__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}
.tribe-news__item:hover { background: var(--surface-2); }
.tribe-news__item img { width: 40px; height: 40px; padding: 6px; border-radius: 12px; background: var(--surface-2); flex: none; }
.tribe-news__item strong { display: block; font-size: 14px; }
.tribe-news__item small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }

/* ---------------------------------------------------------------- Coqueta Studio: el lugar de las herramientas */
.studio-page .studio-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  background:
    radial-gradient(520px 300px at 88% 20%, rgba(255, 179, 107, 0.28), transparent 70%),
    radial-gradient(520px 300px at 10% 110%, rgba(255, 95, 143, 0.22), transparent 70%),
    radial-gradient(640px 360px at 60% 120%, rgba(124, 92, 255, 0.3), transparent 70%),
    linear-gradient(135deg, #1b1424, #0f1018);
  box-shadow: var(--shadow-md);
}
.studio-page .studio-hero h1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.studio-page .studio-hero__lead { color: rgba(246, 245, 251, 0.85); }
.studio-page .studio-badge { background: var(--grad); border: 0; color: #1a0f1c; }
.studio-page .catalog-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.studio-page .catalog-subtitle::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.studio-page .tool-visual-card { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.studio-page .tool-visual-card:hover { transform: translateY(-3px); border-color: rgba(255, 95, 143, 0.45); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.studio-learn-link { margin: 22px 0 0; color: var(--text-soft); }
.studio-learn-link a { color: var(--brand-ink); font-weight: 700; }
.studio-app-heading {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin: 40px 0 16px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 179, 107, 0.45);
  background: linear-gradient(120deg, rgba(255, 179, 107, 0.08), rgba(124, 92, 255, 0.08));
}
.studio-app-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.studio-app-heading p:not(.eyebrow) { margin: 0 0 6px; max-width: 60ch; color: var(--text-soft); }
.studio-app-heading .button:disabled { opacity: 0.75; cursor: not-allowed; }

/* Enlaces de ayuda de las herramientas con el acento cálido */
body.tool-page .growth-help-links{color:var(--hot)}
