/* ==========================================================================
   CLAWBUIS Cockpit — Unified Design System (Handy <700 · Tablet · PC >=1100)
   Palette: #f5f7f9 · #ffffff · #232328 · #9ea4a5 · #19be84 (<=10%)
   Fonts: Barlow Semi Condensed (local) · Inter (local)
   ========================================================================== */

@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/barlow-semi-condensed-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/barlow-semi-condensed-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.woff2') format('woff2');
}

:root {
  /* Strict 5-color brand palette */
  --paper: #f5f7f9;
  --surface: #ffffff;
  --ink: #232328;
  --muted: #9ea4a5;
  --accent: #19be84;

  /* Strictly derived tonal opacities */
  --ink-80: rgba(35, 35, 40, 0.80);
  --ink-62: rgba(35, 35, 40, 0.62);
  --ink-42: rgba(35, 35, 40, 0.42);
  --ink-18: rgba(35, 35, 40, 0.18);
  --ink-12: rgba(35, 35, 40, 0.12);
  --ink-08: rgba(35, 35, 40, 0.08);
  --ink-05: rgba(35, 35, 40, 0.05);
  --ink-03: rgba(35, 35, 40, 0.03);
  --muted-35: rgba(158, 164, 165, 0.35);
  --muted-20: rgba(158, 164, 165, 0.20);
  --accent-18: rgba(25, 190, 132, 0.18);
  --accent-10: rgba(25, 190, 132, 0.10);
  --accent-05: rgba(25, 190, 132, 0.05);

  /* Typography */
  --font-display: 'Barlow Semi Condensed', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Radii (no 999px pill buttons; 6–16px scale) */
  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(35, 35, 40, 0.04), 0 6px 18px -10px rgba(35, 35, 40, 0.10);
  --shadow-lift: 0 16px 38px -12px rgba(35, 35, 40, 0.24), 0 2px 8px rgba(35, 35, 40, 0.08);
  --shadow-sheet: 0 -10px 36px rgba(35, 35, 40, 0.16);

  /* Motion */
  --ease-spring: cubic-bezier(0.22, 1.18, 0.36, 1);
  --ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);

  /* Layout metrics */
  --nav-h: 66px;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --sidebar-w: 220px;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

h1, h2, h3, h4, p { margin: 0; }

.num, .disp {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Monochrome Client Pattern Grammar (No rainbow colors)
   ========================================================================== */
.pat-solid { background: var(--ink); color: var(--surface); }
.pat-half { background: var(--ink-62); color: var(--surface); }
.pat-hatch {
  background: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, var(--surface) 1.5px 4px);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-42);
}
.pat-stripe {
  background: repeating-linear-gradient(90deg, var(--ink) 0 1.4px, var(--surface) 1.4px 3.8px);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-42);
}
.pat-grid {
  background:
    linear-gradient(var(--ink-42) 1px, transparent 1px) 0 0 / 4px 4px,
    linear-gradient(90deg, var(--ink-42) 1px, var(--surface) 1px) 0 0 / 4px 4px;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-62);
}
.pat-dots {
  background: radial-gradient(circle, var(--ink) 1px, var(--surface) 1.1px) 0 0 / 3.8px 3.8px;
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-42);
}
.pat-ring {
  background: radial-gradient(circle, transparent 1.6px, var(--ink-62) 1.7px, var(--ink-62) 2.5px, var(--surface) 2.6px);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.2px var(--ink-62);
}
.pat-outline {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.pat-double {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.4px var(--ink), inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--ink-42);
}
.pat-muted { background: var(--muted); color: var(--surface); }
.pat-hair {
  background: repeating-linear-gradient(0deg, var(--ink-18) 0 1px, var(--paper) 1px 3.5px);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-18);
}

.swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: none;
}
.swatch.md { width: 14px; height: 14px; border-radius: 4px; }
.swatch.lg { width: 18px; height: 18px; border-radius: 5px; }

.code-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-62);
  white-space: nowrap;
}

/* Status Glyphs (consistent everywhere) */
.glyph {
  width: 11px;
  height: 11px;
  flex: none;
  display: inline-block;
  position: relative;
}
.glyph::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 50%;
}
.glyph.bei-mir::before { background: var(--accent); }
.glyph.laeuft::before {
  inset: 1.5px 1px 1.5px 2px;
  border-radius: 0;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.glyph.wartet::before { box-shadow: inset 0 0 0 1.7px var(--ink); background: var(--surface); }
.glyph.ruht::before { border: 1.4px dashed var(--muted); background: transparent; }
.glyph.ich::before { background: var(--accent); }
.glyph.sie::before { box-shadow: inset 0 0 0 1.7px var(--ink); background: var(--surface); }
.glyph.frist-heute::before { background: var(--ink); }

.unverified-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.3px solid var(--ink-62);
  flex: none;
}

/* ==========================================================================
   App Shell (Responsive: Mobile Stack · Tablet 2-Col · PC 3-Col)
   ========================================================================== */
.app-shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: hidden;
}

/* PC Sidebar (hidden < 1100px) */
.pc-sidebar {
  display: none;
}

/* Tablet Top Nav (700px - 1099px only) */
.tablet-topbar {
  display: none;
}

/* Main Content Area */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
}

.list-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  padding-bottom: calc(var(--nav-h) + var(--sab));
  transition: transform 240ms var(--ease-out), filter 240ms var(--ease-out);
}

/* Desktop/Tablet Detail Pane (hidden on Mobile < 700px; mobile uses .mobile-stack) */
.detail-pane {
  display: none;
}

/* Mobile Push-Stack Container (< 700px) */
.mobile-stack {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  overflow: hidden;
}
.stack-scrim {
  position: absolute;
  inset: 0;
  background: rgba(35, 35, 40, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}
.stack-scrim.active {
  opacity: 1;
  pointer-events: auto;
}
.stack-page {
  position: absolute;
  inset: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  box-shadow: -12px 0 36px rgba(35, 35, 40, 0.14);
  transform: translateX(0);
  transition: transform 260ms var(--ease-out), opacity 220ms var(--ease-out);
  will-change: transform;
}
.stack-page.entering {
  transform: translateX(100%);
}
.stack-page.under {
  transform: translateX(-16%);
  filter: brightness(0.95);
  pointer-events: none;
}
.stack-page.dragging {
  transition: none !important;
}

/* Mobile Bottom Nav (< 700px) */
.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + var(--sab));
  padding: 0 6px var(--sab);
  display: grid;
  grid-template-columns: 1fr 1fr 74px 1fr 1fr;
  align-items: center;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--ink-08);
  view-transition-name: mobile-nav;
}

.mnav-btn {
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  position: relative;
  transition: color 140ms ease, transform 120ms ease;
}
.mnav-btn svg { width: 21px; height: 21px; }
.mnav-btn span { font-size: 11px; font-weight: 600; }
.mnav-btn.active { color: var(--ink); }
.mnav-btn.active::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 18px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}
.mnav-btn:active { transform: scale(0.96); }

.mic-fab {
  justify-self: center;
  width: 54px;
  height: 54px;
  margin-top: -16px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  display: grid;
  place-items: center;
  border: 3px solid var(--paper);
  box-shadow: 0 10px 24px -8px rgba(35, 35, 40, 0.48);
  transition: transform 180ms var(--ease-spring), background 140ms ease;
  touch-action: none;
}
.mic-fab svg { width: 21px; height: 21px; }
.mic-fab:active, .mic-fab.holding {
  background: var(--accent);
  transform: scale(0.94);
}

/* View Transitions API */
.stage-fade { view-transition-name: main-stage; }
::view-transition-old(main-stage),
::view-transition-new(main-stage) {
  animation-duration: 200ms;
  animation-timing-function: var(--ease-out);
}
::view-transition-old(active-entity-title),
::view-transition-new(active-entity-title) {
  animation-duration: 260ms;
  animation-timing-function: var(--ease-out);
}

/* ==========================================================================
   Headers, Ordnungsleiste, Segmented Controls
   ========================================================================== */
.view-header {
  flex: none;
  padding: calc(12px + var(--sat)) 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
  z-index: 4;
}

.vh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}

.vh-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.vh-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: nowrap;
}

.vh-meta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vh-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.sq-btn {
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--ink-08);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.sq-btn svg { width: 16px; height: 16px; }
.sq-btn:hover { border-color: var(--ink-18); }
.sq-btn:active { transform: scale(0.96); background: var(--ink-05); }
.sq-btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sq-btn.accent { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.sq-btn.icon-only { width: 34px; padding: 0; }
.sq-btn[disabled] { opacity: 0.35; pointer-events: none; }

.heute-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  position: relative;
}
.heute-mark::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Segmented switch */
.seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: var(--r-md);
  background: var(--ink-05);
  border: 1px solid var(--ink-05);
}
.seg-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-62);
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(35, 35, 40, 0.11);
}

/* Ordnungsleiste (Grouping · Filter · Sort) */
.order-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0 2px;
}
.order-bar::-webkit-scrollbar { display: none; }

.ob-chip {
  height: 28px;
  padding: 0 9px;
  border-radius: var(--r-xs);
  background: var(--surface);
  border: 1px solid var(--ink-08);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-62);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex: none;
  transition: background 130ms ease, color 130ms ease, border-color 130ms ease, transform 120ms ease;
}
.ob-chip svg { width: 13px; height: 13px; opacity: 0.7; }
.ob-chip:active { transform: scale(0.96); }
.ob-chip.active {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.ob-chip.active svg { opacity: 1; }
.ob-sep {
  width: 1px;
  height: 16px;
  background: var(--ink-12);
  flex: none;
  margin: 0 1px;
}

.ob-select {
  height: 28px;
  padding: 0 22px 0 8px;
  border-radius: var(--r-xs);
  background: var(--surface);
  border: 1px solid var(--ink-08);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  flex: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23232328' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

/* Scrollable body inside list-pane */
.view-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 14px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-12) transparent;
}

.sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 2px 8px;
}
.sec-row:first-child { margin-top: 2px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sec-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-62);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.sec-link:hover { color: var(--ink); }

/* ==========================================================================
   HEUTE: HUD Instrumentenband 1+3 · Tagesbogen · Braucht dich · Zuletzt
   ========================================================================== */
.bezel {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.inst-hero {
  width: 100%;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  transition: background 130ms ease;
}
.inst-hero:hover { background: var(--ink-03); }
.inst-hero:active { background: var(--ink-05); transform: scale(0.99); }

.ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
}
.ring-svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--muted-20); stroke-width: 3.5; }
.ring-prog {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 450ms var(--ease-out);
}
.ring-val {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero-body { flex: 1; min-width: 0; }
.hero-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.hero-time {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chev { width: 16px; height: 16px; color: var(--muted); flex: none; }

.inst-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink-08);
}
.inst-cell {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  transition: background 130ms ease;
}
.inst-cell + .inst-cell { border-left: 1px solid var(--ink-08); }
.inst-cell:hover { background: var(--ink-03); }
.inst-cell:active { background: var(--ink-05); }

.inst-val-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}
.inst-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: color 260ms ease;
}
.inst-num.zero { color: var(--muted); }
.inst-num.flash {
  color: var(--accent);
  animation: numFlash 520ms var(--ease-spring);
}
@keyframes numFlash {
  0% { transform: scale(1.18); color: var(--accent); }
  100% { transform: scale(1); }
}

.inst-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex: none;
}
.ai-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: beacon 2.8s ease-out infinite;
}
@keyframes beacon {
  0% { transform: scale(0.75); opacity: 0.55; }
  75%, 100% { transform: scale(1.8); opacity: 0; }
}
.ai-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
}

/* Tagesbogen Card */
.bogen-card {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 12px 14px 11px;
  margin-top: 10px;
}
.bogen-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.bogen-now {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.bogen-now i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.bogen-track-wrap { position: relative; padding: 6px 0 18px; }
.bogen-track {
  position: relative;
  height: 26px;
  border-radius: var(--r-xs);
  background: var(--paper);
  border: 1px solid var(--ink-08);
}
.bogen-tick {
  position: absolute;
  top: 100%;
  width: 1px;
  height: 5px;
  background: var(--muted-35);
}
.bogen-tick.major { height: 7px; background: var(--muted); }
.bogen-tlabel {
  position: absolute;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bogen-tlabel.start { transform: none; }
.bogen-tlabel.end { transform: translateX(-100%); }

.bogen-block {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 5px;
  border: 1px solid var(--ink-42);
  background: var(--surface);
  transition: transform 130ms ease, border-color 130ms ease;
}
.bogen-block:hover { border-color: var(--ink); }
.bogen-block:active { transform: scaleY(0.92); }
.bogen-block.past { background: var(--muted-20); border-color: transparent; }
.bogen-block.next { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.bogen-block.priv { background: var(--muted-35); border-color: transparent; }

.now-needle {
  position: absolute;
  top: -5px;
  bottom: -3px;
  width: 2px;
  background: var(--accent);
  transform: translateX(-1px);
  pointer-events: none;
  z-index: 3;
}
.now-needle::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--surface);
}

/* Swipeable Cards & List Rows */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swipe-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
}
.swipe-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--paper);
  transition: background 120ms ease;
}
.swipe-bg.r-hint { background: var(--accent-18); }
.swipe-bg.r-go { background: var(--accent); color: var(--surface); }
.swipe-bg.l-hint { background: var(--ink-12); }
.swipe-bg.l-go { background: var(--ink); color: var(--surface); }

.swipe-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transition: opacity 110ms ease;
}
.swipe-cue svg { width: 16px; height: 16px; }
.swipe-bg.r-hint .cue-r { opacity: 1; color: var(--accent); }
.swipe-bg.r-go .cue-r { opacity: 1; color: var(--surface); }
.swipe-bg.l-hint .cue-l { opacity: 1; color: var(--ink); }
.swipe-bg.l-go .cue-l { opacity: 1; color: var(--surface); }

.act-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-md);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-card);
  text-align: left;
  touch-action: pan-y;
  transition: transform 240ms var(--ease-spring), border-color 140ms ease, background 140ms ease;
}
.act-card.dragging { transition: none; }
.act-card:hover { border-color: var(--ink-18); }
.act-card.kb-focus, .list-row.kb-focus {
  background: var(--ink-05);
  box-shadow: inset 3px 0 0 var(--ink);
}
.act-card.selected-row, .list-row.selected-row {
  background: var(--ink-05);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ac-main { flex: 1; min-width: 0; }
.ac-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.ac-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.ac-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-62);
}
.ac-val.urgent { color: var(--ink); font-weight: 800; }

/* Group Card & Dense Lists */
.group-card {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 10px;
}
.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-08);
}
.group-head-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.group-head-btn:hover .group-title { text-decoration: underline; }
.group-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.list-row {
  position: relative;
  width: 100%;
  min-height: 46px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  text-align: left;
  transition: background 120ms ease;
}
.list-row + .list-row,
.swipe-wrap + .swipe-wrap .list-row,
.group-card .swipe-wrap { border-top: 1px solid var(--ink-08); }
.group-card .swipe-wrap:first-child,
.group-head + .swipe-wrap { border-top: 0; }
.list-row:hover { background: var(--ink-03); }
.list-row:active { background: var(--ink-05); }
.list-row.stale .lr-title { color: var(--muted); }

.lr-main { flex: 1; min-width: 0; }
.lr-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lr-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.lr-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-62);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lr-num.old { color: var(--muted); }

/* Zuletzt passiert & Eingang Row on Heute */
.recent-card {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.recent-row {
  width: 100%;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background 120ms ease;
}
.recent-row + .recent-row { border-top: 1px solid var(--ink-08); }
.recent-row:hover { background: var(--ink-03); }
.recent-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
  width: 38px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.recent-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-bar {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--ink-08);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.inbox-bar:hover { border-color: var(--ink-18); }
.inbox-bar-l { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; }
.inbox-bar-l svg { width: 17px; height: 17px; color: var(--ink-62); }
.count-box {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.count-box.zero { background: var(--ink-08); color: var(--muted); }

/* ==========================================================================
   KUNDEN: Lage-Radar (from prototyp_gemini & DESIGN_HANDY §10a)
   ========================================================================== */
.radar-card {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 12px;
}
.radar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 2px;
}
.radar-leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.radar-svg-wrap { padding: 0 8px 4px; display: flex; justify-content: center; }
.radar-svg { width: 100%; max-width: 320px; height: auto; display: block; overflow: visible; }
.radar-dot { cursor: pointer; }
.radar-dot circle.main-dot { transition: transform 220ms var(--ease-spring); transform-box: fill-box; transform-origin: center; }
.radar-dot:hover circle.main-dot, .radar-dot.selected circle.main-dot { transform: scale(1.24); }
.radar-reticle { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 2.5; opacity: 0; transition: opacity 150ms ease; }
.radar-dot.selected .radar-reticle { opacity: 1; }

.radar-readout {
  width: 100%;
  border-top: 1px solid var(--ink-08);
  background: var(--paper);
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.radar-readout:hover { background: var(--ink-05); }

/* ==========================================================================
   PROJEKTE: State Bar · Sparklines · Freshness · Board · Zeitachse
   ========================================================================== */
.state-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 10px;
}
.sb-cell {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  transition: background 130ms ease, color 130ms ease;
}
.sb-cell + .sb-cell { border-left: 1px solid var(--ink-08); }
.sb-cell:hover { background: var(--ink-03); }
.sb-cell.active { background: var(--ink); color: var(--surface); }
.sb-cell.active .sb-lbl { color: rgba(255, 255, 255, 0.72); }
.sb-cell.active .glyph.laeuft::before { background: var(--surface); }
.sb-cell.active .glyph.wartet::before { box-shadow: inset 0 0 0 1.6px var(--surface); background: transparent; }
.sb-num-row { display: flex; align-items: center; gap: 5px; }
.sb-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sb-lbl { font-size: 11px; font-weight: 600; color: var(--muted); }

/* Sparklines & Freshness bar */
.spark { display: flex; align-items: flex-end; gap: 1.5px; height: 16px; flex: none; }
.spark i { width: 2.5px; background: var(--ink); border-radius: 1px; min-height: 1px; }
.spark i.zero { background: var(--ink-12); height: 2px; }
.spark i.now { background: var(--accent); }

.fresh-wrap { display: flex; align-items: center; gap: 6px; flex: none; }
.fresh-bar {
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-08);
  overflow: hidden;
}
.fresh-bar i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.fresh-bar.hot i { background: var(--accent); }

/* Board View */
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: start;
}
.board-col {
  background: var(--paper);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.board-col-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 4px 5px;
}
.board-col-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}
.board-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(35, 35, 40, 0.04);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 130ms ease, transform 120ms ease;
}
.board-card:hover { border-color: var(--ink-42); }
.board-card:active { transform: scale(0.98); }
.board-card.selected-row { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.bc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bc-name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

/* Zeitachse (6-Week Timeline) */
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 8px 0 10px;
  position: relative;
  overflow-x: auto;
}
.tl-inner { min-width: 340px; position: relative; }
.tl-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
}
.tl-scale { height: 24px; position: relative; margin-right: 10px; }
.tl-scale span {
  position: absolute;
  top: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
}
.tl-group {
  grid-column: 1 / -1;
  height: 28px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  border-top: 1px solid var(--ink-08);
  background: var(--paper);
}
.tl-name {
  padding: 0 6px 0 12px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  min-width: 0;
}
.tl-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name:hover { color: var(--accent); }
.tl-lane {
  position: relative;
  height: 32px;
  margin-right: 10px;
}
.tl-lane::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--ink-08);
}
.tl-bar {
  position: absolute;
  bottom: 7px;
  border-radius: 1.5px;
  background: var(--ink);
  cursor: pointer;
}
.tl-bar:hover { background: var(--accent); }
.tl-bar.plan { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-42); }
.tl-frist {
  position: absolute;
  top: 3px;
  width: 8px;
  height: 7px;
  margin-left: -4px;
  background: var(--ink);
  clip-path: polygon(50% 100%, 100% 0, 0 0);
}
.tl-grid-overlay {
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 128px;
  right: 10px;
  pointer-events: none;
}
.tl-today {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}
.tl-wkline {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ink-05);
}

/* ==========================================================================
   KALENDER: Monat · Woche · Tag · Ablage zum Ziehen
   ========================================================================== */
.cal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 12px 10px;
  overflow: hidden;
  position: relative;
}
.cal-body.with-tray { padding-bottom: 58px; }

.cal-surface {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--paper);
  border-bottom: 1px solid var(--ink-08);
  flex: none;
}
.dow-row span {
  padding: 6px 0 6px 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.month-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(64px, 1fr);
  overflow-y: auto;
}

.m-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 5px 5px 6px;
  border-right: 1px solid var(--ink-08);
  border-bottom: 1px solid var(--ink-08);
  background: var(--surface);
  text-align: left;
  min-width: 0;
  overflow: hidden;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.m-cell:nth-child(7n) { border-right: 0; }
.m-cell.wknd { background: rgba(245, 247, 249, 0.65); }
.m-cell.outside { opacity: 0.36; }
.m-cell:hover { background: var(--paper); }
.m-cell.is-today::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: var(--accent);
}
.m-cell.selected { box-shadow: inset 0 0 0 2px var(--ink); z-index: 2; }
.m-cell.drop-target {
  background: var(--accent-10) !important;
  box-shadow: inset 0 0 0 2px var(--accent) !important;
  z-index: 3;
}
.m-cell.drop-flash { animation: cellFlash 560ms var(--ease-spring); }
@keyframes cellFlash {
  0% { background: var(--accent-18); }
  100% { background: var(--surface); }
}

.mc-top { display: flex; align-items: center; justify-content: space-between; }
.mc-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.m-cell.is-today .mc-num { color: var(--accent); font-weight: 800; }

.mc-tri {
  width: 8px;
  height: 7px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  flex: none;
}
.mc-appts { display: flex; flex-direction: column; gap: 2px; min-height: 11px; }
.mc-appts i { display: block; height: 3px; border-radius: 1.5px; background: var(--ink); }
.mc-appts i.priv { background: var(--muted); }
.mc-appts i.past { opacity: 0.38; }

.mc-ribbon {
  display: flex;
  height: 6px;
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
  background: var(--ink-05);
  gap: 1px;
}
.mc-ribbon i { display: block; height: 100%; }
.mc-ribbon i.plan { opacity: 0.35; }

.mc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--ink-62);
  font-variant-numeric: tabular-nums;
}
.ok-mark { width: 10px; height: 10px; color: var(--accent); flex: none; }
.open-ring { width: 7px; height: 7px; border-radius: 50%; border: 1.4px solid var(--ink-42); flex: none; }

/* Month summary strip */
.month-band {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--ink-08);
  box-shadow: var(--shadow-card);
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mb-hours {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mb-hours small { font-size: 13px; color: var(--muted); margin-left: 3px; font-weight: 700; }
.mb-stack { display: flex; height: 8px; border-radius: 3px; overflow: hidden; background: var(--ink-05); gap: 1.5px; }
.mb-stack i { display: block; height: 100%; }
.mb-leg { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* Time Grid (Week & Day) */
.time-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}
.time-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  border-bottom: 1px solid var(--ink-08);
  background: var(--paper);
  flex: none;
}
.th-cols { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.th-day {
  padding: 7px 8px;
  border-left: 1px solid var(--ink-08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.th-day:hover { background: var(--ink-05); }
.th-day.is-today .th-num { color: var(--accent); }
.th-dow { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.th-num { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1; }

.time-grid {
  display: grid;
  grid-template-columns: 44px 1fr;
  height: calc(13 * 48px); /* 07:00 - 20:00 */
  position: relative;
}
.hour-axis {
  position: relative;
  background: var(--paper);
  border-right: 1px solid var(--ink-08);
}
.hour-lbl {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.time-cols {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  position: relative;
}
.t-col {
  position: relative;
  border-left: 1px solid var(--ink-08);
  background-image: linear-gradient(to bottom, var(--ink-05) 1px, transparent 1px);
  background-size: 100% 48px;
}
.t-col:first-child { border-left: 0; }
.t-col.is-today { background-color: var(--accent-05); }
.t-col.drop-target { background-color: var(--accent-10); }

.t-now {
  position: absolute;
  left: -4px; right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 6;
  pointer-events: none;
}
.t-now::before {
  content: "";
  position: absolute;
  left: 0; top: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.t-block {
  position: absolute;
  left: 3px; right: 3px;
  border-radius: 7px;
  padding: 4px 6px 4px 8px;
  overflow: hidden;
  text-align: left;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: transform 130ms ease, box-shadow 130ms ease;
}
.t-block:hover { z-index: 5; box-shadow: var(--shadow-card); }
.t-block:active { transform: scale(0.98); }
.t-block.appt {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.4px var(--ink), 0 2px 6px -3px rgba(35, 35, 40, 0.18);
}
.t-block.appt.priv {
  box-shadow: inset 0 0 0 1.2px var(--muted);
  color: var(--ink-62);
}
.t-block.appt.past { opacity: 0.55; }
.t-block.work {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ink-12);
  padding-left: 11px;
  z-index: 2;
}
.t-block.work .w-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.t-block.plan {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.2px var(--ink-42);
  border-style: dashed;
  padding-left: 11px;
  z-index: 2;
}
.t-block.plan .w-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; opacity: 0.45; }
.t-block.task-blk {
  background: var(--accent-10);
  box-shadow: inset 0 0 0 1.3px var(--accent);
  z-index: 4;
}
.tb-t { font-size: 11.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-z { font-family: var(--font-display); font-weight: 700; font-size: 10.5px; color: var(--ink-62); font-variant-numeric: tabular-nums; }

/* Draggable Ablage Tray */
.ablage-tray {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  z-index: 15;
  background: var(--surface);
  border: 1px solid var(--ink-12);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 28px -8px rgba(35, 35, 40, 0.22);
  overflow: hidden;
  transition: transform 260ms var(--ease-spring), opacity 180ms ease;
}
.ablage-tray.dimmed { opacity: 0.22; pointer-events: none; transform: translateY(10px); }
.ablage-bar {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ablage-bar svg { width: 17px; height: 17px; flex: none; color: var(--ink-62); }
.ablage-bar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}
.ablage-hint { font-size: 11.5px; color: var(--muted); margin-left: auto; margin-right: 4px; }
.ablage-chev { transition: transform 220ms var(--ease-out); color: var(--muted); }
.ablage-tray.open .ablage-chev { transform: rotate(180deg); }

.ablage-body {
  display: none;
  padding: 0 10px 10px;
}
.ablage-tray.open .ablage-body { display: block; }
.ablage-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ablage-row::-webkit-scrollbar { display: none; }

.drag-chip {
  flex: none;
  width: 158px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--paper);
  border: 1px solid var(--ink-12);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  cursor: grab;
  touch-action: none;
  transition: transform 160ms var(--ease-spring), border-color 140ms ease;
}
.drag-chip:hover { border-color: var(--ink-42); }
.drag-chip:active { cursor: grabbing; transform: scale(0.97); }
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.dc-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drag-ghost {
  position: fixed;
  left: 0; top: 0;
  z-index: 95;
  pointer-events: none;
  display: none;
  width: 170px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1.6px solid var(--ink);
  box-shadow: var(--shadow-lift);
  transform: rotate(-1.5deg);
}
.drag-ghost.active { display: block; }
.drag-ghost-tag {
  position: absolute;
  top: -22px; left: 0;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}

/* ==========================================================================
   ENTITY DETAIL PAGE (Seiten statt Blätter · Unified Anatomy)
   ========================================================================== */
.entity-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: hidden;
}

.ep-header {
  flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--ink-08);
  padding: calc(10px + var(--sat)) 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: padding 180ms ease;
}
.ep-header.compact { padding-top: calc(8px + var(--sat)); padding-bottom: 8px; gap: 5px; }

.ep-nav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
.ep-hist-btns { display: flex; align-items: center; gap: 4px; flex: none; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.breadcrumbs::-webkit-scrollbar { display: none; }
.bc-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding: 2px 4px;
  border-radius: 5px;
}
.bc-link:hover { color: var(--ink); background: var(--ink-05); }
.bc-link.current { color: var(--ink); }
.bc-sep { color: var(--muted); font-size: 11px; flex: none; }

.ep-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ep-id-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.ep-id-wrap > svg { width: 22px; height: 22px; flex: none; color: var(--ink); }
.status-badge svg { width: 13px; height: 13px; flex: none; }
.ep-kind {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.ep-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.08;
  color: var(--ink);
  transition: font-size 180ms ease;
}
.ep-header.compact .ep-title { font-size: 20px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--paper);
  border: 1px solid var(--ink-12);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.status-badge.accent {
  background: var(--accent-10);
  border-color: var(--accent-18);
  color: var(--ink);
}

.ep-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ep-act-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  background: var(--paper);
  border: 1px solid var(--ink-08);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 120ms ease, transform 110ms ease;
}
.ep-act-btn svg { width: 14px; height: 14px; }
.ep-act-btn:hover { background: var(--ink-08); }
.ep-act-btn:active { transform: scale(0.96); }
.ep-act-btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ep-act-btn.green { background: var(--accent); color: var(--surface); border-color: var(--accent); }

.ep-anchors {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 2px;
}
.ep-anchors::-webkit-scrollbar { display: none; }
.ep-anchor {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.ep-anchor:hover, .ep-anchor.active { background: var(--paper); color: var(--ink); }

.ep-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-12) transparent;
}

.ep-sec {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 13px 15px;
  scroll-margin-top: 12px;
}
.ep-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.ep-sec-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ep-copy {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.ep-next-box {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--paper);
  border-left: 3px solid var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.ep-next-lbl {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.ep-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.ep-kv {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ep-kv-k { font-size: 11px; color: var(--muted); font-weight: 600; }
.ep-kv-v { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }

/* Universal Neighbor Chips (Same visual identity everywhere) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.entity-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--paper);
  border: 1px solid var(--ink-08);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  transition: background 120ms ease, border-color 120ms ease, transform 110ms ease;
}
.entity-chip:hover { background: var(--surface); border-color: var(--ink-42); }
.entity-chip:active { transform: scale(0.97); }
.entity-chip svg { width: 14px; height: 14px; color: var(--ink-62); flex: none; }
.entity-chip .ec-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

/* Task rows inside Detail Pages */
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  min-height: 40px;
}
.task-row + .task-row { border-top: 1px solid var(--ink-08); }
.chk-btn {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.6px solid var(--ink-42);
  display: grid;
  place-items: center;
  flex: none;
  transition: background 140ms ease, border-color 140ms ease;
}
.chk-btn svg { width: 13px; height: 13px; color: var(--surface); opacity: 0; }
.task-row.done .chk-btn { background: var(--accent); border-color: var(--accent); }
.task-row.done .chk-btn svg { opacity: 1; }
.task-row.done .tr-title { text-decoration: line-through; color: var(--muted); }
.tr-main { flex: 1; min-width: 0; text-align: left; }
.tr-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tr-meta { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Timeline Verlauf inside Detail Page */
.v-list { position: relative; padding-left: 16px; }
.v-list::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px; bottom: 8px;
  width: 1.5px;
  background: var(--ink-12);
}
.v-item { position: relative; padding: 6px 0 8px; display: flex; flex-direction: column; gap: 2px; }
.v-item::before {
  content: "";
  position: absolute;
  left: -16px; top: 11px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.7px solid var(--ink);
}
.v-item.src-Agent::before, .v-item.src-Lieferung::before { background: var(--ink); }
.v-item.src-Diktat::before, .v-item.src-Sprachnachricht::before { border-color: var(--accent); }
.v-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.v-date { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--ink-62); font-variant-numeric: tabular-nums; }
.v-src {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink-62);
}
.v-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.v-text { font-size: 13px; color: var(--ink-62); line-height: 1.45; }

/* Brief / Quittung on Terminseite */
.brief-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.brief-list li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.4; }
.brief-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--ink);
  flex: none;
}

.quittung-box {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1.3px solid var(--ink-12);
  background: var(--paper);
  resize: vertical;
  font-size: 13.5px;
  line-height: 1.45;
}
.quittung-box:focus { border-color: var(--ink); background: var(--surface); outline: none; }

/* Project 6-Week Activity Bar Chart */
.proj-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 44px;
  margin-top: 6px;
}
.proj-bars button {
  flex: 1;
  min-height: 4px;
  background: var(--ink);
  border-radius: 2px 2px 0 0;
  transition: background 120ms ease, transform 120ms ease;
}
.proj-bars button:hover { background: var(--accent); transform: scaleY(1.06); transform-origin: bottom; }
.proj-bars button.empty { background: var(--ink-08); height: 3px !important; }
.proj-bars button.today { background: var(--accent); }
.proj-bars button.plan { background: transparent; border: 1px solid var(--ink-42); }

/* ==========================================================================
   MODALS: Command Palette (Ctrl+K) · Action Bottom Sheet · Context Menu · Voice
   ========================================================================== */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(35, 35, 40, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.scrim.open { opacity: 1; pointer-events: auto; }

/* Command Palette */
.cmd-modal {
  position: fixed;
  top: 12vh;
  left: 50%;
  transform: translate(-50%, -10px) scale(0.98);
  width: min(560px, calc(100vw - 24px));
  max-height: 72vh;
  background: var(--surface);
  border: 1px solid var(--ink-12);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  z-index: 75;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 200ms var(--ease-out);
}
.cmd-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--ink-08);
}
.cmd-input-row svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cmd-input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
}
.cmd-input::placeholder { color: var(--muted); }
.kbd-hint {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--paper);
  border: 1px solid var(--ink-12);
  color: var(--ink-62);
}

.cmd-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.cmd-group-lbl {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.cmd-item {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background 100ms ease;
}
.cmd-item svg { width: 16px; height: 16px; flex: none; color: var(--ink-62); }
.cmd-item:hover, .cmd-item.active { background: var(--paper); }
.cmd-item.active { box-shadow: inset 2.5px 0 0 var(--accent); }
.cmd-item-title { font-size: 13.5px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-item-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cmd-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--ink-08);
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

/* Action Sheet (Short actions only: Wiedervorlage, Notiz, Aufgabe, Kontext) */
.action-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-sheet);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(12px + var(--sab));
  transform: translateY(105%);
  transition: transform 340ms var(--ease-spring);
  visibility: hidden;
}
.action-sheet.open { transform: translateY(0); visibility: visible; }
.action-sheet.dragging { transition: none; }
.sheet-handle {
  height: 24px;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}
.sheet-handle i { width: 38px; height: 4px; border-radius: 4px; background: var(--muted-35); }
.sheet-body { padding: 4px 18px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.sheet-sub { font-size: 12.5px; color: var(--muted); margin-top: -8px; }

.field-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1.3px solid var(--ink-12);
  background: var(--paper);
  font-size: 14px;
}
.field-input:focus { border-color: var(--ink); background: var(--surface); outline: none; }
.field-area {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1.3px solid var(--ink-12);
  background: var(--paper);
  font-size: 14px;
  resize: vertical;
}
.field-area:focus { border-color: var(--ink); background: var(--surface); outline: none; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice-btn {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--paper);
  border: 1px solid var(--ink-08);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.choice-btn:hover { border-color: var(--ink-42); }
.choice-btn strong { font-size: 13.5px; }
.choice-btn span { font-size: 11.5px; color: var(--muted); }

.sheet-btns { display: flex; gap: 8px; }
.btn-full {
  flex: 1;
  height: 44px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--ink-12);
}
.btn-full.dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn-full.green { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.btn-full:active { transform: scale(0.98); }

/* Context Menu (PC right-click / Mobile long-press) */
.ctx-menu {
  position: fixed;
  z-index: 80;
  min-width: 196px;
  background: var(--surface);
  border: 1px solid var(--ink-12);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.ctx-menu.open { display: flex; }
.ctx-item {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.ctx-item:hover { background: var(--paper); }

/* Voice Hold-to-Dictate Overlay */
.voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(35, 35, 40, 0.94);
  color: var(--surface);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 28px;
  text-align: center;
}
.voice-overlay.open { display: flex; }
.voice-ctx {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.voice-timer {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  font-variant-numeric: tabular-nums;
}
.voice-bars {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 54px;
}
.voice-bars i {
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
  height: 12px;
  transition: height 90ms ease;
}
.voice-hint { font-size: 13px; color: rgba(255, 255, 255, 0.72); }

/* Undo Toast */
.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + var(--sab) + 12px);
  z-index: 85;
  height: 48px;
  padding: 0 8px 0 14px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms var(--ease-spring), opacity 180ms ease;
}
.toast.open { transform: none; opacity: 1; pointer-events: auto; }
.toast-msg { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-undo {
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}
.toast-bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
}
.toast.open .toast-bar { animation: toastShrink 5s linear forwards; }
@keyframes toastShrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Eingang Cards */
.inbox-card {
  background: var(--surface);
  border: 1px solid var(--ink-08);
  border-radius: var(--r-md);
  padding: 12px 13px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 8px;
}
.inbox-card.kb-focus { box-shadow: inset 3px 0 0 var(--ink), var(--shadow-card); }
.ic-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ic-src {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.ic-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); }
.ic-text { font-size: 13px; color: var(--ink-62); line-height: 1.42; }
.ic-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 2px; }

/* ==========================================================================
   TABLET (700px – 1099px): Top Nav + 2 Columns (List + Detail)
   ========================================================================== */
@media (min-width: 700px) and (max-width: 1099px) {
  .mobile-nav, .mobile-stack { display: none !important; }
  .tablet-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 52px;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--ink-08);
    flex: none;
  }
  .tt-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 19px; }
  .tt-brand img { width: 22px; height: 22px; }
  .tt-nav { display: flex; align-items: center; gap: 4px; }
  .tt-btn {
    height: 32px;
    padding: 0 11px;
    border-radius: var(--r-xs);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-62);
  }
  .tt-btn.active { background: var(--paper); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

  .list-pane {
    flex: 0 0 360px;
    border-right: 1px solid var(--ink-08);
    padding-bottom: 0;
  }
  .workspace.wide-list .list-pane { flex: 1 1 auto; }
  .detail-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
    background: var(--paper);
  }
  .workspace.wide-list .detail-pane { flex: 0 0 360px; }
  .toast { left: auto; right: 20px; bottom: 20px; width: 380px; }
  .action-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 440px; border-radius: var(--r-lg);
    transform: translate(-50%, -46%) scale(0.97);
    opacity: 0;
  }
  .action-sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-handle { display: none; }
}

/* ==========================================================================
   PC (>= 1100px): 3 Columns (Sidebar 220px · List 390px · Detail Flex)
   ========================================================================== */
@media (min-width: 1100px) {
  .mobile-nav, .mobile-stack, .tablet-topbar { display: none !important; }

  .app-shell {
    flex-direction: row;
  }

  .pc-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--ink-08);
    padding: 14px 10px 12px;
    gap: 14px;
    overflow-y: auto;
  }

  .sb-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 6px;
  }
  .sb-brand-l {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .sb-brand-l img { width: 24px; height: 24px; }
  .sb-brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.01em;
  }

  .sb-search {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    background: var(--paper);
    border: 1px solid var(--ink-08);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    transition: border-color 120ms ease, color 120ms ease;
  }
  .sb-search:hover { border-color: var(--ink-18); color: var(--ink); }
  .sb-search svg { width: 14px; height: 14px; }
  .sb-search .kbd-hint { margin-left: auto; }

  .sb-group { display: flex; flex-direction: column; gap: 2px; }
  .sb-group-lbl {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 2px 8px 4px;
  }

  .sb-nav-btn {
    width: 100%;
    height: 34px;
    padding: 0 9px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-62);
    text-align: left;
    transition: background 110ms ease, color 110ms ease;
  }
  .sb-nav-btn svg { width: 16px; height: 16px; flex: none; }
  .sb-nav-btn:hover { background: var(--paper); color: var(--ink); }
  .sb-nav-btn.active {
    background: var(--paper);
    color: var(--ink);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .sb-nav-cnt {
    margin-left: auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .sb-nav-btn.active .sb-nav-cnt { color: var(--ink); }

  .sb-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--ink-08);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .sb-mic-btn {
    width: 100%;
    height: 36px;
    padding: 0 11px;
    border-radius: var(--r-sm);
    background: var(--ink);
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    transition: background 130ms ease, transform 120ms ease;
  }
  .sb-mic-btn svg { width: 15px; height: 15px; }
  .sb-mic-btn:hover { background: var(--accent); }
  .sb-mic-btn:active { transform: scale(0.98); }

  .sb-ai-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--ink-62);
  }

  /* Columns 2 & 3 */
  .list-pane {
    flex: 0 0 390px;
    border-right: 1px solid var(--ink-08);
    padding-bottom: 0;
  }
  .workspace.wide-list .list-pane {
    flex: 1 1 640px;
  }

  .detail-pane {
    display: flex;
    flex-direction: column;
    flex: 1 1 460px;
    min-width: 400px;
    min-height: 0;
    background: var(--paper);
  }
  .workspace.wide-list .detail-pane {
    flex: 0 0 420px;
    min-width: 390px;
  }

  .view-header { padding: 16px 18px 10px; }
  .view-scroll { padding: 4px 16px 28px; }
  .ep-header { padding: 14px 22px 11px; }
  .ep-scroll { padding: 16px 22px 36px; }

  .mobile-only { display: none !important; }

  /* Action Sheet becomes clean centered dialog on PC */
  .action-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 450px;
    border-radius: var(--r-lg);
    padding-bottom: 14px;
    transform: translate(-50%, -46%) scale(0.97);
    opacity: 0;
  }
  .action-sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 18px; }

  .toast { left: auto; right: 24px; bottom: 22px; width: 400px; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
