/* ==========================================================================
   LUDWIGSLUST · PLATFORM v1.0
   Frosted Marble-Glass Aesthetic (Zero-Green, Pure Slate/White/Silver Marble)
   ========================================================================== */

:root {
  --marble-bg: rgba(255, 255, 255, 0.88);
  --marble-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 246, 249, 0.84) 100%);
  --marble-border: rgba(255, 255, 255, 0.95);
  --marble-shadow: 0 16px 45px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.06);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bar-width: min(860px, 95vw);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: #0b1511;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.12) 42%, rgba(15, 23, 42, 0.6) 100%),
    url('/images/ludwigslust/schloss_real.jpg?v=clean');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── 1. UNIFIED LUDWIGSLUST LIVE TICKER & WEATHER STRIP (TOP: 0) ─── */
.city-ticker-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 38px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

/* ══ TICKER CHROME v7 — works on desktop AND mobile (new HTML: wordmark | track | right) ══ */
.ticker-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 0 0 auto;
  z-index: 6;
  padding: 0 10px 0 12px;
  height: 100%;
  line-height: 1;
  background: transparent;
  pointer-events: none;
  white-space: nowrap;
}
.ticker-wordmark-city {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.ticker-wordmark-sub {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1;
}
.ticker-right-cluster {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  z-index: 6;
  height: 100%;
  gap: 8px;
  padding: 0 10px 0 8px;
  margin-left: auto;
}
.ticker-track-container {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}
/* LIVE badge removed — weather only (nolive-v9) */
.city-ticker-strip .ticker-badge,
.city-ticker-strip .ticker-pulse-dot,
.city-ticker-strip .badge-live-label {
  display: none !important;
}

/* hide obsolete left-cluster if any leftover markup */
.ticker-left-cluster { display: none !important; }

.bar-impressum-btn { display: none !important; }
.impressum-side-tab { display: none !important; }

@media (max-width: 768px) {
  .city-ticker-strip {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }
  .ticker-wordmark {
    padding: 0 6px 0 8px;
    max-width: 42vw;
  }
  .ticker-wordmark-city {
    font-size: 13px;
  }
  .ticker-wordmark-sub {
    font-size: 6.5px;
    margin-top: 1px;
    letter-spacing: 0.14em;
  }
  .ticker-right-cluster {
    gap: 4px;
    padding: 0 6px 0 4px;
  }
  .ticker-badge {
    height: 16px;
    padding: 0 5px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .ticker-badge-text {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
  }
  .badge-city-prefix { display: none !important; }
  .ticker-pulse-dot { width: 4px; height: 4px; }
  .ticker-weather-btn {
    height: 16px;
    padding: 0 5px;
    font-size: 8px;
    margin: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
  }
  .ticker-weather-sub { display: none !important; }
  .ticker-marquee,
  .ticker-loading,
  .ticker-item {
    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: 0.01em;
  }
  .ticker-item {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .ticker-tag {
    font-size: 9px !important;
    padding: 0 5px !important;
  }
  .ticker-source {
    font-size: 10px !important;
  }
  .ticker-track-container button,
  .ticker-track-container [class*="regional"] {
    display: none !important;
  }
  .scenic-viewport { padding-top: 30px !important; }
  .sky-title-box { display: none !important; }

  /* impressum-hide-side-tab-v1 — no mobile right-edge IMPRESSUM tab */
  .impressum-side-tab {
    display: none !important;
  }
  .impressum-side-tab-text {
    display: none !important;
  }
  .impressum-side-tab:active,
  .impressum-side-tab:focus-visible {
    display: none !important;
  }
  body.mirror-open .impressum-side-tab {
    display: none !important;
  }

}

/* LIVE badge: no duplicate city name — logo is on the left */
.badge-city-prefix {
  display: none !important;
}

/* END TICKER CHROME v7 */


.ticker-left-cluster {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  z-index: 5;
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.35);
  padding-right: 8px;
  gap: 8px;
}

.ticker-cluster-top {
  display: flex;
  align-items: center;
  height: 100%;
  order: 2;
  gap: 8px;
}

.ticker-cluster-bottom {
  display: flex;
  align-items: center;
  height: 100%;
  order: 1;
}

/* Mobile-only Impressum button under LIVE/weather is hidden on desktop */
.ticker-mobile-legal-btn {
  display: none !important;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 100%;
  flex-shrink: 0;
}

.ticker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseDot 1.6s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

.ticker-badge-text {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-city-prefix {
  display: inline;
}

.badge-live-label {
  color: #ef4444;
  font-weight: 900;
}

/* Real-Time Weather Pill Button in Ticker */
.ticker-weather-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  color: #ffffff;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.ticker-weather-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.ticker-weather-sub {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.7rem;
}

.ticker-track-container {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-marquee {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
  animation: tickerScroll 240s linear infinite;
  padding-left: 20px;
}

.ticker-marquee:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f1f5f9;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 3px 10px;
  border-radius: 8px;
}

.ticker-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.ticker-tag {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}

.ticker-source {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 500;
}

.ticker-loading {
  font-size: 0.78rem;
  color: #cbd5e1;
  padding-left: 14px;
}

/* ── 2. MONUMENTAL SKY TITLE (LUDWIGSLUST · UNSERE STADT) ───────────────── */
.scenic-viewport {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 50px;
  pointer-events: none;
  text-align: center;
}

/* sky-subtitle compact under Ludwigslust (sky-sub-v3b) */
.sky-title-box {
  animation: fadeIn 0.45s ease-out;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sky-title {
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.75);
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  caret-color: transparent !important;
  outline: none !important;
}

.sky-subtitle {
  font-size: clamp(7px, 0.85vw, 11px);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 4px;
  font-weight: 700;
  letter-spacing: 0.62em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  caret-color: transparent !important;
  outline: none !important;
  /* ~Ludwig→g hook; natural text width (no max-width clip) */
  max-width: none;
  width: max-content;
  white-space: nowrap;
  align-self: flex-start;
}

/* ── 3. MELISA LIVE RESPONSE CARD (FROSTED MARBLE GLASS & MOBILE PERFECTION) ── */
.response-card-wrapper {
  position: fixed;
  bottom: 84px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  z-index: 120;
  animation: slideUpCard 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes slideUpCard {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.response-card {
  width: 100%;
  max-width: var(--bar-width);
  max-height: min(540px, calc(100dvh - 150px));
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 14px 18px 16px;
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  pointer-events: auto;
}

/* Card Header: Stable, Single-Row, Never Squished */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding-bottom: 9px;
  flex-shrink: 0;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.melisa-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
  padding: 3.5px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
  flex-shrink: 0;
}

.melisa-pill-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
  animation: melisaPulse 2s infinite ease-in-out;
}

@keyframes melisaPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.card-title-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.card-heading {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  height: 32px;
  padding: 0 11px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.card-audio-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.card-audio-btn.speaking {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

/* Soundwaves animation inside Stimme button */
.audio-soundwaves {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 11px;
}

.card-audio-btn.speaking .audio-soundwaves {
  display: inline-flex;
}

.card-audio-btn.speaking svg {
  display: none !important;
}

.wave-bar {
  width: 2px;
  background: #38bdf8;
  border-radius: 1px;
  animation: waveSound 0.8s ease-in-out infinite alternate;
}

.bar-1 { height: 4px; animation-delay: 0.1s; }
.bar-2 { height: 11px; animation-delay: 0.25s; }
.bar-3 { height: 7px; animation-delay: 0.4s; }

@keyframes waveSound {
  from { height: 3px; }
  to { height: 12px; }
}

.card-close-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.card-close-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

/* Scroll Body for Dialogue */
.card-scroll-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

/* User Message: Discrete, Compact Bubble (Not huge header text) */
.card-user-bubble-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.card-user-bubble {
  max-width: 88%;
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 14px 14px 4px 14px;
  padding: 6px 12px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.06);
}

.user-bubble-prefix {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #0284c7;
  color: #ffffff;
  padding: 1.5px 5px;
  border-radius: 5px;
  margin-top: 1px;
  flex-shrink: 0;
}

.user-bubble-content {
  font-size: 12.5px;
  font-weight: 600;
  color: #0369a1;
  line-height: 1.4;
  word-break: break-word;
}

.card-reply-text {
  font-size: 0.94rem;
  line-height: 1.58;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

.card-reply-text strong {
  color: #000000;
  font-weight: 800;
}

.card-reply-text em {
  color: #64748b;
  font-style: italic;
}

.card-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.card-chip {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-chip:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.card-chip.original-chip {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.card-chip.original-chip:hover {
  background: #b45309;
  color: #ffffff;
}

/* ── 4. LIGHT INPUT BAR: FROSTED MARBLE GLASS (ZERO-GREEN!) ────────────── */
.melisa-bottom-bar {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  z-index: 130;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.melisa-bar-container {
  width: 100%;
  max-width: var(--bar-width);
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid var(--marble-border);
  border-radius: 28px;
  padding: 5px 6px 5px 12px;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  box-shadow: var(--marble-shadow);
  pointer-events: auto;
}

.melisa-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.voice-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Language selector pill: DE / RU */
.lang-pill {
  height: 38px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff;
}

.lang-pill:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* Legal & Impressum pill in bottom bar (legacy class kept harmlessly) */
.legal-bar-pill {
  display: none;
}

/* Document Upload Button */
.doc-upload-btn {
  height: 38px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff;
}

.doc-upload-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

.doc-btn-label {
  font-size: 0.74rem;
  font-weight: 700;
}

/* Microphone Action Button */
.mic-action-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff;
}

.mic-action-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

.mic-action-btn.listening {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mic-label {
  font-size: 12.5px;
  font-weight: 700;
}

/* Text Input Field */
.melisa-text-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}

.melisa-text-input::placeholder {
  color: #64748b;
  font-size: 0.9rem;
}

/* Right Tools Cluster */
.bar-right-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Vertical divider stroke separating input text from mic/send */
.input-action-sep {
  display: inline-block;
  width: 1.5px;
  height: 22px;
  background: rgba(148, 163, 184, 0.45);
  margin: 0 4px 0 2px;
  border-radius: 1px;
}

/* Send CTA Button — Marble Glass (ZERO-GREEN) */
.send-cta-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 #ffffff;
}

.send-cta-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15), inset 0 1px 0 #ffffff;
  transform: translateY(-1px);
  color: #000000;
}

/* impressum-ghost-v1 — transparent text-only legal trigger */
.corner-legal-pill {
  position: fixed;
  bottom: 14px;
  right: 18px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border-radius: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: color 0.15s ease, opacity 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.corner-legal-pill:hover {
  background: transparent;
  color: #ffffff;
  border: none;
  box-shadow: none;
  transform: none;
  opacity: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 2px 12px rgba(0, 0, 0, 0.5);
}

.corner-legal-icon {
  font-weight: 800;
  font-size: 12px;
  color: rgba(186, 230, 253, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.corner-legal-text {
  letter-spacing: 0.03em;
  font-weight: 650;
}


/* Ticker Header Legal Button */
.ticker-legal-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  margin-right: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.ticker-legal-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── 5. BOTTOM LEGAL ANCHOR (DEPRECATED - MOVED TO TOP TICKER BAR) ─── */
.bottom-legal-anchor {
  display: none !important;
}

/* ── 6. AUSFÜLLHILFE MODAL ────────────────────────────────────────────── */

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.form-modal.active {
  display: flex;
}

.form-paper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.form-paper-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-paper-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.form-paper-title p {
  font-size: 0.74rem;
  font-weight: 700;
  color: #c1121f;
  text-transform: uppercase;
}

.modal-close-btn {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-main);
}

.form-paper-body {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.form-group input, .form-group select, .form-group textarea {
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.form-watermark-notice {
  background: #fff8e6;
  border: 1px solid #ffd166;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #7a5200;
  line-height: 1.45;
}

.form-paper-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.privacy-badge-local {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
}

.print-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* ── 7. IMPRESSUM MODAL ───────────────────────────────────────────────── */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.legal-modal.active {
  display: flex;
}

.legal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  padding: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}

.legal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.legal-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.legal-card-body {
  padding: 22px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-card-body h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 10px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #cbd5e1;
}

.legal-card-body p {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

.legal-link {
  color: #0284c7;
  text-decoration: underline;
  font-weight: 700;
}

.legal-link:hover {
  color: #0369a1;
}

.legal-card-footer {
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

.legal-close-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.legal-close-btn:hover {
  background: #1e293b;
}

/* ── 8. MOBILE ADAPTATIONS ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* fat two-story layout removed — see MOBILE_HOME_RAIL_V3 */
  .city-ticker-strip {
    height: 26px;
  }
  .ticker-left-cluster {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0 4px;
    gap: 4px;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .ticker-cluster-top {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    gap: 4px;
    height: auto;
  }
  .ticker-cluster-bottom {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: auto;
  }
  .ticker-badge {
    padding: 0;
    height: auto;
    gap: 5px;
  }
  .ticker-badge-text {
    font-size: 0.68rem;
    line-height: 1;
  }
  /* In mobile: remove 'LUDWIGSLUST' duplicate from ticker badge; leave only 'LIVE' */
  .badge-city-prefix {
    display: none !important;
  }
  .ticker-weather-btn {
    padding: 2px 7px;
    font-size: 0.68rem;
    height: 20px;
    margin: 0;
    white-space: nowrap;
  }
  .ticker-weather-sub {
    display: none;
  }
  /* Mobile-only Impressum: on top, left-aligned */
  .ticker-mobile-legal-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    color: #f1f5f9;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 8px;
    cursor: pointer;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    transition: background 0.15s ease;
  }
  .ticker-mobile-legal-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
  }
  .mobile-legal-icon {
    color: #38bdf8;
    font-weight: 900;
    font-size: 0.72rem;
  }
  .mobile-legal-text {
    letter-spacing: 0.02em;
  }
  /* impressum-ghost-v1 mobile: smaller + above Melisa bar (~8px gap) */
  .corner-legal-pill {
    display: inline-flex !important;
    bottom: 68px;
    right: 12px;
    left: auto;
    font-size: 9.5px;
    gap: 4px;
    padding: 2px 0;
    z-index: 90;
  }
  .corner-legal-icon {
    font-size: 10.5px;
  }
  body.mirror-open .corner-legal-pill {
    display: none !important;
  }

  .ticker-marquee {
    animation: tickerScroll 260s linear infinite;
  }
  .scenic-viewport {
    padding-top: 50px;
  }
  .sky-title {
    font-size: 32px;
  }
  .sky-subtitle {
    font-size: 11px;
    margin-top: 2px;
  }
  .melisa-bottom-bar {
    bottom: 12px;
    padding: 0 10px;
  }
  .melisa-bar-container {
    padding: 4px 6px 4px 8px;
  }
  .mic-action-btn {
    padding: 0 10px;
  }
  .mic-label {
    display: none;
  }
  .send-cta-btn span {
    display: none;
  }
  .send-cta-btn {
    padding: 0 12px;
  }
}

/* ── 9. DYNAMIC SERVICE CARDS IN RESPONSE ───────────────────────────── */
.card-services-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.service-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.service-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.service-card-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 10px;
}

.service-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.service-mirror-btn {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.service-mirror-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.service-orig-btn {
  background: rgba(255, 255, 255, 0.8);
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.service-orig-btn:hover {
  background: #ffffff;
  color: #0f172a;
  border-color: #94a3b8;
}

/* ── 10. SPIEGEL-PORTAL MIRROR MODAL ────────────────────────────────── */
/* v18.0 Dima red-annotation: tight under UNSERE STADT, flush to chat, ~1140px, thin chrome */
.mirror-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  align-items: stretch;
  justify-content: center;
  /* Top: ticker 38 + scenic pad 50 + title + subtitle + ~6px → tight under UNSERE STADT
     Bottom: chat bar (~56) + bottom offset 16 → flush (впритык) */
  padding: max(140px, calc(38px + 50px + clamp(42px, 5.8vw, 76px) + 10px)) 16px calc(16px + 52px); /* flush впритык to Brief/Sprich */
  animation: fadeIn 0.2s ease-out;
  box-sizing: border-box;
}

.mirror-window {
  width: 100%;
  max-width: min(1140px, 94vw);
  height: auto;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mirror-chrome {
  height: 28px;
  min-height: 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  gap: 8px;
  overflow: visible;
}

.mirror-nav-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.mirror-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.mirror-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

/* ── FROSTED MARBLE PAGINATION BUTTONS (WEATHER PILL STYLE) ────────── */
.mirror-page-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mirror-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  color: #ffffff;
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.mirror-page-btn:hover:not(:disabled) {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
}

.mirror-page-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  box-shadow: none;
  background: #64748b;
  border-color: transparent;
}

.mirror-page-pill {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mirror-page-sep {
  color: #94a3b8;
  margin: 0 3px;
}

.mirror-url-bar {
  flex: 1;
  max-width: 580px;
  height: 32px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.78rem;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mirror-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mirror-ext-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.mirror-ext-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.mirror-close-btn {
  background: rgba(15, 23, 42, 0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #0f172a;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mirror-legal-btn {
  background: rgba(15, 23, 42, 0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mirror-legal-btn:hover {
  background: #0f172a;
  color: #ffffff;
}

.mirror-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.mirror-body {
  flex: 1;
  width: 100%;
  position: relative;
  background: #ffffff;
}

#mirrorIframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── 11. IN-MIRROR MELISA CONCIERGE BAR ─────────────────────────────── */
.mirror-melisa-strip {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 12px 20px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  z-index: 10;
}

.mirror-melisa-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mirror-melisa-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mirror-melisa-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.mirror-melisa-info {
  display: flex;
  flex-direction: column;
}

.mirror-melisa-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.mirror-melisa-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: #059669;
}

.mirror-melisa-balloon {
  flex: 1;
  min-width: 0;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 12px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mirror-speaker-btn {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0f172a;
  flex-shrink: 0;
  transition: var(--transition);
}

.mirror-speaker-btn:hover {
  background: #0f172a;
  color: #ffffff;
}

.mirror-melisa-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mirror-mic-action-btn {
  height: 40px;
  padding: 0 14px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
  flex-shrink: 0;
  transition: var(--transition);
}

.mirror-mic-action-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.mirror-mic-action-btn.listening {
  background: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3) !important;
  animation: pulseMic 1.5s infinite;
}

.mirror-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.mirror-input-field {
  width: 100%;
  height: 40px;
  padding: 0 90px 0 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #0f172a;
  outline: none;
  transition: var(--transition);
}

.mirror-input-field:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.mirror-submit-btn {
  position: absolute;
  right: 4px;
  height: 32px;
  padding: 0 12px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.mirror-submit-btn:hover {
  background: #1e293b;
}

.mirror-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
}

.mirror-quick-chips::-webkit-scrollbar {
  display: none;
}

.mirror-chip {
  background: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 4px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.mirror-chip:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .mirror-modal {
    /* Mobile: still tight under title, flush to composer */
    padding: max(110px, calc(38px + 42px + clamp(36px, 9vw, 52px) + 22px)) 0 calc(12px + 48px + env(safe-area-inset-bottom, 0px)); /* flush to composer */
    align-items: stretch;
  }
  .mirror-window {
    height: auto;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 14px 14px 0 0;
    max-width: 100vw;
  }
  .mirror-chrome {
    height: 28px;
    min-height: 28px;
    padding: 0 8px;
    gap: 6px;
  }
  .mirror-nav-cluster {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
  }
  .mirror-brand {
    font-size: 0.76rem;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mirror-title {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mirror-actions {
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
  }
  .mirror-tool-btn {
    padding: 5px 8px;
    font-size: 0.72rem;
    border-radius: 8px;
    gap: 4px;
  }
  .mirror-tool-btn .btn-text {
    display: none !important;
  }
  .mirror-btn-fill {
    padding: 5px 8px;
  }
  .mirror-btn-fill .btn-text-fill {
    font-size: 0.72rem;
    font-weight: 700;
  }
  .mirror-legal-btn,
  .mirror-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.85rem;
  }
  .mirror-url-bar {
    display: none;
  }
  .mirror-page-btn span {
    display: none;
  }
  .mirror-page-btn {
    padding: 5px 8px;
  }
  .mirror-melisa-strip {
    padding: 10px 12px 12px;
    gap: 8px;
  }
  /* Phone/tablet: grid — name+speaker top, balloon full width under */
  .mirror-melisa-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "badge speaker"
      "balloon balloon";
    align-items: center;
    gap: 8px 10px;
  }
  .mirror-melisa-badge {
    grid-area: badge;
    min-width: 0;
  }
  .mirror-speaker-btn {
    grid-area: speaker;
    margin-left: 0 !important;
    flex-shrink: 0;
  }
  .mirror-melisa-balloon {
    grid-area: balloon;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    box-sizing: border-box;
    font-size: 0.84rem;
    line-height: 1.45;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    padding: 10px 12px;
  }
  .mirror-melisa-controls {
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
  }
  .mirror-mic-action-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
  }
  .mirror-input-field {
    font-size: 0.8rem;
    height: 32px;
  }
  .mirror-submit-btn {
    padding: 0 10px;
    font-size: 0.75rem;
    height: 32px;
  }
}

/* ── 8B. TYPEWRITER & IN-BROWSER OVERLAY EDITOR ────────────────────────── */
.mirror-body {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: #1e293b;
  overflow: hidden;
}

.mirror-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.mirror-typewriter-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  cursor: crosshair;
  background: rgba(37, 99, 235, 0.04);
  overflow: auto;
}

.typewriter-box {
  position: absolute;
  min-width: 120px;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px dashed #2563eb;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 4px 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  z-index: 60;
  line-height: 1.3;
}

.typewriter-box:focus {
  border-style: solid;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  background: #ffffff;
}

.typewriter-del-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: #ffffff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  user-select: none;
}

.mirror-btn-typewriter.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
}

@media print {
  .mirror-chrome, .mirror-melisa-strip, .typewriter-del-btn, .mirror-btn-typewriter {
    display: none !important;
  }
  .typewriter-box {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* ── 9. DYNAMIC SERVICE CARDS & OFFICIAL CONTACT DIRECTORY ─────────────── */
.card-services-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.service-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.service-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.service-card-desc {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 10px;
}

.service-card-contact {
  margin: 10px 0;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 2px;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.contact-dept {
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 700;
}

.contact-row {
  font-size: 0.82rem;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.45;
}

.contact-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
}

.contact-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #059669;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  transition: all 0.2s;
}

.contact-call-btn:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

.contact-mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.contact-mail-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.service-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.service-mirror-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.service-mirror-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* ── 10. DOCUMENT ANALYSIS & LETTER SCANNER CARD ─────────────────────── */
.doc-analysis-card {
  margin: 12px 0;
  padding: 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.doc-sender {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
}

.doc-aktenzeichen {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.doc-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.doc-deadline-badge.normal {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.doc-summary {
  font-size: 0.88rem;
  color: #1e293b;
  line-height: 1.5;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #0284c7;
}

.doc-legal-advice {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
}

.doc-draft-box {
  margin-top: 6px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.45;
}

.doc-draft-box strong {
  display: block;
  margin-bottom: 4px;
  color: #78350f;
}

/* ── 11. MIRROR DOCUMENT ACTIONS TOOLBAR ─────────────────────────────────── */
.mirror-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mirror-tool-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.mirror-btn-download {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.mirror-btn-download:hover {
  background: #1d4ed8;
  color: #ffffff;
}

@media (max-width: 640px) {
  .response-card-wrapper {
    bottom: 74px;
    padding: 0 8px;
  }
  .response-card {
    padding: 11px 13px 13px;
    border-radius: 18px;
    gap: 8px;
    max-height: calc(100dvh - 138px);
  }
  .card-top {
    padding-bottom: 7px;
    gap: 6px;
  }
  .card-title-group {
    gap: 6px;
  }
  .melisa-pill {
    padding: 2.5px 8px;
    font-size: 11px;
  }
  .card-heading {
    font-size: 12px;
  }
  .card-actions {
    gap: 4px;
  }
  .card-audio-btn {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
    gap: 4px;
  }
  .card-close-btn {
    width: 30px;
    height: 30px;
  }
  .card-user-bubble {
    max-width: 92%;
    padding: 5px 10px;
  }
  .user-bubble-content {
    font-size: 12px;
  }
  .card-reply-text {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .quick-services-bar {
    gap: 6px;
    margin-top: 12px;
  }
  .quick-pill-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
  .mirror-tool-btn span {
    display: none;
  }
}

/* ── 12. INTERACTIVE AUSFÜLLHILFE MODAL & PRINT VIEW ──────────────────── */
.form-modal {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.form-modal.active,
.form-modal[style*="display: flex"] {
  display: flex !important;
}

.form-paper {
  background: #ffffff;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  animation: fadeIn 0.2s ease-out;
}

.form-paper-header {
  padding: 18px 24px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.form-official-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #1d4ed8;
  margin-bottom: 4px;
}

.form-paper-title h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.form-paper-title p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.form-assistant-strip {
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.assistant-avatar {
  font-size: 20px;
  background: #dbeafe;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.assistant-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.assistant-text {
  font-size: 13px;
  color: #1e3a8a;
  line-height: 1.4;
}

.autofill-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.autofill-btn:hover {
  background: #1d4ed8;
}

.form-paper-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.form-field-row {
  margin-bottom: 16px;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.melisa-field-help-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.melisa-field-help-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.fillable-input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fillable-input:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.melisa-field-hint {
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 10px 14px;
  background: #f0f9ff;
  border-left: 3.5px solid #0284c7;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.08);
  animation: fadeIn 0.18s ease-out;
}

.hint-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.hint-text-de {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #0f172a;
  font-weight: 500;
}

.hint-text-ru {
  margin: 6px 0 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #475569;
  font-style: italic;
  border-top: 1px dashed rgba(2, 132, 199, 0.25);
  padding-top: 5px;
}

.form-paper-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cancel {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.print-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.15s;
}

.print-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.mirror-btn-fill {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0369a1 !important;
}

.mirror-btn-fill:hover {
  background: #0369a1 !important;
}

/* ── FORM ASSISTANT ACTIONS & VOICE-FILL BUTTON ────────────────────────── */
.form-assistant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.voicefill-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.voicefill-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

.voicefill-btn.listening {
  background: #ef4444 !important;
  animation: micPulse 1.2s infinite;
}

/* Mobile optimizations for Interactive Form Modal */
@media (max-width: 768px) {
  .form-modal {
    padding: 0;
  }
  .form-paper {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .form-paper-header {
    padding: 12px 14px;
  }
  .form-paper-header h3 {
    font-size: 0.98rem;
  }
  .form-paper-header p {
    font-size: 0.74rem;
  }
  .form-assistant-strip {
    padding: 10px 12px;
  }
  .form-paper-body {
    padding: 12px 12px;
    flex: 1;
    overflow-y: auto;
  }
  .form-paper-footer {
    padding: 10px 12px;
    gap: 8px;
  }
  .print-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  .btn-cancel {
    padding: 8px 12px;
    font-size: 12px;
  }
  .fillable-input {
    font-size: 15px; /* Prevents unwanted iOS zoom on inputs */
  }
}

/* ── DUAL CARD ACTION BUTTONS (ONLINE AUSFÜLLEN + ORIGINAL-PDF) ─────── */
.service-card-actions.dual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.service-fill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.service-fill-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.service-mirror-btn.secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.service-mirror-btn.secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ── MELISA FIELD HELP BUTTON & ACCORDION HINT ───────────────────────── */
.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.melisa-field-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.melisa-field-help-btn:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
  color: #78350f;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.25);
}

.melisa-field-hint {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #78350f;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
  animation: fadeInHint 0.2s ease-out;
}

@keyframes fadeInHint {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.melisa-field-hint .hint-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 4px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.melisa-field-hint .hint-text-de {
  margin: 0 0 4px 0;
  color: #92400e;
  font-weight: 500;
}

.melisa-field-hint .hint-text-ru {
  margin: 0;
  color: #1e3a8a;
  font-weight: 500;
  background: rgba(59, 130, 246, 0.08);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.16);
}


/* Melisa strip — force readable stack on narrow screens (v17.2) */
@media (max-width: 900px) {
  .mirror-melisa-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "badge speaker"
      "balloon balloon";
    align-items: center;
    gap: 8px 10px;
  }
  .mirror-melisa-badge { grid-area: badge; min-width: 0; }
  .mirror-speaker-btn { grid-area: speaker; }
  .mirror-melisa-balloon {
    grid-area: balloon !important;
    width: 100% !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.45 !important;
  }
}



/* Melisa Browser back control */
.mirror-nav-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mirror-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  height: 32px;
  padding: 0 10px 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mirror-back-btn:hover {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.mirror-back-btn .mirror-back-text {
  line-height: 1;
}
@media (max-width: 640px) {
  .mirror-back-btn .mirror-back-text { display: none; }
  .mirror-back-btn { padding: 0; width: 32px; justify-content: center; }
}


/* ══ Compact Melisa Browser chrome — thin title-tall bar (v18.0) ══ */
.mirror-chrome {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 10px !important;
  overflow: visible !important;
}
.mirror-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}
.mirror-chrome-mic-btn,
.mirror-chrome-speaker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.mirror-chrome-mic-btn:hover,
.mirror-chrome-speaker-btn:hover {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.mirror-chrome-mic-btn.listening {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.28);
}
.mirror-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}
.mirror-search-row .mirror-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  margin: 0;
}
.mirror-search-row .mirror-input-field {
  width: 100%;
  height: 40px;
  padding: 0 96px 0 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.9rem;
  background: #fff;
}
.mirror-search-row .mirror-submit-btn {
  position: absolute;
  right: 4px;
  height: 32px;
}
.mirror-melisa-prompt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* Kill old multi-row Melisa strip look if any leftover rules apply */
.mirror-melisa-top,
.mirror-melisa-badge,
.mirror-melisa-balloon,
.mirror-melisa-controls {
  display: none !important;
}
@media (max-width: 640px) {
  .mirror-chrome { padding: 6px 8px !important; }
  .mirror-brand .mirror-title {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
  }
  .mirror-search-row { padding: 6px 8px 8px; }
  .mirror-search-row .mirror-input-field { height: 38px; font-size: 0.84rem; }
}


/* v17.5 — always one Melisa Browser chrome row */
.mirror-search-row,
#mirrorMelisaStrip { display: none !important; }
.mg-top-chrome { display: none !important; }


/* v17.6 — single chrome; never show search strip in Melisa Browser */
#mirrorMelisaStrip, .mirror-search-row { display: none !important; height: 0 !important; overflow: hidden !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.mg-top-chrome { display: none !important; }

/* v17.7 — Melisa Browser overlay: leave title + bottom input clear; chrome = speaker+close only */
.mirror-chrome-mic-btn {
  display: none !important;
}

/* Bottom composer stays above Melisa Browser dimmer so voice/text remain usable */
body.mirror-open .melisa-bottom-bar {
  z-index: 10050;
  pointer-events: none;
}
body.mirror-open .melisa-bottom-bar .melisa-bar-container {
  pointer-events: auto;
}
body.mirror-open .city-ticker-strip {
  z-index: 10040;
}

@media (max-width: 768px) {
  body.mirror-open .melisa-bottom-bar {
    z-index: 10050;
  }
}


/* ══ v18.0 red-annotation finish — thin Melisa chrome + protruding close ══ */
.mirror-brand {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  gap: 6px;
}
.mirror-indicator {
  width: 7px;
  height: 7px;
}
.mirror-chrome-speaker-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.mirror-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 1.05rem;
  /* Protrude slightly into content so hit target stays easy on thin chrome */
  margin-bottom: -10px;
  position: relative;
  z-index: 6;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.mirror-actions {
  align-items: center;
  gap: 6px !important;
  overflow: visible;
}
body.mirror-open .sky-title-box {
  /* Mobile: hidden via MOBILE_HOME_RAIL_V2. Desktop: stay decorative, never above mirror. */
  z-index: 1;
  position: relative;
}


/* ══ v19.3 school paging + Melisa flush / single chat ══ */
.mirror-search-row,
#mirrorMelisaStrip {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}
/* v19.4 — Melisa Browser: restore scroll for portal/mirror content.
   Schools (/s/*) keep no page scroll via campus overflow:hidden + paging. */
.mirror-body {
  overflow: hidden; /* clip to window chrome */
}
#mirrorIframe,
.mirror-body iframe {
  overflow: auto !important; /* allow document scroll inside Melisa Browser */
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
/* One Melisa input only — bottom Brief/Sprich; never a second chrome mic/search */
.mirror-chrome-mic-btn,
.mirror-mic-action-btn,
.mirror-input-box,
.mirror-input-field,
.mirror-submit-btn {
  display: none !important;
}
body.mirror-open .melisa-bottom-bar {
  z-index: 10050;
}


/* v19.3b-flush — Melisa Browser bottom flush to composer, no gap */
body.mirror-open .mirror-modal {
  padding-bottom: calc(16px + 52px) !important;
}
body.mirror-open .mirror-window {
  margin-bottom: 0 !important;
}
@media (max-width: 768px) {
  body.mirror-open .mirror-modal {
    padding-bottom: calc(12px + 50px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* v19.4-melisa-scroll — Melisa Browser scroll restored; schools stay page-flip */

/* ══ v20 Melisa Browser polish — airy chrome, soft close, breathing bottom ══ */
body.mirror-open .mirror-modal {
  /* leave clear air above the floating Melisa composer */
  padding-bottom: calc(28px + 64px + env(safe-area-inset-bottom, 0px)) !important;
  padding-left: max(18px, 2.2vw) !important;
  padding-right: max(18px, 2.2vw) !important;
  background: rgba(15, 23, 42, 0.28) !important;
}
body.mirror-open .mirror-window {
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.55) inset !important;
  overflow: hidden !important;
  background: #fffaf6 !important;
}
/* thin elegant chrome */
body.mirror-open .mirror-chrome {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255,250,246,0.94)) !important;
  border-bottom: 1px solid rgba(42, 32, 64, 0.08) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
body.mirror-open .mirror-title,
body.mirror-open #mirrorTitleText {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #3b2f4a !important;
  letter-spacing: 0.01em;
}
body.mirror-open .mirror-indicator {
  width: 7px !important;
  height: 7px !important;
  background: linear-gradient(135deg, #38bdf8, #2dd4bf) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
}
/* quieter tools: icon-first, no chunky labels in hub browsing */
body.mirror-open .mirror-tool-btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(42, 32, 64, 0.10) !important;
  background: rgba(255, 255, 255, 0.75) !important;
  color: #4a3b5c !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
body.mirror-open .mirror-tool-btn .btn-text,
body.mirror-open .mirror-tool-btn .btn-text-fill {
  display: none !important; /* Vollbild / labels — icons only, calmer */
}
body.mirror-open .mirror-back-btn {
  height: 28px !important;
  padding: 0 10px 0 8px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(42, 32, 64, 0.10) !important;
  color: #4a3b5c !important;
  font-size: 0.74rem !important;
}
body.mirror-open .mirror-chrome-speaker-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(42, 32, 64, 0.10) !important;
  box-shadow: none !important;
}
/* soft close — no protruding slab */
body.mirror-open .mirror-close-btn {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  background: rgba(255,255,255,0.85) !important;
  border: 1px solid rgba(42, 32, 64, 0.12) !important;
  color: #6b5b7a !important;
  box-shadow: none !important;
  position: static !important;
}
body.mirror-open .mirror-close-btn:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}
body.mirror-open .mirror-body {
  background: transparent !important;
}
/* composer floats with air — not glued to browser */
body.mirror-open .melisa-bottom-bar {
  z-index: 10050 !important;
}
body.mirror-open .melisa-bottom-bar .melisa-bar-container,
body.mirror-open .melisa-bottom-bar .input-pill,
body.mirror-open .composer-shell {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18) !important;
}
@media (max-width: 768px) {
  body.mirror-open .mirror-modal {
    padding-bottom: calc(20px + 58px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* v20.1 — Melisa Browser speaker = mute toggle */
.mirror-chrome-speaker-btn.is-muted {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.08) !important;
  color: #94a3b8 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
.mirror-chrome-speaker-btn.is-muted svg {
  opacity: 0.7;
}


/* Browser open: hide Melisa card entirely — only a plain black line over content */
body.mirror-open .response-card-wrapper,
body.mirror-open #responseWrapper {
  display: none !important;
}
.response-strip-close { display: none !important; }

/* One black line at bottom of Melisa Browser (over iframe), then fades out */
.mirror-line-reply {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: min(920px, calc(100% - 24px));
  bottom: 12px;
  z-index: 6;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.92);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mirror-line-reply.is-on {
  opacity: 1;
}
.mirror-body {
  position: relative;
}



/* v21 mobile Melisa Browser — full height except bottom bar; clear ✕ */
@media (max-width: 768px) {
  body.mirror-open .mirror-modal {
    padding-top: max(6px, env(safe-area-inset-top, 0px)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: calc(8px + 56px + env(safe-area-inset-bottom, 0px)) !important;
    align-items: stretch !important;
    background: rgba(15, 23, 42, 0.45) !important;
  }
  body.mirror-open .mirror-window {
    max-width: 100vw !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    border-radius: 14px 14px 0 0 !important;
    margin: 0 !important;
  }
  body.mirror-open .mirror-chrome {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 8px 0 10px !important;
    overflow: visible !important;
  }
  body.mirror-open .mirror-actions {
    flex-shrink: 0 !important;
    overflow: visible !important;
    gap: 6px !important;
  }
  body.mirror-open .mirror-close-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-shrink: 0 !important;
    border-radius: 999px !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    background: #fff !important;
    color: #0f172a !important;
    border: 1.5px solid rgba(15, 23, 42, 0.16) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14) !important;
    z-index: 20 !important;
  }
  /* Light wait pill instead of heavy card story on small screens */
  .card-reply-text .melisa-wait,
  #cardReplyContent .melisa-wait {
    font-style: normal !important;
    font-weight: 700 !important;
    color: #64748b !important;
    letter-spacing: 0.04em;
  }


/* MELISA_THINK_WEB_20260926 — calm cream/teal desktop wait cue (not green LIVE) */
.melisa-thinking {
  display: flex;
  align-items: center;
  margin: 2px 0 4px;
}
.melisa-think-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 6px;
  background: linear-gradient(135deg, #fffaf3 0%, #f3faf8 55%, #e8f5f2 100%);
  border: 1px solid rgba(15, 118, 110, 0.18);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  color: #0f766e;
}
.melisa-think-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.melisa-think-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0d9488;
  opacity: 0.35;
  transform: scale(1);
  will-change: opacity, transform;
}
.melisa-think-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #115e59;
  line-height: 1.25;
}
.melisa-thinking-mirror {
  background: linear-gradient(135deg, #fffaf3 0%, #f3faf8 100%) !important;
  border-color: rgba(15, 118, 110, 0.2) !important;
  color: #115e59 !important;
  padding: 8px 10px !important;
}
.melisa-thinking-mirror .melisa-think-bubble {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
body.mirror-open .mirror-line-reply.melisa-think-line,
.mirror-line-reply.is-thinking {
  background: rgba(255, 250, 243, 0.95);
  border-color: rgba(15, 118, 110, 0.28);
  color: #115e59;
}

}

/* v22 mobile Melisa Browser UX polish */
/* Ticker must NEVER cover Melisa chrome / ✕ while mirror is open */
body.mirror-open .city-ticker-strip {
  z-index: 9000 !important; /* below .mirror-modal (10000) */
  pointer-events: none !important; /* no steal taps from ✕ */
}
body.mirror-open .city-ticker-strip a,
body.mirror-open .city-ticker-strip button {
  pointer-events: none !important;
}

/* Always-solid close ✕ — never invisible on green / sky / photo */
body.mirror-open .mirror-close-btn,
.mirror-close-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 30 !important;
  flex-shrink: 0 !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 2px solid rgba(15, 23, 42, 0.22) !important;
  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.9) !important;
  -webkit-tap-highlight-color: transparent;
}
body.mirror-open .mirror-close-btn:hover,
body.mirror-open .mirror-close-btn:active,
.mirror-close-btn:hover,
.mirror-close-btn:active {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}

@media (max-width: 768px) {
  body.mirror-open .mirror-modal {
    padding-top: max(46px, calc(38px + env(safe-area-inset-top, 0px))) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: calc(10px + 58px + env(safe-area-inset-bottom, 0px)) !important;
    align-items: stretch !important;
    background: rgba(15, 23, 42, 0.42) !important;
  }
  body.mirror-open .mirror-window {
    max-width: 100vw !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    border-radius: 14px 14px 0 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #fffaf6 !important;
  }
  body.mirror-open .mirror-chrome {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 8px 0 10px !important;
    overflow: visible !important;
    background: #ffffff !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body.mirror-open .mirror-actions {
    flex-shrink: 0 !important;
    overflow: visible !important;
    gap: 6px !important;
    z-index: 5 !important;
  }
  body.mirror-open .mirror-brand,
  body.mirror-open .mirror-title,
  body.mirror-open #mirrorTitleText {
    color: #0f172a !important;
    max-width: min(52vw, 200px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.mirror-open .mirror-chrome-speaker-btn {
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border: 1.5px solid rgba(15, 23, 42, 0.14) !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
  }
  body.mirror-open .melisa-bottom-bar {
    z-index: 10050 !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
    pointer-events: none !important;
  }
  body.mirror-open .melisa-bottom-bar .melisa-bar-container {
    pointer-events: auto !important;
  }
  body.mirror-open.mirror-school .mirror-modal {
    padding-bottom: calc(12px + 62px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .mirror-quick-chips,
  .card-chips,
  .card-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  .mirror-quick-chips::-webkit-scrollbar,
  .card-chips::-webkit-scrollbar {
    display: none !important;
  }
  .card-chip,
  .mirror-chip {
    flex-shrink: 0 !important;
  }
}


/* v22b flush school bottom */
@media (max-width: 768px) {
  body.mirror-open.mirror-school .mirror-modal {
    padding-bottom: calc(6px + 56px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* v23 school unify — one PWA surface */
/* When /s/* is open in Melisa Browser: chrome + school = single app, no stacked cards */
body.mirror-open.mirror-school .mirror-modal {
  padding-top: max(42px, calc(36px + env(safe-area-inset-top, 0px))) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: calc(6px + 56px + env(safe-area-inset-bottom, 0px)) !important;
  align-items: stretch !important;
  background: #ffffff !important;
}
body.mirror-open.mirror-school .mirror-window {
  max-width: 100% !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: none !important;
  border: none !important;
}
body.mirror-open.mirror-school .mirror-chrome {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 8px 0 10px !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  border: none !important;
  border-bottom: none !important; /* fuse with school tab row */
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.mirror-open.mirror-school .mirror-frame,
body.mirror-open.mirror-school .mirror-body,
body.mirror-open.mirror-school #mirrorFrame,
body.mirror-open.mirror-school iframe#mirrorIframe,
body.mirror-open.mirror-school .mirror-iframe {
  border: none !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}
body.mirror-open.mirror-school .mirror-brand,
body.mirror-open.mirror-school .mirror-title,
body.mirror-open.mirror-school #mirrorTitleText {
  color: #0f172a !important;
}

/* v25 school chrome tighten + in-place chat */
/* Kill empty water above title: modal white was reserving ticker gap */
body.mirror-open.mirror-school .mirror-modal {
  padding-top: max(0px, env(safe-area-inset-top, 0px)) !important;
}
body.mirror-open.mirror-school .city-ticker-strip {
  display: none !important;
}
body.mirror-open.mirror-school .mirror-chrome {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 6px 0 8px !important;
}
body.mirror-open.mirror-school .mirror-close-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  font-size: 1.05rem !important;
}
body.mirror-open.mirror-school .mirror-chrome-speaker-btn {
  width: 32px !important;
  height: 32px !important;
}
body.mirror-open.mirror-school .mirror-brand,
body.mirror-open.mirror-school .mirror-title,
body.mirror-open.mirror-school #mirrorTitleText {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

/* Expand control on compact composer */
.mirror-chat-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  color: #0f172a;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
body.mirror-open .mirror-chat-expand-btn {
  display: inline-flex;
}
body.mirror-chat-expanded .mirror-chat-expand-btn {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
body.mirror-chat-expanded .mirror-chat-expand-btn svg {
  transform: rotate(180deg);
}

/* In-place chat sheet — fills mirror body, stays in Melisa Browser */
.mirror-chat-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  background: #ffffff;
  border: none;
}
body.mirror-chat-expanded .mirror-chat-sheet {
  display: flex !important;
}
.mirror-chat-sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}
.mirror-chat-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.mirror-chat-back:active {
  background: #f1f5f9;
}
.mirror-chat-sheet-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}
.mirror-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}
.mirror-chat-empty {
  margin: 24px 8px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}
.mirror-chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.mirror-chat-user {
  align-self: flex-end;
  background: #0f766e;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.mirror-chat-assistant {
  align-self: flex-start;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}
/* When chat expanded: keep composer above sheet, hide floating line */
body.mirror-chat-expanded .mirror-line-reply {
  display: none !important;
}
body.mirror-chat-expanded .melisa-bottom-bar {
  z-index: 10060 !important;
}
@media (min-width: 769px) {
  body.mirror-open.mirror-school .mirror-chrome {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }
}


/* v26 one-app chrome — hide X when back */
/* Product: ← is close/navigate; X reserved for future school-only PWA — not Melisa mirror */
body.mirror-open.mirror-has-back .mirror-close-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
  box-shadow: none !important;
  position: absolute !important;
  clip: rect(0, 0, 0, 0) !important;
}
/* Portal home keeps ✕ (no back) — untouched */

/* v29 senden clear Melisa bar */
/* Extra ~16px shell air so school footer + Senden clear floating Melisa composer */
body.mirror-open.mirror-school .mirror-modal {
  padding-bottom: calc(6px + 72px + env(safe-area-inset-bottom, 0px)) !important;
}
@media (max-width: 768px) {
  body.mirror-open.mirror-school .mirror-modal {
    padding-bottom: calc(6px + 72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
