/* ==========================================================================
   features.css — mensajes estilo WhatsApp, emojis, grupos y pulido general
   Se carga después de ios.css.
   ========================================================================== */

/* ------------------------- margen seguro en móvil ------------------------ */
@media (max-width: 767px) {
  .main,
  .main.no-left,
  .main.no-right,
  .main.only-feed {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }
  .card {
    border-radius: 18px;
    box-shadow: var(--shadow-xs);
  }
  .page-card { border-radius: 18px; }
  .topbar { padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .mobile-nav { padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  .feed-toolbar { border-radius: 16px; }
  .stories-wrap { padding-left: 2px; padding-right: 2px; }
  .page-head { padding-left: 2px; padding-right: 2px; }
  .composer { border-radius: 18px; }
}

/* --------------------------- emojis -------------------------------------- */
.emoji-pop {
  position: fixed;
  z-index: 1600;
  width: 330px;
  height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: .5px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: 0 24px 70px -24px rgba(0, 0, 0, .45);
}
.emoji-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 6px; flex: none;
}
.emoji-title { font-size: 14px; font-weight: 800; }
.emoji-close { width: 30px; height: 30px; }
.emoji-tabs {
  display: flex; gap: 2px; padding: 0 8px 6px; overflow-x: auto;
  flex: none; scrollbar-width: none;
}
.emoji-tabs::-webkit-scrollbar { display: none; }
.emoji-tab {
  flex: none; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; opacity: .62;
}
.emoji-tab:hover { background: var(--hover); opacity: 1; }
.emoji-tab.active { background: var(--brand-soft); opacity: 1; }
.emoji-grid {
  flex: 1; overflow-y: auto; padding: 4px 8px 10px;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  align-content: start; gap: 1px;
}
.emoji-cell {
  height: 38px; border-radius: 9px; font-size: 25px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--fast), transform var(--fast);
}
.emoji-cell:hover { background: var(--hover); transform: scale(1.08); }
.emoji-empty { grid-column: 1 / -1; padding: 24px 8px; text-align: center; color: var(--text-2); font-size: 13px; }
.emoji-backdrop { display: none; }

.chat-emoji {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #54656f; flex: none;
}
html[data-theme="dark"] .chat-emoji { color: #aebac1; }
.chat-emoji:hover { background: var(--hover); }
.comment-emoji { width: 34px; height: 34px; flex: none; color: var(--text-2); }

@media (max-width: 620px) {
  .emoji-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1590;
    background: rgba(0, 0, 0, .25); backdrop-filter: blur(2px);
  }
  .emoji-pop {
    left: 0 !important; right: 0; top: auto !important; bottom: 0;
    width: 100%; height: 48dvh; min-height: 320px;
    border-radius: 20px 20px 0 0;
  }
  .emoji-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* ------------------------- mensajes estilo WhatsApp ---------------------- */
.messenger {
  --wa-header: #075e54;
  --wa-header-2: #128c7e;
  --wa-green: #25d366;
  --wa-accent: #00a884;
  --wa-bg: #efeae2;
  --wa-bubble-in: #ffffff;
  --wa-bubble-out: #d9fdd3;
  --wa-text: #111b21;
  --wa-muted: #667781;
  height: calc(100vh - var(--topbar-h) - 34px);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 50px -32px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .messenger {
  --wa-bg: #0b141a;
  --wa-bubble-in: #202c33;
  --wa-bubble-out: #005c4b;
  --wa-text: #e9edef;
  --wa-muted: #8696a0;
}

/* lista */
.msgr-list { background: var(--card); border-right: .5px solid var(--line-soft); }
.msgr-list-head {
  background: linear-gradient(135deg, var(--wa-header), var(--wa-header-2));
  color: #fff; padding: 14px 14px 12px;
}
.msgr-list-head h1 { color: #fff; font-size: 23px; letter-spacing: -.4px; }
.msgr-list-head .btn-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.msgr-list-head .btn-icon:hover { background: rgba(255, 255, 255, .26); }
.msgr-list-head .search-inline {
  background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8);
  border-radius: 10px; padding: 8px 11px;
}
.msgr-list-head .search-inline input { color: #fff; }
.msgr-list-head .search-inline input::placeholder { color: rgba(255, 255, 255, .75); }
.msgr-items { padding: 4px 0 8px; }
.conv {
  gap: 11px; padding: 9px 13px; border-radius: 0;
  border-bottom: .5px solid var(--line-soft);
}
.conv:hover { background: var(--hover); }
.conv.active { background: var(--wa-accent-soft, rgba(0, 168, 132, .1)); }
.conv .cv-name { font-size: 15px; font-weight: 650; }
.conv .cv-last { font-size: 13px; color: var(--wa-muted); }
.conv .cv-time { font-size: 11.5px; color: var(--wa-muted); }
.conv.unread .cv-time { color: var(--wa-green); font-weight: 700; }
.conv .cv-dot {
  width: 18px; height: 18px; background: var(--wa-green);
  box-shadow: 0 2px 6px rgba(37, 211, 102, .35);
}
.conv .avatar { width: 48px; height: 48px; }
.conv-empty { color: var(--wa-muted); }

/* chat */
.msgr-chat { background: var(--wa-bg); }
.chat-head {
  background: var(--card); padding: 9px 14px;
  border-bottom: .5px solid var(--line-soft);
}
.chat-head .ch-name { font-size: 15.5px; font-weight: 650; }
.chat-head .ch-sub { font-size: 12px; color: var(--wa-accent); }
.chat-head .btn-icon { color: var(--wa-muted); }
.chat-list-btn { display: none; flex: none; }
@media (max-width: 767px) {
  .chat-list-btn { display: inline-flex; margin-right: -2px; }
}
.chat-body {
  background-color: var(--wa-bg);
  background-image: radial-gradient(rgba(0, 0, 0, .045) 1px, transparent 1px);
  background-size: 18px 18px;
  padding: 14px 16px;
  gap: 2px;
}
html[data-theme="dark"] .chat-body {
  background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px);
}
.chat-day {
  align-self: center; margin: 10px 0 8px;
  padding: 4px 10px; border-radius: 7px;
  background: rgba(255, 255, 255, .86); color: var(--wa-muted);
  font-size: 11.5px; font-weight: 600;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
html[data-theme="dark"] .chat-day { background: #182229; color: #ffd279; }
.msg { max-width: 76%; gap: 6px; margin-top: 3px; }
.msg .bubble {
  position: relative;
  background: var(--wa-bubble-in); color: var(--wa-text);
  padding: 6px 9px 7px; border-radius: 8px;
  font-size: 14.7px; line-height: 1.38;
  box-shadow: 0 1px .5px rgba(0, 0, 0, .13);
}
.msg .bubble .stamp {
  float: right; margin: 6px -2px -3px 8px;
  font-size: 10.5px; color: var(--wa-muted); line-height: 1;
  white-space: nowrap;
}
.msg.me .bubble .stamp { color: rgba(17, 27, 33, .55); }
html[data-theme="dark"] .msg.me .bubble .stamp { color: rgba(233, 237, 239, .55); }
.msg .bubble::after {
  content: ''; position: absolute; left: -6px; bottom: 0;
  border-style: solid; border-width: 0 7px 8px 0;
  border-color: transparent var(--wa-bubble-in) transparent transparent;
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble {
  background: var(--wa-bubble-out); color: var(--wa-text);
  border-radius: 8px;
}
.msg.me .bubble::after {
  left: auto; right: -6px;
  border-width: 8px 7px 0 0;
  border-color: var(--wa-bubble-out) transparent transparent transparent;
}
.msg .stamp {
  font-size: 10.5px; color: var(--wa-muted); padding-bottom: 2px;
  white-space: nowrap;
}
.msg.me .stamp { color: var(--wa-muted); }
.msg.pending .bubble { opacity: .62; }
.msg .bubble img { border-radius: 6px; }
.chat-empty-soft { color: var(--wa-muted); }
.chat-empty-soft .strong { color: var(--wa-text); }

.chat-input {
  background: var(--card); border-top: .5px solid var(--line-soft);
  padding: 8px 12px; align-items: flex-end; gap: 7px;
}
.chat-input .box {
  background: var(--card-2); border-radius: 24px;
  padding: 4px 4px 4px 6px; gap: 2px;
}
.chat-input .box:focus-within { box-shadow: none; }
.chat-input textarea { font-size: 15px; padding: 7px 4px; }
.chat-input .send {
  width: 42px; height: 42px; background: var(--wa-accent); color: #fff;
  border-radius: 50%;
}
.chat-input .send:hover { filter: brightness(1.05); }
.chat-input .send:disabled { background: var(--card-3); color: var(--text-3); }
.chat-empty { color: var(--wa-muted); }
.chat-empty .big-ic { background: rgba(0, 168, 132, .12); color: var(--wa-accent); }

@media (max-width: 767px) {
  .messenger {
    height: calc(100dvh - var(--topbar-h) - var(--nav-h) - 20px);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
  }
  .msgr-list-head { border-radius: 18px 18px 0 0; }
  .chat-body { padding: 12px 10px; }
  .msg { max-width: 87%; }
  .chat-input { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* -------------------------- selector del muro ----------------------------- */
.feed-toolbar {
  justify-content: center;
  padding: 0 0 12px;
}
.feed-toolbar .segmented {
  width: 100%;
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 15px;
  background: var(--card-2);
  border: .5px solid var(--line-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}
.feed-toolbar .segmented-item {
  flex: 1;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 13.8px;
  font-weight: 650;
  color: var(--text-2);
  background: transparent;
  border: 0;
  transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease), transform 120ms var(--ease);
}
.feed-toolbar .segmented-item:active { transform: scale(.98); }
.feed-toolbar .segmented-item.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .06);
}
html[data-theme="dark"] .feed-toolbar .segmented-item.active {
  background: var(--card-3);
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .55);
}

/* --------------------------- historias vistas ---------------------------- */
.story-card.seen img.cover,
.story-tile.seen > img { filter: saturate(.55) brightness(.86); }
.story-card.seen .sc-name { color: rgba(255, 255, 255, .72); }
.story-card.seen .sc-avatar { opacity: .7; }
.story-tile.seen { opacity: .82; }
.story-tile.seen .story-tile-name { color: rgba(255, 255, 255, .72); }

/* --------------------------- cámara de historias ------------------------- */
.story-camera,
.story-publish-preview {
  width: min(100%, calc(min(78vh, 760px) * 9 / 16));
  height: min(78vh, 760px);
  aspect-ratio: 9 / 16;
  border-radius: 26px;
}
.story-camera video,
.story-camera .story-video { width: 100%; height: 100%; object-fit: cover; }
.story-publish-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .story-camera,
  .story-publish-preview {
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 20px;
  }
}

/* --------------------------- galería propia ------------------------------ */
.zuma-gallery { display: flex; flex-direction: column; gap: 12px; }
.zuma-gallery-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.zuma-gallery-head p { max-width: 360px; margin: 0; }
.zuma-gallery-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px; max-height: 56vh; overflow-y: auto; padding: 2px;
}
.zuma-gallery-item {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: var(--card-2); border: 0; padding: 0;
}
.zuma-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zuma-gallery-item:hover img { filter: brightness(.9); }
.zuma-gallery-check {
  position: absolute; right: 6px; top: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .42); color: #fff;
}
.zuma-gallery-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 18px; text-align: center; color: var(--text-2);
}
.zuma-gallery-empty .big-ic {
  width: 64px; height: 64px; border-radius: 50%; background: var(--card-2);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  margin-bottom: 4px;
}
.zuma-gallery-empty p { max-width: 340px; }

/* ------------------------------ grupos ----------------------------------- */
.group-cover-fallback {
  background: var(--group-color, #0a84ff);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(0, 0, 0, .28));
  display: flex; align-items: center; justify-content: center;
}
.group-cover-emoji { font-size: 32px; line-height: 1; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .25)); }
.group-cover-fallback.big .group-cover-emoji { font-size: 54px; }
.group-card { border-radius: 18px; overflow: hidden; }
.group-card .group-cover { height: 112px; }
.group-card .group-cover img { width: 100%; height: 100%; object-fit: cover; }
.group-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.group-card-emoji { font-size: 17px; flex: none; }
.group-card-name { font-size: 15.5px; font-weight: 750; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-category {
  display: inline-flex; width: fit-content; margin-top: 3px;
  padding: 2px 7px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 10.5px; font-weight: 750; letter-spacing: .02em; text-transform: uppercase;
}
.group-desc {
  font-size: 12.5px; color: var(--text-2); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.group-meta { display: flex; gap: 5px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.group-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-title-emoji { font-size: 27px; line-height: 1; }
.group-rules {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px;
  border-left: 3px solid var(--group-color, var(--brand));
}
.group-rules-icon {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.group-rules p { margin-top: 4px; white-space: pre-wrap; }
.group-profile-header { --group-color: var(--brand); }

/* editor */
.group-editor { max-height: 66vh; overflow-y: auto; padding-right: 2px; }
.group-editor-row { display: flex; gap: 10px; align-items: flex-end; }
.group-cover-picker {
  width: 100%; border-radius: 16px; overflow: hidden; display: block;
  background: var(--card-2); border: .5px solid var(--line-soft);
}
.group-cover-preview {
  position: relative; height: 132px; display: flex; align-items: stretch; justify-content: center;
  background: var(--group-color, #0a84ff);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .3));
}
.group-cover-preview > img { width: 100%; height: 100%; object-fit: cover; }
.group-cover-edit {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .48); color: #fff;
  font-size: 12px; font-weight: 650; backdrop-filter: blur(8px);
}
.group-emoji-button {
  width: 100%; height: 44px; border-radius: 12px;
  background: var(--card-2); border: .5px solid var(--line-soft);
  font-size: 24px; display: flex; align-items: center; justify-content: center;
}
.group-colors { display: flex; gap: 9px; flex-wrap: wrap; }
.group-color-dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--dot);
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  transition: transform var(--fast);
}
.group-color-dot:hover { transform: scale(1.1); }
.group-color-dot.active { border-color: var(--text); transform: scale(1.08); }
.group-profile-info .profile-actions-row { flex-wrap: wrap; }

@media (max-width: 767px) {
  .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-card .group-cover { height: 96px; }
  .group-editor { max-height: 60vh; }
  .group-editor-row { flex-direction: column; align-items: stretch; }
  .group-editor-row .field[style] { width: 100% !important; }
}

/* ----------------------------- pulido general ---------------------------- */
.page-head h1 { letter-spacing: -.5px; }
.card > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.section-title { scroll-margin-top: 80px; }
@media (max-width: 767px) {
  .modal .modal-head { padding-left: 16px; padding-right: 16px; }
  .modal .modal-body { padding-left: 16px; padding-right: 16px; }
  .search-page, .page-shell { padding-left: 2px; padding-right: 2px; }
}

/* --------------------------- verificación de pago ------------------------ */
.verification-card { display: flex; flex-direction: column; }
.verification-card > .btn { margin-top: auto; }
.verification-price {
  display: flex; flex-direction: column; gap: 1px; align-items: center;
  margin: 14px 0 12px; padding: 10px 12px; border-radius: 13px;
  background: var(--brand-soft);
}
.verification-price-value { font-size: 18px; font-weight: 850; color: var(--brand); letter-spacing: -.3px; }
.verification-price-note { font-size: 11px; font-weight: 650; color: var(--text-2); }
.verification-unavailable {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 16px;
}
.verification-options { display: grid; gap: 8px; }
.verification-option {
  display: flex; align-items: center; gap: 9px; padding: 12px 13px;
  border-radius: 13px; border: 1.5px solid var(--line-soft);
  background: var(--card); text-align: left;
}
.verification-option.active { border-color: var(--brand); background: var(--brand-soft); }
.verification-option span { font-size: 14px; font-weight: 700; }
.verification-option small { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--text-2); }
.verification-form-price {
  padding: 9px 12px; border-radius: 10px; background: var(--card-2);
  font-size: 13px; font-weight: 750; color: var(--brand);
}
.verification-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) {
  .verification-form-grid { grid-template-columns: 1fr; }
  .verification-card { border-radius: 18px; }
}

/* --------------------------- transición nativa --------------------------- */
.col-center { view-transition-name: zuma-page; }
::view-transition-old(zuma-page) {
  animation: zuma-page-out 140ms ease both;
}
::view-transition-new(zuma-page) {
  animation: zuma-page-in 220ms cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes zuma-page-out {
  to { opacity: .35; transform: translateY(4px) scale(.995); }
}
@keyframes zuma-page-in {
  from { opacity: .5; transform: translateY(7px) scale(.997); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(zuma-page),
  ::view-transition-new(zuma-page) { animation: none; }
}

/* ------------------------------ buscador iOS ----------------------------- */
.search-head { align-items: flex-end; }
.search-shortcut {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--card-2); border: .5px solid var(--line-soft);
  color: var(--text-3); flex: none;
}
.search-shortcut kbd { font: inherit; font-size: 13px; }
.search-hero {
  position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 20;
  padding: 9px; border-radius: 18px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: .5px solid var(--line-soft);
  box-shadow: 0 10px 30px -18px rgba(4, 28, 84, .35);
}
.search-big {
  display: flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 12px; border-radius: 13px;
  background: var(--card-2); border: .5px solid var(--line-soft);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}
.search-big:focus-within {
  background: var(--card);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, .12);
}
.search-big input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent;
  font-size: 16px; font-weight: 550; outline: none;
}
.search-tabs {
  display: flex; gap: 3px; padding: 4px; margin: 10px 0 2px;
  border-radius: 14px; background: var(--card-2);
  border: .5px solid var(--line-soft); overflow-x: auto;
  scrollbar-width: none;
}
.search-tabs::-webkit-scrollbar { display: none; }
.search-tab {
  flex: 1; min-width: max-content; border: 0; border-radius: 10px;
  padding: 8px 12px; background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 650; display: inline-flex; gap: 6px;
  align-items: center; justify-content: center;
  transition: background 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.search-tab.active { background: var(--card); color: var(--text); box-shadow: 0 2px 7px -2px rgba(0, 0, 0, .2); }
.search-tab-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 10.5px; line-height: 18px; text-align: center;
}
.search-summary {
  display: flex; align-items: baseline; gap: 6px;
  padding: 12px 2px 6px; font-size: 13.5px;
}
.search-block {
  background: var(--card); border: .5px solid var(--line-soft);
  border-radius: 16px; margin-top: 10px; overflow: hidden;
}
.search-block-head { padding: 13px 15px 7px; }
.search-block-title { font-size: 13.5px; font-weight: 750; letter-spacing: -.1px; }
.search-row { padding: 10px 15px; gap: 11px; border-top: .5px solid var(--line-soft); }
.search-block-head + .search-row { border-top: 0; }
.search-row:hover { background: var(--card-2); }
.search-person-sub { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.search-person-bio {
  font-size: 12px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-highlight {
  background: rgba(255, 204, 0, .28); color: inherit;
  border-radius: 3px; padding: 0 1px;
}
.search-explore { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 2px; }
.search-explore-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 11px; border-radius: 999px;
  background: var(--card); border: .5px solid var(--line-soft);
  color: var(--text-2); font-size: 12.5px; font-weight: 600;
}
.search-explore-chip:hover { color: var(--brand); border-color: var(--brand); }
.search-suggestions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 4px 16px 16px; }
.search-no-results { padding-bottom: 4px; }
@media (max-width: 767px) {
  .search-hero { top: calc(var(--topbar-h) + 4px); padding: 7px; border-radius: 16px; }
  .search-big { height: 46px; }
  .search-shortcut { display: none; }
  .search-tabs { margin-top: 8px; }
  .search-tab { padding: 8px 9px; font-size: 12.5px; }
  .search-row { padding: 10px 12px; }
}

/* ------------------------------- contacto -------------------------------- */
.contact-card { display: flex; flex-direction: column; gap: 9px; }
.contact-option {
  display: flex; align-items: center; gap: 11px; padding: 12px;
  border-radius: 14px; background: var(--card-2); border: .5px solid var(--line-soft);
  transition: transform 120ms var(--ease), background 160ms var(--ease);
}
.contact-option:hover { background: var(--card); text-decoration: none; }
.contact-option:active { transform: scale(.985); }
.contact-option-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.contact-option.whatsapp .contact-option-icon { background: #25d366; }
.contact-option.instagram .contact-option-icon {
  background: radial-gradient(circle at 30% 110%, #feda75 0 22%, #fa7e1e 38%, #d62976 62%, #962fbf 80%, #4f5bd5 100%);
}
.contact-option-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.contact-option-label { font-size: 13px; font-weight: 750; color: var(--text); }
.contact-option-value { font-size: 12.5px; color: var(--text-2); }
html[data-theme="dark"] .contact-option { background: rgba(255, 255, 255, .06); }

/* ---------------------- responder a publicación de Shop ------------------ */
.chat-input { flex-wrap: wrap; }
.chat-reply-bar {
  flex: 1 0 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; margin: 0 0 6px; border-radius: 11px;
  background: var(--card-2); border-left: 3px solid var(--wa-accent);
  min-width: 0;
}
.chat-reply-bar.hide { display: none; }
.chat-reply-thumb {
  width: 34px; height: 34px; border-radius: 7px; overflow: hidden;
  flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--text-2);
}
.chat-reply-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-reply-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-reply-label {
  font-size: 10.5px; font-weight: 750; color: var(--wa-accent);
  text-transform: uppercase; letter-spacing: .3px;
}
.chat-reply-title {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-reply-price { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.chat-reply-close { width: 28px; height: 28px; flex: none; }
.msg-reply {
  display: flex; gap: 7px; align-items: center;
  margin: 1px 0 5px; padding: 5px 7px;
  border-radius: 6px; border-left: 3px solid var(--wa-accent);
  background: rgba(0, 0, 0, .06); min-width: 0;
}
.msg.me .msg-reply { background: rgba(0, 0, 0, .08); }
html[data-theme="dark"] .msg-reply { background: rgba(255, 255, 255, .07); }
.msg-reply-thumb {
  width: 30px; height: 30px; border-radius: 5px; overflow: hidden;
  flex: none; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .08);
}
.msg-reply-thumb img { width: 100%; height: 100%; object-fit: cover; }
.msg-reply-copy { min-width: 0; display: flex; flex-direction: column; }
.msg-reply-label { font-size: 10px; font-weight: 750; color: var(--wa-accent); text-transform: uppercase; }
.msg-reply-title {
  font-size: 12px; font-weight: 600; color: inherit;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px;
}
.msg-reply-price { font-size: 11px; opacity: .75; }
@media (max-width: 767px) {
  .msg-reply-title { max-width: 160px; }
}

.ch-sub.typing { color: var(--wa-accent); font-weight: 650; }

/* El aviso de instalar no debe tapar el chat ni la cámara de historias */
body[data-route="messages"] .install-banner,
body[data-route="storycompose"] .install-banner { display: none; }

/* ------------------------- promoción de Shop en feed --------------------- */
.shop-promo {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line-soft));
  background: var(--card);
  background:
    radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 62%),
    var(--card);
  box-shadow: 0 18px 46px -30px rgba(10, 132, 255, .55), 0 1px 2px rgba(16, 24, 40, .04);
}
.shop-promo-ribbon {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 14%, var(--card)), color-mix(in srgb, #8b5cf6 10%, var(--card)));
  border-bottom: .5px solid var(--line-soft);
}
.shop-promo-ribbon-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.shop-promo-ribbon-note { font-size: 10.5px; color: var(--text-3); font-weight: 550; }
.shop-promo .shop-feed-head { padding-top: 12px; }
.shop-promo-mini {
  padding: 2px 6px; border-radius: 5px;
  background: var(--brand); color: #fff;
  font-size: 8.5px; font-weight: 850; letter-spacing: .1em;
}
.shop-promo-seller { color: var(--text); font-weight: 650; }
.shop-promo .shop-feed-media { margin: 0 16px; border-radius: 14px; }
.shop-promo .shop-feed-tag {
  background: var(--brand); color: #fff;
  letter-spacing: .08em;
}
.shop-promo .shop-feed-body { padding: 14px 18px 10px; }
.shop-promo .shop-feed-title { font-size: 18px; letter-spacing: -.2px; }
.shop-feed-price-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 1px; }
.shop-feed-price { color: var(--text); }
.shop-feed-condition {
  padding: 3px 8px; border-radius: 999px; background: var(--card-2);
  font-size: 11px; font-weight: 650; color: var(--text-2);
}
.shop-promo .post-actions { border-top: .5px solid var(--line-soft); }
.shop-promo-primary { color: var(--brand) !important; font-weight: 750; }
html[data-theme="dark"] .shop-promo {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line-soft));
  box-shadow: 0 20px 50px -30px rgba(10, 132, 255, .6);
}
@media (max-width: 620px) {
  .shop-promo-ribbon { padding: 7px 12px; }
  .shop-promo-ribbon-note { display: none; }
  .shop-promo .shop-feed-media { margin: 0 12px; }
  .shop-promo .shop-feed-body { padding: 12px 14px 8px; }
}

/* ------------------------ perfil con insignia azul ----------------------- */
.verified-profile {
  border: .5px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}
.verified-cover-art {
  position: absolute; right: 18px; top: 14px; width: min(38%, 260px);
  pointer-events: none; z-index: 1;
}
.verified-cover-art svg { display: block; width: 100%; height: auto; }
.verified-profile .profile-cover::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 85, 150, .16));
}
.verified-profile .profile-avatar-big .avatar {
  box-shadow: 0 0 0 4px var(--card), 0 0 0 7px rgba(29, 155, 240, .42), 0 10px 30px -14px rgba(29, 155, 240, .6);
}
.profile-type-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; background: rgba(29, 155, 240, .13);
  color: #0878c9; font-size: 11px; font-weight: 750; letter-spacing: .01em;
  border: .5px solid rgba(29, 155, 240, .25);
}
html[data-theme="dark"] .profile-type-chip { color: #7dc8ff; background: rgba(29, 155, 240, .18); }
.profile-verified-strip {
  display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap;
  width: fit-content; margin-top: 7px; padding: 5px 9px;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(29, 155, 240, .12), rgba(29, 155, 240, .04));
  border: .5px solid rgba(29, 155, 240, .22);
  color: #0878c9;
}
.profile-verified-label { font-size: 11.5px; font-weight: 750; }
.profile-verified-until { font-size: 10.5px; opacity: .72; }
html[data-theme="dark"] .profile-verified-strip { color: #8ed0ff; }
@media (max-width: 620px) {
  .profile-verified-strip { width: 100%; justify-content: center; }
}

/* --------------------------- insignia única azul ------------------------- */
.verification-page { display: flex; flex-direction: column; gap: 14px; }
.verification-single {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 24px; padding: 24px; overflow: hidden;
  box-shadow: 0 24px 60px -42px rgba(29, 155, 240, .55);
  position: relative;
}
.verification-single::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 150px;
  background: radial-gradient(110% 130% at 50% -30%, rgba(29, 155, 240, .18), transparent 65%);
  pointer-events: none;
}
.verification-single-top { display: flex; align-items: center; gap: 16px; position: relative; }
.verification-seal {
  width: 80px; height: 80px; border-radius: 24px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(29, 155, 240, .1);
  border: .5px solid rgba(29, 155, 240, .2);
}
.verification-single-title { min-width: 0; }
.verification-kicker {
  font-size: 10.5px; font-weight: 850; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand);
}
.verification-single-title h2 { font-size: 24px; letter-spacing: -.5px; margin: 2px 0 3px; }
.verification-single-title p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.verification-price-line {
  display: inline-flex; align-items: baseline; gap: 5px;
  margin: 16px 0 14px; padding: 8px 12px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
}
.verification-price-line strong { font-size: 20px; font-weight: 850; letter-spacing: -.4px; }
.verification-price-line span { font-size: 12px; font-weight: 650; }
.verification-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.verification-benefit {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 12px; border-radius: 13px;
  background: var(--card-2); border: .5px solid var(--line-soft);
}
.verification-benefit-icon {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.verification-benefit strong { display: block; font-size: 12.5px; font-weight: 750; color: var(--text); }
.verification-benefit p { margin: 2px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--text-2); }
.verification-cta { margin-top: 16px; min-height: 46px; }
.verification-status { display: flex; align-items: flex-start; gap: 10px; }
.verification-status p { margin: 3px 0 0; }
.verification-status.expired { border-color: color-mix(in srgb, #f59e0b 30%, var(--line-soft)); }
.verification-request-price {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border-radius: 13px; background: var(--brand-soft);
}
.verification-request-price > div { display: flex; flex-direction: column; }
.verification-request-price strong { font-size: 14px; }
.verification-request-price span { font-size: 12px; color: var(--text-2); }
@media (max-width: 620px) {
  .verification-single { padding: 18px; border-radius: 20px; }
  .verification-single-top { align-items: flex-start; gap: 12px; }
  .verification-seal { width: 64px; height: 64px; border-radius: 19px; }
  .verification-single-title h2 { font-size: 21px; }
  .verification-benefits { grid-template-columns: 1fr; }
}

/* ------------------------- enlaces y metadatos --------------------------- */
.text-link { color: var(--brand); font-weight: 550; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.text-link:hover { color: color-mix(in srgb, var(--brand) 80%, #000); }
.external-link-modal { display: flex; flex-direction: column; gap: 10px; }
.external-link-url {
  padding: 10px 12px; border-radius: 10px; background: var(--card-2);
  font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere;
}
.external-link-modal .btn { text-align: center; justify-content: center; }
.post-text.post-bg {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.post-text.post-bg .see-more { align-self: center; }
.post-meta {
  flex-wrap: wrap; row-gap: 1px; min-width: 0;
  line-height: 1.35;
}
.post-meta .post-fullname {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-meta .dot { flex: none; }
.share-box .post-meta { flex-wrap: wrap; }

.compose-tool:disabled, .compose-tool.disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}
.compose-text.compose-bg-azul, .compose-text.compose-bg-rosa, .compose-text.compose-bg-verde,
.compose-text.compose-bg-arena, .compose-text.compose-bg-violeta, .compose-text.compose-bg-oscuro {
  text-align: center;
}

/* --------------------------- videos en historias ------------------------- */
.story-publish-video {
  width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block;
}
.story-processing {
  display: flex; align-items: center; justify-content: center; min-height: 60vh;
}
.story-processing-card {
  width: min(420px, 100%); padding: 26px; text-align: center;
  background: var(--card); border: .5px solid var(--line-soft);
  border-radius: 22px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.story-processing-card .big-ic {
  width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.story-processing-text { font-size: 13px; font-weight: 700; color: var(--brand); margin-top: 5px; }
.story-processing-track {
  width: 100%; height: 7px; border-radius: 999px; overflow: hidden;
  background: var(--card-2); margin-top: 4px;
}
.story-processing-bar {
  width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #7c3aed);
  transition: width 180ms linear;
}

/* ---------------------------- visor de historias ------------------------- */
.sv-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #000; z-index: 0;
  transform: translateZ(0);
  will-change: transform;
}
.sv-video.hide { display: none; }
.sv-image.hide { display: none; }

.story-video-badge {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .48); color: #fff;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.story-video-badge .ico { margin-left: 1px; }

/* -------------------------------- reels ---------------------------------- */
.reels-page {
  display: flex; flex-direction: column; gap: 10px;
  height: calc(100dvh - var(--topbar-h) - 48px);
  min-height: 600px;
  width: 100%; max-width: 560px; margin: 0 auto;
}
.reels-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 2px;
}
.reels-head h1 { font-size: 24px; letter-spacing: -.6px; }
.reels-head p { margin: 2px 0 0; }
.reels-feed {
  flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory;
  border-radius: 20px; background: #000;
  scrollbar-width: none;
}
.reels-feed::-webkit-scrollbar { display: none; }
.reel-slide {
  position: relative; height: 100%; min-height: 560px; scroll-snap-align: start;
  overflow: hidden; background: #000; display: flex; align-items: flex-end;
}
.reel-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #000;
}
.reel-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.24), transparent 28%, transparent 58%, rgba(0,0,0,.78));
}
.reel-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px;
}
.reel-brand {
  display: inline-flex; align-items: center; gap: 5px;
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .04em;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.reel-mute {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.38); color: #fff; backdrop-filter: blur(6px);
}
.reel-info {
  position: relative; z-index: 2; width: 100%; max-width: calc(100% - 76px);
  padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 7px;
}
.reel-author { display: flex; align-items: center; gap: 9px; }
.reel-name-row { display: flex; align-items: center; gap: 4px; }
.reel-name { color: #fff; font-weight: 750; font-size: 14px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.reel-name:hover { text-decoration: underline; }
.reel-time { font-size: 11px; color: rgba(255,255,255,.72); }
.reel-caption {
  margin: 0; font-size: 13.5px; line-height: 1.42; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; white-space: pre-wrap; text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.reel-delete {
  align-self: flex-start; border: 0; background: rgba(255,255,255,.13);
  color: #fff; border-radius: 999px; padding: 5px 9px;
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
}
.reel-actions {
  position: absolute; right: 12px; bottom: 26px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.reel-like {
  width: 56px; border: 0; background: transparent; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.45));
}
.reel-like .ico { transition: transform 150ms var(--ease); }
.reel-like:active .ico { transform: scale(1.2); }
.reel-like.active { color: #ff3b5c; }
.reel-like-count { color: #fff; }
.reel-like.active .reel-like-count { color: #fff; }
.reels-empty { padding: 20px; }
.reels-upload-fab { display: none; }
.reel-upload-preview {
  width: 100%; aspect-ratio: 9 / 16; max-height: 300px;
  border-radius: 14px; overflow: hidden; background: #000;
}
.reel-upload-preview video { width: 100%; height: 100%; object-fit: cover; }
.reel-upload-status { min-height: 18px; margin: 0; font-size: 12.5px; font-weight: 650; color: var(--brand); }
@media (max-width: 767px) {
  .reels-page {
    height: calc(100dvh - var(--topbar-h) - var(--nav-h) - 14px);
    min-height: 0; gap: 7px;
  }
  .reels-head h1 { font-size: 20px; }
  .reels-head p { display: none; }
  .reels-head .btn { display: none; }
  .reels-feed { border-radius: 16px; }
  .reel-slide { min-height: 0; height: 100%; }
  .reels-upload-fab {
    display: inline-flex; position: fixed; right: 16px;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
    z-index: 520; box-shadow: var(--shadow-lg);
  }
}

body[data-route="reels"] .install-banner { display: none; }

/* --------------------------- crear publicación --------------------------- */
.compose-page { max-width: 1120px; margin: 0 auto; }
.compose-head { align-items: flex-end; }
.compose-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compose-layout {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr);
  gap: 18px; align-items: start;
}
.compose-card {
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 60px -45px rgba(0, 0, 0, .45);
}
.compose-owner {
  padding: 15px 18px; border-bottom: .5px solid var(--line-soft);
}
.compose-owner .avatar { flex: none; }
.compose-text {
  width: 100%; border: 0; outline: 0; resize: vertical;
  min-height: 220px; padding: 20px 20px 12px;
  font-size: 19px; line-height: 1.5; background: transparent;
}
.compose-text::placeholder { color: var(--text-3); }
.compose-media { padding: 0 18px; }
.compose-chips { padding: 0 18px; }
.compose-palette {
  margin: 10px 18px 0; padding: 10px;
  background: var(--card-2); border-radius: 14px;
}
.compose-tools {
  margin-top: 10px; padding: 10px 18px;
  border-top: .5px solid var(--line-soft);
  justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
}
.compose-tools::-webkit-scrollbar { display: none; }
.compose-foot {
  padding: 0 18px 14px;
}
.compose-preview-card {
  position: sticky; top: calc(var(--topbar-h) + 18px);
  background: var(--card); border: .5px solid var(--line-soft);
  border-radius: 22px; padding: 14px;
  box-shadow: var(--shadow-sm);
}
.compose-preview-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 10px;
}
.compose-preview-post {
  border: .5px solid var(--line-soft); border-radius: 16px;
  overflow: hidden; background: var(--card);
}
.compose-preview-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px;
}
.compose-preview-head .avatar { flex: none; }
.compose-preview-sub {
  display: flex; align-items: center; gap: 3px;
  font-size: 11.5px; color: var(--text-3); margin-top: 1px;
}
.compose-preview-text {
  padding: 8px 14px 12px; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto;
}
.compose-preview-text.empty { color: var(--text-3); font-style: italic; }
.compose-preview-text.post-bg { margin: 4px 8px 8px; border-radius: 13px; }
.compose-preview-media {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  padding: 0 8px 8px;
}
.compose-preview-media img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px;
}
.compose-preview-actions {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 12px; border-top: .5px solid var(--line-soft);
  font-size: 11px; color: var(--text-2);
}
.compose-preview-actions span { display: inline-flex; align-items: center; gap: 4px; }
.compose-preview-note {
  margin: 11px 2px 0; font-size: 11px; line-height: 1.45; color: var(--text-3);
}
@media (max-width: 980px) {
  .compose-layout { grid-template-columns: 1fr; }
  .compose-preview-card { display: none; }
  .compose-head-actions .btn.soft { display: none; }
}
@media (max-width: 620px) {
  .compose-page { padding: 0; }
  .compose-head { padding: 10px 12px 8px; }
  .compose-head-actions .btn.primary { display: inline-flex; }
  .compose-card { border-radius: 0; border-left: 0; border-right: 0; }
  .compose-text { min-height: 180px; font-size: 18px; }
}

/* ---------------------------- historias estilo IG ------------------------ */
.stories-page { max-width: 1120px; margin: 0 auto; }
.stories-head { align-items: flex-end; }
.stories-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stories-duration-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 10px; border-radius: 999px;
  background: var(--card-2); border: .5px solid var(--line-soft);
  color: var(--text-2); font-size: 11.5px; font-weight: 650;
}
.stories-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.story-tile {
  border-radius: 22px !important;
  border: .5px solid var(--line-soft);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.story-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -28px rgba(0,0,0,.55); }
.story-tile.create {
  background:
    radial-gradient(100% 80% at 50% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%),
    var(--card);
  border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line));
}
.story-tile.create .story-tile-create {
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 25px -12px rgba(10,132,255,.7);
}
.story-tile-meta { font-size: 11px; }
.story-tile-count { backdrop-filter: blur(5px); }
.story-composer {
  min-height: calc(100dvh - var(--topbar-h));
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(29,155,240,.12), transparent 70%),
    var(--bg);
}
.story-stage { padding-top: 8px; }
.story-camera {
  border-radius: 30px;
  box-shadow: 0 35px 90px -55px rgba(0,0,0,.85);
}
.story-camera-top, .story-camera-foot {
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.story-camera-foot {
  background: linear-gradient(0deg, rgba(0,0,0,.58), transparent);
  border-radius: 0 0 30px 30px;
}
.story-gallery-btn.ghost {
  background: rgba(255,255,255,.14); color: #fff;
}
.story-publish-preview { border-radius: 28px; overflow: hidden; }
.story-publish-actions { max-width: 680px; margin: 0 auto; }
@media (max-width: 767px) {
  .stories-page { padding: 0 2px 16px; }
  .stories-head { padding: 10px 4px 6px; }
  .stories-duration-pill { display: none; }
  .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .story-camera { border-radius: 20px; }
  .story-camera-foot { border-radius: 0 0 20px 20px; }
}

/* ------------------------------ Shop estilo IG --------------------------- */
.shop-page { max-width: 1120px; margin: 0 auto; }
.shop-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 26px 24px; margin-bottom: 14px; border-radius: 24px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(124, 58, 237, .3), transparent 58%),
    radial-gradient(120% 150% at 0% 0%, rgba(29, 155, 240, .34), transparent 62%),
    #0b1220;
  color: #fff;
  box-shadow: 0 28px 65px -50px rgba(0, 0, 0, .8);
}
.shop-hero::after {
  content: ''; position: absolute; right: -30px; bottom: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 38px rgba(255,255,255,.05), 0 0 0 78px rgba(255,255,255,.03);
  pointer-events: none;
}
.shop-hero-copy { position: relative; z-index: 1; max-width: 620px; }
.shop-hero-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.shop-hero h1 { font-size: 34px; letter-spacing: -.9px; margin: 4px 0 5px; }
.shop-hero p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.72); }
.shop-hero-actions { position: relative; z-index: 1; }
.shop-hero-actions .btn.primary { background: #fff; color: #0b1220; }
.shop-toolbar {
  position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 15;
  border-radius: 16px; padding: 9px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.shop-search-row { gap: 10px; }
.shop-cats {
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 2px 12px;
}
.shop-cats::-webkit-scrollbar { display: none; }
.shop-cat {
  flex: none; border-radius: 999px; padding: 8px 13px;
  background: var(--card); border: .5px solid var(--line-soft);
  font-size: 12.5px; font-weight: 650; color: var(--text-2);
}
.shop-cat.active { background: var(--text); color: var(--card); border-color: transparent; }
.shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shop-card {
  border-radius: 20px; overflow: hidden;
  background: var(--card); border: .5px solid var(--line-soft);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 22px 45px -34px rgba(0,0,0,.55); text-decoration: none; }
.shop-card-img { aspect-ratio: 4 / 5; overflow: hidden; }
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
.shop-card:hover .shop-card-img img { transform: scale(1.035); }
.shop-card-condition {
  position: absolute; left: 9px; top: 9px;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(0,0,0,.48); color: #fff;
  font-size: 10.5px; font-weight: 750; backdrop-filter: blur(6px);
}
.shop-card-body { padding: 11px 13px 13px; gap: 3px; }
.shop-price { font-size: 18px; letter-spacing: -.4px; }
.shop-card-title { font-size: 13.5px; font-weight: 650; }
.shop-card-meta { font-size: 11.5px; color: var(--text-3); }
.shop-card-seller {
  display: flex; align-items: center; gap: 5px;
  margin-top: 5px; font-size: 11.5px; color: var(--text-2);
}
.shop-card-seller .avatar { flex: none; }
.shop-sold { z-index: 2; }
@media (max-width: 1000px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .shop-page { padding: 0 2px 14px; }
  .shop-hero { padding: 20px 16px; border-radius: 20px; margin-bottom: 10px; }
  .shop-hero h1 { font-size: 27px; }
  .shop-hero-actions { width: 100%; }
  .shop-hero-actions .btn { width: 100%; justify-content: center; }
  .shop-grid { gap: 9px; }
  .shop-card { border-radius: 15px; }
  .shop-card-body { padding: 9px 10px 11px; }
  .shop-price { font-size: 16px; }
  .shop-cat { padding: 7px 11px; font-size: 12px; }
}

.story-gallery-btn.story-video-btn {
  visibility: visible; color: #fff;
  background: rgba(255,255,255,.14); border-radius: 14px; padding: 5px 2px;
}

.compose-tools { flex-wrap: nowrap; }
body[data-route="compose"] .install-banner,
body[data-route="shop"] .install-banner,
body[data-route="stories"] .install-banner { display: none; }

/* ---------------------- cámara de historia full screen ------------------- */
body[data-route="storycompose"] { overflow: hidden; }
body[data-route="storycompose"] .story-composer {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(29,155,240,.12), transparent 70%),
    #000;
}
body[data-route="storycompose"] .story-stage { width: 100%; height: 100%; }
body[data-route="storycompose"] .story-camera {
  width: 100vw; height: 100dvh; max-width: none;
  border-radius: 0; margin: 0; box-shadow: none;
}
body[data-route="storycompose"] .story-camera-foot {
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.62), transparent);
}
body[data-route="storycompose"] .story-camera-top { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.story-video-btn, .story-camera-error { display: none !important; }
.story-camera.no-camera .story-shutter { display: none; }
.story-camera.no-camera .story-camera-foot { justify-content: flex-start; padding-left: 26px; }
.story-camera.no-camera .story-gallery-btn { width: auto; flex-direction: row; gap: 7px; padding: 11px 15px; border-radius: 14px; background: rgba(255,255,255,.16); }
.story-composer .story-publish { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 18px; }
.story-composer .story-publish-preview { width: min(100%, 480px); margin: 0 auto; }

/* ---------------------- galería unificada de Zuma ------------------------ */
.zuma-gallery { display: flex; flex-direction: column; gap: 10px; }
.zuma-gallery-top { display: flex; align-items: center; gap: 8px; }
.zuma-gallery-tabs {
  display: flex; gap: 3px; padding: 4px; flex: 1;
  background: var(--card-2); border-radius: 13px;
}
.zuma-gallery-tab {
  flex: 1; border: 0; border-radius: 9px; padding: 7px 10px;
  background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 650;
}
.zuma-gallery-tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 5px rgba(0,0,0,.15); }
.zuma-gallery-add {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  border: 0; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.zuma-gallery-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px; max-height: 58vh; overflow-y: auto; padding: 2px;
}
.zuma-gallery-item {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: var(--card-2); border: 0; padding: 0;
}
.zuma-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zuma-gallery-item.is-video::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35));
  pointer-events: none;
}
.zuma-gallery-video {
  position: absolute; left: 5px; bottom: 5px; z-index: 1;
  display: inline-flex; align-items: center; gap: 3px;
  color: #fff; font-size: 10px; font-weight: 750;
  text-shadow: 0 1px 5px rgba(0,0,0,.7);
}
.zuma-gallery-play {
  width: 17px; height: 17px; border-radius: 50%;
  background: rgba(0,0,0,.48); display: flex; align-items: center; justify-content: center;
}
.zuma-gallery-status {
  padding: 8px 10px; border-radius: 10px; background: var(--brand-soft);
  color: var(--brand); font-size: 12px; font-weight: 650; text-align: center;
}
.zuma-gallery-status.hide { display: none; }
.zuma-gallery-empty { grid-column: 1 / -1; }
@media (max-width: 767px) {
  .zuma-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 56dvh; }
  .modal.lg:has(.zuma-gallery) { width: 100%; max-width: none; height: 100dvh; border-radius: 0; }
  .modal.lg:has(.zuma-gallery) .modal-body { max-height: none; }
  body[data-route="storycompose"] .story-camera { height: 100dvh; }
}

/* --------------------------- responder historia -------------------------- */
.sv-reply {
  position: absolute; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 6; display: flex; align-items: center; gap: 7px;
  padding: 6px; border-radius: 999px;
  background: rgba(18, 18, 20, .46);
  border: .5px solid rgba(255,255,255,.24);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.sv-reply.hide { display: none; }
.sv-reply-input {
  flex: 1; min-width: 0; height: 36px; padding: 0 11px;
  border: 0; border-radius: 999px; background: transparent;
  color: #fff; font-size: 13px; outline: none;
}
.sv-reply-input::placeholder { color: rgba(255,255,255,.72); }
.sv-reply-send {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  border: 0; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.sv-reply-input:focus { background: rgba(255,255,255,.08); }

/* ------------------------------ perfil nuevo ----------------------------- */
.profile-hero {
  border-radius: 24px; overflow: hidden;
  border: .5px solid var(--line-soft);
  background: var(--card);
}
.profile-hero .profile-cover { height: 220px; }
.profile-main-row {
  align-items: flex-end; gap: 20px;
  padding: 0 24px 18px; margin-top: -56px;
}
.profile-avatar-big .avatar {
  width: 112px; height: 112px;
  box-shadow: 0 0 0 4px var(--card), 0 14px 34px -20px rgba(0,0,0,.55);
}
.profile-name { font-size: 31px; letter-spacing: -.8px; line-height: 1.1; }
.profile-fullname {
  margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--text-3);
}
.profile-bio { margin: 9px 0 0; max-width: 560px; line-height: 1.5; }
.profile-meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.profile-meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 999px;
  background: var(--card-2); color: var(--text-2);
  font-size: 11.5px; font-weight: 600;
}
.profile-meta-chip .ico { opacity: .7; }
.profile-stats { margin-top: 10px; font-size: 13px; }
.profile-actions-row { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.profile-avatar-stack { margin-left: auto; align-self: flex-end; padding-bottom: 4px; }
.profile-tabs {
  position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 12;
  display: flex; gap: 2px; overflow-x: auto;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: .5px solid var(--line-soft);
}
.profile-tabs .tab {
  flex: 1; min-width: max-content; border-radius: 10px;
  height: 36px; padding: 0 10px; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.profile-tabs .tab.active { background: var(--card-2); color: var(--text); }
@media (max-width: 767px) {
  .profile-hero { border-radius: 0 0 20px 20px; }
  .profile-hero .profile-cover { height: 170px; }
  .profile-main-row { padding: 0 14px 14px; margin-top: -44px; gap: 11px; }
  .profile-avatar-big .avatar { width: 88px; height: 88px; }
  .profile-name { font-size: 24px; }
  .profile-fullname { font-size: 12.5px; }
  .profile-bio { font-size: 13px; }
  .profile-avatar-stack { display: none; }
  .profile-tabs { top: calc(var(--topbar-h) + 2px); padding: 5px 8px; }
  .profile-tabs .tab { height: 34px; font-size: 12px; }
}

/* ----------------------------- notificaciones ---------------------------- */
.notif-list { display: flex; flex-direction: column; gap: 6px; }
.notif {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px;
  background: var(--card-2); border: .5px solid transparent;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}
.notif:hover { background: var(--card); border-color: var(--line-soft); text-decoration: none; }
.notif.unread { background: rgba(29,155,240,.08); border-color: rgba(29,155,240,.18); }
.notif-avatar { position: relative; flex: none; }
.notif-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 19px; height: 19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  border: 2px solid var(--card);
}
.notif.unread .notif-badge { background: var(--brand); }
.n-text { font-size: 13.3px; line-height: 1.4; }
.notif.unread .n-text { font-weight: 650; }
.n-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.notif-welcome {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}

body[data-route="storycompose"] .topbar,
body[data-route="storycompose"] .mobile-nav,
body[data-route="storycompose"] .left-rail,
body[data-route="storycompose"] .right-rail,
body[data-route="storycompose"] .install-banner { display: none !important; }
body[data-route="storycompose"] .main { padding-top: 0 !important; }
body[data-route="storycompose"] .story-stage { padding-top: 0 !important; }
body[data-route="storycompose"] .story-camera { height: 100dvh !important; }
body[data-route="storycompose"] .col-center { view-transition-name: none; }

.story-camera.no-camera .story-gallery-btn {
  width: 48px; height: 48px; padding: 0; border-radius: 50%;
  justify-content: center;
}
.story-camera.no-camera .story-gallery-btn span { display: none; }

/* --------------------------- recorte de video ---------------------------- */
.vt { display: flex; flex-direction: column; gap: 12px; }
.vt-stage {
  position: relative; overflow: hidden; border-radius: 22px;
  background: #000; aspect-ratio: 9 / 16; max-height: 52vh; margin: 0 auto; width: 100%;
}
.vt-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vt-stage-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 24%, transparent 68%, rgba(0,0,0,.55)); pointer-events: none; }
.vt-close {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.vt-badge {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(0,0,0,.45); color: #fff; font-size: 10.5px; font-weight: 750;
  backdrop-filter: blur(8px);
}
.vt-stage-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 12px;
}
.vt-play {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #111;
  display: flex; align-items: center; justify-content: center;
}
.vt-hint { color: rgba(255,255,255,.75); font-size: 11.5px; font-weight: 600; text-shadow: 0 1px 5px rgba(0,0,0,.6); }
.vt-controls { padding: 4px 2px 0; }
.vt-labels { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vt-labels > div { display: flex; align-items: baseline; gap: 5px; }
.vt-labels .vt-right { text-align: right; }
.vt-label { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.vt-time { font-size: 13px; font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.vt-selected { font-size: 11.5px; font-weight: 700; color: var(--brand); }
.vt-track {
  position: relative; height: 44px; margin: 8px 0 2px;
  border-radius: 10px; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 10%),
    var(--card-2);
}
.vt-selection {
  position: absolute; top: 0; bottom: 0; left: var(--sel-left, 0%); width: var(--sel-width, 100%);
  background: rgba(10,132,255,.26);
  border-left: 3px solid var(--brand); border-right: 3px solid var(--brand);
  border-radius: 4px;
}
.vt-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.12); }
.vt-ranges { position: relative; height: 24px; }
.vt-range {
  position: absolute; left: 0; right: 0; top: 0; width: 100%;
  accent-color: var(--brand); background: transparent;
}
.vt-start { z-index: 2; }
.vt-end { z-index: 3; pointer-events: auto; }
.vt-ranges .vt-range::-webkit-slider-thumb { cursor: ew-resize; }
@media (max-width: 767px) {
  .vt-stage { max-height: 46dvh; border-radius: 16px; }
  .modal.lg:has(.vt) { width: 100%; max-width: none; height: 100dvh; border-radius: 0; }
}
.vt-ranges { display: grid; gap: 4px; height: auto; }
.vt-range { position: static; width: 100%; }
.vt-start, .vt-end { z-index: auto; }
.profile-support-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(29,155,240,.12); color: var(--brand);
  font-size: 10.5px; font-weight: 800;
}

/* ------------------- secciones a pantalla completa (sin modales) --------- */
.modal-page {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  display: block; padding: 0; animation: zuma-page-in 180ms var(--ease);
}
.modal-page .modal {
  width: 100%; max-width: 840px; min-height: 100dvh; max-height: none;
  margin: 0 auto; border-radius: 0; box-shadow: none;
  background: var(--bg); display: flex; flex-direction: column;
}
.modal-page .modal.sm { max-width: 620px; }
.modal-page .modal.lg { max-width: 940px; }
.modal-page .modal-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; min-height: 60px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: .5px solid var(--line-soft);
}
.modal-page .modal-head h2 { font-size: 19px; letter-spacing: -.25px; margin: 0; }
.modal-page .modal-back {
  width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%;
  background: var(--card-2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.modal-page .modal-body { padding: 18px 16px 28px; max-height: none; overflow: visible; flex: 1; }
.modal-page .modal-foot {
  position: sticky; bottom: 0; z-index: 3;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: .5px solid var(--line-soft);
}
.modal-page .modal-foot:empty { display: none; }
.modal-page .modal-foot > .row { width: 100%; }
.modal-page.headless .modal { max-width: 620px; min-height: auto; margin-top: 7vh; border-radius: 22px; border: .5px solid var(--line-soft); overflow: hidden; box-shadow: var(--shadow-sm); }
.modal-page.headless .modal-body { padding: 24px 20px 12px; }
.modal-page.headless .modal-foot { position: static; padding: 12px 20px 20px; border-top: 0; background: var(--bg); }
.modal-page .modal.confirm .modal-body { text-align: center; }
.modal-page .modal.confirm .modal-confirm h3 { font-size: 20px; }
.modal-page .modal.confirm .modal-confirm p { margin-top: 6px; color: var(--text-2); }
@media (max-width: 767px) {
  .modal-page .modal { max-width: none; }
  .modal-page .modal-head { min-height: 56px; padding: 9px 12px; }
  .modal-page .modal-body { padding: 14px 12px 24px; }
  .modal-page .modal-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .modal-page.headless .modal { margin-top: 0; border-radius: 0; min-height: 100dvh; }
}
.zuma-gallery-permission {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 9px; padding: 34px 20px;
}
.zuma-gallery-permission-ic {
  width: 72px; height: 72px; border-radius: 24px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.zuma-gallery-permission p { max-width: 420px; margin: 0; }
.sv-menu {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); color: #fff;
  border: .5px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sv-head { padding-right: 56px; }
.dropdown { z-index: 1700 !important; }
.msg-more {
  width: 24px; height: 24px; flex: none; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-3); opacity: .55;
}
.msg:hover .msg-more, .msg-more:focus-visible { opacity: 1; background: var(--card-2); }
.msg.me .msg-more { margin-left: 2px; }
.chat-head { gap: 6px; }
.chat-head .btn-icon { flex: none; }
@media (max-width: 620px) {
  .chat-head .btn-icon[title="Ver perfil"] { display: none; }
}

/* --------------------------- recorte de foto ----------------------------- */
.crop { display: flex; flex-direction: column; gap: 12px; }
.crop-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.crop-stage {
  position: relative; width: 100%; max-width: 560px; margin: 0 auto;
  overflow: hidden; border-radius: 18px; background: #0b0b0d;
  touch-action: none; cursor: grab;
}
.crop-stage:active { cursor: grabbing; }
.crop-image {
  position: absolute; display: block; max-width: none;
  user-select: none; pointer-events: none;
}
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 33.2%, rgba(255,255,255,.28) 33.3% 33.6%, transparent 33.7% 66.2%, rgba(255,255,255,.28) 66.3% 66.6%, transparent 66.7%),
    linear-gradient(0deg, transparent 33.2%, rgba(255,255,255,.28) 33.3% 33.6%, transparent 33.7% 66.2%, rgba(255,255,255,.28) 66.3% 66.6%, transparent 66.7%);
}
.crop-zoom-row { display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 0 auto; width: 100%; }
.crop-zoom { flex: 1; accent-color: var(--brand); }
.crop-zoom-symbol { width: 16px; text-align: center; font-size: 18px; color: var(--text-3); }
.crop .modal-foot .btn { flex: 1; }

/* ------------------------------ GR en el feed ---------------------------- */
.post.post-gr {
  border: .5px solid color-mix(in srgb, var(--brand) 32%, var(--line-soft));
  background:
    linear-gradient(180deg, rgba(29,155,240,.06), transparent 120px),
    var(--card);
  position: relative;
}
.post.post-gr::before {
  content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #1d9bf0, #7c3aed);
}
.post-gr-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 4px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
}
.post-gr-title {
  font-size: 17px; font-weight: 800; letter-spacing: -.25px;
  margin: 0 0 4px; color: var(--text);
}
.post-gr-desc { font-size: 14.5px; line-height: 1.5; }
.post-gr-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--text-3); font-size: 11.5px; }
.post-gr-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------------------------------- GR ----------------------------------- */
.gr-page { max-width: 1120px; margin: 0 auto; }
.gr-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 16px; align-items: stretch; margin-bottom: 16px;
}
.gr-hero-copy {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(29,155,240,.3), transparent 55%),
    radial-gradient(110% 100% at 0% 100%, rgba(124,58,237,.22), transparent 60%),
    #0b1220;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.gr-hero-copy::after {
  content: 'GR'; position: absolute; right: 12px; bottom: -30px;
  font-size: 150px; font-weight: 900; letter-spacing: -10px;
  color: rgba(255,255,255,.05); pointer-events: none;
}
.gr-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.66);
}
.gr-title { font-size: 44px; line-height: .95; letter-spacing: -2px; margin: 8px 0 10px; }
.gr-title span { display: block; font-size: 23px; letter-spacing: -.6px; color: rgba(255,255,255,.72); font-weight: 650; margin-top: 5px; }
.gr-lead { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.7); max-width: 430px; margin: 0 0 16px; }
.gr-hero-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.gr-hero-actions .btn.primary { background: #fff; color: #0b1220; }
.gr-hero-actions .btn.soft { background: rgba(255,255,255,.12); color: #fff; }
.gr-weather {
  position: relative; overflow: hidden; border-radius: 26px; padding: 20px;
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(255,196,0,.22), transparent 55%),
    var(--card);
  border: .5px solid var(--line-soft);
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.gr-weather-main { display: flex; align-items: center; gap: 12px; }
.gr-weather-ic {
  width: 66px; height: 66px; border-radius: 21px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,196,0,.22), rgba(29,155,240,.14));
  color: #f5a623;
}
.gr-weather-temp { font-size: 38px; font-weight: 850; letter-spacing: -1.5px; line-height: 1; }
.gr-weather-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-top: 3px; }
.gr-weather-side { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-3); }
.gr-weather-place { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 750; font-size: 12px; }
.gr-weather-updated { position: absolute; right: 14px; bottom: 12px; font-size: 9px; color: var(--text-3); }
.gr-quick {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin: 4px auto 22px; max-width: 880px;
}
.gr-quick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 18px; border-radius: 20px;
  background: var(--card); border: .5px solid var(--line-soft);
  color: var(--text); text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.gr-quick-card:hover { transform: translateY(-3px); box-shadow: 0 20px 45px -35px rgba(0,0,0,.5); border-color: var(--brand); text-decoration: none; }
.gr-quick-ic {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.gr-quick-card.gr-blue .gr-quick-ic { background: rgba(29,155,240,.12); color: #1d9bf0; }
.gr-quick-card.gr-red .gr-quick-ic { background: rgba(244,67,54,.12); color: #f44336; }
.gr-quick-card.gr-purple .gr-quick-ic { background: rgba(124,58,237,.12); color: #7c3aed; }
.gr-quick-title { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.gr-quick-desc { font-size: 11.5px; line-height: 1.4; color: var(--text-3); min-height: 32px; }
.gr-quick-count { margin-top: 4px; font-size: 10.5px; font-weight: 750; color: var(--brand); }
.gr-latest-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gr-latest-head h2 { font-size: 22px; letter-spacing: -.6px; margin: 2px 0 0; }
.gr-section-kicker { display: flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.gr-link { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--brand); }
.gr-empty { padding: 12px 0 30px; }
.gr-section-head {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.gr-back {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 36px; padding: 0 11px; border-radius: 11px;
  background: var(--card); border: .5px solid var(--line-soft);
  color: var(--text-2); font-size: 12.5px; font-weight: 700;
}
.gr-section-title { font-size: 32px; letter-spacing: -1px; margin: 2px 0; }
.gr-section-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; }
.gr-section-nav::-webkit-scrollbar { display: none; }
.gr-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 11px; border-radius: 999px;
  background: var(--card); border: .5px solid var(--line-soft);
  color: var(--text-2); font-size: 12px; font-weight: 650;
}
.gr-chip.active { background: var(--text); color: var(--card); border-color: transparent; }
.gr-chip-count { opacity: .65; font-size: 10.5px; }
.gr-compose-page { max-width: 760px; margin: 0 auto; }
.gr-compose-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.gr-form { padding: 20px; }
.gr-form-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: 12px; padding: 5px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 10.5px; font-weight: 800;
}
.gr-form .field { margin-bottom: 11px; }
.gr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gr-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.gr-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.gr-form-error { color: var(--danger); font-size: 12px; margin: 8px 0; }
.gr-form .btn.primary { margin-top: 6px; }
@media (max-width: 900px) {
  .gr-hero { grid-template-columns: 1fr; }
  .gr-title { font-size: 38px; }
}
@media (max-width: 640px) {
  .gr-page { padding: 0 2px 18px; }
  .gr-hero-copy { border-radius: 20px; padding: 20px; }
  .gr-title { font-size: 34px; }
  .gr-quick { grid-template-columns: 1fr; gap: 8px; }
  .gr-quick-card { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 13px; }
  .gr-quick-ic { width: 38px; height: 38px; margin: 0 4px 0 0; }
  .gr-quick-desc { flex: 1 0 100%; min-height: 0; padding-left: 42px; }
  .gr-quick-count { padding-left: 42px; }
  .gr-section-title { font-size: 26px; }
  .gr-fields { grid-template-columns: 1fr; }
  .gr-form { padding: 14px; }
}
.story-camera .story-video { object-fit: contain !important; background: #000; }

/* menú de historia por encima de las zonas de navegación */
.story-viewer .sv-head { z-index: 12 !important; }
.story-viewer .sv-nav { top: 66px !important; bottom: 76px !important; z-index: 2 !important; }
.sv-menu { z-index: 30 !important; pointer-events: auto !important; }
.sv-menu .ico { pointer-events: none; }
.sv-bars { z-index: 4; }

/* --------------------------- instalación PWA ------------------------------ */
.install-banner:not(.hide) { display: flex !important; z-index: 950; }
.ib-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.ib-help { white-space: nowrap; }
@media (max-width: 640px) {
  .install-banner { width: calc(100vw - 18px); padding: 10px; gap: 8px; }
  .ib-text span { font-size: 10.5px; }
  .ib-actions { flex-direction: column; align-items: stretch; }
  .ib-actions .btn { height: 30px; padding: 0 9px; font-size: 11px; }
  .ib-help { display: none; }
  body[data-route="storycompose"] .install-banner { display: none !important; }
}
.install-page { max-width: 760px; margin: 0 auto; }
.install-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 28px 22px; border-radius: 26px; margin-bottom: 14px;
  background:
    radial-gradient(100% 100% at 50% 0%, rgba(29,155,240,.28), transparent 60%),
    #0b1220; color: #fff;
}
.install-logo { width: 74px; height: 74px; border-radius: 22px; margin: 0 auto 10px; display: block; box-shadow: 0 15px 35px -18px rgba(0,0,0,.8); }
.install-hero .gr-section-kicker { justify-content: center; color: rgba(255,255,255,.65); }
.install-hero h1 { font-size: 32px; letter-spacing: -1px; margin: 8px 0; }
.install-hero p { max-width: 520px; margin: 0 auto 16px; color: rgba(255,255,255,.7); font-size: 13.5px; line-height: 1.5; }
.install-hero .btn { background: #fff; color: #0b1220; }
.install-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.install-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 16px;
  background: var(--card); border: .5px solid var(--line-soft);
}
.install-step-num {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
}
.install-step-title { font-size: 14px; font-weight: 750; }
.install-step p { margin: 2px 0 0; line-height: 1.4; }
.install-note {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px;
  background: var(--card-2); color: var(--text-2); font-size: 11.5px; line-height: 1.45;
}
.install-note .ico { flex: none; margin-top: 1px; }
@media (max-width: 640px) {
  .install-hero { padding: 22px 16px; border-radius: 20px; }
  .install-hero h1 { font-size: 26px; }
}
.tb-back { flex: none; margin-right: 2px; }
@media (max-width: 767px) {
  .tb-back { width: 34px; height: 34px; }
}
.install-banner { top: calc(var(--topbar-h) + 10px); bottom: auto; z-index: 950; }
@media (max-width: 767px) {
  .install-banner { top: calc(var(--topbar-h) + 6px); bottom: auto; }
}
body[data-route="install"] .install-banner { display: none !important; }
body.has-pwa-alert .main { padding-top: calc(var(--topbar-h) + 96px) !important; }
body.has-pwa-alert .main.only-feed { padding-top: calc(var(--topbar-h) + 96px) !important; }
@media (max-width: 767px) {
  body.has-pwa-alert .main { padding-top: calc(var(--topbar-h) + 104px) !important; }
}
