/* ============================================================
   SANDIA VILLAGE — Panel del habitante (capa sobre village.css)
   ============================================================ */

.nav-project a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav-project a:hover { border-color: var(--flesh); }
.nav-link.as-button {
  background: none; border: none; cursor: pointer;
  font-family: var(--body); font-size: 14px;
  color: var(--cream-dim);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
  padding: 0;
}
.nav-link.as-button:hover { color: var(--cream); border-color: var(--flesh); }

/* ----- Cargando: los vecinos pasean mientras se comprueba la sesión ----- */
.boot-stage {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 20px 60px;
}
.boot-card { text-align: center; }
.boot-dolls {
  display: flex; justify-content: center; align-items: flex-end; gap: 10px;
  height: 84px; margin-bottom: 22px;
}
.boot-doll {
  width: 56px; height: auto; image-rendering: pixelated;
  position: relative; bottom: 0;
  animation: bootStep .52s ease-in-out infinite, bootSway .52s ease-in-out infinite, bootIn .5s var(--ease-out) both;
  animation-delay: calc(var(--i) * -0.09s), calc(var(--i) * -0.09s), calc(var(--i) * 0.06s);
}
@keyframes bootStep { 0%, 100% { bottom: 0; } 50% { bottom: 6px; } }
@keyframes bootSway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@keyframes bootIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.boot-text {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-faint); margin: 0;
}
.boot-dots i { font-style: normal; animation: bootDot 1.2s infinite; }
.boot-dots i:nth-child(2) { animation-delay: .2s; }
.boot-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes bootDot { 0%, 60%, 100% { opacity: 0.2; } 30% { opacity: 1; } }
.login-stage.is-in, .dash.is-in, #dash-view.is-in { animation: viewIn .35s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .boot-doll, .boot-dots i, .login-stage.is-in, #dash-view.is-in { animation: none; }
}
@media (max-width: 480px) { .boot-doll { width: 40px; } .boot-dolls { gap: 6px; height: 64px; } }

/* ----- Login ----- */
.login-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
  position: relative;
}
.login-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 480px at 50% -10%, rgba(82, 199, 118, 0.10), transparent 60%),
    radial-gradient(600px 420px at 80% 90%, rgba(239, 182, 68, 0.06), transparent 60%);
  pointer-events: none;
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}
.login-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.login-title em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--flesh); }
.login-sub { font-size: 14.5px; color: var(--cream-dim); margin: 0 0 22px; line-height: 1.55; }

.offline-banner {
  background: rgba(239, 182, 68, 0.08);
  border: 1px solid rgba(239, 182, 68, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--cream-dim);
  margin-bottom: 20px;
  line-height: 1.5;
}
.offline-banner b { color: var(--gold); }
.offline-banner a { color: var(--cream); border-bottom: 1px solid var(--flesh); }

.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin: 16px 0 8px;
}
.login-card .field-hint {
  display: inline;
  margin-left: 8px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--cream-faint);
  opacity: 0.8;
}
.login-card select, .login-card input, .whisper-card textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--cream);
  font-family: var(--body);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color .2s;
}
.login-card select:focus, .login-card input:focus, .whisper-card textarea:focus {
  outline: none;
  border-color: var(--leaf);
}
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 22px;
  background: var(--flesh);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 700;
  padding: 13px 20px;
  cursor: pointer;
  transition: background .2s, transform .2s var(--ease-out), opacity .2s;
}
.btn-primary:hover:not(:disabled) { background: var(--flesh-deep); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.form-error {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--flesh);
  background: rgba(255, 83, 72, 0.08);
  border: 1px solid rgba(255, 83, 72, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
}

/* ----- Selector de personaje (login) ----- */
.login-card { max-width: 560px; }
/* campo de contraseña con ojo para verla */
.pw-field { position: relative; }
.pw-field input { width: 100%; padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent;
  color: var(--cream-faint); cursor: pointer; display: grid; place-items: center;
  transition: color .2s, background .2s;
}
.pw-toggle svg { width: 20px; height: 20px; overflow: visible; }
.pw-toggle:hover { color: var(--cream); background: rgba(255, 255, 255, 0.05); }
.pw-toggle .eye-off { display: none; }
.pw-toggle.is-on .eye-off { display: block; }
.pw-toggle.is-on .eye-open { display: none; }

/* regla de los susurros: un aviso violeta con las Z de dormir, como en la crónica */
.login-rule {
  display: flex; align-items: center; gap: 14px;
  background: #3B2E6E; border: 1px solid #6A57B0; border-radius: 12px;
  padding: 12px 16px; margin: 0 0 22px;
  font-size: 14px; line-height: 1.5; color: var(--cream);
}
.login-rule p { margin: 0; }
.login-rule b { font-weight: 600; }
/* retrato de grupo del pueblo en la tarjeta de acceso */
.login-crowd {
  display: block; width: 100%; height: auto; aspect-ratio: 820 / 136; object-fit: contain; margin: 4px 0 18px;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

/* ----- Dashboard ----- */
.dash { padding-top: 108px; padding-bottom: 56px; }
.dash { display: grid; gap: 22px; }
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-col { display: grid; gap: 22px; min-width: 0; }
.dash-col > * { min-width: 0; }
.card-block { overflow-wrap: break-word; }

.card-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.block-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.hud-activity { margin: 0; font-size: 14px; color: var(--cream-dim); line-height: 1.55; }

.sheet-text { margin: 0 0 4px; font-size: 13.5px; color: var(--cream-dim); line-height: 1.6; }
.objectives { display: grid; gap: 10px; }
.objective {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cream-dim);
}
.objective .obj-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
  margin-top: 2px;
}
.objective .obj-tag.hoy { color: var(--leaf); border: 1px solid rgba(82, 199, 118, 0.35); }
.objective .obj-tag.semana { color: var(--gold); border: 1px solid rgba(239, 182, 68, 0.35); }
.objective .obj-tag.global { color: var(--sky); border: 1px solid rgba(111, 182, 217, 0.35); }
.objective.is-done { opacity: 0.55; }
.objective.is-done .obj-text { text-decoration: line-through; }


/* ----- Susurros ----- */
.whisper-history {
  display: grid;
  gap: 8px;
  min-height: 56px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  margin-bottom: 6px;
  padding-right: 4px;
}
.wh-empty { margin: 4px 0; font-size: 13px; color: var(--cream-faint); font-style: italic; }
.wh-bubble {
  /* la etiqueta del día arriba y el texto debajo, a todo el ancho (antes iban en fila y el texto quedaba en una columna estrecha) */
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--leaf);
  border-radius: 0 12px 12px 0;
  padding: 10px 14px 12px;
  font-family: var(--read, inherit);
  font-size: 14.5px;
  color: var(--cream-dim);
  line-height: 1.5;
  animation: rise .3s var(--ease-out) both;
}
.wh-bubble .wh-day {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leaf);
  border: 1px solid rgba(82, 199, 118, 0.35);
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
  margin-top: 1px;
  white-space: nowrap;
}
.wh-bubble.is-pending { border-left-color: var(--gold); }
.wh-bubble.is-pending .wh-day { color: var(--gold); border-color: rgba(239, 182, 68, 0.35); }

/* Susurro absorbido: la burbuja pendiente pasa de dorado a verde con un pulso */
@keyframes absorbPulse {
  0% {
    border-left-color: var(--gold);
    background: rgba(239, 182, 68, 0.12);
    box-shadow: 0 0 0 rgba(82, 199, 118, 0);
    transform: scale(1);
  }
  35% {
    border-left-color: var(--leaf);
    background: rgba(82, 199, 118, 0.18);
    box-shadow: 0 0 28px rgba(82, 199, 118, 0.4);
    transform: scale(1.015);
  }
  100% {
    border-left-color: var(--leaf);
    background: var(--bg-2);
    box-shadow: 0 0 0 rgba(82, 199, 118, 0);
    transform: scale(1);
  }
}
.wh-bubble.just-absorbed { animation: absorbPulse 2s var(--ease-out) both; }

.whisper-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.w-chip {
  font-family: var(--body);
  font-size: 12px;
  color: var(--cream-dim);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all .2s;
}
.w-chip:hover { border-color: var(--gold); color: var(--cream); transform: translateY(-1px); }
.whisper-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.whisper-counter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--cream-faint); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .2s; }
.wc-bar { width: 56px; height: 3px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.wc-bar i { display: block; height: 100%; width: 0; background: var(--leaf); border-radius: inherit; transition: width .15s, background .2s; }
.whisper-counter.is-active { color: var(--cream-dim); }
.whisper-counter.is-warn { color: var(--gold); }
.whisper-counter.is-warn .wc-bar i { background: var(--gold); }
.whisper-counter.is-full { color: var(--flesh); }
.whisper-counter.is-full .wc-bar i { background: var(--flesh); }
.whisper-card .field-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cream-faint);
  margin: 8px 0 0;
}
.whisper-card textarea { resize: vertical; }
.whisper-card .btn-primary { max-width: 320px; }

.personal-feed { max-height: 720px; overflow-y: auto; overflow-x: hidden; overscroll-behavior-x: none; scrollbar-width: thin; padding: 0 4px 0 0; }

/* ----- Toasts ----- */
.toasts {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 600;
  display: grid;
  gap: 10px;
}
/* ----- Entrada en la mente (tras iniciar sesión) ----- */
.enter-fx {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 60% at 50% 50%, rgba(59, 46, 110, 0.55), rgba(8, 20, 12, 0.96) 70%);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s ease;
}
.enter-fx.is-in { opacity: 1; }
.enter-fx.is-out { opacity: 0; transition-duration: .4s; }
/* velo previo mientras se confirma la sesión: solo las ondas, sin retrato ni nombre */
.enter-fx.is-pre { transition: none; }
.enter-fx.is-pre .enter-doll, .enter-fx.is-pre .enter-kicker, .enter-fx.is-pre .enter-name { animation: none; opacity: 0; }
.enter-scene { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.enter-ring {
  position: absolute; left: 50%; top: 72px;
  width: 160px; height: 160px; border-radius: 50%;
  border: 1.5px solid #B7A6E8;
  translate: -50% -50%; opacity: 0;
  animation: enterRing 2.2s ease-out infinite;
}
.enter-ring.r2 { animation-delay: .55s; }
.enter-ring.r3 { animation-delay: 1.1s; }
@keyframes enterRing { 0% { scale: 0.35; opacity: 0; } 15% { opacity: .75; } 100% { scale: 1.6; opacity: 0; } }
.enter-doll {
  position: relative; width: 144px; height: 144px;
  display: flex; align-items: flex-end; justify-content: center;
  filter: drop-shadow(0 0 22px rgba(183, 166, 232, 0.55));
  animation: enterDoll .9s var(--ease-out) both, enterFloat 2.4s ease-in-out .9s infinite;
}
.enter-doll img { width: 112px; height: auto; image-rendering: pixelated; }
.enter-doll span { font-family: var(--display); font-size: 56px; color: var(--cream); }
@keyframes enterDoll { from { opacity: 0; scale: 0.6; translate: 0 26px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes enterFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.enter-kicker {
  margin: 14px 0 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #B7A6E8; opacity: 0; animation: enterText .6s var(--ease-out) .35s both;
}
.enter-name {
  margin: 0; font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: -0.02em; line-height: 1.05;
  color: var(--cream); opacity: 0; animation: enterText .7s var(--ease-out) .5s both;
}
@keyframes enterText { from { opacity: 0; translate: 0 10px; letter-spacing: 0.06em; } to { opacity: 1; translate: 0 0; } }
.enter-name { animation-name: enterName; }
@keyframes enterName { from { opacity: 0; translate: 0 10px; letter-spacing: 0.08em; } to { opacity: 1; translate: 0 0; letter-spacing: -0.02em; } }
@media (max-width: 480px) { .enter-name { font-size: 34px; } .enter-doll img { width: 96px; } }

.toast {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--leaf);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--cream);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: rise .3s var(--ease-out) both;
  max-width: 340px;
}
.toast.error { border-left-color: var(--flesh); }

/* ----- Lobby ciudadano (registro) ----- */
.login-card textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--cream);
  font-family: var(--body);
  font-size: 15px;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color .2s;
}
.login-card textarea:focus { outline: none; border-color: var(--leaf); }
.switch-link { margin: 16px 0 0; text-align: center; }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--body); font-size: 14px; color: var(--cream-dim);
  border-bottom: 1px solid var(--flesh);
  transition: color .2s;
}
.link-btn:hover { color: var(--cream); }

/* ventana de susurros: abierta (duerme) o cuándo se abre */

/* ── Cabecera del personaje ───────────────────────────────── */
.hud-main { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hud-main .mb-avatar { width: 84px; height: 84px; display: grid; place-items: center; }
.hud-main .mb-avatar img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.avatar-initial { font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--cream-dim); }
.hud-id { min-width: 0; flex: 1 1 260px; }
.hud-id .mb-name { font-size: 24px; }
.hud-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; flex: 1 1 320px; max-width: 420px; margin-left: auto; }
.hud-now { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.hud-now-label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-faint); margin-bottom: 6px; }
.hud-activity { margin: 0; font-size: 15px; color: var(--cream); line-height: 1.55; }
.hud-now .tl-say { margin-top: 10px; }
.hud-now .tl-quote { font-size: 15px; }
.village-strip { margin: 16px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--cream-faint); }

/* ── Bloque de estado del susurro ─────────────────────────── */
.ws {
  display: flex; gap: 16px; align-items: center;
  border-radius: 14px; padding: 16px 18px; margin: 0 0 18px;
  border: 1px solid var(--line-strong); background: var(--bg-2);
  transition: background .3s, border-color .3s;
}
.ws-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.ws-ico svg { width: 22px; height: 22px; overflow: visible; }
.ws-ico .wb-zzz { transform: scale(0.85); }
.ws-body { min-width: 0; }
.ws-body b { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--cream); margin-bottom: 3px; }
.ws-body p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cream-dim); }
.ws.is-open { background: #3B2E6E; border-color: #6A57B0; }
.ws.is-open .ws-body p { color: #E4DDF8; }
.ws.is-open .ws-ico { background: rgba(255, 255, 255, 0.1); color: var(--cream); }
.ws.is-sent { background: rgba(82, 199, 118, 0.10); border-color: rgba(82, 199, 118, 0.45); }
.ws.is-sent .ws-ico { color: var(--leaf); background: rgba(82, 199, 118, 0.15); }
.ws.is-closed { background: rgba(239, 182, 68, 0.08); border-color: rgba(239, 182, 68, 0.4); }
.ws.is-closed .ws-ico { color: var(--gold); background: rgba(239, 182, 68, 0.14); }
.ws.is-locked { background: rgba(255, 83, 72, 0.08); border-color: rgba(255, 83, 72, 0.4); }
.ws.is-locked .ws-ico { color: var(--flesh); background: rgba(255, 83, 72, 0.14); }
.whisper-card .mb-section-title { margin-top: 26px; }
.wh-flag { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; align-self: center; }
.wh-flag.is-pending { color: var(--gold); }
.wh-flag.is-absorbed { color: var(--leaf); }

/* Safari (iPhone) toma la base del flex (320 px, 260 px) como ancho mínimo y ensanchaba toda la tarjeta
   más que la pantalla: ni las tarjetas del panel ni lo de dentro de la cabecera pueden pasar del ancho disponible */
.dash-grid > *, .hud-main > * { min-width: 0; }
@media (max-width: 720px) {
  .hud-vitals { max-width: none; margin-left: 0; flex-basis: 100%; }
  .hud-id { flex-basis: 100%; }
  .ws { align-items: flex-start; }
}

/* ── Historia: buscador y filtros ─────────────────────────── */
.hist-tools { display: grid; gap: 10px; margin: -4px 0 10px; }
.hist-searchbox { position: relative; }
.hist-lupa { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--cream-faint); pointer-events: none; }
.hist-search {
  width: 100%; font-family: var(--body); font-size: 14px; color: var(--cream);
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 44px 11px 42px;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.hist-search::-webkit-search-cancel-button { display: none; }
.hist-search:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(82, 199, 118, 0.15); }
.hist-search::placeholder { color: var(--cream-faint); }
.hist-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px;
  border: 0; border-radius: 8px; background: transparent; color: var(--cream-faint); cursor: pointer; display: grid; place-items: center;
}
.hist-clear svg { width: 16px; height: 16px; }
.hist-clear:hover { color: var(--cream); background: rgba(255, 255, 255, 0.06); }
.hist-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hist-label { flex: none; width: 30px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-faint); }
.hist-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px 0; }
.hist-chips::-webkit-scrollbar { display: none; }
.h-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--body); font-size: 12.5px; color: var(--cream-dim);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.h-chip i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--cream-faint); }
.h-chip i:empty { display: none; }
.h-chip s { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 6px var(--leaf); }
.h-chip:hover { border-color: var(--line-strong); color: var(--cream); }
.h-chip.is-on { background: var(--cream); color: var(--bg); border-color: var(--cream); font-weight: 600; }
.h-chip.is-on i { color: rgba(0, 0, 0, 0.55); }
.hist-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.hist-count, .hist-order { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--cream-faint); min-height: 14px; }
.hist-order { white-space: nowrap; }
.hist-dayhead { margin: 6px 0 2px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-faint); }
.hist-dayhead:first-child { margin-top: 0; }
.feed-wrap { position: relative; }
.feed-wrap::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--card)); border-radius: 0 0 12px 12px; }
.personal-feed { padding-bottom: 28px; }
.personal-feed mark { background: rgba(239, 182, 68, 0.28); color: var(--cream); border-radius: 3px; padding: 0 2px; }

/* ── Historia como línea de tiempo ────────────────────────── */
.personal-feed { padding: 4px 8px 28px 0; gap: 0; }
.personal-feed .hist-dayhead { margin: 14px 0 8px 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 58px 18px minmax(0, 1fr); gap: 0 10px; padding: 12px 0 14px; border-top: 1px solid var(--line); }
.tl-item:first-child, .hist-dayhead + .tl-item { border-top: 0; }
.tl-time { font-family: var(--mono); font-size: 11px; color: var(--cream-faint); padding-top: 3px; text-align: right; white-space: nowrap; }
.tl-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin: 5px auto 0; border-radius: 50%; background: var(--card); border: 2px solid var(--cream-faint); box-sizing: border-box; }
.tl-dot.dialogo { border-color: var(--sky); background: var(--sky); }
.tl-dot.viaje { border-color: var(--gold); }
.tl-dot.plan { border-color: var(--leaf); background: var(--leaf); }
.tl-dot.sueno { border-color: #B7A6E8; background: #B7A6E8; }
.tl-body { min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.tl-times { font-family: var(--mono); font-size: 10.5px; color: var(--cream-faint); }
.tl-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--cream-dim); }   /* lo que hace: más apagado que lo que dice */
.tl-quote { margin: 0; font-family: var(--read); font-size: 14.5px; line-height: 1.5; color: var(--cream); }
/* lo que dice: bocadillo, como en la crónica del pueblo (azul si habla con alguien) */
.tl-say { margin: 9px 0 0; padding: 8px 13px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); }
.tl-say.is-to { background: rgba(111, 182, 217, 0.10); border-color: rgba(111, 182, 217, 0.3); border-top-left-radius: 4px; }
.tl-say-meta { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-faint); }
.tl-say-meta b { font-weight: 500; color: var(--sky); }
/* su frase, con su avatar y su nombre, como las respuestas */
.tl-own { display: flex; align-items: flex-start; gap: 8px; min-width: 0; margin: 9px 0 0 -32px; }   /* el avatar cuelga a la izquierda y el bocadillo queda alineado con el texto de arriba */
.tl-own .tl-say { flex: 1; min-width: 0; margin-top: 0; }
.tl-own .mini-avatar, .tl-reply .mini-avatar { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 7px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); }
.tl-own .mini-avatar img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.tl-say-meta b.tl-me { color: var(--cream); }
/* respuestas de los demás debajo de su turno */
.tl-replies { display: grid; gap: 8px; margin: 10px 0 0 11px; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.tl-reply { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.tl-reply .mini-avatar { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 7px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); }
.tl-reply .mini-avatar img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.tl-reply-bubble { min-width: 0; flex: 1; padding: 8px 13px 10px; border-radius: 14px; border-top-left-radius: 4px; background: rgba(239, 182, 68, 0.07); border: 1px solid rgba(239, 182, 68, 0.25); }
.tl-reply-bubble .tl-say-meta b { color: var(--gold); }
.tl-route { margin: 6px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--gold); }
.tl-route span { color: var(--cream-faint); margin: 0 4px; }
.tl-diary summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 13.5px; color: var(--cream-dim); }
.tl-diary summary::-webkit-details-marker { display: none; }
.tl-more { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-faint); }
.tl-diary details[open] .tl-more { display: none; }
.tl-diary details[open] summary { color: var(--cream); }
.tl-diary .tl-text { margin-top: 8px; font-size: 13.5px; color: var(--cream-dim); }
/* en el móvil, la hora y el punto suben a la línea de la etiqueta («● 17:11 Diálogo») y el texto y el
   bocadillo ocupan todo el ancho (antes la columna de la hora dejaba un hueco grande a la izquierda) */
@media (max-width: 600px) {
  .tl-item { grid-template-columns: auto auto minmax(0, 1fr); gap: 6px 8px; align-items: center; padding: 12px 0 14px; }
  .tl-dot { grid-row: 1; grid-column: 1; margin: 0; }
  .tl-time { grid-row: 1; grid-column: 2; padding-top: 0; text-align: left; }
  .tl-body { display: contents; }
  .tl-body > * { grid-column: 1 / -1; }
  .tl-body > .tl-head { grid-row: 1; grid-column: 3; margin-bottom: 0; }
  .tl-own { margin-left: 0; }
}

/* ── Comentarios ──────────────────────────────────────────── */
.fb-card { position: relative; overflow: hidden; display: flex; gap: 18px; align-items: flex-start; padding-top: 28px; }
.fb-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: repeating-linear-gradient(135deg, var(--gold) 0 12px, #1c1a14 12px 24px); opacity: 0.85; }
.fb-worker { flex: none; width: 72px; display: grid; place-items: end center; padding-top: 6px; position: relative; }
.fb-worker::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -4px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); filter: blur(2px); }
.fb-worker img { width: 64px; height: 80px; image-rendering: pixelated; position: relative; z-index: 1; animation: workerBob 2.4s ease-in-out infinite; }
@keyframes workerBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.fb-body { min-width: 0; flex: 1; }
.fb-body .kicker { margin-bottom: 6px; }
.fb-h { margin: 0 0 6px; font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--cream); }
.fb-text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--cream-dim); }
@media (max-width: 400px) { .fb-card { flex-direction: column; } }
.btn-ghost-full {
  display: block; width: 100%; padding: 11px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--cream);
  font-family: var(--display); font-weight: 600; font-size: 14px; transition: border-color .2s, background .2s;
}
.btn-ghost-full:hover { border-color: var(--cream-faint); background: rgba(255, 255, 255, 0.04); }
.fb-modal { max-width: 520px; padding: 28px; }
.fb-title { margin: 6px 0 6px; font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--cream); }
.fb-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--cream-dim); }
.fb-form select, .fb-form input, .fb-form textarea {
  width: 100%; font-family: var(--body); font-size: 14.5px; color: var(--cream);
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; margin-bottom: 14px;
}
.fb-form select:focus, .fb-form input:focus, .fb-form textarea:focus { outline: none; border-color: var(--leaf); }
.fb-form textarea { resize: vertical; }
.fb-form .btn-primary { margin-top: 4px; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* «Conversaciones» en su historia: la misma lista plegable que la del pueblo (estilos .inbox de village.css) */
.hc-list { margin: 0; }
.hc-open { padding: 4px 6px 12px; background: rgba(255, 255, 255, 0.03); border-radius: 0 0 10px 10px; }
.hc-open .th-msgs { margin-top: 4px; }
.hc-more { display: block; margin: 4px auto 8px; padding: 4px 12px; border-radius: 999px; background: none; border: 1px solid var(--line-strong); color: var(--cream-dim); font-family: var(--mono); font-size: 11px; cursor: pointer; }
.hc-more:hover { border-color: var(--gold); color: var(--gold); }
.hc-list .th-msg { max-width: 92%; }
.hc-list .th-msg.is-b { margin-left: auto; flex-direction: row-reverse; }
.hc-list .inbox-row.is-open .inbox-last { display: none; }
/* en la burbuja en columna, la marca («en su mente», «guiando su día») va debajo, a la izquierda */
.wh-bubble .wh-flag { margin-left: 0; align-self: flex-start; }
