/* ═══════════════════════════════════════════════════════════════════
   Phase Z — Verschmelzung + Feature-Tiefe + Bot-Proaktivität
   ═══════════════════════════════════════════════════════════════════ */

/* ── Prompt-Wuerfel: Kategorie-Chip ──────────────────────────────── */
.prompt-cat-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  font-weight: 500;
}

/* ── Pet-Rock: State-Indikator ───────────────────────────────────── */
.rock-state-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 100px;
  margin-top: 0.4rem;
  font-weight: 500;
}
.rock-state-hungrig    { color: var(--warning); background: rgba(217, 119, 87, 0.1); }
.rock-state-zufrieden  { color: var(--success); background: rgba(122, 139, 111, 0.1); }
.rock-state-gelangweilt{ color: var(--ink-dim); background: rgba(107, 100, 89, 0.1); }
.rock-state-verschwunden { color: var(--danger); background: rgba(181, 67, 52, 0.1); }
.rock-trick-text {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--accent);
  font-size: 0.78rem;
  margin-top: 0.5rem;
  display: block;
}

/* ── Mood-Ring 4D: 4 Sub-Ringe ───────────────────────────────────── */
.mood4d-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.5rem 0;
}
.mood4d-cell {
  text-align: center;
  padding: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.mood4d-cell-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.2rem;
}
.mood4d-cell-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 0.1rem;
}
.mood4d-svg-mini {
  width: 60px;
  height: 60px;
}

/* ── Memory-Highlights Card ──────────────────────────────────────── */
.memory-highlights {
  margin-top: 1.5rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.memory-highlights-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 460;
  color: var(--ink);
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.memory-highlights-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}
.memory-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem;
}
.memory-hi-item {
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 200ms, transform 150ms;
}
.memory-hi-item:hover {
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}
.memory-hi-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--ink-dimmer);
  display: block;
  margin-top: 0.4rem;
}

/* ── Web-Chat Live-Mode (Block B) ────────────────────────────────── */
.webchat-shell {
  display: flex;
  flex-direction: column;
  height: 70vh;
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
}
.webchat-header {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  background: linear-gradient(180deg, var(--bg-card), var(--bg));
}
.webchat-header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}
.webchat-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.webchat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
}
.webchat-msg {
  max-width: 75%;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  animation: msgFadeIn 280ms ease-out;
}
@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.webchat-msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}
.webchat-msg-assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.webchat-msg-system {
  align-self: center;
  background: transparent;
  color: var(--ink-dimmer);
  font-style: italic;
  font-size: 0.78rem;
  max-width: 90%;
  padding: 0.3rem 0.5rem;
}
.webchat-msg-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-dimmer);
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
}
.webchat-msg-user .webchat-msg-meta { color: rgba(255,255,255,0.7); }
.webchat-tool-event {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  background: var(--bg-hover);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  border-left: 2px solid var(--accent);
  max-width: 80%;
  animation: msgFadeIn 200ms ease-out;
}
.webchat-typing {
  align-self: flex-start;
  display: flex;
  gap: 0.3rem;
  padding: 0.7rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.webchat-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-dimmer);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.webchat-typing span:nth-child(2) { animation-delay: 0.15s; }
.webchat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.webchat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.webchat-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-heavy);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: none;
  min-height: 42px;
  max-height: 140px;
}
.webchat-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.webchat-send-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms;
  flex-shrink: 0;
}
.webchat-send-btn:hover { background: var(--accent-hover); }
.webchat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 720px) {
  .webchat-shell { height: calc(100vh - 200px); min-height: 360px; }
  .webchat-msg { max-width: 88%; font-size: 0.85rem; }
  .webchat-input { font-size: 16px; /* iOS zoom prevention */ }
}

/* ── Avatar omnipresent (Block A.5) ──────────────────────────────── */
.akh-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
}
.akh-avatar-mini::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
  animation: avatarBreath 4s ease-in-out infinite;
}
@keyframes avatarBreath {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50%      { transform: scale(1.0);  opacity: 0.85; }
}

/* When real PNG avatar is used: */
.akh-avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
}
.akh-avatar-img.lg { width: 36px; height: 36px; }
.akh-avatar-img.xl { width: 64px; height: 64px; }

/* Header avatar inline */
.header-akh-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
  object-fit: cover;
}

/* Activity ribbon ── Phase Z.G */
.dashboard-activity-ribbon {
  margin: 0.6rem 0 0;
  padding: 0.4rem 0.8rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink);
  display: none;
}
.dashboard-activity-ribbon.active { display: block; animation: msgFadeIn 300ms ease-out; }
