/* ==========================================================================
   Command Hub · App-Dashboard — Modern Spatial & Bento Design System
   ========================================================================== */

:root {
  /* Dark Theme (Default Obsidian Glass) */
  --bg-base: #080a0f;
  --bg-elevated: rgba(19, 23, 34, 0.72);
  --bg-card: rgba(23, 28, 41, 0.68);
  --bg-card-hover: rgba(30, 36, 54, 0.84);
  --bg-glass-strong: rgba(15, 18, 28, 0.88);
  --bg-input: rgba(10, 13, 20, 0.65);

  --text-primary: #f3f5fa;
  --text-secondary: #9ba3b8;
  --text-muted: #646d85;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-highlight: rgba(255, 255, 255, 0.15);
  --card-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);

  --accent-primary: #ff2a5c;
  --accent-gold: #f5b82e;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html[data-theme="light"] {
  --bg-base: #f2f5fa;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.96);
  --bg-glass-strong: rgba(248, 250, 254, 0.94);
  --bg-input: rgba(237, 241, 248, 0.85);

  --text-primary: #111625;
  --text-secondary: #4f5973;
  --text-muted: #7c86a1;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-highlight: rgba(15, 23, 42, 0.16);
  --card-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   Ambient Background Mesh & Grid
   ========================================================================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.26;
  transition: opacity 0.4s ease;
  animation: floatOrb 22s ease-in-out infinite alternate;
}

html[data-theme="light"] .ambient-orb {
  opacity: 0.16;
}

.orb-1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, #ff2a5c 0%, transparent 70%);
  top: -180px;
  left: -120px;
}

.orb-2 {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, #f5b82e 0%, transparent 70%);
  top: 15%;
  right: -200px;
  animation-delay: -7s;
}

.orb-3 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
  bottom: -200px;
  left: 25%;
  animation-delay: -14s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.08); }
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 30%, transparent 100%);
  opacity: 0.45;
}

/* ==========================================================================
   Shared Glass Panel
   ========================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  line-height: 1.2;
}

html[data-theme="light"] kbd {
  background: rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   Top Navigation Bar (with integrated Center Clock & Chronograph Pro)
   ========================================================================== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-elevated);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(env(safe-area-inset-top) + 10px) 24px 10px;
}

.top-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-self: start;
}

.top-actions {
  justify-self: end;
}

.header-clock-card {
  position: relative;
  justify-self: center;
  min-width: 356px;
  padding: 8px 16px 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.038);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.header-clock-card .clock-header {
  padding: 0 26px;
}

html[data-theme="light"] .header-clock-card {
  background: rgba(15, 23, 42, 0.032);
}

.header-clock-card .clock-date {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}

.header-clock-card .clock-main-row {
  gap: 14px;
}

.header-clock-card .clock-time {
  font-size: clamp(1.75rem, 2.6vw, 2.15rem);
  line-height: 1;
}

.header-clock-card .clock-seconds {
  font-size: 0.96rem;
}

.header-clock-card .clock-chrono-pill {
  padding: 4.5px 11px;
  font-size: 0.74rem;
  gap: 6px;
}

@media (max-width: 1180px) {
  .top-bar-inner {
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }

  .header-clock-card {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    min-width: 0;
    padding: 9px 14px 10px;
  }
}

.brand-logo-wrap {
  position: relative;
  width: 40px;
  height: 40px;
}

.brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(255, 42, 92, 0.3);
}

.brand-pulse {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 2px solid var(--bg-base);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(245, 184, 46, 0.12);
  border: 1px solid rgba(245, 184, 46, 0.32);
  color: var(--accent-gold);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.version-badge:hover {
  background: rgba(245, 184, 46, 0.24);
}

.update-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 1332px;
  margin: 12px auto 0;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(245, 184, 46, 0.65);
  background: linear-gradient(135deg, rgba(245, 184, 46, 0.24), rgba(255, 42, 92, 0.24));
  box-shadow: 0 8px 26px rgba(245, 184, 46, 0.18);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.update-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(245, 184, 46, 0.28);
}

.update-banner-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulseDot 0.9s infinite alternate;
  flex-shrink: 0;
}

.update-banner[hidden] {
  display: none;
}

.dashboard-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-check-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

.footer-check-btn:hover {
  color: var(--accent-gold);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Command Trigger Button */
.cmd-trigger {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmd-trigger:hover {
  border-color: var(--border-highlight);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(255, 42, 92, 0.12);
}

.cmd-trigger-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}

.cmd-trigger-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Actions */
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-pill:hover {
  border-color: var(--border-highlight);
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.status-dot.checking {
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}

.segmented-control {
  display: inline-flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.seg-btn svg {
  width: 14px;
  height: 14px;
}

.seg-btn.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

/* ==========================================================================
   Main Layout & Unified Hero Row (v3.0.0 Spatial Bento Command Center)
   ========================================================================== */
.dashboard-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: padding-right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.top-widgets-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-top-row {
  display: grid;
  grid-template-columns: minmax(320px, 4.7fr) minmax(0, 7.3fr);
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 920px) {
  .hero-top-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.clock-card {
  padding: 13px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.clock-card-clickable {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.clock-card-clickable:hover {
  border-color: rgba(255, 42, 92, 0.36);
  box-shadow: 0 14px 36px -12px rgba(255, 42, 92, 0.22), var(--card-shadow);
}

.clock-card-clickable:active {
  transform: scale(0.992);
}

.clock-card-clickable:focus-visible {
  outline: 2px solid rgba(255, 42, 92, 0.7);
  outline-offset: 2px;
}

.clock-header {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.clock-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.clock-main-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.clock-side-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
}

.clock-side-action {
  justify-self: end;
}

.kw-badge,
.clock-tz {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: rgba(147, 184, 232, 0.74);
  border: 1px solid rgba(96, 150, 220, 0.18);
  background: rgba(59, 130, 246, 0.07);
  white-space: nowrap;
}

html[data-theme="light"] .kw-badge,
html[data-theme="light"] .clock-tz {
  color: #4b6c96;
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.08);
}

.clock-time-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  justify-self: center;
  gap: 4px;
}

.clock-time {
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.clock-seconds {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.clock-chrono-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fecdd3;
  background: linear-gradient(135deg, rgba(255, 42, 92, 0.16), rgba(220, 38, 38, 0.09));
  border: 1px solid rgba(255, 42, 92, 0.34);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

@media (max-width: 520px) {
  .clock-main-row {
    gap: 6px;
  }

  .clock-side-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .kw-badge,
  .clock-tz {
    font-size: 0.65rem;
    padding: 1.5px 7px;
  }

  .clock-chrono-pill {
    padding: 5px 10px;
    font-size: 0.72rem;
    gap: 5px;
  }
}

.clock-card-clickable:hover .clock-chrono-pill {
  background: linear-gradient(135deg, rgba(255, 42, 92, 0.26), rgba(220, 38, 38, 0.16));
  border-color: rgba(255, 42, 92, 0.56);
  box-shadow: 0 0 16px rgba(255, 42, 92, 0.22);
}

html[data-theme="light"] .clock-chrono-pill {
  color: #be123c;
  background: rgba(255, 42, 92, 0.09);
  border-color: rgba(255, 42, 92, 0.28);
}

.clock-chrono-pill.is-running {
  background: linear-gradient(135deg, rgba(255, 42, 92, 0.28), rgba(185, 28, 28, 0.22));
  border-color: rgba(255, 42, 92, 0.72);
  color: #fff1f2;
  box-shadow: 0 0 18px rgba(255, 42, 92, 0.32);
}

html[data-theme="light"] .clock-chrono-pill.is-running {
  background: #ff2a5c;
  border-color: #e11d48;
  color: #ffffff;
}

.clock-chrono-pill.is-paused {
  border-color: rgba(245, 184, 46, 0.55);
  color: #fde68a;
  background: rgba(245, 184, 46, 0.14);
}

html[data-theme="light"] .clock-chrono-pill.is-paused {
  color: #92400e;
  background: rgba(245, 184, 46, 0.22);
}

.clock-chrono-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #ff4d79;
}

.clock-chrono-pill.is-running .clock-chrono-icon,
.clock-chrono-pill.is-paused .clock-chrono-icon {
  display: none;
}

.clock-chrono-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2a5c;
  box-shadow: 0 0 8px #ff2a5c;
  flex-shrink: 0;
}

.clock-chrono-pill.is-running .clock-chrono-dot {
  animation: chronoPulseDot 1.1s ease-in-out infinite;
}

.clock-chrono-pill.is-paused .clock-chrono-dot {
  background: #f5b82e;
  box-shadow: 0 0 8px rgba(245, 184, 46, 0.7);
  animation: none;
}

.clock-chrono-label {
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

.clock-chrono-pill.is-running .clock-chrono-label,
.clock-chrono-pill.is-paused .clock-chrono-label {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

@keyframes chronoPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

/* Scratchpad Widget (Side-by-side with Clock on Desktop, compact below on iPhone) */
.scratchpad-card {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.scratchpad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.scratchpad-title-bar {
  display: contents;
}

.scratchpad-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-gold);
  flex-shrink: 0;
  order: 1;
}

.scratchpad-heading {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.scratchpad-left-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
  order: 2;
  margin-right: auto;
}

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

.scratchpad-icon {
  width: 15px;
  height: 15px;
}

@media (max-width: 520px) {
  .scratchpad-header {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .scratchpad-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .scratchpad-left-controls {
    margin-right: 0;
    gap: 6px;
  }

  .memo-transfer-btns {
    gap: 6px;
  }
}

.scratchpad-saved {
  display: none;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.scratchpad-saved.recording {
  display: inline-flex;
  align-items: center;
  color: #ff4a70;
  font-weight: 700;
}

.scratchpad-link[hidden] {
  display: none;
}

.scratchpad-save-btn {
  padding: 3px 10px;
  border-radius: 999px;
  border: none;
  background: var(--accent-gold);
  color: #0b0d13;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.scratchpad-mic-frame {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  border-radius: 50%;
}

.scratchpad-mic-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 42, 92, 0.45);
  background: rgba(255, 42, 92, 0.14);
  color: #ff4a70;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.scratchpad-mic-btn svg {
  width: 14px;
  height: 14px;
}

.scratchpad-mic-btn:hover {
  background: rgba(255, 42, 92, 0.28);
  color: #ffffff;
  transform: scale(1.06);
}

.scratchpad-mic-btn.recording {
  background: linear-gradient(135deg, #ff2a5c, #dc143c);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 0 0 rgba(255, 42, 92, 0.65);
  animation: micPulse 1.15s ease-out infinite;
}

@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 42, 92, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(255, 42, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 42, 92, 0); }
}

.scratchpad-saved.recording {
  color: #ff4a70;
  font-weight: 700;
}

.scratchpad-input.mic-listening {
  border-color: rgba(255, 42, 92, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 42, 92, 0.18);
}

.scratchpad-save-btn[hidden] {
  display: none;
}

.scratchpad-save-btn:hover {
  transform: scale(1.04);
}

.scratchpad-link {
  background: none;
  border: none;
  padding: 2px 4px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}

.scratchpad-link:hover {
  color: var(--accent-gold);
}

.scratchpad-input {
  width: 100%;
  resize: none;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.35;
  min-height: 36px;
  padding: 8px 11px;
  outline: none;
  overflow-y: hidden;
  transition: border-color 0.2s, min-height 0.2s ease, font-size 0.18s ease;
}

.scratchpad-input:focus {
  border-color: rgba(245, 184, 46, 0.65);
  min-height: 64px;
  font-size: 1rem;
  overflow-y: auto;
}

/* Compact Inline Quick-Memo Transfer Buttons (dringend / JUH / privat) */
.memo-transfer-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.memo-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

@media (max-width: 400px) {
  .scratchpad-card {
    padding: 10px 12px;
  }
  .memo-cat-btn {
    padding: 0 8.5px;
    font-size: 0.73rem;
    gap: 4px;
  }
}

html[data-theme="light"] .memo-cat-btn {
  background: rgba(15, 23, 42, 0.05);
}

.memo-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.memo-cat-btn.cat-dringend .memo-cat-dot { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.memo-cat-btn.cat-juh .memo-cat-dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.memo-cat-btn.cat-privat .memo-cat-dot { background: #10b981; box-shadow: 0 0 6px #10b981; }

.memo-cat-btn.cat-dringend:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}
.memo-cat-btn.cat-juh:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.55);
  transform: translateY(-1px);
}
.memo-cat-btn.cat-privat:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

.memo-cat-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Notizen vorhanden Badge inside the Notizen card */
.notes-present-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.42);
  color: #facc15;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

html[data-theme="light"] .notes-present-badge {
  background: rgba(234, 179, 8, 0.18);
  color: #a16207;
  border-color: rgba(202, 138, 4, 0.45);
}

.notes-present-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 6px #eab308;
}

/* Compact Filter Popover in Header (0px space in board) */
.filter-popover-wrap {
  position: relative;
}

.filter-trigger-btn {
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-trigger-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.filter-trigger-btn:hover,
.filter-trigger-btn.active {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.filter-trigger-btn.filtered {
  border-color: rgba(245, 184, 46, 0.5);
  background: rgba(245, 184, 46, 0.12);
}

.filter-trigger-btn.filtered svg,
.filter-trigger-btn.filtered .filter-trigger-count {
  color: var(--accent-gold);
}

.filter-trigger-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.filter-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 284px;
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65);
  z-index: 75;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: popIn 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-popover[hidden] {
  display: none;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.filter-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.filter-popover-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
}

.filter-mini-link {
  border: none;
  background: transparent;
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-mini-link:hover {
  text-decoration: underline;
}

.filter-popover-cats {
  display: flex;
  gap: 6px;
}

.filter-cat-pill {
  flex: 1;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-cat-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.filter-cat-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.filter-popover-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.filter-app-row:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-app-row.checked {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

.filter-app-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.filter-app-left img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}

.filter-app-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--text-muted);
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: transparent;
  background: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.filter-app-row.checked .check-box {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #080a0f;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   Apps Section Toolbar (Category Quick-Filter + Sort Toggle)
   ========================================================================== */
.apps-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.apps-cat-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.apps-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

html[data-theme="light"] .apps-cat-tab {
  background: rgba(15, 23, 42, 0.04);
}

.apps-cat-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.075);
}

.apps-cat-tab.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
}

html[data-theme="light"] .apps-cat-tab.active {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.22);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.apps-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.apps-cat-dot.dot-all { background: #94a3b8; }
.apps-cat-dot.dot-rd { background: #ff2a5c; box-shadow: 0 0 6px rgba(255, 42, 92, 0.7); }
.apps-cat-dot.dot-sport { background: #ff7a33; box-shadow: 0 0 6px rgba(255, 122, 51, 0.7); }
.apps-cat-dot.dot-alltag { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, 0.7); }

.apps-cat-tab.active .apps-cat-dot.dot-all {
  background: var(--text-primary);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.apps-cat-tab .cat-sm {
  display: none;
}

.apps-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 184, 46, 0.42);
  background: rgba(245, 184, 46, 0.11);
  color: #fde68a;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.apps-sort-btn:focus:not(:focus-visible),
.apps-cat-tab:focus:not(:focus-visible) {
  outline: none;
}

.apps-sort-btn svg {
  width: 13px;
  height: 13px;
}

.apps-sort-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.apps-sort-btn.active {
  color: #0b0d13;
  background: var(--accent-gold);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(245, 184, 46, 0.35);
}

html[data-theme="light"] .apps-sort-btn:not(.active) {
  color: #92400e;
  background: rgba(245, 184, 46, 0.18);
  border-color: rgba(217, 119, 6, 0.45);
}

html[data-theme="light"] .move-btn {
  color: #92400e;
  background: rgba(245, 184, 46, 0.2);
  border-color: rgba(217, 119, 6, 0.45);
}

/* ==========================================================================
   Bento App Grid & Interactive App Cards (Gap-free 4-Col Desktop / 2-Col / 1-Col)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.app-card {
  grid-column: auto;
  position: relative;
  border-radius: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
  cursor: pointer;
}

.app-card.bento-wide {
  grid-column: auto;
}

/* Dynamic Cursor Spotlight Overlay */
.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    var(--app-glow, rgba(255, 255, 255, 0.08)),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

/* Top Accent Line */
.app-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--app-accent, #ff2a5c), transparent);
  opacity: 0.55;
  transition: opacity 0.25s ease, left 0.25s ease, right 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--app-border, rgba(255, 255, 255, 0.22));
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.65), 0 0 28px -8px var(--app-glow, rgba(255, 42, 92, 0.3));
}

.app-card:hover::before {
  opacity: 1;
}

.app-card:hover::after {
  opacity: 1;
  left: 12px;
  right: 12px;
}

.app-card > * {
  position: relative;
  z-index: 1;
}

/* Card Header */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.app-icon-box {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card:hover .app-icon-box {
  transform: scale(1.06) rotate(-1.5deg);
}

.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-category-tag {
  display: block;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--app-accent, #ff2a5c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-usage-line,
.app-domain {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.domain-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  flex-shrink: 0;
}

/* Card Top Right Actions (Calm Launch Arrow + On-Demand Reorder / Keycap) */
.card-meta-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  align-self: flex-start;
}

.shortcut-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.app-card:hover .shortcut-badge {
  opacity: 1;
}

.bento-grid.is-sorting .shortcut-badge {
  display: none;
}

.launch-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
}

html[data-theme="light"] .launch-arrow-btn {
  background: rgba(15, 23, 42, 0.04);
}

.app-card:hover .launch-arrow-btn,
.launch-arrow-btn:hover {
  background: var(--app-accent, #ff2a5c);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px -2px var(--app-glow, rgba(255, 42, 92, 0.45));
  transform: translate(1px, -1px);
}

.app-card[data-contrast="dark"]:hover .launch-arrow-btn,
.app-card[data-contrast="dark"] .launch-arrow-btn:hover {
  color: #0b0d13;
}

/* Reorder Controls — hidden cleanly until Sort Mode is toggled */
.move-controls {
  display: none;
  align-items: center;
  gap: 3px;
}

.bento-grid.is-sorting .move-controls {
  display: inline-flex;
}

.bento-grid.is-sorting .launch-arrow-btn,
.bento-grid.is-sorting .desktop-only-pill {
  display: none;
}

/* Desktop-only locked state on iPhone (visible, but not launchable) */
.app-card.desktop-only-locked {
  opacity: 0.72;
  cursor: default;
}

.app-card.desktop-only-locked:hover {
  transform: none;
}

.desktop-only-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.12);
  color: #ddd6fe;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

html[data-theme="light"] .desktop-only-pill {
  color: #5b21b6;
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.35);
}

.quick-chip-locked {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
}

.dock-item.desktop-only-locked {
  opacity: 0.48;
}

.bento-grid.is-sorting .app-card {
  border-style: dashed;
  border-color: rgba(245, 184, 46, 0.52);
  cursor: grab;
}

.bento-grid.is-sorting .card-quick-chips,
.bento-grid.is-sorting .card-inline-Prompt {
  pointer-events: none;
  opacity: 0.42;
}

.move-btn {
  width: 34px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(245, 184, 46, 0.45);
  background: rgba(245, 184, 46, 0.14);
  color: #fde68a;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.16s ease;
}

.move-btn:hover:not(:disabled) {
  background: var(--accent-gold);
  color: #0b0d13;
  border-color: transparent;
}

.move-btn:disabled {
  opacity: 0.22;
  cursor: default;
}

.app-card.dragging,
.dock-item.dragging {
  opacity: 0.45;
  transform: scale(0.96);
}

.app-card.drag-over {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 2px var(--accent-gold), var(--card-shadow) !important;
}

.dock-item.drag-over {
  transform: translateY(-4px);
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Card Description & Interactive Feature Area */
.app-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Embedded Quick Search inside Wissen Card */
.card-inline-Prompt {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px 5px 4px 10px;
  margin-top: -1px;
  min-width: 0;
}

.card-inline-Prompt:focus-within {
  border-color: rgba(240, 180, 41, 0.55);
}

.card-inline-Prompt input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  outline: none;
}

.card-inline-Prompt button {
  padding: 4px 9px;
  border-radius: 7px;
  border: none;
  background: var(--app-accent, #f5b82e);
  color: #0b0d13;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Quick Chips / Deep-Link Sub-Actions */
.card-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4.5px 9.5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

html[data-theme="light"] .quick-chip {
  background: rgba(15, 23, 42, 0.04);
}

.quick-chip:hover {
  background: var(--app-glow, rgba(255, 255, 255, 0.12));
  color: var(--text-primary);
  border-color: var(--app-accent, var(--border-highlight));
  transform: translateY(-1px);
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  gap: 10px;
}

.card-telemetry {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.launch-cta-red {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff2a5c 0%, #dc143c 100%);
  border: 1px solid rgba(255, 110, 140, 0.45);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 42, 92, 0.38);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.launch-cta-red:hover {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(255, 42, 92, 0.52);
}

.launch-cta-red:active {
  transform: scale(0.96);
}

.launch-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.launch-cta:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: transparent;
}

/* ==========================================================================
   Multi-App Workflows Section
   ========================================================================== */
.workflows-section {
  padding: 22px 26px;
}

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

.workflows-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
}

.workflows-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.workflows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.workflow-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workflow-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.wf-icon-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wf-icon-group img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 2px solid var(--bg-base);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.wf-icon-group img + img {
  margin-left: -10px;
}

.wf-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wf-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.wf-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-arrow {
  color: var(--text-muted);
  font-weight: 700;
  transition: transform 0.2s ease, color 0.2s ease;
}

.workflow-card:hover .wf-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

/* ==========================================================================
   Floating Quick-Launch Dock (v2.4.6)
   Mac: kompakte Glasleiste, passt sich der Zahl der Apps an, Vergrößerung unter dem Zeiger.
   iPhone: volle Breite, alle Apps in einer Reihe (Größe je nach Anzahl), blendet beim
   Herunterscrollen aus und beim Hochscrollen wieder ein.
   ========================================================================== */
.floating-dock {
  --icon: 46px;
  --gap: 8px;
  --pad: 8px;
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 45;
  max-width: calc(100vw - 16px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.floating-dock.versteckt {
  transform: translate(-50%, calc(100% + 28px + env(safe-area-inset-bottom)));
  opacity: 0;
  pointer-events: none;
}

.dock-inner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--gap);
  height: calc(var(--icon) + 2 * var(--pad));
  padding: var(--pad) calc(var(--pad) + 2px);
  border-radius: calc(var(--icon) * 0.3 + var(--pad));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    var(--bg-glass-strong);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--border-highlight);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 20px 44px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.dock-item {
  --s: 1;
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--icon) * var(--s));
  height: calc(var(--icon) * var(--s));
  border-radius: 24%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  transition: width 0.16s ease-out, height 0.16s ease-out, transform 0.18s ease;
}

.dock-item img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.dock-item:active {
  transform: scale(0.9);
}

.dock-item:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

/* Name über dem Symbol – nur mit Maus/Trackpad */
.dock-item::after {
  content: attr(data-title);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border-highlight);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .dock-item:hover::after,
  .dock-item:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.dock-dot {
  position: absolute;
  bottom: calc(var(--pad) * -1 + 2px);
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dock-item.active .dock-dot {
  opacity: 1;
}

/* iPhone / schmale Fenster: volle Breite, eine Reihe, Größe nach Anzahl der Apps */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1024px) {
  .floating-dock {
    --gap: 6px;
    --pad: 7px;
    --icon: max(34px, min(48px, calc((100vw - 16px - 2 * (var(--pad) + 2px) - 2px - (var(--n, 8) - 1) * var(--gap)) / var(--n, 8))));
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    max-width: none;
    transform: none;
  }

  .floating-dock.versteckt {
    transform: translateY(calc(100% + 16px + env(safe-area-inset-bottom)));
  }

  .dock-inner {
    border-radius: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }

  .dock-inner::-webkit-scrollbar {
    display: none;
  }

  /* bei mehr Apps als Platz: Reihe beginnt links und lässt sich wischen */
  .dock-inner.ueberlauf {
    justify-content: flex-start;
  }

  .dock-item {
    scroll-snap-align: center;
  }

  .dock-dot {
    bottom: -5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-dock,
  .dock-item {
    transition: none;
  }
}

/* ==========================================================================
   Integrated Split-Cockpit Drawer
   ========================================================================== */
.cockpit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 94vw);
  z-index: 60;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid var(--border-highlight);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.3s ease, visibility 0.35s;
  overscroll-behavior: contain;
}

/* App-Fenster offen: Board-Seite dahinter scrollt nicht mit (keine Laufleiste am rechten Rand) */
html.cockpit-offen,
html.cockpit-offen body {
  overflow: hidden;
  overscroll-behavior: none;
}

.cockpit-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.cockpit-drawer.expanded {
  width: min(1240px, 96vw);
}

.cockpit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4, 6, 12, 0.55);
  backdrop-filter: blur(4px);
}

.cockpit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass-strong);
  flex-shrink: 0;
}

.cockpit-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(245, 184, 46, 0.45);
  background: rgba(245, 184, 46, 0.14);
  color: var(--accent-gold);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.cockpit-back-btn svg {
  width: 17px;
  height: 17px;
}

.cockpit-back-btn:hover {
  background: var(--accent-gold);
  color: #0b0d13;
  border-color: transparent;
}

.cockpit-app-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.cockpit-app-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}

.cockpit-app-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-app-url {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-app-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.cockpit-switch-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, transform 0.15s;
}

.cockpit-switch-btn:hover, .cockpit-switch-btn.active {
  opacity: 1;
  transform: scale(1.08);
}

.cockpit-switch-btn img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
}

.cockpit-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cockpit-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cockpit-btn svg {
  width: 14px;
  height: 14px;
}

.cockpit-btn.primary {
  background: var(--accent-primary);
  color: #fff;
  border-color: transparent;
}

.cockpit-body {
  position: relative;
  flex: 1;
  background: #0b0d13;
}

.cockpit-share-bar {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(16, 19, 28, 0.94);
  border: 1px solid rgba(234, 179, 8, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cockpit-share-bar[hidden] {
  display: none;
}

.cockpit-share-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f8fafc;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.cockpit-share-primary {
  border: none;
  border-radius: 9px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
  background: #facc15;
  cursor: pointer;
  white-space: nowrap;
}

.cockpit-share-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
}

.cockpit-share-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.95rem;
  padding: 4px 6px;
  cursor: pointer;
}

.cockpit-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.cockpit-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 0.85rem;
  z-index: 2;
}

.cockpit-loader[hidden] {
  display: none;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Command Palette Modal (Cmd+K)
   ========================================================================== */
.cmd-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 7, 14, 0.68);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 16px 16px;
}

.cmd-modal-backdrop[hidden] {
  display: none;
}

.cmd-modal {
  width: 100%;
  max-width: 620px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-highlight);
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75);
}

.cmd-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-search-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
}

.cmd-results {
  max-height: 390px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.14s ease;
}

.cmd-item.selected, .cmd-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .cmd-item.selected,
html[data-theme="light"] .cmd-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cmd-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.cmd-item-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.cmd-item-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.cmd-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cmd-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   iPhone Home-Screen Install Guide Modal
   ========================================================================== */
.ios-guide-modal {
  max-width: 560px;
}

.ios-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.ios-modal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ios-preview-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.ios-modal-brand h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.ios-modal-brand p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ios-modal-body {
  padding: 22px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: center;
}

.ios-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.ios-qr-img {
  width: 132px;
  height: 132px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.ios-qr-caption {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.ios-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ios-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ios-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.ios-steps strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.ios-steps p {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.ios-steps code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-gold);
  word-break: break-all;
}

@media (max-width: 600px) {
  .ios-modal-body {
    grid-template-columns: 1fr;
  }
  .ios-qr-box {
    display: none;
  }
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: slideInToast 0.22s ease;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1179px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .top-bar {
    position: relative;
    padding: calc(env(safe-area-inset-top) + 8px) 12px 10px;
  }
  .top-bar-inner {
    gap: 8px;
    row-gap: 9px;
  }
  .header-clock-card {
    padding: 8px 12px 9px;
    border-radius: 15px;
    gap: 4px;
  }
  .header-clock-card .clock-date {
    font-size: 0.88rem;
    color: var(--text-primary);
  }
  .header-clock-card .clock-main-row {
    gap: 8px;
  }
  .header-clock-card .clock-time {
    font-size: 1.95rem;
  }
  .header-clock-card .clock-seconds {
    font-size: 0.98rem;
  }
  .header-clock-card .clock-chrono-pill {
    padding: 4.5px 10px;
    font-size: 0.72rem;
    gap: 5px;
  }
  .brand-subtitle, .status-label, .segmented-control span, .cmd-kbd, #ping-all-btn {
    display: none;
  }
  .cmd-trigger {
    min-width: 0;
    padding: 7px 10px;
  }
  .cmd-trigger-text {
    font-size: 0.78rem;
  }
  .top-actions {
    gap: 6px;
  }
  .dashboard-main {
    padding: 12px 12px 28px;
    gap: 12px;
  }
  .top-widgets-section {
    gap: 10px;
  }
  .clock-card {
    padding: 12px 14px;
  }
  .scratchpad-card {
    padding: 10px 12px;
  }
  .apps-toolbar {
    margin-bottom: 10px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .apps-cat-tabs {
    gap: 5px;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .apps-cat-tab {
    height: 29px;
    padding: 0 9px;
    font-size: 0.72rem;
    gap: 5px;
  }
  .apps-cat-tab .cat-lg {
    display: none;
  }
  .apps-cat-tab .cat-sm {
    display: inline;
  }
  .apps-sort-btn {
    height: 30px;
    padding: 0 9px;
    gap: 4px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }
  .apps-sort-btn .sort-label {
    display: inline;
  }
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .app-card {
    padding: 12px 13px;
    gap: 9px;
    border-radius: 18px;
  }
  .card-top {
    gap: 8px;
  }
  .app-identity {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }
  .app-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .app-category-tag {
    font-size: 0.6rem;
  }
  .app-title {
    font-size: 0.98rem;
  }
  .move-btn {
    width: 26px;
    height: 26px;
    font-size: 0.68rem;
  }
  .launch-arrow-btn {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .card-meta-actions {
    flex-shrink: 0;
    gap: 4px;
  }
  .shortcut-badge {
    display: none;
  }
  .cockpit-app-switcher,
  .cockpit-app-url,
  #cockpit-expand,
  .cockpit-ext-label {
    display: none;
  }
}

/* ==========================================================================
   Groq Whisper Speech-to-Text Settings Button & Modal (v2.0.0)
   ========================================================================== */
.filter-popover-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.filter-speech-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.filter-speech-btn:hover {
  background: rgba(255, 42, 92, 0.12);
  border-color: rgba(255, 42, 92, 0.4);
}

.groq-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  white-space: nowrap;
}

.groq-status-pill.active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.scratchpad-saved.transcribing {
  display: inline-flex;
  align-items: center;
  color: #facc15;
  font-weight: 700;
}

.groq-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.groq-modal-backdrop[hidden] {
  display: none;
}

.groq-modal {
  width: 100%;
  max-width: 420px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.groq-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.groq-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.groq-modal-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.05rem;
  padding: 4px 6px;
  cursor: pointer;
}

.groq-modal-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.groq-modal-steps {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.groq-modal-steps code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #fde047;
}

.groq-key-link {
  color: #facc15;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.groq-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.groq-key-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
}

.groq-key-input:focus {
  border-color: rgba(250, 204, 21, 0.65);
}

.groq-eye-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.groq-modal-status {
  min-height: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.groq-modal-status.ok { color: #34d399; }
.groq-modal-status.err { color: #fb7185; }

.groq-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.groq-modal-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.groq-btn-primary {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #0b0d13;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.groq-btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.groq-btn-secondary {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.groq-btn-danger {
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.groq-btn-danger[hidden] {
  display: none;
}

/* ==========================================================================
   Chronograph Pro · Carbon Crimson Modal
   ========================================================================== */
.chrono-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 3, 6, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: chronoFadeIn 0.18s ease-out;
}

.chrono-modal-backdrop[hidden] {
  display: none;
}

@keyframes chronoFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chrono-modal {
  width: 100%;
  max-width: 650px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  color: #fff1f2;
  background:
    radial-gradient(circle at 22% 0%, rgba(255, 42, 92, 0.24), transparent 55%),
    radial-gradient(circle at 88% 100%, rgba(220, 38, 38, 0.18), transparent 55%),
    linear-gradient(160deg, #16090e 0%, #0d0609 55%, #12070c 100%);
  border: 1px solid rgba(255, 42, 92, 0.36);
  box-shadow:
    0 28px 68px -12px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 42px -12px rgba(255, 42, 92, 0.28);
  animation: chronoSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chronoSlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chrono-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 13px;
  border-bottom: 1px solid rgba(255, 42, 92, 0.18);
}

.chrono-title-group {
  display: flex;
  align-items: center;
  gap: 11px;
}

.chrono-live-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 133, 162, 0.35);
  border: 1px solid rgba(255, 42, 92, 0.6);
  transition: all 0.2s ease;
}

.chrono-modal.is-running .chrono-live-indicator {
  background: #ff2a5c;
  box-shadow: 0 0 12px #ff2a5c;
  animation: chronoPulseDot 1.1s ease-in-out infinite;
}

.chrono-modal.is-paused .chrono-live-indicator {
  background: #f5b82e;
  border-color: #fde68a;
  box-shadow: 0 0 10px rgba(245, 184, 46, 0.65);
}

.chrono-modal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff1f2;
  line-height: 1.15;
}

.chrono-modal-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #fda4af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.chrono-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fecdd3;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.chrono-close-btn:hover {
  background: rgba(255, 42, 92, 0.22);
  border-color: rgba(255, 42, 92, 0.55);
  color: #ffffff;
}

.chrono-body {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
  padding: 18px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chrono-dial-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.chrono-dial-wrap {
  width: 244px;
  height: 244px;
  position: relative;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.68));
}

.chrono-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chrono-live-lap-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 42, 92, 0.1);
  border: 1px solid rgba(255, 42, 92, 0.26);
}

.chrono-lap-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fda4af;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chrono-lap-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff1f2;
}

.chrono-pushers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 256px;
}

.chrono-btn {
  height: 44px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.chrono-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.chrono-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.chrono-btn-secondary {
  background: rgba(48, 18, 27, 0.9);
  border-color: rgba(255, 42, 92, 0.36);
  color: #fecdd3;
}

.chrono-btn-secondary:hover:not(:disabled) {
  background: rgba(74, 24, 39, 0.95);
  border-color: rgba(255, 42, 92, 0.65);
  color: #ffffff;
}

.chrono-btn-primary {
  background: linear-gradient(135deg, #ff2a5c, #dc2626);
  color: #ffffff;
  box-shadow: 0 8px 22px -6px rgba(255, 42, 92, 0.65);
}

.chrono-btn-primary:hover {
  filter: brightness(1.1);
}

.chrono-btn-primary.is-stop {
  background: linear-gradient(135deg, #3a0d18, #24070e);
  border-color: rgba(255, 42, 92, 0.85);
  color: #ff6b8f;
  box-shadow: 0 0 20px -4px rgba(255, 42, 92, 0.45);
}

.chrono-laps-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 42, 92, 0.16);
  border-radius: 16px;
  padding: 12px 13px;
}

.chrono-laps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chrono-laps-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff1f2;
  letter-spacing: 0.02em;
}

.chrono-copy-btn {
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: #fecdd3;
  background: rgba(255, 42, 92, 0.16);
  border: 1px solid rgba(255, 42, 92, 0.34);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chrono-copy-btn:hover {
  background: rgba(255, 42, 92, 0.3);
  color: #ffffff;
}

.chrono-copy-btn[hidden] {
  display: none;
}

.chrono-laps-cols {
  display: grid;
  grid-template-columns: 32px 1fr 1fr 66px;
  gap: 6px;
  padding: 7px 6px 5px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a67683;
}

.chrono-laps-cols .text-right,
.chrono-lap-row .text-right {
  text-align: right;
}

.chrono-laps-list {
  flex: 1;
  min-height: 120px;
  max-height: 270px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 2px;
}

.chrono-laps-list::-webkit-scrollbar {
  width: 4px;
}

.chrono-laps-list::-webkit-scrollbar-thumb {
  background: rgba(255, 42, 92, 0.35);
  border-radius: 4px;
}

.chrono-laps-empty {
  margin: auto 0;
  padding: 24px 8px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #8f6370;
}

.chrono-lap-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr 66px;
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.77rem;
}

.chrono-lap-row.is-fastest {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(16, 185, 129, 0.08);
}

.chrono-lap-row.is-slowest {
  border-color: rgba(255, 42, 92, 0.34);
  background: rgba(255, 42, 92, 0.09);
}

.chrono-lap-num {
  color: #fda4af;
  font-weight: 700;
}

.chrono-lap-split {
  color: #fff1f2;
  font-weight: 700;
}

.chrono-lap-row.is-fastest .chrono-lap-split {
  color: #34d399;
}

.chrono-lap-row.is-slowest .chrono-lap-split {
  color: #ff5c84;
}

.chrono-lap-total {
  color: #c9a1ac;
}

.chrono-lap-wall {
  color: #9e7481;
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .chrono-modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .chrono-modal {
    max-width: 100%;
    border-radius: 22px;
    max-height: calc(100dvh - 20px);
  }

  .chrono-body {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  }

  .chrono-dial-wrap {
    width: 220px;
    height: 220px;
  }

  .chrono-pushers {
    max-width: 100%;
  }

  .chrono-btn {
    height: 46px;
    font-size: 0.92rem;
  }

  .chrono-laps-list {
    min-height: 76px;
    max-height: 165px;
  }
}

/* ==========================================================================
   iPhone: Einheitlich aufgeräumte 2-Zeilen-Kopfzeile (v3.2.7)
   Zeile 1: Logo + Titel/Version | Freizeit-Wechsler + Tab/Cockpit + Filter + Theme
   Zeile 2: Volle Breite Uhrzeit + KW/MEZ + Stoppuhr + Stadionuhr-PiP
   ========================================================================== */
@media (max-width: 640px) {
  .top-bar {
    padding: calc(env(safe-area-inset-top) + 8px) 12px 10px;
  }
  .top-bar-inner {
    gap: 8px;
    row-gap: 8px;
  }
  .brand {
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
  }
  .brand-logo-wrap {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .brand-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .brand-title {
    font-size: 1rem;
    line-height: 1.08;
    white-space: nowrap;
  }
  .version-badge {
    font-size: 0.62rem;
    padding: 1px 6px;
    line-height: 1.25;
  }
  .top-actions {
    gap: 5px;
    flex-shrink: 0;
  }
  .freizeit-switch-pill {
    height: 32px;
    padding: 0 9px 0 5px;
    font-size: 0.72rem;
    gap: 5px;
  }
  .freizeit-switch-icon {
    width: 19px;
    height: 19px;
    border-radius: 5px;
  }
  .segmented-control {
    height: 32px;
    padding: 2px;
    align-items: center;
  }
  .seg-btn {
    height: 26px;
    padding: 0 7px;
  }
  .filter-trigger-btn {
    height: 32px;
    padding: 0 8px;
    gap: 4px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .header-clock-card {
    padding: 8px 12px 9px;
    border-radius: 14px;
    gap: 4px;
  }
  .header-clock-card .clock-header {
    padding: 0 28px;
  }
  .header-clock-card .clock-date {
    font-size: 0.8rem;
  }
  .header-clock-card .clock-main-row {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .header-clock-card .clock-time {
    font-size: 1.75rem;
  }
  .header-clock-card .clock-seconds {
    font-size: 0.9rem;
  }
  .header-clock-card .clock-chrono-pill {
    padding: 4.5px 9px;
    font-size: 0.71rem;
    gap: 5px;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .brand-title-suffix {
    display: none;
  }
}

@media (max-width: 430px) {
  .filter-trigger-count {
    display: none;
  }
  .filter-trigger-btn {
    width: 32px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 370px) {
  .top-bar { padding-left: 10px; padding-right: 10px; }
  .brand-logo-wrap { width: 30px; height: 30px; }
  .brand { gap: 6px; }
  .freizeit-switch-pill { padding: 0 7px 0 4px; font-size: 0.69rem; }
  .seg-btn { padding: 0 6px; }
}

/* ==========================================================================
   Freizeit-Board Direkt-Wechsler (v3.1.4)
   ========================================================================== */
.freizeit-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: #34d399;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  transition: transform 0.16s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

html[data-theme="light"] .freizeit-switch-pill {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.38);
}

.freizeit-switch-pill:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.6);
}

.freizeit-switch-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.dock-divider {
  width: 1px;
  height: calc(var(--icon) * 0.56);
  background: var(--border-highlight);
  align-self: center;
  margin: 0 2px;
  flex-shrink: 0;
}

.dock-item-freizeit {
  text-decoration: none;
}

.dock-item-freizeit img {
  border-color: rgba(52, 211, 153, 0.55);
}

.dock-badge-label {
  display: none;
}

/* ==========================================================================
   Schwebende Stadionuhr (Pop-out / Picture-in-Picture Controls)
   ========================================================================== */
.clock-pip-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.clock-pip-btn svg {
  width: 13.5px;
  height: 13.5px;
}

.clock-pip-btn:hover {
  background: rgba(255, 42, 92, 0.22);
  border-color: rgba(255, 42, 92, 0.56);
  color: #fff1f2;
  transform: scale(1.06);
}

.clock-pip-btn.is-active {
  background: rgba(255, 42, 92, 0.28);
  border-color: rgba(255, 42, 92, 0.78);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 42, 92, 0.42);
}

html[data-theme="light"] .clock-pip-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.14);
  color: #475569;
}

html[data-theme="light"] .clock-pip-btn:hover,
html[data-theme="light"] .clock-pip-btn.is-active {
  background: #ff2a5c;
  border-color: #e11d48;
  color: #ffffff;
}

.chrono-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.chrono-pip-size-btn,
.chrono-pip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: #fecdd3;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.chrono-pip-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.chrono-pip-size-btn:hover,
.chrono-pip-btn:hover {
  background: rgba(255, 42, 92, 0.22);
  border-color: rgba(255, 42, 92, 0.56);
  color: #ffffff;
}

.chrono-pip-size-btn.is-stadium {
  background: rgba(255, 42, 92, 0.16);
  border-color: rgba(255, 42, 92, 0.45);
  color: #fff1f2;
}

.chrono-pip-btn.is-active {
  background: linear-gradient(135deg, rgba(255, 42, 92, 0.34), rgba(220, 38, 38, 0.28));
  border-color: rgba(255, 42, 92, 0.8);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 42, 92, 0.36);
}

/* Safari Video-PiP Floating Control Bar */
.stadion-safari-bar {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 92px);
  transform: translateX(-50%);
  z-index: 1265;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  max-width: calc(100vw - 24px);
  border-radius: 999px;
  background: rgba(16, 9, 13, 0.92);
  border: 1px solid rgba(255, 42, 92, 0.48);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.78), 0 0 24px -6px rgba(255, 42, 92, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff1f2;
}

.stadion-safari-bar[hidden] {
  display: none;
}

.stadion-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 4px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #fda4af;
  white-space: nowrap;
}

.stadion-bar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff2a5c;
  box-shadow: 0 0 8px #ff2a5c;
  animation: chronoPulseDot 1.1s ease-in-out infinite;
}

.stadion-bar-btn,
.stadion-bar-close {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.stadion-bar-btn[hidden] {
  display: none;
}

.stadion-bar-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.stadion-bar-btn:hover:not(:disabled),
.stadion-bar-close:hover {
  background: rgba(255, 42, 92, 0.24);
  border-color: rgba(255, 42, 92, 0.56);
}

.stadion-bar-btn-primary {
  background: linear-gradient(135deg, #ff2a5c, #dc2626);
  border-color: rgba(255, 133, 162, 0.55);
  color: #ffffff;
}

.stadion-bar-btn-primary.is-running {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(253, 230, 138, 0.55);
  color: #1c1003;
}

.stadion-bar-close {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 520px) {
  .chrono-pip-size-btn {
    padding: 0 8px;
    font-size: 0.7rem;
  }
  .chrono-pip-btn {
    padding: 0 9px;
    font-size: 0.7rem;
  }
  .stadion-safari-bar {
    border-radius: 18px;
    bottom: calc(env(safe-area-inset-bottom) + 78px);
  }
}
