/* ==========================================================================
   EASTER EGGS: toast, modo root, consola de API
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 90;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 2rem);
  padding: 0.6rem 1rem;
  border: 1px solid var(--blue);
  background: var(--bg);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--base) ease, transform var(--base) var(--ease);
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Modo root: el estado pasa a verde */
:root[data-root] .panel__status .dot { background: #22c55e; }
:root[data-root] .panel__status .dot::after { border-color: #22c55e; }
:root[data-root] #status-text { color: #22c55e; }

/* Tormenta de paquetes */
.net.is-storm .net__nodes circle { fill: var(--blue); }
.net.is-storm .net__links line { stroke: var(--blue); }
.net__nodes .hub:hover { r: 8; }

/* Consola de API */
.api {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 6, 14, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade var(--fast) ease both;
}

.api[hidden] { display: none; }

.api__box {
  width: min(680px, 100%);
  height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--ink);
  animation: pop var(--base) var(--ease) both;
}

.api__bar {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
}

.api__out {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  line-height: 1.6;
}

.api__line { margin-bottom: 0.35rem; word-break: break-word; }
.api__line .dim { color: var(--ink-3); }
.api__line .ok { color: var(--blue); }
.api__line .err { color: #ef4444; }
.api__line pre { margin: 0.2rem 0 0.6rem; white-space: pre-wrap; color: var(--ink-2); }
.api__line pre i { font-style: normal; color: var(--blue); }

.api__in {
  display: flex;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--line);
}

.api__ps { color: var(--blue); white-space: nowrap; }

.api__in input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  outline: none;
}
