/* ============================================================
   GloxPin — pantalla Social (feed opcional) + pantalla Yo (perfil)
   ============================================================ */

.tick {
  width: 15px;
  height: 15px;
  margin-left: 3px;
  color: var(--accent);
  vertical-align: -2px;
  flex: 0 0 auto;
}

/* ---- Scroll wrapper compartido ----------------------------- */
.social-screen,
.yo-screen {
  height: 100%;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ================= SOCIAL: banner ============================ */
.social-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--ink-dim);
  flex: 0 0 auto;
}
.social-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: 0 0 auto;
}

/* ================= SOCIAL: estados ============================ */
.states-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px;
  flex: 0 0 auto;
  scrollbar-width: none;
}
.states-row::-webkit-scrollbar { display: none; }

.state-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 2px;
  flex: 0 0 auto;
  width: 68px;
  cursor: pointer;
  color: var(--ink);
  border-radius: 14px;
  transition: transform .12s var(--ease);
}
.state-item:active { transform: scale(.95); }
.state-item:focus-visible { outline: 2px solid var(--edge-hi); outline-offset: 3px; }

.state-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}
.state-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3px;
  display: flex;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
}
.state-ring-inner {
  flex: 1;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}
.state-avatar { --sz: 54px; }
.state-plus {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: 2px solid var(--bg);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.state-label {
  font-size: 11px;
  color: var(--ink-dim);
  max-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Visor fullscreen (⭐ panel de vidrio esmerilado) --------- */
.state-visor {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  animation: sheet-in .28s var(--ease) both;
}
.state-visor-track {
  height: 3px;
  margin: calc(10px + env(safe-area-inset-top, 0px)) 16px 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
  flex: 0 0 auto;
}
.state-visor-bar {
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 4s linear;
}
.state-visor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  flex: 0 0 auto;
}
.state-visor-avatar { --sz: 38px; }
.state-visor-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.state-visor-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.state-visor-time {
  font-size: 12px;
  color: var(--ink-dim);
}
.state-visor-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.state-visor-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.state-visor-close:active { transform: scale(.94); }

.state-visor-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
}
.state-visor-emoji {
  font-size: clamp(72px, 24vw, 128px);
  line-height: 1;
}
.state-visor-text {
  max-width: 420px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

/* ================= SOCIAL: feed ============================ */
.social-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.social-post {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.social-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-post-avatar { --sz: 40px; }
.social-post-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.social-post-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.social-post-time {
  font-size: 12px;
  color: var(--ink-dim);
}

.social-post-media {
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.social-post-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .12);
}
.social-post-emoji {
  font-size: clamp(56px, 14vw, 84px);
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3));
}

.social-grad-a { background: linear-gradient(135deg, var(--blob-1), var(--blob-2)); }
.social-grad-b { background: linear-gradient(135deg, var(--blob-2), var(--blob-3)); }
.social-grad-c { background: linear-gradient(135deg, var(--blob-3), var(--accent)); }
.social-grad-d { background: linear-gradient(135deg, var(--accent), var(--blob-1)); }

.social-post-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

.social-post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-like,
.social-comment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--ink-dim);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.social-like:hover,
.social-comment:hover { background: var(--glass-strong); border-color: var(--edge-hi); }
.social-like:active,
.social-comment:active { transform: scale(.96); }
.social-like svg,
.social-comment svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.social-like.is-liked {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.social-like.is-liked svg { fill: var(--accent); stroke: var(--accent); }
.social-like.pop svg { animation: like-pop .38s var(--ease); }
@keyframes like-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.social-empty {
  padding: 28px;
  text-align: center;
}

/* ================= YO ============================ */
.yo-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  flex: 0 0 auto;
}
.yo-mini-avatar { --sz: 52px; }
.yo-mini-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yo-mini-name {
  font-size: 16px;
  font-weight: 650;
  display: flex;
  align-items: center;
}
.yo-mini-pin {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: .04em;
}

.yo-section {
  padding: 16px;
  flex: 0 0 auto;
}
.yo-section-title {
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-dim);
  margin: 0 0 12px;
}

/* ---- Segmented control (Sobrio / Vivo) ------------------------ */
.seg {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--edge);
}
.seg-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  transition: transform .32s var(--ease);
  z-index: 0;
}
.seg-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  border: 0;
  background: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: color .2s var(--ease);
}
.seg-btn[aria-pressed="true"] { color: var(--ink); }
.seg-btn:active { transform: scale(.97); }

/* ---- Seguridad ------------------------------------------------ */
.yo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.yo-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--edge);
}
.yo-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.yo-list-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.yo-list-icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.yo-list-label { flex: 1; font-size: 14px; color: var(--ink); }
.yo-list-ok { color: var(--ok); font-weight: 700; font-size: 15px; }
.yo-soon { font-size: 12px; padding: 5px 12px; cursor: default; }
.yo-soon:hover { background: var(--glass); border-color: var(--edge); }

/* ---- Cuentas ---------------------------------------------------- */
.yo-accounts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.account-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.account-pill:hover { background: var(--glass-strong); }
.account-pill:active { transform: scale(.98); }
.account-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.account-pill-avatar { --sz: 36px; }
.account-pill-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.account-pill-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-pill-pin {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.account-pill-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  flex: 0 0 auto;
}

/* ---- Footer ------------------------------------------------------ */
.yo-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 0 4px;
  flex: 0 0 auto;
}
.yo-version {
  font-size: 12px;
  color: var(--ink-faint);
  margin: 0;
}

/* ---- Reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .state-visor, .social-like.pop svg { animation: none !important; }
}

/* ---- Mi idioma (18/07 noche) ------------------------------- */
.yo-lang-hint { font-size: 12.5px; color: var(--ink-faint); margin: 0 0 12px; line-height: 1.5; }
.yo-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.yo-lang { font-size: 13px; padding: 8px 13px; }
.yo-lang--on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 0 14px -4px var(--accent);
}

/* ---- Mi alias (editor) ------------------------------------- */
.yo-mini-alias { display: block; font-size: 13.5px; font-weight: 650; color: var(--accent); }
.yo-alias-row { display: flex; align-items: center; gap: 8px; }
.yo-alias-at {
  font-size: 18px; font-weight: 800; color: var(--accent);
  padding: 0 2px 0 6px; flex: 0 0 auto;
}
.yo-alias-input {
  flex: 1; min-width: 0;
  background: var(--glass); border: 1px solid var(--edge); border-radius: 14px;
  padding: 12px 14px; color: var(--ink); font: inherit; font-size: 16px; outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.yo-alias-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.yo-alias-hint { margin: 8px 2px 0; font-size: 12px; color: var(--ink-faint); line-height: 1.5; }
.yo-alias-hint.error { color: var(--danger); }

/* ---- Seguridad ------------------------------------------------ */
.seg-label {
  display: block;
  margin: 14px 0 6px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--txt-2, rgba(255, 255, 255, .62));
}

.seg-btn-wide {
  width: 100%;
  margin-top: 16px;
}

.seg-codigo {
  margin: 16px 0 10px;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--glass-line, rgba(255, 255, 255, .14));
  background: var(--glass-2, rgba(255, 255, 255, .06));
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  word-break: break-all;
}

#seg-msg.error,
#seg-msg2.error {
  color: var(--danger, #ff6b6b);
}
