:root {
  --q-bg-void: #000000;
  --q-bg-base: #07080A;
  --q-bg-panel: #111214;
  --q-bg-elevated: #1A1B1E;
  --q-border: rgba(197, 160, 89, 0.24);
  --q-border-strong: rgba(217, 186, 122, 0.48);

  /* okmarcom.com Bronze- / Champagnergold */
  --q-gold-deep: #8C6B32;
  --q-gold: #C5A059;
  --q-gold-bright: #D9BA7A;
  --q-gold-grad: linear-gradient(135deg, #DEC184 0%, #C5A059 50%, #987537 100%);

  /* Leuchtendes Petrol für Neon High */
  --q-petrol-deep: #006B78;
  --q-petrol: #00B8C8;
  --q-petrol-bright: #24E5F2;
  --q-petrol-grad: linear-gradient(135deg, #3CF0FC 0%, #00B8C8 52%, #007584 100%);

  /* Warmes Rotgold für Mathilda-Modus */
  --q-rose-deep: #9E544C;
  --q-rose: #D4847A;
  --q-rose-bright: #F0AFA4;
  --q-rose-grad: linear-gradient(135deg, #F5BEB4 0%, #D4847A 52%, #9E544C 100%);

  --q-accent-deep: var(--q-gold-deep);
  --q-accent: var(--q-gold);
  --q-accent-bright: var(--q-gold-bright);
  --q-accent-grad: var(--q-gold-grad);
  --q-accent-glow: rgba(197, 160, 89, 0.34);

  --q-text: #F2F4F7;
  --q-muted: #9B9E9F;
  --q-emerald: #10B981;
  --q-amber: #F59E0B;
  --q-danger: #EF4444;
}

[data-model="neon_high"] {
  --q-accent-deep: var(--q-petrol-deep);
  --q-accent: var(--q-petrol);
  --q-accent-bright: var(--q-petrol-bright);
  --q-accent-grad: var(--q-petrol-grad);
  --q-accent-glow: rgba(0, 184, 200, 0.42);
}

[data-speaker="mathilda"] {
  --q-accent-deep: var(--q-rose-deep);
  --q-accent: var(--q-rose);
  --q-accent-bright: var(--q-rose-bright);
  --q-accent-grad: var(--q-rose-grad);
  --q-accent-glow: rgba(212, 132, 122, 0.42);
}

[data-theme="daylight"] {
  --q-bg-void: #EAEDF2;
  --q-bg-base: #F4F5F8;
  --q-bg-panel: #FFFFFF;
  --q-bg-elevated: #E6EAF2;
  --q-border: rgba(10, 12, 16, 0.25);
  --q-border-strong: rgba(10, 12, 16, 0.45);
  --q-gold: #8E6A28;
  --q-gold-bright: #6F5019;
  --q-text: #0A0C10;
  --q-muted: #3A404D;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--q-bg-void);
  color: var(--q-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 85% 42% at 50% 0%, rgba(197, 160, 89, 0.14) 0%, rgba(32, 28, 22, 0.35) 35%, var(--q-bg-base) 68%, var(--q-bg-void) 100%);
}

/* Header */
.lux-header {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: calc(11px + env(safe-area-inset-top)) 16px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(10, 11, 13, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.16);
}

.brand-left-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: inherit;
}
.brand-left-btn:active { transform: scale(0.97); }

.header-right { display: flex; align-items: center; gap: 9px; }

.q-badge-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--q-border-strong);
  background: #050507;
  color: var(--q-gold-bright);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(217, 186, 122, 0.25);
}

.brand-title { font-size: 0.92rem; font-weight: 800; letter-spacing: 0.15em; color: var(--q-text); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.is-green { background: var(--q-emerald); box-shadow: 0 0 10px rgba(16, 185, 129, 0.85); }
.status-dot.is-amber { background: var(--q-amber); box-shadow: 0 0 10px rgba(245, 158, 11, 0.85); }
.status-dot.is-red { background: var(--q-danger); box-shadow: 0 0 10px rgba(239, 68, 68, 0.85); }

.version-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(197, 160, 89, 0.32);
  background: linear-gradient(145deg, rgba(197, 160, 89, 0.16), rgba(22, 20, 16, 0.7));
  color: var(--q-gold-bright);
}

/* Modell-Toggle (Gold bei Hydrogen | Leuchtendes Petrol bei Neon High) */
.model-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(22, 24, 29, 0.95), rgba(11, 12, 16, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.model-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--q-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, color 0.2s ease, box-shadow 0.25s ease;
}
.model-btn:active { transform: scale(0.96); }
.model-btn[data-tier="hydrogen"].is-active {
  background: var(--q-gold-grad);
  color: #090806;
  box-shadow: 0 2px 16px rgba(197, 160, 89, 0.42), inset 0 1px 0 rgba(255, 245, 220, 0.45);
}
.model-btn[data-tier="neon_high"].is-active {
  background: var(--q-petrol-grad);
  color: #021418;
  box-shadow: 0 2px 18px rgba(0, 184, 200, 0.52), inset 0 1px 0 rgba(210, 252, 255, 0.5);
}

.icon-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--q-border);
  background: linear-gradient(145deg, #1E1F23, #111215);
  color: var(--q-text);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.16s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}
.icon-circle-btn.small-icon { width: 28px; height: 28px; font-size: 0.72rem; }
.icon-circle-btn:hover { border-color: var(--q-accent-bright); color: var(--q-accent-bright); box-shadow: 0 0 16px var(--q-accent-glow); }
.icon-circle-btn:active { transform: scale(0.94); }

/* Main Content */
.main-scroll { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 14px 14px 104px; }
.tab-view { display: flex; flex-direction: column; gap: 13px; }

.lux-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(197, 160, 89, 0.11) 0%, transparent 55%),
    linear-gradient(165deg, #211F1B 0%, #151413 42%, #0D0E10 100%);
  border: 1px solid rgba(197, 160, 89, 0.22);
  border-radius: 18px;
  padding: 17px;
  box-shadow: inset 0 1px 0 rgba(217, 186, 122, 0.16), 0 14px 36px rgba(0, 0, 0, 0.55);
  transition: transform 0.22s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}
.shimmer-card:hover {
  transform: translateY(-2px);
  border-color: var(--q-border-strong);
  box-shadow: inset 0 1px 0 rgba(217, 186, 122, 0.28), 0 16px 40px rgba(197, 160, 89, 0.12);
}

.hero-card {
  border-color: rgba(197, 160, 89, 0.4);
  background:
    radial-gradient(ellipse 75% 55% at 80% 0%, rgba(197, 160, 89, 0.22) 0%, rgba(45, 38, 26, 0.45) 45%, transparent 78%),
    linear-gradient(170deg, #23201A 0%, #131314 55%, #0B0C0E 100%);
}

.hero-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.hero-kicker, .card-kicker, .pulse-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--q-gold);
}

.hero-clock-inline {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--q-gold-bright);
  letter-spacing: 0.06em;
}

.hero-greeting { margin: 8px 0 6px; font-size: 1.78rem; font-weight: 800; letter-spacing: -0.02em; color: #FFFFFF; }
.hero-weather { font-size: 0.88rem; color: var(--q-muted); }

.hero-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.34), rgba(197, 160, 89, 0.06));
  margin: 14px 0 12px;
}

.pulse-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.link-gold-btn { border: 0; background: transparent; color: var(--q-gold-bright); font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0; }
.pulse-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pulse-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 0.84rem; color: var(--q-text); }
.pulse-list .pulse-empty { color: var(--q-muted); font-size: 0.8rem; }

.inbox-card { cursor: pointer; }
.inbox-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.card-sub { margin: 0; font-size: 0.84rem; line-height: 1.44; color: var(--q-muted); }
.inbox-arrow { color: var(--q-gold); font-size: 0.9rem; }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-card { cursor: pointer; }
.metric-num {
  font-size: 1.95rem;
  font-weight: 800;
  background: var(--q-gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.metric-label { margin-top: 6px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; color: var(--q-muted); }

.briefing-card {
  background:
    radial-gradient(circle at 12% 15%, rgba(197, 160, 89, 0.2) 0%, transparent 55%),
    linear-gradient(155deg, #241F16 0%, #141416 65%, #0D0E10 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.briefing-info { flex: 1; min-width: 210px; display: flex; flex-direction: column; gap: 6px; }
.briefing-actions { display: flex; gap: 8px; }

.gold-pill-btn {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.84rem;
  font-weight: 800;
  background: var(--q-gold-grad);
  color: #090806;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(197, 160, 89, 0.28), inset 0 1px 0 rgba(255, 244, 214, 0.48);
  transition: transform 0.16s ease, box-shadow 0.24s ease;
}
[data-model="neon_high"] #tab-chat .gold-pill-btn {
  background: var(--q-petrol-grad);
  color: #021418;
  box-shadow: 0 4px 18px rgba(0, 184, 200, 0.34), inset 0 1px 0 rgba(215, 253, 255, 0.5);
}
.gold-pill-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 75%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transition: left 0.55s ease;
}
.gold-pill-btn:hover::after { left: 140%; }
.gold-pill-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(197, 160, 89, 0.42); }
.gold-pill-btn:active { transform: scale(0.96); }

.dark-pill-btn {
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  background: linear-gradient(160deg, #1E2025, #121317);
  color: var(--q-text);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.16s ease, border-color 0.22s ease;
}
.dark-pill-btn:hover { border-color: var(--q-gold-bright); }
.dark-pill-btn:active { transform: scale(0.96); }
.dark-pill-btn.small { padding: 5px 10px; font-size: 0.74rem; }

/* System-Status (Verbrauchs-Balken) */
.system-accordion-card { padding: 0; }
.accordion-head {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--q-text);
}
.accordion-title-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sys-summary-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
}
.accordion-chevron { color: var(--q-gold); font-size: 0.95rem; transition: transform 0.25s ease; }
.accordion-head[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }
.accordion-body { padding: 0 17px 17px; border-top: 1px solid rgba(197, 160, 89, 0.14); }
.sys-bars-grid { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.sys-bar-row { display: flex; flex-direction: column; gap: 5px; }
.sys-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.8rem; }
.sys-bar-name { font-weight: 700; color: var(--q-text); }
.sys-bar-meta { font-size: 0.74rem; color: var(--q-gold-bright); font-variant-numeric: tabular-nums; }
.sys-track { width: 100%; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.sys-fill { height: 100%; border-radius: 999px; background: var(--q-gold-grad); transition: width 0.55s ease; }
.sys-fill.is-emerald { background: linear-gradient(90deg, #10B981, #34D399); }
.sys-note { font-size: 0.71rem; color: var(--q-muted); }

.sys-mix-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.sys-chip {
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--q-border);
  background: rgba(24, 25, 28, 0.8);
  color: var(--q-text);
}
.sys-chip.is-petrol { border-color: rgba(0, 184, 200, 0.45); color: var(--q-petrol-bright); }
.sys-limit-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(197, 160, 89, 0.18);
  background: rgba(15, 16, 19, 0.88);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sys-link {
  color: var(--q-gold-bright);
  text-decoration: underline;
  font-size: 0.72rem;
}

.doc-chip {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  font-size: 0.8rem;
  color: var(--q-text);
}
.chip-close { border: 0; background: transparent; color: var(--q-text); font-weight: 800; cursor: pointer; }

/* Chat & Banner */
.chat-model-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(197, 160, 89, 0.2);
  background: rgba(17, 18, 20, 0.9);
}
[data-model="neon_high"] .chat-model-strip { border-color: rgba(0, 184, 200, 0.42); }

.persona-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--q-border-strong);
  background: rgba(197, 160, 89, 0.14);
  font-size: 0.84rem;
}
.speaker-mathilda-banner {
  border-color: rgba(212, 132, 122, 0.55);
  background: rgba(212, 132, 122, 0.16);
  color: var(--q-rose-bright);
}

.chat-timeline { display: flex; flex-direction: column; gap: 10px; min-height: 320px; }
.msg-bubble {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid var(--q-border);
  background: linear-gradient(165deg, #191A1D, #101114);
  font-size: 0.9rem;
  line-height: 1.48;
}
.msg-bubble.is-user { align-self: flex-end; background: linear-gradient(155deg, rgba(197, 160, 89, 0.22), rgba(40, 34, 24, 0.55)); }
.msg-bubble.is-assistant[data-tier="neon_high"] { border-color: rgba(0, 184, 200, 0.42); }
.msg-bubble.is-assistant { align-self: flex-start; }

.msg-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; font-size: 0.7rem; color: var(--q-muted); }
.msg-badge { color: var(--q-gold-bright); font-weight: 700; }
.msg-badge.is-petrol { color: var(--q-petrol-bright); }

.citation-box { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 0.78rem; border: 1px solid rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.1); }
.citation-box.is-rejected { border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.12); }

.composer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--q-border);
  background: linear-gradient(170deg, #16171A, #0E0F12);
}
.composer-bar textarea { flex: 1; resize: none; border: 0; background: transparent; color: var(--q-text); font-family: inherit; font-size: 0.92rem; outline: none; }

/* Tasks */
.section-heading { margin: 6px 0 8px; font-size: 1.15rem; color: #FFFFFF; }
.task-add-row { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.task-add-row input { flex: 1; min-width: 140px; border-radius: 10px; border: 1px solid var(--q-border); background: var(--q-bg-base); color: var(--q-text); padding: 9px 11px; font-family: inherit; }
.task-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--q-border); background: var(--q-bg-elevated); font-size: 0.86rem; }

/* Bottom Dock Bar */
.bottom-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(16, 17, 19, 0.92), rgba(8, 9, 11, 0.97));
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(197, 160, 89, 0.22);
  display: grid;
  grid-template-columns: 1fr 1fr 78px 1fr 1fr;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}

.dock-item {
  border: 0;
  background: transparent;
  color: var(--q-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.dock-item.is-active { color: var(--q-gold-bright); }
.dock-icon-wrap { position: relative; display: inline-flex; }
.dock-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--q-gold-grad);
  color: #090806;
  font-size: 0.64rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.center-q-btn {
  position: relative;
  width: 64px;
  height: 64px;
  margin: -24px auto 0;
  border-radius: 50%;
  border: 1.5px solid var(--q-gold-bright);
  background: #060608;
  color: var(--q-gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(197, 160, 89, 0.38), inset 0 1px 0 rgba(235, 206, 146, 0.4);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.center-q-btn:hover { transform: scale(1.06); box-shadow: 0 0 36px rgba(197, 160, 89, 0.56); }
.center-q-btn:active { transform: scale(0.94); }
.center-q-ring { position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(217, 186, 122, 0.4); animation: pulseHalo 3.2s ease-in-out infinite; }
@keyframes pulseHalo { 0%, 100% { opacity: 0.45; transform: scale(0.98); } 50% { opacity: 0.95; transform: scale(1.02); } }
.center-q-svg { width: 32px; height: 32px; z-index: 2; }

/* VOLLBILD-SPRACHANSICHT (solide #000000 Basis, KEIN Durchscheinen!) */
.voice-screen,
.car-screen {
  position: fixed;
  inset: 0;
  z-index: 70;
  background-color: #000000;
  background-image: radial-gradient(circle at 50% 42%, rgba(197, 160, 89, 0.08) 0%, #000000 58%);
  color: var(--q-text);
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

[data-model="neon_high"] .voice-screen {
  background-color: #000000;
  background-image: radial-gradient(circle at 50% 42%, rgba(0, 184, 200, 0.11) 0%, #000000 58%);
}

[data-speaker="mathilda"] .voice-screen {
  background-color: #000000;
  background-image: radial-gradient(circle at 50% 42%, rgba(212, 132, 122, 0.12) 0%, #000000 58%);
}

[data-theme="daylight"] .car-screen { background: var(--q-bg-base); }

.voice-top-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.voice-top-right { display: flex; align-items: center; gap: 8px; }

.sub-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 20, 24, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.camera-btn {
  width: 36px;
  height: 36px;
  border-color: var(--q-accent);
  color: var(--q-accent-bright);
}

.voice-q-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  margin: 8px 0;
}

.organic-q-trigger {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: min(260px, 60vw);
  height: min(260px, 60vw);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.organic-q-trigger:active { transform: scale(0.96); }
#organicQCanvas { width: 100%; height: 100%; display: block; }

.voice-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--q-accent);
  background: rgba(16, 15, 13, 0.94);
  box-shadow: 0 0 26px var(--q-accent-glow);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--q-accent-bright);
}

.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--q-accent-bright); }
.voice-status-pill[data-tone="listening"] .pill-dot { background: var(--q-emerald); box-shadow: 0 0 10px var(--q-emerald); }
.voice-status-pill[data-tone="error"] { border-color: var(--q-danger); color: #FCA5A5; }
.voice-status-pill[data-tone="error"] .pill-dot { background: var(--q-danger); }

.pill-bars { display: inline-flex; align-items: center; gap: 3px; height: 14px; }
.pill-bars span { width: 2px; height: 10px; border-radius: 2px; background: var(--q-accent-bright); animation: eqWave 1s ease-in-out infinite; }
.pill-bars span:nth-child(2) { animation-delay: 0.15s; height: 14px; }
.pill-bars span:nth-child(3) { animation-delay: 0.3s; height: 8px; }
.pill-bars span:nth-child(4) { animation-delay: 0.45s; height: 12px; }
@keyframes eqWave { 0%, 100% { transform: scaleY(0.55); opacity: 0.65; } 50% { transform: scaleY(1.1); opacity: 1; } }

.voice-status-desc { margin: 0; font-size: 0.82rem; color: var(--q-muted); max-width: 360px; }

/* Medien-Bühne */
.media-stage-card {
  width: 100%;
  max-width: 540px;
  border-radius: 16px;
  border: 1px solid var(--q-border-strong);
  background: linear-gradient(170deg, #171614, #0B0C0E);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.8);
}

.media-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.media-stage-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.media-stage-body { width: 100%; }

.media-frame {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 12px;
  background: #000000;
}

.gallery-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gallery-img-wrap {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  background: #060709;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.gallery-img-wrap img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--q-muted);
}

.voice-subtitle-wrap {
  flex-shrink: 0;
  width: 100%;
  max-width: 580px;
  margin: 4px auto 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  text-align: center;
}
.voice-subtitle {
  margin: 0;
  width: 100%;
  font-size: 0.94rem;
  line-height: 1.48;
  max-height: 4.55em;
  overflow-y: auto;
  scroll-behavior: smooth;
  color: rgba(242, 244, 248, 0.92);
  padding: 2px 6px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, #000 22%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, #000 22%, #000 100%);
  scrollbar-width: none;
}
.voice-subtitle::-webkit-scrollbar { display: none; }

/* Car-Mode */
.car-model-row { display: flex; justify-content: center; }
.car-q-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.car-q-trigger { width: min(230px, 52vw); height: min(230px, 52vw); }
#carQCanvas { width: 100%; height: 100%; display: block; }
.car-grid-2 {
  max-width: 720px;
  width: 100%;
  margin: 0 auto 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.car-tile {
  min-height: 86px;
  border-radius: 16px;
  border: 1.5px solid var(--q-border);
  background: linear-gradient(165deg, #1E1F23, #111215);
  color: var(--q-text);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
}
.car-tile strong { font-size: 0.92rem; }
.car-tile span { font-size: 0.78rem; opacity: 0.85; }
.car-preview {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--q-border);
  background: var(--q-bg-panel);
  font-size: 0.94rem;
  line-height: 1.48;
  max-height: 4.9em;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* Modals & Update-Ideen */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
.modal-card { width: 100%; max-width: 540px; border-radius: 18px; border: 1px solid var(--q-border-strong); background: linear-gradient(170deg, #1A1918, #0E0F12); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-scroll-card { max-height: 86vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 1rem; color: var(--q-gold-bright); }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ideas-section { padding: 12px; border-radius: 14px; border: 1px solid var(--q-border); background: rgba(12, 13, 16, 0.75); display: flex; flex-direction: column; gap: 8px; }
.ideas-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ideas-list { display: flex; flex-direction: column; gap: 7px; max-height: 220px; overflow-y: auto; }
.idea-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(197, 160, 89, 0.22); background: rgba(24, 24, 27, 0.8); font-size: 0.8rem; }
.idea-row.is-done { border-color: rgba(16, 185, 129, 0.35); opacity: 0.72; }
.idea-id { font-weight: 800; color: var(--q-gold-bright); margin-right: 6px; font-size: 0.72rem; }
.idea-row.is-done .idea-id { color: #6EE7B7; }

.vault-form { display: flex; flex-direction: column; gap: 8px; }
.vault-form input, .vault-form textarea { border-radius: 10px; border: 1px solid var(--q-border); background: var(--q-bg-base); color: var(--q-text); padding: 10px; font-family: inherit; }
.vault-status { font-size: 0.82rem; color: var(--q-gold-bright); }
.vault-list { display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; }
.vault-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--q-border); background: var(--q-bg-elevated); font-size: 0.84rem; }

/* In-App Lock Overlay (kein 302-Redirect -> iPhone bleibt 100 % Vollbild) */
.auth-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 30%, rgba(197, 160, 89, 0.14), #000000 62%);
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-lock-card {
  width: 100%;
  max-width: 370px;
  padding: 28px 22px;
  border-radius: 22px;
  border: 1px solid rgba(197, 160, 89, 0.42);
  background: rgba(15, 16, 19, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-lock-logo { width: 58px; height: 58px; color: var(--q-gold-bright); margin: 0 auto; }
.auth-lock-card h1 { margin: 0; font-size: 1.35rem; letter-spacing: 0.18em; }
.auth-lock-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.auth-lock-form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(197, 160, 89, 0.34);
  background: #0B0C0E;
  color: var(--q-text);
  font-size: 1rem;
}
.auth-lock-err { margin: 0; color: #FCA5A5; font-size: 0.84rem; min-height: 1.1em; }
.sr-hidden-user { position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px; }

/* Inbox Accordion + Zwischenablage + Dateiverlauf */
.inbox-accordion-sub { padding: 0 17px 14px; text-align: left; }
.inbox-textarea {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(197, 160, 89, 0.28);
  background: rgba(10, 11, 14, 0.95);
  color: var(--q-text);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
}
.inbox-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.gold-pill-btn.small { padding: 6px 12px; font-size: 0.76rem; }
.inbox-history-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-history-row {
  width: 100%;
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 10px;
  background: rgba(20, 21, 25, 0.85);
  color: var(--q-text);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
}
.inbox-history-row:hover { border-color: var(--q-gold-bright); }
.inbox-history-meta { color: var(--q-gold-bright); font-size: 0.72rem; white-space: nowrap; }

@media (max-width: 720px) { .car-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .lux-header { padding-left: 12px; padding-right: 12px; }
  .model-btn { font-size: 0.69rem; padding: 5px 10px; }
}
