/* Pueblo Generativo — UI moderna de monitoreo */

:root {
  --night: #0f1419;
  --teal: #0f766e;
  --teal-soft: #14b8a6;
  --line: #d5dee6;
  --mute: #3f4f5c;
  --fog: #f4f7f9;
  --white: #ffffff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(20, 184, 166, 0.16), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(15, 20, 25, 0.06), transparent 50%),
    linear-gradient(180deg, #eef3f6 0%, var(--fog) 45%, #e9eef2 100%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.shell-enter {
  animation: rise 0.55s var(--ease) both;
}

.app-header {
  position: sticky;
  top: 0.65rem;
  z-index: 50;
  box-shadow: 0 8px 28px rgba(15, 20, 25, 0.06);
  /* El sticky no debe robar clics al mapa/avatares debajo */
  pointer-events: none;
}

.app-header a,
.app-header button,
.app-header select,
.app-header input,
.app-header textarea,
.app-header [role="button"],
.app-header .status-chip,
.app-header .clock-block,
.app-header .live-metric {
  pointer-events: auto;
}

.live-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(213, 222, 230, 0.7);
  min-width: 0;
}

@media (min-width: 720px) {
  .live-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.75rem 1.25rem 1rem;
  }
}

.live-metric {
  min-width: 0;
  overflow: hidden;
  padding: 0.45rem 0.55rem;
  border-radius: 0.75rem;
  background: rgba(244, 247, 249, 0.9);
  border: 1px solid transparent;
}

.live-metric-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.live-metric-value {
  display: block;
  margin-top: 0.1rem;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--night);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-metric-value[data-warn="1"] {
  color: #b45309;
}

.live-metric-bar {
  margin-top: 0.35rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.live-metric-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.45s var(--ease);
}

.shell-enter-delay {
  animation-delay: 0.08s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

.live-pip {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #94a3b8;
}

.live-pip.is-live {
  background: var(--teal-soft);
  animation: pulse-soft 1.6s ease-in-out infinite;
}

.clock-block {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(160deg, #ffffff, #f0f6f5);
  padding: 0.7rem 1rem;
  min-width: 10.5rem;
}

.btn {
  border-radius: 0.85rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), opacity 0.18s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  background: #0d9488;
}

.btn-ghost {
  background: #fff;
  color: var(--night);
  border: 1px solid var(--line);
}

.btn-ghost:hover:not(:disabled) {
  border-color: #b7c5d0;
  background: #f8fafb;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.55rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.status-chip[data-state="running"] {
  border-color: rgba(20, 184, 166, 0.35);
  background: #f0fdfa;
  color: var(--teal);
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #94a3b8;
}

.status-chip[data-state="running"] .status-dot {
  background: var(--teal-soft);
  animation: pulse-soft 1.4s ease-in-out infinite;
}

.panel {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(213, 222, 230, 0.95);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.15rem;
  min-width: 0;
}

.panel-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.panel-head h2,
.panel-head p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  max-height: min(68vh, 720px);
  padding: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: #b8c5cf transparent;
}

.count-chip {
  display: inline-flex;
  min-width: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: #ccfbf1;
  color: var(--teal);
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.count-chip-alt {
  background: #e2e8f0;
  color: #334155;
}

.empty-hint {
  padding: 1.5rem 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* Agents */
.agent-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  border: 1px solid transparent;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 0.85rem 0.95rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  animation: fade-in 0.35s var(--ease) both;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
}

.agent-row:hover {
  border-color: rgba(15, 118, 110, 0.22);
  transform: translateY(-1px);
}

.agent-row:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.55);
  outline-offset: 2px;
}

.agent-row.is-sleeping .agent-action {
  color: var(--mute);
  font-style: italic;
}

.agent-avatar {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.agent-name {
  font-family: Syne, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--night);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-occupation {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  overflow-wrap: anywhere;
}

.agent-action {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #1e293b;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.agent-location {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--mute);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-location strong {
  font-weight: 600;
  color: #334155;
}

/* Feed / timeline */
.log-item {
  position: relative;
  padding: 0.7rem 0.85rem 0.7rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  background: #f8fafc;
  animation: fade-in 0.3s var(--ease) both;
  min-width: 0;
  overflow: hidden;
}

.log-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 3px;
  border-radius: 999px;
  background: #cbd5e1;
}

.log-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.log-message {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #1e293b;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-movement {
  background: #f0f7fb;
}

.log-movement::before { background: #38bdf8; }

.log-movement .log-message { color: #0c4a6e; }

.log-dialogue {
  background: #f0fdfa;
}

.log-dialogue::before { background: var(--teal-soft); }

.chat-bubble {
  display: inline-block;
  max-width: 100%;
  margin-top: 0.15rem;
  border-radius: 1rem 1rem 1rem 0.35rem;
  background: var(--teal);
  color: #fff;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-reflection {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.log-reflection::before { background: #fb923c; }

.reflection-text {
  font-family: Syne, system-ui, sans-serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
  color: #9a3412;
}

.log-social {
  background: #f8fafc;
}

.log-social::before { background: #64748b; }

.log-plan::before { background: var(--teal); }

.log-tick {
  opacity: 0.78;
  background: transparent;
  border: 1px dashed var(--line);
}

.log-tick .log-message {
  font-size: 0.8rem;
  color: var(--mute);
}

.log-system {
  background: #fff;
  border: 1px dashed var(--line);
}

.log-system::before { background: #94a3b8; }

@media (max-width: 640px) {
  .panel-body {
    max-height: 52vh;
  }

  .models-pull-row {
    flex-direction: column;
    align-items: stretch;
  }

  .installed-actions {
    width: 100%;
  }

  .installed-actions .btn {
    flex: 1;
  }
}

/* Models panel — flujo guiado */
.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 0.7rem;
}

.btn-danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
}

.btn-active-state {
  background: #ccfbf1;
  color: var(--teal);
  border: 1px solid rgba(15, 118, 110, 0.25);
  cursor: default;
  opacity: 1;
}

.models-panel .panel-body {
  max-height: none;
}

.models-body {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding-bottom: 1.35rem;
}

.models-toast {
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  animation: fade-in 0.25s var(--ease) both;
}

.models-toast[data-kind="ok"] {
  border: 1px solid rgba(15, 118, 110, 0.3);
  background: #f0fdfa;
  color: #115e59;
}

.models-toast[data-kind="error"] {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.models-howto {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0.85rem 1rem;
  list-style: none;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #475569;
}

.models-howto strong {
  color: var(--night);
}

.models-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-family: Syne, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--night);
}

.models-section-title-inline {
  margin-bottom: 0.15rem;
}

.models-step {
  border-top: 1px solid var(--line);
  padding-top: 1.15rem;
}

.models-step-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.65rem;
  background: var(--teal);
  color: #fff;
  font-family: Syne, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.models-step-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--mute);
}

.now-using-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .now-using-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .now-using-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.now-card {
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: #fff;
}

.now-card-chat {
  border-color: rgba(15, 118, 110, 0.35);
  background: linear-gradient(160deg, #f0fdfa, #ffffff);
}

.now-card-reasoning {
  border-color: rgba(30, 64, 175, 0.28);
  background: linear-gradient(160deg, #eef2ff, #ffffff);
}

.now-card-embed {
  background: linear-gradient(160deg, #f8fafc, #ffffff);
}

.now-card-role {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.now-card-name {
  margin: 0.4rem 0 0.25rem;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  word-break: break-all;
  color: var(--night);
}

.now-card-chat .now-card-name {
  color: var(--teal);
}

.now-card-reasoning .now-card-name {
  color: #1e40af;
}

.now-card-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--mute);
}

.catalog-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

@media (min-width: 720px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.9rem 1rem;
}

.catalog-card[data-role="chat"] {
  border-color: rgba(15, 118, 110, 0.22);
}

.catalog-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.catalog-role {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.catalog-card[data-role="embed"] .catalog-role {
  color: #64748b;
}

.catalog-state {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--mute);
}

.catalog-title {
  margin: 0;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--night);
}

.catalog-id {
  margin: 0;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #64748b;
}

.catalog-note {
  margin: 0.15rem 0 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--mute);
  flex: 1;
}

.catalog-actions {
  margin-top: auto;
}

.catalog-status.is-on {
  display: inline-flex;
  align-items: center;
  border-radius: 0.65rem;
  background: #ccfbf1;
  color: var(--teal);
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.models-pull-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
}

.models-input {
  flex: 1;
  min-width: 12rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--night);
  padding: 0.65rem 0.85rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
}

.models-input:focus {
  outline: 2px solid rgba(20, 184, 166, 0.35);
  outline-offset: 1px;
}

.pull-progress {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
}

.pull-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.pull-progress-track {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.pull-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-soft));
  transition: width 0.25s var(--ease);
}

.installed-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.installed-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.9rem 1rem;
  animation: fade-in 0.3s var(--ease) both;
}

.installed-row.is-active {
  border-color: rgba(15, 118, 110, 0.45);
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.12);
}

.installed-name {
  font-family: Syne, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--night);
}

.installed-meta {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--mute);
}

.installed-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.role-badge {
  display: inline-flex;
  border-radius: 0.45rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.role-badge-chat {
  background: #ccfbf1;
  color: var(--teal);
}

.role-badge-embed {
  background: #e2e8f0;
  color: #334155;
}

.role-badge-idle {
  background: #f1f5f9;
  color: #94a3b8;
}

.installed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* --- LLM provider / slots --- */

.provider-tabs {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 700px) {
  .provider-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.provider-tab {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.95rem 1.05rem;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.provider-tab:hover {
  border-color: rgba(15, 118, 110, 0.35);
}

.provider-tab.is-active {
  border-color: rgba(15, 118, 110, 0.55);
  background: linear-gradient(160deg, #f0fdfa, #ffffff);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.provider-tab-title {
  display: block;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--night);
}

.provider-tab-desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--mute);
}

.provider-panel[hidden] {
  display: none !important;
}

.slot-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.slot-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slot-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.models-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--night);
  padding: 0.65rem 0.85rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
}

.models-select:focus {
  outline: 2px solid rgba(20, 184, 166, 0.35);
  outline-offset: 1px;
}

.models-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--mute);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 0.35rem;
}

.check-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
}

.api-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.apply-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 1rem;
  background: linear-gradient(160deg, #f0fdfa, #ffffff);
}

.apply-title {
  margin: 0;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--night);
}

.apply-desc {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--mute);
}

/* --- Beliefs / rumores (Fase 1) --- */

.beliefs-head {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.beliefs-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.beliefs-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0.15rem;
  color: var(--teal);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.linkish:hover {
  color: #0d9488;
}

.beliefs-body {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

@media (min-width: 800px) {
  .beliefs-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.belief-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(160deg, #f8fafc, #ffffff);
  padding: 0.9rem 1rem;
  min-width: 0;
  overflow: hidden;
}

.belief-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  min-width: 0;
}

.belief-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--night);
  line-height: 1.25;
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.belief-cov {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  flex: 0 0 auto;
  white-space: nowrap;
}

.belief-cov[data-band="low"] { color: #b45309; }
.belief-cov[data-band="mid"] { color: #0f766e; }
.belief-cov[data-band="high"] { color: #0d9488; }
.belief-cov[data-band="full"] { color: #047857; }

.cov-track {
  height: 0.35rem;
  margin: 0 0 0.55rem;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
}

.cov-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width 0.55s var(--ease);
}

.cov-fill[data-band="low"] { background: linear-gradient(90deg, #d97706, #f59e0b); }
.cov-fill[data-band="mid"] { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.cov-fill[data-band="high"] { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.cov-fill[data-band="full"] { background: linear-gradient(90deg, #047857, #10b981); }

.beliefs-overview {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.05rem 1.05rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(204, 251, 241, 0.35), transparent 42%),
    linear-gradient(180deg, #fbfcfd, #f4f7f9);
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 960px) {
  .beliefs-overview {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    align-items: start;
  }
}

.beliefs-overview-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.ov-ring {
  position: relative;
  width: 5.25rem;
  height: 5.25rem;
  flex: 0 0 auto;
}

.ov-ring-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ov-ring-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 3.2;
}

.ov-ring-fg {
  fill: none;
  stroke: #0f766e;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.7s var(--ease);
}

.ov-ring[data-band="low"] .ov-ring-fg { stroke: #d97706; }
.ov-ring[data-band="mid"] .ov-ring-fg { stroke: #0f766e; }
.ov-ring[data-band="high"] .ov-ring-fg { stroke: #0d9488; }
.ov-ring[data-band="full"] .ov-ring-fg { stroke: #047857; }

.ov-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.ov-ring-center strong {
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--night);
  line-height: 1;
}

.ov-ring-center span {
  margin-top: 0.15rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.beliefs-overview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  min-width: 0;
}

.ov-stat {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.5rem 0.6rem;
  min-width: 0;
  overflow: hidden;
}

.ov-stat-leader {
  grid-column: 1 / -1;
}

.ov-stat-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-stat strong {
  display: block;
  margin-top: 0.12rem;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1.05rem;
  color: var(--night);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-stat-sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--teal);
}

.beliefs-chart-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.cov-bars-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.cov-bars-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mute);
}

.cov-bars-legend i {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #94a3b8;
}

.cov-bars-legend i[data-band="low"] { background: #f59e0b; }
.cov-bars-legend i[data-band="mid"] { background: #0f766e; }
.cov-bars-legend i[data-band="high"] { background: #2dd4bf; }
.cov-bars-legend i[data-band="full"] { background: #10b981; }

.cov-bars-legend em {
  font-style: normal;
  opacity: 0.45;
}

.cov-avg-mark {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-left: 2px dashed #64748b;
}

.cov-bars {
  display: grid;
  gap: 0.55rem;
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.15rem;
  min-width: 0;
}

.cov-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.65rem;
  align-items: center;
  animation: rise 0.45s var(--ease) both;
  animation-delay: var(--bar-delay, 0ms);
}

.cov-bar-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.cov-bar-name {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--night);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.cov-bar-nums {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.cov-bar-count {
  font-size: 0.68rem;
  color: var(--mute);
}

.cov-bar-pct {
  font-family: Syne, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal);
}

.cov-bar-pct[data-band="low"] { color: #b45309; }
.cov-bar-pct[data-band="full"] { color: #047857; }

.cov-bar-track {
  position: relative;
  height: 0.55rem;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
  min-width: 0;
}

.cov-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width 0.65s var(--ease);
}

.cov-bar-fill[data-band="low"] { background: linear-gradient(90deg, #d97706, #f59e0b); }
.cov-bar-fill[data-band="mid"] { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.cov-bar-fill[data-band="high"] { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.cov-bar-fill[data-band="full"] { background: linear-gradient(90deg, #047857, #10b981); }

.cov-bar-avg {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 0;
  border-left: 1.5px dashed #64748b;
  opacity: 0.7;
  pointer-events: none;
  transform: translateX(-50%);
}

.cov-bar-hop {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--teal);
  white-space: nowrap;
}

.cov-bar-hop-mute {
  color: #94a3b8;
  font-weight: 600;
}

.hop-graph-wrap {
  margin-top: 0.75rem;
  padding: 0.6rem 0.65rem 0.55rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(213, 222, 230, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 249, 0.7));
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.hop-graph-caption {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.hop-graph {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  flex-shrink: 0;
}

.hop-depth-label {
  fill: #94a3b8;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: Outfit, system-ui, sans-serif;
}

.hop-halo {
  fill: rgba(20, 184, 166, 0.18);
  stroke: none;
}

.hop-circle {
  fill: #ccfbf1;
  stroke: #0f766e;
  stroke-width: 1.5;
}

.hop-node-seed .hop-circle {
  fill: #0f766e;
  stroke: #0d9488;
  stroke-width: 1.75;
}

.hop-node-seed .hop-initials {
  fill: #ecfeff;
}

.hop-initials {
  fill: #0f766e;
  font-size: 9px;
  font-weight: 700;
  font-family: Outfit, system-ui, sans-serif;
}

.hop-name {
  fill: var(--night);
  font-size: 8px;
  font-weight: 600;
  font-family: Outfit, system-ui, sans-serif;
}

.hop-time {
  fill: #64748b;
  font-size: 7px;
  font-family: Outfit, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.hop-node {
  animation: fade-in 0.4s var(--ease) both;
  animation-delay: calc(var(--hop-i, 0) * 45ms);
}

.hop-edge {
  stroke: #0f766e;
  stroke-width: 1.6;
  opacity: 0.85;
}

.hop-edge-soft {
  stroke: #94a3b8;
  stroke-dasharray: 3 3;
  opacity: 0.75;
}

.hop-arrow {
  fill: #0f766e;
}

.belief-statement {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--night);
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.belief-holders {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.belief-chip {
  display: inline-flex;
  max-width: 100%;
  border-radius: 0.5rem;
  background: #ccfbf1;
  color: #0f766e;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-belief {
  border-left: 3px solid #0d9488;
  background: #f0fdfa;
}

.inject-form {
  margin: 0 1rem 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  background: #f8fafc;
}

.inject-form-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .inject-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inject-field-wide {
    grid-column: 1 / -1;
  }
}

.inject-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  border: 0;
  padding: 0;
  min-width: 0;
}

.inject-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.inject-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--night);
  padding: 0.65rem 0.85rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 4.5rem;
}

.inject-textarea:focus {
  outline: 2px solid rgba(20, 184, 166, 0.35);
  outline-offset: 1px;
}

.inject-seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
}

.inject-seed-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #334155;
}

.inject-seed-row input {
  accent-color: var(--teal);
}

.inject-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.inject-status {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.inject-status[data-kind="ok"] {
  color: #115e59;
}

.inject-status[data-kind="error"] {
  color: #991b1b;
}

.player-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 1rem 0;
}

.player-tab {
  border: 1px solid var(--line, #d5dee6);
  background: #fff;
  color: var(--mute, #5b6b78);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.player-tab.is-active {
  background: var(--teal, #0f766e);
  border-color: var(--teal, #0f766e);
  color: #fff;
}

.log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 1rem 0.15rem;
  border-bottom: 1px solid var(--line);
}

.log-filter {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--mute);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.log-filter:hover {
  border-color: #b7c5d0;
  color: var(--night);
}

.log-filter.is-active {
  background: #ccfbf1;
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--teal);
}

.log-player {
  background: #fff7ed;
}

.log-player::before {
  background: #ea580c;
}

.agent-row.is-map-focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18);
}

/* —— Mapa conceptual del pueblo —— */
.town-panel-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 1024px) {
  .town-panel-body {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  }
}

.town-map {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(6.5rem, auto);
  gap: 0.65rem;
  padding: 0.85rem;
  background:
    linear-gradient(160deg, rgba(240, 253, 250, 0.55), transparent 40%),
    linear-gradient(0deg, #f1f5f9 1px, transparent 1px),
    linear-gradient(90deg, #f1f5f9 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  background-color: #f8fafc;
  min-height: 14rem;
  max-height: none;
  overflow: auto;
}

@media (min-width: 560px) {
  .town-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(60vh, 560px);
  }
}

@media (min-width: 900px) {
  .town-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(7.5rem, auto);
    max-height: min(52vh, 520px);
  }
}

@media (min-width: 1100px) {
  .town-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.town-detail {
  border-top: 1px solid var(--line);
  padding: 0.85rem;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .town-detail {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.town-area {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.55rem 0.6rem 0.65rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.town-area:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 4px 14px rgba(15, 20, 25, 0.04);
}

.town-area--cafe { background: linear-gradient(165deg, #fff7ed, #fff); }
.town-area--park { background: linear-gradient(165deg, #ecfdf5, #fff); }
.town-area--plaza { background: linear-gradient(165deg, #f0f9ff, #fff); }
.town-area--library { background: linear-gradient(165deg, #f5f3ff, #fff); }
.town-area--shop { background: linear-gradient(165deg, #fef2f2, #fff); }
.town-area--home { background: linear-gradient(165deg, #f8fafc, #fff); }

.town-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-width: 0;
}

.town-area-name {
  margin: 0;
  min-width: 0;
  font-family: Syne, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--night);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.town-area-count {
  display: inline-flex;
  min-width: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
}

.town-area-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
}

.town-sub {
  flex: 1 1 5.2rem;
  min-width: 0;
  max-width: 100%;
  border: 1px dashed #dbe3ea;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.3rem 0.35rem 0.4rem;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.town-sub.has-agents {
  border-style: solid;
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(204, 251, 241, 0.35);
}

.town-sub.is-closed {
  border-style: solid;
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 226, 226, 0.45);
  opacity: 0.85;
}

.town-sub-state {
  display: inline-block;
  margin: 0 0 0.2rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b91c1c;
}

.town-sub-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.25rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.town-detail-idle-title {
  margin: 0;
  font-family: Syne, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--night);
}

.town-sub-agents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-height: 1.75rem;
  align-items: flex-start;
}

.town-limbo {
  border: 1px dashed #cbd5e1;
  border-radius: 0.85rem;
  padding: 0.5rem 0.65rem;
  background: #fff;
}

.town-agent {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
}

.town-agent-face {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.18);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.town-agent:hover .town-agent-face,
.town-agent.is-selected .town-agent-face {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15, 118, 110, 0.55);
}

.town-agent.is-sleeping .town-agent-face {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.town-agent-enter .town-agent-face {
  animation: town-pop 0.4s var(--ease) both;
}

@keyframes town-pop {
  from { transform: scale(0.55); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.town-agent-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.25rem);
  transform: translateX(-50%);
  z-index: 5;
  max-width: 10rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--night);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.55rem;
  padding: 0.2rem 0.4rem;
  box-shadow: 0 4px 10px rgba(15, 20, 25, 0.08);
  pointer-events: none;
}

.town-detail-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  min-width: 0;
}

.town-detail-avatar {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.town-detail-name {
  margin: 0;
  min-width: 0;
  font-family: Syne, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--night);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.town-detail-loc {
  margin: 0.2rem 0 0;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--mute);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.town-detail-action {
  margin: 0.45rem 0 0;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #1e293b;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

@media (max-width: 899px) {
  .town-area {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .town-area-name {
    font-size: 0.9rem;
  }

  .town-sub-label {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    color: #475569;
  }

  .town-sub {
    flex: 1 1 6rem;
    min-width: 0;
  }
}



