/* ================================================================
   RUPscribe — Stylesheet
   Design-Tokens und Komponenten gemäß Design „RUPscribe v2"
   ================================================================ */

:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --surface2: #e9e9e7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text2: #8e8e93;
  --sep: rgba(60, 60, 67, .09);
  --sep2: rgba(60, 60, 67, .17);
  --glass: rgba(255, 255, 255, .82);
  --scrub: #d8d8d5;
  --accent: #0a84ff;
  --rec: #ff3b30;
  --ok: #28a745;
  --warnbg: #fbf4dd;
  --warntx: #7a6200;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface2: #2c2c2e;
  --card: #1c1c1e;
  --text: #f2f2f7;
  --text2: #98989e;
  --sep: rgba(84, 84, 88, .38);
  --sep2: rgba(84, 84, 88, .55);
  --glass: rgba(28, 28, 30, .8);
  --scrub: #3a3a3c;
  --ok: #30d158;
  --warnbg: #2b291b;
  --warntx: #ffd60a;
}

@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
@keyframes wave { 0%, 100% { transform: scaleY(.3) } 50% { transform: scaleY(1) } }
@keyframes fade { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .35) }
  70% { box-shadow: 0 0 0 16px rgba(255, 59, 48, 0) }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0) }
}
@keyframes spin { to { transform: rotate(360deg) } }

* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none }
a:hover { text-decoration: underline }
input, button, select { font-family: inherit }
input::placeholder { color: #a2a2a7 }
button { cursor: pointer }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums }
.hidden { display: none !important }

/* ---------- Screens ---------- */
#app { height: 100%; position: relative }
.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fade .28s ease-out;
}
.screen.active { display: flex }

/* ---------- Typo-Bausteine ---------- */
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text2);
}
.eyebrow-lg { font-size: 12px; letter-spacing: .08em }
h1.page-title { margin: 6px 0 0; font-size: 40px; font-weight: 600; letter-spacing: -.03em }

/* ---------- Buttons ---------- */
.btn { border: none; background: transparent; color: var(--text); padding: 0 }
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--sep2); background: transparent;
  color: var(--text); font-size: 13px; font-weight: 500;
}
.btn-outline:hover { background: var(--surface) }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 12px; border: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(10, 132, 255, .28);
  transition: transform .15s;
}
.btn-primary:hover { transform: scale(1.02) }
.btn-link { border: none; background: transparent; color: var(--accent); font-size: 13px; font-weight: 500; padding: 0 }
.btn-link-dim { border: none; background: transparent; color: var(--text2); font-size: 12.5px; padding: 0 }
.btn-icon { border: none; background: transparent; color: var(--text2); padding: 6px; display: inline-flex; border-radius: 6px }
.btn-icon:hover { color: var(--text) }
.btn-cta {
  height: 46px; border-radius: 12px; border: none;
  background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(10, 132, 255, .28);
}
.btn-shipped {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px;
  border-radius: 12px; border: none; background: rgba(10, 132, 255, .12);
  color: var(--accent); font-size: 13px; font-weight: 600;
}
.btn-busy { opacity: .55; pointer-events: none }

/* Record-Buttons */
.btn-rec {
  border-radius: 50%; border: 2.5px solid var(--sep2); background: transparent;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform .2s;
}
.btn-rec:hover { transform: scale(1.06) }
.btn-rec .dot {
  display: block; border-radius: 50%; background: var(--rec);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px rgba(255, 59, 48, .32);
}
.btn-rec.size-64 { width: 64px; height: 64px } .btn-rec.size-64 .dot { width: 48px; height: 48px }
.btn-stop {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2.5px solid rgba(255, 59, 48, .35); background: transparent;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform .2s; animation: ring 1.8s ease-out infinite;
}
.btn-stop:hover { transform: scale(1.05) }
.btn-stop .sq { display: block; width: 26px; height: 26px; border-radius: 7px; background: var(--rec); box-shadow: 0 4px 14px rgba(255, 59, 48, .35) }
.btn-round-52 {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--sep2);
  background: var(--surface); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.btn-round-52:hover { background: var(--surface2) }
.ctrl-col { display: flex; flex-direction: column; align-items: center; gap: 7px }
.ctrl-col > span { font-size: 11px; color: var(--text2) }

/* ---------- Toggle ---------- */
.tgl {
  width: 46px; height: 28px; border-radius: 14px; border: none; padding: 2px;
  background: var(--surface2); transition: background .2s; display: block; flex: none;
}
.tgl .knob {
  display: block; width: 24px; height: 24px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transform: translateX(0); transition: transform .2s;
}
.tgl.on { background: var(--accent) }
.tgl.on .knob { transform: translateX(18px) }
.tgl:disabled { opacity: .4; cursor: not-allowed }

/* ---------- Segment-Control ---------- */
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface2); gap: 2px }
.seg.r9 { border-radius: 9px }
.seg > button {
  height: 28px; padding: 0 14px; border: none; border-radius: 6px;
  background: transparent; color: var(--text); font-size: 12.5px; font-weight: 500;
}
.seg.r9 > button { height: 30px; border-radius: 7px }
.seg.tall > button { height: 32px; flex: 1; font-size: 13px }
.seg > button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12) }

/* ---------- Panels & Zeilen ---------- */
.panel { background: var(--surface); border-radius: 16px; margin: 0 0 28px }
.panel-label { margin: 0 0 8px; padding: 0 16px }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--sep);
}
.panel > .row:last-child, .panel > .row.last { border-bottom: none }
.row .row-txt { display: flex; flex-direction: column; gap: 2px }
.row .row-title { font-size: 14.5px; color: var(--text) }
.row .row-sub { font-size: 12px; color: var(--text2) }

/* ---------- Inputs ---------- */
.input {
  height: 44px; border: 1px solid var(--sep2); border-radius: 12px;
  background: var(--card); padding: 0 14px; font-size: 14px; color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent) }
.input-ghost { border: none; background: transparent; outline: none; color: var(--text); padding: 0 }
.searchbar {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 12px; background: var(--surface); color: var(--text2);
}
.searchbar input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: var(--text) }
.search-x {
  border: none; background: var(--surface2); color: var(--text2); width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0; font-size: 11px; line-height: 1;
}

/* ---------- Badges ---------- */
.badge-lang {
  font-size: 10px; font-weight: 600; letter-spacing: .09em; padding: 3px 9px;
  border-radius: 6px; border: 1px solid var(--sep2); background: transparent; color: var(--text2);
  flex: none;
}
.badge-soon {
  font-size: 10px; font-weight: 600; letter-spacing: .05em; padding: 2px 8px;
  border-radius: 6px; background: var(--surface2); color: var(--text2); flex: none;
}
.shipped-ico { color: var(--accent); display: inline-flex; flex: none }
.lock-ico { color: var(--text2); display: inline-flex; flex: none }

/* ---------- Banner ---------- */
.banner {
  margin: 14px 0 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface);
  animation: fade .25s ease-out;
}
.banner.accent { background: rgba(10, 132, 255, .08) }
.banner .banner-txt { flex: 1; font-size: 13px; line-height: 1.5; color: var(--text) }

/* ---------- Home ---------- */
.home-head { padding: 44px 0 0; width: 860px; max-width: calc(100% - 48px); margin: 0 auto; flex: none }
.home-topbar { display: flex; align-items: flex-start; justify-content: space-between }
.home-actions { display: flex; align-items: center; gap: 20px }
.home-scroll { flex: 1; overflow: auto; padding: 10px 0 60px }
.home-list { width: 860px; max-width: calc(100% - 48px); margin: 0 auto }
.group-label { padding: 0 14px 8px }
.rec-group { margin: 26px 0 0 }
.rec-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 14px;
  border-radius: 12px; cursor: pointer; border-bottom: 1px solid var(--sep);
  transition: background .2s;
}
.rec-row:hover { background: var(--surface) }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px }
.rec-title-line { display: flex; align-items: center; gap: 8px; min-width: 0 }
.rec-title-line > .t { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.rec-meta { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2) }
.rename-input {
  font-size: 15px; font-weight: 500; border: none; outline: none;
  background: var(--surface2); border-radius: 6px; padding: 3px 9px;
  color: var(--text); width: min(420px, 60%);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, .3);
}
.rec-prog { display: flex; flex-direction: column; gap: 6px }
.rec-prog .p-label { font-size: 13px; color: var(--accent) }
.rec-prog .p-track { display: block; width: 220px; height: 3px; border-radius: 2px; background: var(--surface2); overflow: hidden }
.rec-prog .p-fill { display: block; width: 40%; height: 3px; border-radius: 2px; background: var(--accent); animation: pulse 1.4s ease-in-out infinite }
.row-actions { display: flex; gap: 2px; color: var(--text2) }
.row-actions button {
  border: none; background: transparent; color: inherit; padding: 6px;
  opacity: .4; border-radius: 6px; display: inline-flex;
}
.row-actions button:hover { opacity: 1; background: var(--surface2) }
.hit-row { display: flex; align-items: flex-start; gap: 16px; padding: 15px 14px; border-radius: 12px; cursor: pointer; border-bottom: 1px solid var(--sep); transition: background .2s }
.hit-row:hover { background: var(--surface) }
.hit-snippet { font-size: 13.5px; color: var(--text2); line-height: 1.55 }
.hit-snippet .hit { color: var(--accent); font-weight: 600 }
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-bottom: 80px }
.empty-circle {
  width: 110px; height: 110px; border-radius: 50%; border: 1.5px dashed var(--sep2);
  display: flex; align-items: center; justify-content: center; color: var(--text2);
}

/* ---------- Aufnahme ---------- */
.rec-screen { align-items: center }
.rec-head { flex: none; padding: 38px 0 0; display: flex; flex-direction: column; align-items: center; gap: 14px }
.source-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500;
  color: var(--text2); padding: 5px 12px; border-radius: 20px; background: var(--surface);
}
.rec-title-input {
  border: none; background: transparent; outline: none; text-align: center;
  font-size: 24px; font-weight: 600; color: var(--text); width: min(600px, 90vw);
}
.timer-line { display: flex; align-items: center; gap: 10px }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: pulse 1.4s ease-in-out infinite }
.live-dot.paused { background: var(--text2); animation: none }
.timer {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums;
  font-size: 56px; font-weight: 200; letter-spacing: .01em; color: var(--text); transition: color .2s;
}
.timer.paused { color: var(--text2) }
.save-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text2) }
.live-area {
  flex: 1; width: min(720px, calc(100vw - 56px)); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 0 28px;
}
.live-seg { margin: 16px 0 0 }
.live-sp-line { display: flex; align-items: center; gap: 8px; margin: 0 0 3px }
.sp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none }
.sp-name-input {
  border: none; background: transparent; outline: none; font-size: 12.5px; font-weight: 600;
  color: var(--text2); width: 130px; padding: 2px 0; cursor: text;
}
.sp-name-input:focus { color: var(--text) }
.pencil { color: var(--text2); opacity: .55; display: inline-flex; flex: none; pointer-events: none }
.live-text { margin: 0; font-size: 21px; line-height: 1.7; font-weight: 300; color: var(--text2); text-wrap: pretty }
.live-text.cur { color: var(--text) }
.live-text.cur .hl { background: rgba(10, 132, 255, .13); border-radius: 5px; padding: 1px 3px }
.marker-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--accent); background: rgba(10, 132, 255, .1); padding: 4px 11px; border-radius: 12px;
  animation: fade .25s ease-out;
}
.rec-foot { flex: none; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 0 0 44px }
.wave {
  display: flex; align-items: center; justify-content: center; gap: 4.5px; height: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.wave span {
  width: 2.5px; border-radius: 2px; background: var(--text); opacity: .35;
  transform-origin: center; flex: none; transition: height .12s ease-out;
}
.rec-ctrls { display: flex; align-items: center; gap: 44px }

/* ---------- Overlay / Modal ---------- */
.overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 30;
}
.modal {
  width: 400px; max-width: calc(100vw - 40px); background: var(--card); border-radius: 20px; padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 18px;
  animation: fade .25s ease-out;
}
.modal h2 { margin: 0; font-size: 19px; font-weight: 600 }
.modal-note { font-size: 12px; color: var(--text2); line-height: 1.5 }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px }
.btn-cancel { height: 36px; padding: 0 16px; border-radius: 12px; border: none; background: transparent; color: var(--accent); font-size: 14px; font-weight: 500 }
.btn-start-rec { height: 36px; padding: 0 18px; border-radius: 10px; border: none; background: var(--rec); color: #fff; font-size: 14px; font-weight: 600 }
.mode-ico { display: inline-flex; align-items: center; color: var(--text2); margin-right: 2px }
.spcount-row { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.spcount-row .seg > button { min-width: 34px }

/* Vorgeschlagene Anschlussfragen im Transkript-Chat */
.chat-suggests { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 2px }
.chat-suggests button {
  border: 1px solid var(--sep2); background: var(--surface2); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer; text-align: left;
}
.chat-suggests button:hover { border-color: var(--accent); color: var(--accent) }

/* Aufnahmeart: zwei große, selbsterklärende Karten (Meeting | Diktat) */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px 12px 11px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--sep2); background: var(--surface2); color: var(--text2);
  transition: border-color .15s, background .15s;
}
.mode-card .m-title { font-size: 14px; font-weight: 600; color: var(--text) }
.mode-card .m-sub { font-size: 11.5px; line-height: 1.35; color: var(--text2) }
.mode-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent) }
.mode-card.on .m-title { color: var(--accent) }
.consent-row { display: flex; align-items: flex-start; gap: 10px; border: none; background: transparent; padding: 0; text-align: left }
.checkbox {
  flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--sep2);
  background: transparent; display: flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px;
}
.checkbox.on { background: var(--accent); border-color: var(--accent) }
.consent-row .c-label { font-size: 13px; line-height: 1.45; color: var(--text) }

/* ---------- Detail ---------- */
.detail-head { flex: none; padding: 26px 56px 18px; border-bottom: 1px solid var(--sep) }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px }
.detail-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px }
.detail-title-input {
  border: none; background: transparent; outline: none; font-size: 30px; font-weight: 600;
  letter-spacing: -.02em; color: var(--text); width: 100%; padding: 0;
}
.detail-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--text2); flex-wrap: wrap }
.detail-meta .saved { color: var(--ok); display: inline-flex; align-items: center; gap: 4px }
.detail-actions { display: flex; align-items: center; gap: 10px; position: relative; flex: none; padding-top: 4px }
.export-menu {
  position: absolute; top: 42px; right: 40px; width: 190px; background: var(--card);
  border: 1px solid var(--sep); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
  padding: 6px; z-index: 10; display: flex; flex-direction: column; animation: fade .2s ease-out;
}
.export-menu button {
  text-align: left; border: none; background: transparent; color: var(--text);
  font-size: 13px; padding: 9px 12px; border-radius: 8px;
}
.export-menu button:hover { background: var(--surface) }
.tabs-line { flex: none; display: flex; align-items: center; gap: 14px; padding: 14px 56px 0 }
.tabs-hint { font-size: 11.5px; color: var(--text2) }
.tab-pane { flex: 1; overflow: auto; padding: 30px 56px 130px }
.tab-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 38px }
.sec-label { margin: 0 0 12px }
.summary-text { margin: 0; font-size: 17px; line-height: 1.75; font-weight: 300; color: var(--text); text-wrap: pretty }
.summary-text[contenteditable]:focus { outline: none; border-radius: 8px; box-shadow: 0 0 0 2px rgba(10, 132, 255, .25) }
.bullets { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 0 }
.bullet { display: flex; gap: 11px; align-items: baseline }
.bullet .b-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: center }
.bullet .b-txt { font-size: 15px; line-height: 1.6 }
.todo-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--sep) }
.todo-check {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--sep2);
  background: transparent; color: #fff; display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background .2s, border-color .2s;
}
.todo-check.on { background: var(--accent); border-color: var(--accent) }
.todo-t { flex: 1; font-size: 15px; color: var(--text); transition: opacity .2s }
.todo-row.done .todo-t { opacity: .45; text-decoration: line-through }
.todo-who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2) }
.todo-due { font-size: 12px; color: var(--text2); width: 84px; text-align: right }
.insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px }
.insight-card { background: var(--surface); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px }
.insight-card .i-label { font-size: 12.5px; color: var(--text2) }
.insight-card .i-value { font-size: 19px; font-weight: 500 }
.insight-card .i-note { font-size: 12.5px; line-height: 1.5; color: var(--text2) }
.share-row { display: flex; align-items: center; gap: 10px }
.share-row .s-name { font-size: 13px; width: 72px; flex: none }
.share-row .s-track { flex: 1; height: 5px; border-radius: 3px; background: var(--surface2) }
.share-row .s-fill { display: block; height: 5px; border-radius: 3px }
.share-row .s-pct { font-size: 12px; color: var(--text2); width: 34px; text-align: right; font-variant-numeric: tabular-nums }
.gen-hint { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text2) }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid var(--surface2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

/* Transkript-Tab */
.tr-wrap { flex: 1; display: flex; overflow: hidden }
.tr-scroll { flex: 1; overflow: auto; padding: 34px 56px 110px }
.tr-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px }
.tr-block .tr-head { display: flex; align-items: baseline; gap: 9px; margin: 0 0 8px }
.tr-sp-dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; flex: none }
.tr-sp-input {
  border: none; background: transparent; outline: none; padding: 0; font-size: 13px;
  font-weight: 600; color: var(--text); width: 110px; cursor: text;
}
.tr-sp-input:focus { color: var(--accent) }
.tr-ts { font-size: 11.5px; color: var(--text2); margin-left: auto }
.tr-text { margin: 0; font-size: 17px; line-height: 1.85; color: var(--text); text-wrap: pretty }
.tr-text .w { border-radius: 4px; padding: 0 1px; cursor: pointer; transition: background .15s }
.tr-text .w.cur { background: rgba(10, 132, 255, .25) }
.hide-ts .tr-ts { display: none }
.tr-side {
  flex: none; width: 280px; border-left: 1px solid var(--sep); overflow: auto;
  padding: 26px 24px 110px; display: flex; flex-direction: column; gap: 30px;
}
.side-sp-row { display: flex; align-items: center; gap: 9px }
.side-sp-row input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text); padding: 2px 0; border-bottom: 1px solid transparent;
}
.side-sp-row input:focus { border-bottom-color: var(--accent) }
.marker-row {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px; border: none;
  background: transparent; padding: 0; color: var(--text); text-align: left;
}
.marker-row:hover { color: var(--accent) }
.marker-row .m-ts { font-size: 11.5px; color: var(--text2) }
.tag-chip { font-size: 12px; padding: 4px 10px; border-radius: 14px; background: var(--surface2); color: var(--text) }
.side-toggle-row { display: flex; align-items: center; justify-content: space-between; border: none; background: transparent; padding: 0; color: var(--text) }
.tgl.small { width: 42px; height: 26px; border-radius: 13px }
.tgl.small .knob { width: 22px; height: 22px; border-radius: 11px }
.tgl.small.on .knob { transform: translateX(16px) }

/* Chat-Tab */
.chat-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden }
.chat-scroll { flex: 1; overflow: auto; padding: 30px 56px 10px }
.chat-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px }
.chat-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 0 20px }
.chat-empty .c-ico {
  width: 54px; height: 54px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.chat-empty .c-hint { font-size: 15px; color: var(--text2); text-align: center; max-width: 400px; line-height: 1.6 }
.chip-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 520px }
.chip-btns button {
  border: 1px solid var(--sep2); background: transparent; color: var(--text);
  font-size: 13px; padding: 7px 14px; border-radius: 18px;
}
.chip-btns button:hover { background: var(--surface) }
.msg-user {
  align-self: flex-end; max-width: 75%; background: var(--surface2); color: var(--text);
  border-radius: 18px 18px 5px 18px; padding: 10px 16px; font-size: 14.5px; line-height: 1.55;
}
.msg-ai { align-self: flex-start; max-width: 88%; display: flex; gap: 11px }
.msg-ai .a-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 9px }
.msg-ai p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text); text-wrap: pretty }
.msg-ai code { background: var(--surface2); border-radius: 5px; padding: 1px 5px; font-size: 13px; font-family: ui-monospace, 'SF Mono', Menlo, monospace }
.msg-ai .md-li { display: block; position: relative; padding-left: 16px }
.msg-ai .md-li::before { content: '•'; position: absolute; left: 2px; color: var(--accent) }
.typing { align-self: flex-start; color: var(--text2); font-size: 14px; animation: pulse 1.2s ease-in-out infinite; padding-left: 18px }
.chat-inputbar { flex: none; padding: 14px 56px 108px }
.chat-inputbar .bar {
  max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 48px;
  border: 1px solid var(--sep2); border-radius: 24px; padding: 0 6px 0 18px; background: var(--card);
}
.chat-inputbar input { flex: 1; border: none; background: transparent; outline: none; font-size: 14.5px; color: var(--text) }
.chat-send {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(10, 132, 255, .28);
}

/* Player-Bar */
.playerbar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: min(780px, calc(100vw - 32px)); height: 64px; border: 1px solid var(--sep); border-radius: 32px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
  display: flex; align-items: center; gap: 16px; padding: 0 22px; z-index: 15;
}
.play-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--surface2);
  color: var(--text); display: flex; align-items: center; justify-content: center; flex: none;
}
.play-btn:hover { background: var(--sep2) }
.mute-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent;
  color: var(--text); display: flex; align-items: center; justify-content: center; flex: none;
}
.mute-btn:hover { background: var(--surface2) }
.mute-btn.muted { color: var(--text2) }
.player-time { font-size: 12px; color: var(--text2); flex: none }
.scrub-wrap { flex: 1; position: relative }
.scrub { display: flex; align-items: center; gap: 2px; height: 36px; cursor: pointer }
.scrub span { flex: 1; border-radius: 1.5px; background: var(--scrub) }
.scrub span.played { background: var(--accent) }
.scrub-mark {
  position: absolute; top: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--card); cursor: pointer;
  transform: translateX(-50%); z-index: 2;
}
.speed-btn {
  height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--sep2);
  background: transparent; color: var(--text); font-size: 12px; font-weight: 600;
  flex: none; font-variant-numeric: tabular-nums;
}
.speed-btn:hover { background: var(--surface) }

/* Toast */
.toast {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 100px;
  display: flex; align-items: center; gap: 14px; background: var(--text); color: var(--bg);
  padding: 11px 12px 11px 18px; border-radius: 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  z-index: 40; animation: fade .25s ease-out;
}
.toast .t-txt { font-size: 13.5px; font-weight: 500 }
.toast button { border: none; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; padding: 0 }

/* ---------- Login ---------- */
/* Wichtig: kein position-Override — .screen ist bereits absolute+inset:0 */
.login-screen { align-items: center; justify-content: center }
.login-foot { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--text2); letter-spacing: .02em }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 0 0 44px }
.login-logo {
  width: 72px; height: 72px; border-radius: 50%; border: 2.5px solid var(--sep2);
  display: flex; align-items: center; justify-content: center;
}
.login-logo .dot {
  display: block; width: 54px; height: 54px; border-radius: 50%; background: var(--rec);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px rgba(255, 59, 48, .32);
}
.login-name { font-size: 30px; font-weight: 600; letter-spacing: -.02em }
.login-claim { font-size: 14px; color: var(--text2) }
.login-form { width: 340px; max-width: calc(100vw - 48px); display: flex; flex-direction: column; gap: 8px }
.login-hint { font-size: 12px; color: var(--text2); text-align: center; line-height: 1.5; margin: 4px 0 0 }
.login-divider { width: 340px; max-width: calc(100vw - 48px); display: flex; align-items: center; gap: 12px; margin: 32px 0 }
.login-divider span:not(.d-txt) { flex: 1; height: 1px; background: var(--sep) }
.login-divider .d-txt { font-size: 11.5px; color: var(--text2) }
.connected-box {
  display: flex; align-items: center; gap: 10px; height: 46px;
  border: 1px solid rgba(48, 209, 88, .45); border-radius: 12px;
  background: rgba(48, 209, 88, .08); padding: 0 14px;
  color: var(--ok); font-size: 14px; font-weight: 500;
}
.error-box {
  border: 1px solid rgba(255, 59, 48, .4); border-radius: 12px; background: rgba(255, 59, 48, .07);
  padding: 10px 14px; color: var(--rec); font-size: 13px; line-height: 1.5;
}

/* ---------- Einstellungen ---------- */
.settings-scroll { flex: 1; overflow: auto }
.settings-inner { width: 640px; max-width: calc(100% - 40px); margin: 0 auto; padding: 44px 0 80px }
.settings-inner h1 { margin: 0 0 30px; font-size: 40px; font-weight: 600; letter-spacing: -.03em }
.value-input { flex: 1; text-align: right; border: none; background: transparent; outline: none; font-size: 14.5px; color: var(--text2) }
.value-input:focus { color: var(--text) }
.key-mask { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text2) }
.key-input {
  flex: 1; border: none; background: transparent; outline: none; text-align: right;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text);
}
.conn-ok-row { display: flex; align-items: center; gap: 9px; padding: 14px 18px; border-bottom: 1px solid var(--sep); color: var(--ok) }
.conn-ok-row span { font-size: 14.5px; font-weight: 500 }
.logout-btn {
  width: 100%; display: flex; justify-content: center; border: none; background: transparent;
  color: var(--rec); font-size: 14.5px; font-weight: 500; padding: 14px 18px; border-radius: 16px;
}
.logout-btn:hover { background: var(--surface2) }
.settings-foot { font-size: 11.5px; color: var(--text2); text-align: center; margin: 14px 0 0 }
.lang-row { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border: none; background: transparent; text-align: left }
.lang-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border: none; border-top: 1px solid var(--sep); background: transparent; text-align: left }
.chev { transition: transform .2s }
.chev.open { transform: rotate(90deg) }
.dl-track { display: block; height: 4px; border-radius: 2px; background: var(--surface2); overflow: hidden }
.dl-fill { display: block; height: 4px; border-radius: 2px; background: var(--accent); transition: width .3s }

/* ---------- Admin ---------- */
.admin-wrap { flex: 1; display: flex; overflow: hidden }
.admin-nav {
  flex: none; width: 216px; border-right: 1px solid var(--sep); padding: 36px 14px;
  display: flex; flex-direction: column; gap: 2px; background: var(--surface);
}
.admin-nav .nav-label { padding: 0 12px 18px }
.admin-nav button {
  text-align: left; border: none; border-radius: 8px; background: transparent;
  color: var(--text2); font-size: 13.5px; font-weight: 500; padding: 9px 12px;
}
.admin-nav button:hover { color: var(--text) }
.admin-nav button.on { background: var(--surface2); color: var(--text) }
.admin-nav .back-app { margin-top: auto; color: var(--accent) }
.admin-main { flex: 1; overflow: auto; padding: 44px 48px 60px }
.admin-main h1 { margin: 0 0 26px; font-size: 30px; font-weight: 600; letter-spacing: -.02em }
.warn-banner {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px;
  background: var(--warnbg); color: var(--warntx); font-size: 13px; margin: 0 0 26px;
}
.warn-banner .w-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 16px }
.stat-card { border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 9px; background: var(--surface) }
.stat-card .s-label { font-size: 12.5px; color: var(--text2) }
.stat-card .s-value { font-size: 31px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.stat-card .s-sub { font-size: 12px; color: var(--text2) }
.chart-card { border-radius: 18px; padding: 26px; background: var(--surface) }
.chart-card .c-title { font-size: 13.5px; font-weight: 600; margin: 0 0 16px }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--text2); padding: 6px 0 0 }
.prov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.prov-card { background: var(--surface); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px }
.prov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.prov-name { font-size: 15px; font-weight: 600 }
.prov-role { font-size: 12px; color: var(--text2) }
.prov-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; flex: none }
.prov-status .p-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.prov-key-row { display: flex; align-items: center; gap: 10px }
.prov-key {
  flex: 1; min-width: 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px;
  color: var(--text2); background: var(--surface2); border-radius: 8px; padding: 8px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: none; outline: none;
}
input.prov-key { color: var(--text) }
.btn-test {
  height: 32px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--sep2);
  background: transparent; color: var(--text); font-size: 12.5px; font-weight: 500; flex: none;
}
.btn-test:hover { background: var(--surface2) }
.route-panel { background: var(--surface); border-radius: 16px }
.route-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid var(--sep) }
.route-row:last-child { border-bottom: none }
.route-row .r-label { font-size: 14px; display: inline-flex; align-items: center; gap: 8px }
.select {
  border: 1px solid var(--sep2); border-radius: 8px; background: var(--card); color: var(--text);
  font-size: 12.5px; padding: 6px 10px; cursor: pointer;
}
.users-table { background: var(--surface); border-radius: 18px; overflow: hidden }
.users-head, .user-row { display: grid; grid-template-columns: 1.1fr 1.5fr .9fr 1fr .8fr; gap: 12px; padding: 13px 22px; align-items: center }
.users-head { padding: 12px 22px }
.user-row { border-top: 1px solid var(--sep) }
.user-row .u-name { font-size: 14px; font-weight: 500 }
.user-row .u-mail { font-size: 13px; color: var(--text2); overflow: hidden; text-overflow: ellipsis }
.user-row .u-last { font-size: 12.5px; color: var(--text2) }
.status-pill { justify-self: start; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px }
.status-pill.active { background: rgba(48, 209, 88, .15); color: var(--ok) }
.status-pill.invited { background: var(--surface2); color: var(--text2) }
.admin-hint { font-size: 13px; color: var(--text2); line-height: 1.6; max-width: 520px }

/* ---------- Mobile ---------- */
.mobile-tabbar { display: none }
@media (max-width: 1060px) {
  .prov-grid { grid-template-columns: 1fr }
  .stat-grid { grid-template-columns: 1fr 1fr }
  .insights-grid { grid-template-columns: 1fr }
}
@media (max-width: 760px) {
  h1.page-title { font-size: 32px; font-weight: 700 }
  .home-head { padding-top: 24px; width: auto; max-width: none; margin: 0; padding-left: 20px; padding-right: 20px }
  .home-list { width: auto; max-width: none; padding: 0 20px }
  .home-actions { display: none }
  .home-scroll { padding-bottom: 130px }
  .mobile-tabbar {
    display: flex; position: absolute; left: 0; right: 0; bottom: 0; height: 104px;
    background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--sep); align-items: center; justify-content: space-between;
    padding: 0 40px 12px; z-index: 20;
  }
  .mobile-tabbar .btn-icon { color: var(--text2) }
  .rec-row, .hit-row { padding: 12px 0; border-radius: 0 }
  .rec-row:hover, .hit-row:hover { background: transparent }
  .row-actions { display: none }
  .detail-head { padding: 20px 20px 14px }
  .detail-title-line { flex-direction: column; gap: 12px }
  .detail-title-input { font-size: 22px }
  .detail-meta { row-gap: 2px }
  .detail-actions { padding-top: 0; flex-wrap: wrap; justify-content: flex-start }
  .detail-actions #btn-sidebar { display: none }
  .export-menu { top: 42px; right: auto; left: 0 }
  .tabs-line { padding: 12px 20px 0; flex-wrap: wrap }
  .tabs-hint { display: none }
  .tab-pane { padding: 24px 20px 150px }
  .tr-scroll { padding: 24px 20px 150px }
  .tr-side { display: none }
  .chat-scroll { padding: 24px 20px 10px }
  .chat-inputbar { padding: 10px 16px 120px }
  .playerbar { bottom: 12px; padding: 0 14px; gap: 10px }
  .mute-btn { display: none }
  .rec-head { padding-top: 24px }
  .timer { font-size: 30px; font-weight: 300 }
  .rec-title-input { font-size: 19px }
  .live-area { width: auto; align-self: stretch; padding: 20px 28px 22px }
  .live-text { font-size: 17px }
  .rec-ctrls { gap: 36px }
  .wave-wrap-outer { width: 300px !important }
  .settings-inner { padding-top: 24px }
  .settings-inner h1 { font-size: 32px }
  .stat-grid { grid-template-columns: 1fr 1fr }
  .prov-grid { grid-template-columns: 1fr }
  .insights-grid { grid-template-columns: 1fr }
  .admin-wrap { flex-direction: column }
  .admin-nav {
    width: auto; flex-direction: row; overflow-x: auto; padding: 12px 14px; gap: 6px;
    border-right: none; border-bottom: 1px solid var(--sep); align-items: center;
  }
  .admin-nav .nav-label { display: none }
  .admin-nav button { flex: none }
  .admin-nav .back-app { margin-top: 0; margin-left: auto }
  .admin-main { padding: 24px 20px 60px }
  .users-head, .user-row { grid-template-columns: 1fr 1fr; row-gap: 6px }
  .users-head span:nth-child(n+3) { display: none }
}
