/* Videotagebuch für Windows. Farben aus dem App-Icon (Indigo, Violett, Koralle), Schriften von Windows. */

:root {
  --bg: #f7f6fa;
  --sidebar: #efedf4;
  --surface: #ffffff;
  --surface-2: #f3f1f7;
  --line: rgba(35, 25, 60, 0.1);
  --line-strong: rgba(35, 25, 60, 0.2);
  --text: #1c1a23;
  --muted: #6b6678;
  --faint: #9b96a7;
  --accent: #6a46e5;
  --accent-hover: #5b38d6;
  --accent-soft: rgba(106, 70, 229, 0.12);
  --accent-text: #5b38d6;
  --red: #e5484d;
  --red-hover: #d43a3f;
  --warn: #b25d0a;
  --shadow: 0 1px 2px rgba(25, 15, 45, 0.06), 0 8px 26px rgba(25, 15, 45, 0.08);
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --serif: "Sitka Text", "Sitka Small", ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --serif-display: "Sitka Heading", "Sitka Display", "Sitka Text", ui-serif, "New York", Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17151d;
    --sidebar: #1e1b26;
    --surface: #24212d;
    --surface-2: #2b2835;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f2f0f7;
    --muted: #a6a1b3;
    --faint: #777284;
    --accent: #8b6cf6;
    --accent-hover: #9b80fa;
    --accent-soft: rgba(139, 108, 246, 0.2);
    --accent-text: #b4a0ff;
    --warn: #f0a85a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--serif-display); font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }
.icon { display: inline-flex; flex: none; line-height: 0; }

/* MARK: Knöpfe und Felder */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 500; white-space: nowrap; transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.record { background: var(--red); border-color: transparent; color: #fff; }
.btn.record:hover:not(:disabled) { background: var(--red-hover); }
.btn.danger { background: var(--red); border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: rgba(127, 127, 127, 0.14); }
.btn.light { color: #fff; background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.08); }
.btn.light:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); }
.btn.big { height: 44px; padding: 0 20px; font-size: 16px; font-weight: 600; border-radius: 11px; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn[aria-label]:not(:has(.label)) { width: 34px; padding: 0; }

.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none;
  border: none; border-radius: 8px; background: transparent; color: inherit; opacity: 0.75;
  transition: background 0.15s, opacity 0.15s;
}
.icon-btn:hover { background: rgba(127, 127, 127, 0.16); opacity: 1; }
.icon-btn.faint { opacity: 0.5; }

.link {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; padding: 0; color: var(--accent-text); font-weight: 500;
}
.link:hover { text-decoration: underline; }
.link.light { color: rgba(255, 255, 255, 0.75); }

input[type=text], input[type=date], input[type=time], select, textarea {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-size: 14px; min-height: 34px;
}
select { padding-right: 28px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22); border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* MARK: Gerüst */

.shell { display: grid; grid-template-columns: 300px 1fr; height: 100vh; }
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--sidebar); border-right: 1px solid var(--line);
  transition: opacity 0.3s;
}
.shell.recording .sidebar { opacity: 0.4; pointer-events: none; }
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 8px 16px; }
.sidebar-head img { border-radius: 6px; }
.app-name { font-weight: 600; font-size: 15px; }
.year { margin-left: auto; min-height: 30px; padding: 3px 26px 3px 10px; font-weight: 600; background-color: transparent; border-color: var(--line); }
.entries { flex: 1; overflow: auto; padding: 0 8px 20px; }
.empty { padding: 18px 10px; color: var(--muted); }
.empty strong { display: block; color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--faint); }
.month h2 {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between;
  padding: 14px 8px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--sidebar);
}
.month h2 .muted { font-weight: 400; color: var(--faint); }

.entry-row {
  display: flex; gap: 11px; width: 100%; padding: 8px; margin: 1px 0;
  border: none; border-radius: 10px; background: transparent; color: inherit; text-align: left;
  transition: background 0.15s;
}
.entry-row:hover { background: rgba(127, 127, 127, 0.1); }
.entry-row.selected { background: var(--accent-soft); }
.entry-row.selected .row-date { color: var(--accent-text); }
.thumb {
  position: relative; display: grid; place-items: center; flex: none;
  width: 72px; height: 46px; margin-top: 2px; border-radius: 7px; overflow: hidden;
  background: var(--surface-2); color: var(--faint);
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fade 0.25s; }
.thumb.locked img { filter: blur(6px) saturate(0.4); transform: scale(1.2); }
.thumb-lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.28); color: #fff; }
.thumb.locked:not(.loaded) .thumb-lock { background: transparent; color: var(--faint); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-top { display: flex; justify-content: space-between; gap: 8px; }
.row-date { font-weight: 600; }
.row-dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.row-sub {
  font-size: 13px; line-height: 1.35; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-sub.occasion { color: var(--accent-text); }
.row-sub.occasion .icon { display: inline-flex; vertical-align: -2px; margin-right: 4px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.toolbar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px; flex: none; }
.tools-view, .tools-global, .view-tools { display: flex; align-items: center; gap: 6px; }
.tools-global { gap: 8px; }
.shell.record-mode .toolbar { display: none; }
.content { flex: 1; min-height: 0; overflow: auto; position: relative; }

@keyframes fade { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* MARK: Willkommen */

.welcome { max-width: 780px; margin: 0 auto; padding: 24px 28px 60px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.welcome-logo { width: 112px; height: 112px; margin-top: 18px; filter: drop-shadow(0 8px 18px rgba(60, 30, 120, 0.18)); animation: logoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes logoIn { from { opacity: 0; transform: scale(0.85); } }
.welcome h1 { font-size: 30px; line-height: 1.2; margin-top: 18px; }
.welcome > .muted { margin-top: 6px; font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; width: 100%; }
.step { padding: 14px; border-radius: 12px; background: rgba(127, 127, 127, 0.08); text-align: left; animation: fadeUp 0.45s both; }
.step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.step-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.step p { color: var(--muted); font-size: 13.5px; }
.welcome > .btn { margin-top: 28px; }
.kbd-hint { margin-top: 8px; font-size: 12px; color: var(--faint); }
.welcome > .link { margin-top: 22px; }
.notices { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.notices:not(:empty) { margin-bottom: 8px; }
.notice {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: fadeUp 0.5s both;
}
.notice > div { flex: 1; }
.notice > .icon { color: var(--accent-text); }
.notice p { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.notice.special { background: linear-gradient(135deg, rgba(106, 70, 229, 0.13), rgba(240, 110, 120, 0.13)), var(--surface); }

/* MARK: Aufnahme */

.rec { height: 100%; padding: 14px; }
.rec-frame { position: relative; height: 100%; border-radius: 18px; overflow: hidden; background: #000; color: #fff; }
.rec-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); opacity: 0.25; transition: opacity 0.4s ease;
}
.rec[data-phase=ready] .rec-video, .rec[data-phase=recording] .rec-video { opacity: 1; }
.rec-layer { position: absolute; inset: 0; display: flex; }
.rec-center { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 520px; padding: 30px; text-align: center; }
.rec-center h2 { font-size: 18px; }
.rec-center p { color: rgba(255, 255, 255, 0.82); }
.rec-center .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.failure .icon { opacity: 0.85; }
.rec-top { padding: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(10px); color: #fff; font-size: 14px;
}
.mic { display: inline-flex; align-items: center; gap: 7px; }
.mic .icon { opacity: 0.85; }
.mic.hot .icon { opacity: 1; }
.mic-bars { display: inline-flex; align-items: center; gap: 2.5px; height: 17px; }
.mic-bars i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); transition: background 0.08s; }
.mic-bars i.on { background: #4ade80; }
.mic-bars i.peak { background: #fb923c; }

.ready { display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; animation: fade 0.3s; }
.panel {
  display: flex; flex-direction: column; gap: 16px;
  width: min(800px, calc(100% - 48px)); max-height: calc(100% - 92px); margin: 0 auto 26px; padding: 24px 26px 22px;
  overflow: auto; border-radius: 18px; color: #fff;
  background: rgba(24, 20, 34, 0.58); backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-head h2 { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.72); }
.panel-head p { margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.q-tools { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.rec .btn.ghost { color: rgba(255, 255, 255, 0.85); }
.rec .btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.q-list { display: flex; flex-direction: column; gap: 14px; }
.q-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; }
.q-row.new { animation: fadeUp 0.3s both; }
.q-num { padding-top: 5px; text-align: center; font-weight: 600; font-size: 15px; color: rgba(255, 255, 255, 0.5); }
.q-text { font: 21px/1.3 var(--serif); text-wrap: pretty; }
.q-row.einstieg .q-text { font-size: 18px; color: rgba(255, 255, 255, 0.85); }
.q-side { display: flex; align-items: center; gap: 4px; padding-top: 2px; }
.tag { margin-right: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.65); font-size: 12px; font-weight: 500; white-space: nowrap; }
.q-empty { font: 20px var(--serif); }
.panel-foot { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.hint { margin-left: auto; font-size: 13px; color: rgba(255, 255, 255, 0.55); }

.segmented { display: inline-flex; margin-top: 8px; padding: 2px; border-radius: 8px; background: rgba(127, 127, 127, 0.16); }
.segmented button { padding: 3px 10px; border: none; border-radius: 6px; background: transparent; font-size: 12.5px; opacity: 0.8; }
.segmented button.on { background: var(--surface); color: var(--text); opacity: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.segmented.dark { background: rgba(255, 255, 255, 0.12); }
.segmented.dark button.on { background: rgba(255, 255, 255, 0.92); color: #1c1a23; }

.own { display: flex; flex-direction: column; gap: 5px; }
.rec .own { padding-left: 32px; }
.own-field { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 10px; border-radius: 10px; background: rgba(127, 127, 127, 0.12); }
.own.dark .own-field { background: rgba(255, 255, 255, 0.1); }
.own-plus { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; flex: none; }
.own.dark .own-plus { background: rgba(255, 255, 255, 0.55); color: #1c1a23; }
.own-input { flex: 1; min-width: 0; border: none !important; background: transparent !important; padding: 2px 0 !important; min-height: 26px !important; outline: none !important; font-size: 14.5px !important; }
.own.dark .own-input { font-size: 17px !important; color: #fff; }
.own.dark .own-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.own-hint { padding-left: 4px; font-size: 12px; color: var(--muted); }
.own.dark .own-hint { color: rgba(255, 255, 255, 0.5); }

.countdown { position: relative; display: grid; place-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.3); animation: fade 0.25s; }
.countdown .rec-top { position: absolute; top: 0; left: 0; }
.count-center { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 0 30px; text-align: center; }
.count-num { font: 300 150px/1 var(--serif-display); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); font-variant-numeric: tabular-nums; animation: countIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes countIn { from { opacity: 0; transform: scale(1.35); filter: blur(6px); } }
.count-first { display: flex; flex-direction: column; gap: 8px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }
.count-q { max-width: 660px; font: 24px/1.3 var(--serif); }
.count-foot { position: absolute; left: 22px; bottom: 22px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.eyebrow.small { font-size: 11px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.45); }

.live { display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; animation: fade 0.4s; }
.live-top { position: relative; padding: 26px 160px 70px; text-align: center; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.35) 55%, transparent); }
.rec-badge { position: absolute; left: 22px; top: 22px; font-variant-numeric: tabular-nums; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.rec-paused, .rec-paused-icon { display: none; }
.rec-badge.paused .rec-dot { display: none; }
.rec-badge.paused .rec-paused, .rec-badge.paused .rec-paused-icon { display: inline-flex; font-weight: 600; }
.live-question { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.live-q { max-width: 840px; font: 34px/1.28 var(--serif-display); text-wrap: balance; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5); transition: opacity 0.3s; }
.live-q.enter { animation: qIn 0.6s ease both; }
@keyframes qIn { from { opacity: 0; transform: translateY(-8px); } }
.rec.paused .live-q { opacity: 0.45; }
.live-bottom { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 50px 40px 34px; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent); }
.live-next { display: flex; align-items: baseline; gap: 8px; max-width: 700px; min-width: 0; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); animation: fade 0.4s; }
.live-next-text { font: 16px var(--serif); color: rgba(255, 255, 255, 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-buttons { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.live-buttons .btn { height: 40px; padding: 0 16px; font-size: 15px; }
.live-done { color: rgba(255, 255, 255, 0.72); }

/* MARK: Eintrag und Zeitreise */

.detail { display: flex; flex-direction: column; min-height: 100%; }
.stage-wrap { padding: 2px 20px 0; }
.stage {
  position: relative; width: min(100%, calc(64vh * 16 / 9)); aspect-ratio: 16 / 9; margin: 0 auto;
  overflow: hidden; border-radius: 14px; background: #000;
}
.player { display: block; width: 100%; height: 100%; background: #000; }
.locked-view {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 30px; text-align: center; color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(240, 110, 120, 0.28), transparent 55%), radial-gradient(circle at 70% 80%, rgba(106, 70, 229, 0.5), transparent 60%), #120e1d;
}
.locked-icon { opacity: 0.9; margin-bottom: 4px; }
.locked-title { font: 23px/1.25 var(--serif-display); max-width: 520px; }
.locked-until { color: rgba(255, 255, 255, 0.62); }
.locked-view .btn { margin-top: 8px; }
.detail-info { width: 100%; max-width: 1000px; margin: 0 auto; padding: 18px 24px 34px; }
.detail-head { display: flex; flex-direction: column; gap: 4px; }
.detail-head h1 { font-size: 26px; line-height: 1.2; }
.detail-head .eyebrow { color: var(--muted); }
.occasion { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--accent-text); font-weight: 500; }
.grace { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.q-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.q-line { display: flex; gap: 8px; }
.q-play {
  flex: 1; display: flex; align-items: baseline; gap: 14px; padding: 11px 12px; text-align: left;
  border: none; border-radius: 10px; background: rgba(127, 127, 127, 0.07); color: inherit;
  transition: background 0.25s;
}
.q-play:hover { background: rgba(127, 127, 127, 0.13); }
.q-play.current { background: var(--accent-soft); }
.q-play > .icon { align-self: center; color: var(--faint); transition: color 0.25s; }
.q-play.current > .icon { color: var(--accent-text); }
.q-time { flex: none; width: 44px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-time.end { width: auto; margin-left: auto; }
.q-play-text { flex: 1; font: 17px/1.35 var(--serif); }
.q-kind { font-size: 12px; color: var(--muted); }
.tt-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; flex: none;
  border: none; border-radius: 10px; background: rgba(127, 127, 127, 0.07); color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.tt-btn:hover { background: var(--accent-soft); }
.file-where { display: flex; gap: 6px; align-items: flex-start; margin-top: 24px; font-size: 12.5px; color: var(--faint); user-select: text; }
.file-where span { word-break: break-all; }

.tt-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; opacity: 0; transition: opacity 0.4s ease; }
.tt-video.on { opacity: 1; }
.tt-badge {
  position: absolute; top: 16px; left: 16px; padding: 7px 14px; border-radius: 999px; pointer-events: none;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); color: #fff; font: 17px var(--serif-display);
}
.tt-badge.enter { animation: qIn 0.5s ease both; }
.tt-message { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.7); }
.tt-controls {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 12px; color: #fff;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(12px);
  transition: opacity 0.3s;
}
.tt-stage.playing:not(:hover) .tt-controls { opacity: 0; }
.tt-ctrl { display: grid; place-items: center; width: 34px; height: 34px; border: none; border-radius: 8px; background: transparent; color: #fff; }
.tt-ctrl:hover { background: rgba(255, 255, 255, 0.15); }
.tt-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); cursor: pointer; touch-action: none; }
.tt-bar::before { content: ""; position: absolute; inset: -8px 0; }
.tt-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #fff; }
.tt-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(0, 0, 0, 0.7); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3); }
.tt-time { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.85); white-space: nowrap; }

/* MARK: Dialoge */

dialog.sheet {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text);
  box-shadow: 0 28px 90px rgba(10, 5, 25, 0.38);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheetIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
dialog.sheet::backdrop { background: rgba(15, 10, 28, 0.38); animation: fade 0.2s; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 14px; }
.sheet-head h2 { font-size: 20px; font-weight: 600; }
.sheet-sub { margin-top: 3px; font-size: 14px; color: var(--muted); }
.sheet-pad { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 14px; }
.sheet-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.sheet-foot.plain { padding: 6px 0 0; border: none; }
.warning { margin: 0 20px 10px; color: var(--warn); font-size: 14px; }

dialog.picker { height: min(680px, calc(100vh - 48px)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border: none; border-radius: 999px;
  background: rgba(127, 127, 127, 0.13); font-size: 13.5px; transition: background 0.15s;
}
.chip:hover { background: rgba(127, 127, 127, 0.2); }
.chip.on { background: var(--accent); color: #fff; font-weight: 600; }
.chip-count { padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; }
.chip.on .chip-count { background: rgba(255, 255, 255, 0.25); color: #fff; }
.pick-list { flex: 1; min-height: 0; overflow: auto; padding-bottom: 12px; border-top: 1px solid var(--line); }
.pick-section h3 {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 8px;
  padding: 14px 20px 6px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted);
}
.pick-section h3 .muted { font-weight: 400; color: var(--faint); }
.pick-section h3 .count { margin-left: auto; font-weight: 400; color: var(--faint); }
.pick-row { display: grid; grid-template-columns: 1fr auto; align-items: start; padding: 5px 14px 5px 20px; transition: background 0.15s; }
.pick-row:hover { background: rgba(127, 127, 127, 0.06); }
.pick-label { display: flex; align-items: flex-start; gap: 10px; padding: 3px 0; cursor: pointer; }
.pick-label input { margin-top: 3px; }
.pick-text { display: block; font-size: 14.5px; line-height: 1.35; }
.pick-detail { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.row-action { opacity: 0 !important; }
.pick-row:hover .row-action, .row-action:focus-visible { opacity: 0.6 !important; }
.pick-span { grid-column: 1 / -1; padding: 0 0 6px 26px; }
.pick-span .segmented { margin-top: 2px; }
.manage-row { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 20px; }
.manage-row:hover { background: rgba(127, 127, 127, 0.06); }
.manage-text { flex: 1; font-size: 14.5px; line-height: 1.35; padding: 3px 0; }
.manage-row.editing { align-items: flex-start; }
.edit-field { flex: 1; resize: vertical; font-size: 14.5px; line-height: 1.35; }
.add-row { flex-direction: row !important; align-items: center; }
.add-row .own-field { flex: 1; }
.add-row .own-input { font-size: 14.5px !important; }

dialog.alert { width: min(400px, calc(100vw - 32px)); }
.alert-body { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; text-align: center; }
.alert-icon img { width: 56px; height: 56px; margin-bottom: 4px; }
.alert-body h2 { font-size: 17px; font-weight: 600; }
.alert-body p { color: var(--muted); font-size: 14px; }
.alert-body .buttons { display: flex; gap: 10px; width: 100%; margin-top: 12px; }
.alert-body .buttons .btn { flex: 1; }

dialog.opening { width: min(520px, calc(100vw - 32px)); }
.opening form { display: flex; flex-direction: column; gap: 16px; padding: 24px; overflow: auto; }
.opening h2 { font-size: 21px; line-height: 1.25; }
.opening .sheet-sub { margin-top: -8px; }
.radios { display: flex; flex-direction: column; gap: 1px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.radio:hover { background: rgba(127, 127, 127, 0.08); }
.radio > span { flex: 1; }
.radio input[type=date] { min-height: 30px; padding: 3px 8px; }
.radio input[type=date]:disabled { opacity: 0.5; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.opening .link { align-self: flex-start; font-size: 13.5px; }

dialog.settings { width: min(580px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); }
.settings-body { flex: 1; overflow: auto; padding: 0 20px 24px; }
.set-group h3 { margin: 16px 4px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.set-group:first-child h3 { margin-top: 0; }
.set-card { padding: 2px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.set-row.stacked { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; }
.set-row.stacked .set-foot { margin: 0 0 4px; }
.set-row.buttons { justify-content: flex-start; gap: 8px; }
.set-foot { margin: 8px 4px 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* MARK: Menü und Hinweise */

.menu {
  position: fixed; inset: auto; margin: 0; min-width: 230px; max-width: 420px; overflow: auto; padding: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text);
  box-shadow: 0 14px 44px rgba(10, 5, 25, 0.25); animation: menuIn 0.14s ease-out;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.menu-wide { max-width: 500px; }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: none; border-radius: 7px;
  background: none; color: inherit; text-align: left; font-size: 14px;
}
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--accent); color: #fff; outline: none; }
.menu-item:disabled { opacity: 0.4; }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: var(--red); color: #fff; }
.menu-label { flex: 1; line-height: 1.35; }
.menu-detail { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.menu-item:hover .menu-detail, .menu-item:focus-visible .menu-detail { color: rgba(255, 255, 255, 0.8); }
.menu-item.has-sub .icon { transition: transform 0.15s; opacity: 0.6; }
.menu-item.has-sub.open .icon { transform: rotate(90deg); }
.menu-sub { margin: 2px 0 6px 12px; padding-left: 6px; border-left: 2px solid var(--line); }
.menu-section { padding: 9px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.menu-note { max-width: 320px; padding: 10px; font-size: 13.5px; color: var(--muted); }
.menu-divider { height: 1px; margin: 5px 4px; background: var(--line); }

.toasts {
  position: fixed; inset: auto 0 26px 0; margin: 0 auto; width: max-content; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; border: none; background: transparent; overflow: visible;
}
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 10px 18px; border-radius: 14px;
  background: rgba(30, 26, 40, 0.94); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s;
}
.toast.in { opacity: 1; transform: none; }
.toast-action { border: none; background: rgba(255, 255, 255, 0.16); color: #fff; padding: 3px 10px; border-radius: 7px; }

/* MARK: Begrüßung, Ordner wählen */

body:has(.welcome-screen) { background: #0e0a1a; }

.welcome-screen {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; overflow: auto;
  background: radial-gradient(ellipse at 50% 120%, #3a1d5c 0%, #1a1030 45%, #0e0a1a 100%); color: #fff;
  animation: fade 0.5s;
}
.welcome-screen.leaving { animation: fadeOut 0.5s forwards; }
@keyframes fadeOut { to { opacity: 0; transform: scale(1.02); } }
.glow { position: fixed; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.g1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: #4b2bd6; animation: drift1 22s ease-in-out infinite alternate; }
.g2 { width: 38vmax; height: 38vmax; right: -10vmax; bottom: -12vmax; background: #e9586b; opacity: 0.38; animation: drift2 26s ease-in-out infinite alternate; }
.g3 { width: 26vmax; height: 26vmax; right: 12vmax; top: 8vmax; background: #8f3fd0; opacity: 0.3; animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-7vmax, -5vmax) scale(1.08); } }
.welcome-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 640px; padding: 48px 28px; text-align: center; }
.welcome-inner h1 { font-size: 32px; line-height: 1.2; }
.welcome-icon { filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.4)); margin-bottom: 6px; animation: logoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.welcome-lead { max-width: 520px; font-size: 16px; color: rgba(255, 255, 255, 0.78); }
.welcome-points { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; padding: 16px 18px; list-style: none; text-align: left; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); }
.welcome-points li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, 0.85); }
.welcome-points .icon { margin-top: 2px; color: #c9b8ff; }
.welcome-error { max-width: 480px; color: #ffb9b9; }
.welcome-screen .link.light { margin-top: 6px; }

.gift-icon { width: 132px; height: 132px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45)); animation: giftIcon 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both, float 6s 1.4s ease-in-out infinite; }
@keyframes giftIcon { from { opacity: 0; transform: translateY(16px) scale(0.9); filter: blur(8px); } }
@keyframes float { 50% { transform: translateY(-6px); } }
.gift-text { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.gift-line { font: 21px/1.45 var(--serif); color: rgba(255, 255, 255, 0.88); text-wrap: balance; animation: lineIn 1.2s ease both; }
.gift-line.first { font: 44px/1.15 var(--serif-display); color: #fff; margin-bottom: 6px; }
@keyframes lineIn { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.gift-from { font: italic 18px var(--serif); color: rgba(255, 255, 255, 0.7); animation: lineIn 1.2s ease both; }
.gift-go { margin-top: 18px; animation: lineIn 0.9s ease both; }
.gift-skip { position: fixed; top: 16px; right: 18px; border: none; background: none; color: rgba(255, 255, 255, 0.4); font-size: 13px; }
.gift-skip:hover { color: rgba(255, 255, 255, 0.8); }
.welcome-screen.instant * { animation-delay: 0s !important; }
.welcome-screen.instant .gift-skip { display: none; }

/* MARK: Schmale Fenster */

@media (max-width: 900px) {
  .shell { grid-template-columns: 250px 1fr; }
  .tag, .hint { display: none; }
  .live-top { padding: 70px 24px 50px; }
  .live-q { font-size: 27px; }
  .steps { grid-template-columns: 1fr; }
  .tools-global .btn .label { display: none; }
  .tools-global .btn { width: 34px; padding: 0; }
}
@media (max-width: 620px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}
