/* =========================================================
   DIGITAL SENSE — Modal (shared)
   Works for: Podcast, Books, Workshops
   Naming: ds-modal + ds-*
   ========================================================= */

/* ---------------------------------------------------------
   Scroll lock for body while <dialog> is open
   (required by modal.js)
   --------------------------------------------------------- */
body.ds-modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  /* optional but helps prevent layout jump with scrollbars */
  /* padding-right: var(--ds-scrollbar-comp, 0px); */
}

/* ---------------------------------------------------------
   0) Dialog base
   --------------------------------------------------------- */
dialog.ds-modal {
  width: min(1120px, calc(100% - 24px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;

  /* tokens */
  --ds-modal-text: rgba(9, 12, 16, 0.92);
  --ds-modal-muted: rgba(9, 12, 16, 0.66);
  --ds-modal-soft: rgba(9, 12, 16, 0.5);
  --ds-modal-border: rgba(17, 24, 39, 0.1);
  --ds-modal-shadow: 0 50px 160px rgba(0, 0, 0, 0.22);

  /* compatibility aliases (in case older rules use --modal-*) */
  --modal-text: var(--ds-modal-text);
  --modal-muted: var(--ds-modal-muted);
  --modal-soft: var(--ds-modal-soft);

  color: var(--ds-modal-text);

  border: 1px solid rgba(255, 255, 255, 0.35);
  background:
    radial-gradient(
      1200px 520px at 15% 0%,
      rgba(255, 255, 255, 0.35),
      transparent 55%
    ),
    radial-gradient(
      900px 420px at 85% 0%,
      rgba(255, 255, 255, 0.28),
      transparent 50%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.72),
      rgba(255, 255, 255, 0.58)
    );

  box-shadow:
    0 50px 160px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

dialog.ds-modal::backdrop {
  background: rgba(8, 12, 18, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Inherit colors inside modal */
dialog.ds-modal p,
dialog.ds-modal li,
dialog.ds-modal dd,
dialog.ds-modal dt,
dialog.ds-modal h1,
dialog.ds-modal h2,
dialog.ds-modal h3,
dialog.ds-modal h4 {
  color: inherit;
}

/* ---------------------------------------------------------
   1) Layout + scroll model
   Desktop: only main column scrolls
   Mobile: dialog scrolls naturally
   --------------------------------------------------------- */
.ds-modal-inner {
  max-height: min(86vh, 980px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ds-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  padding: 14px;
  align-items: start;
}

.ds-modal-main {
  min-width: 0;
  border-radius: 20px;

  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);

  padding: 12px;
  overflow: auto;
  max-height: calc(min(86vh, 980px) - 180px);
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}

.ds-modal-side {
  position: sticky;
  top: 14px;
  align-self: start;

  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;

  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 14px 48px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);

  max-height: calc(min(86vh, 980px) - 28px);
  overflow: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 980px) {
  .ds-modal-inner {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ds-modal-body {
    grid-template-columns: 1fr;
  }

  .ds-modal-main {
    max-height: none;
    overflow: visible;
    padding-right: 12px;
  }

  .ds-modal-side {
    position: relative;
    top: 0;
    max-height: none;
    overflow: visible;
  }
}

/* ---------------------------------------------------------
   2) Header + hero image
   Usage:
   <dialog class="ds-modal" data-has-hero="true" style="--ds-modal-hero:url(...)">
   --------------------------------------------------------- */
.ds-modal-head {
  position: sticky;
  top: 0;
  z-index: 50;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  padding: 22px 22px 18px;

  overflow: hidden;
  isolation: isolate;

  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ds-modal-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.35)
  );
}

dialog.ds-modal[data-has-hero="true"] .ds-modal-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;

  background-image: var(--ds-modal-hero);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: saturate(1.08) contrast(1.06);
  transform: scale(1.02);
}

dialog.ds-modal[data-has-hero="true"] .ds-modal-head::after {
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.18)
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.62) 100%
    );
}

.ds-modal-head-left {
  min-width: 0;
  max-width: 74ch;

  padding: 16px 16px 14px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.ds-modal-head .h2 {
  margin: 0 0 6px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ds-modal-text);
}

.ds-modal-head .muted {
  margin: 0;
  max-width: 70ch;
  color: var(--ds-modal-muted);
}

/* close button */
.ds-icon-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;

  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: rgba(9, 12, 16, 0.78);

  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);

  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.ds-icon-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.ds-icon-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .ds-modal-head {
    padding: 16px 16px 14px;
    min-height: 140px;
  }

  .ds-modal-head-left {
    padding: 14px;
    border-radius: 16px;
  }
}

/* ---------------------------------------------------------
   3) Sidebar blocks
   --------------------------------------------------------- */
.ds-modal-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ds-modal-meta div {
  display: grid;
  gap: 2px;
}

.ds-modal-meta dt {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-modal-soft);
}

.ds-modal-meta dd {
  margin: 0;
  font-weight: 850;
  color: var(--ds-modal-text);
}

/* chips (header meta chips) */
.ds-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 10px;
}

.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 650;
  color: rgba(9, 12, 16, 0.7);

  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* facts */
.ds-modal-facts {
  display: grid;
  gap: 10px;
}

.ds-fact {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.ds-fact-v {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.ds-fact-k {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(9, 12, 16, 0.56);
}

/* focus / highlight */
.ds-modal-focus {
  margin-top: 2px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.ds-modal-focus-k {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(9, 12, 16, 0.52);
}

.ds-modal-focus-v {
  margin-top: 6px;
  font-weight: 750;
  color: rgba(9, 12, 16, 0.78);
}

/* actions */
.ds-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.ds-modal-actions .btn {
  width: 100%;
  justify-content: center;
  border-radius: 999px;
}

/* TL;DR label */
.ds-tldr-label {
  display: block;
  margin-bottom: 2px;
}

/* ---------------------------------------------------------
   4) Sections (content blocks)
   --------------------------------------------------------- */
.ds-modal-section {
  padding: 12px 0;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.ds-modal-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ds-modal-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ds-modal-text);
}

.ds-modal-section .muted {
  margin: 0 0 8px;
  line-height: 1.6;
  color: var(--ds-modal-muted);
}

/* intro card (first section highlight) */
.ds-modal-main .ds-modal-section:first-of-type {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
}

/* generic list */
.ds-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.ds-list li {
  margin: 6px 0;
  color: var(--ds-modal-muted);
}

/* ---------------------------------------------------------
   5) Generic item cards + tags (+more)
   --------------------------------------------------------- */
.ds-item-list {
  margin: 10px 0 0;
  display: grid;
  gap: 12px;
}

article.ds-item.card {
  border-radius: 18px;
  padding: 14px;

  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.1);

  color: var(--ds-modal-text);
}

article.ds-item.card h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 850;
  color: var(--ds-modal-text);
}

.ds-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ds-item-meta {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: rgba(9, 12, 16, 0.56);
}

.ds-item-short {
  margin: 10px 0 0 0;
  color: rgba(9, 12, 16, 0.62);
  line-height: 1.55;
}

.ds-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ds-tag {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: rgba(9, 12, 16, 0.62);
  font-weight: 600;
}

.ds-tag--extra {
  display: none;
}

.ds-tags[data-expanded="true"] .ds-tag--extra {
  display: inline-flex;
}

.ds-tag--more {
  cursor: pointer;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(9, 12, 16, 0.6);
}

/* ---------------------------------------------------------
   6) Generic panels (people/guests/authors)
   --------------------------------------------------------- */
/* =========================================================
   Guests / People — modernize (no DOM changes)
   ========================================================= */

/* Section spacing + label */
.ds-people {
  margin-top: 14px;
}

.ds-people > .muted {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(9, 12, 16, 0.52);
}

.ds-people > .muted strong {
  font-weight: 800;
}

/* Grid of guests */
.ds-people-grid {
  display: grid;
  gap: 12px;
}

/* Panel card: turn into modern card with subtle hover */
.ds-panel.ds-person {
  position: relative;
  padding: 14px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow:
    0 14px 46px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.ds-panel.ds-person:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 24, 39, 0.12);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Avatar bubble (initials) without changing DOM */
.ds-panel.ds-person::before {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 999px;

  background:
    radial-gradient(
      22px 22px at 30% 25%,
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.25)
    ),
    linear-gradient(135deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.04));

  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  position: absolute;
  top: 14px;
  left: 14px;
}

/* Initials derived from name (best-effort using first letters) */
.ds-panel.ds-person::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;

  color: rgba(9, 12, 16, 0.78);
  font-weight: 850;
  letter-spacing: -0.02em;
  font-size: 13px;

  /* simple fallback initials: first 2 letters of the full name line */
  /* CSS can't truly compute initials; we keep it subtle */
  content: "👤";
  opacity: 0.85;
}

/* Move content to the right to make room for avatar */
.ds-person-name,
.ds-person-bio,
.ds-person-link {
  padding-left: 58px;
}

/* Name styling */
.ds-person-name {
  margin: 0 0 6px;
}

.ds-person-name strong {
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 850;
  color: var(--ds-modal-text, rgba(9, 12, 16, 0.92));
}

/* Bio: nicer spacing + clamping state */
.ds-person-bio {
  margin-top: 2px;
}

.ds-person-bio-text {
  margin: 0;
  line-height: 1.55;
  color: rgba(9, 12, 16, 0.62);
}

/* Toggle: turn into pill button */
.ds-person-bio-toggle {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 999px;

  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(9, 12, 16, 0.72);

  font-size: 12px;
  font-weight: 650;
  text-decoration: none;

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.ds-person-bio-toggle:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* Link row: make it look like a secondary action pill */
.ds-person-link {
  margin: 10px 0 0;
}

.ds-person-link .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 10px;
  border-radius: 999px;

  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.06);
  color: rgba(9, 12, 16, 0.72);

  text-decoration: none;
  font-size: 12px;
  font-weight: 650;

  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.ds-person-link .link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .ds-panel.ds-person {
    padding: 12px;
  }

  .ds-panel.ds-person::before,
  .ds-panel.ds-person::after {
    top: 12px;
    left: 12px;
  }

  .ds-person-name,
  .ds-person-bio,
  .ds-person-link {
    padding-left: 54px;
  }
}

/* ---------------------------------------------------------
   7) iframe content (external essays)
   --------------------------------------------------------- */
.ds-modal-iframe-wrap {
  width: 100%;
  height: 75vh;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.ds-modal-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------------------------------------------------------
   8) Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  dialog.ds-modal,
  .ds-icon-btn,
  article.ds-item.card {
    transition: none !important;
  }
}

/* ---------------------------------------------------------
   9) FINAL OVERRIDES (lowest wins)
   --------------------------------------------------------- */
.ds-modal-head-left {
  margin-bottom: 60px; /* oder 16px */
}

/* =========================================================
   Guests / People — polish (initials + top-right link)
   ========================================================= */

/* Card: reserve space on the right for the top-right action */
.ds-panel.ds-person {
  position: relative;
  padding: 14px 14px 14px;
  padding-right: 132px; /* Platz für "Profil / Website" oben rechts */
}

/* Avatar bubble */
.ds-panel.ds-person::before {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 999px;

  background:
    radial-gradient(
      22px 22px at 30% 25%,
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.25)
    ),
    linear-gradient(135deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.04));

  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  position: absolute;
  top: 14px;
  left: 14px;
}

/* Initials text */
.ds-panel.ds-person::after {
  content: attr(data-initials);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;

  color: rgba(9, 12, 16, 0.78);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 13px;
  opacity: 0.9;
}

/* If initials missing, show subtle fallback */
.ds-panel.ds-person:not([data-initials])::after {
  content: "👤";
  font-size: 14px;
}

/* Move content to the right to make room for avatar */
.ds-person-name,
.ds-person-bio {
  padding-left: 58px;
}

/* Move the "Profil / Website" action to top-right */
.ds-person-link {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 0;
  z-index: 2;
}

/* Style top-right link as pill */
.ds-person-link .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 10px;
  border-radius: 999px;

  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.06);
  color: rgba(9, 12, 16, 0.72);

  text-decoration: none;
  font-size: 12px;
  font-weight: 650;

  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.ds-person-link .link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* Toggle button: make it pill (keeps your class) */
.ds-person-bio-toggle {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 999px;

  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(9, 12, 16, 0.72);

  font-size: 12px;
  font-weight: 650;
  text-decoration: none;

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.ds-person-bio-toggle:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* Collapsed: 2-line clamp (looks nicer) */
.ds-person-bio[data-collapsed="true"] .ds-person-bio-text {
  -webkit-line-clamp: 2;
  line-clamp: 2; /* standard property for future compatibility */
}

/* Mobile: less right padding */
@media (max-width: 640px) {
  .ds-panel.ds-person {
    padding-right: 14px; /* Link darf umbrechen / normal fließen */
  }

  .ds-person-link {
    position: static;
    margin-top: 10px;
    padding-left: 58px;
  }
}

/* =========================================================
   Guests / People — final polish (works with existing DOM)
   ========================================================= */

.ds-panel.ds-person {
  position: relative;
  padding: 14px;
  padding-right: 132px; /* Platz für Profil/Website oben rechts */
}

/* Avatar bubble */
.ds-panel.ds-person::before {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 999px;
  position: absolute;
  top: 14px;
  left: 14px;

  background:
    radial-gradient(
      22px 22px at 30% 25%,
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.25)
    ),
    linear-gradient(135deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.04));
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Initials */
.ds-panel.ds-person::after {
  content: attr(data-initials);
  width: 44px;
  height: 44px;
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;

  color: rgba(9, 12, 16, 0.78);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 13px;
  opacity: 0.9;
}

.ds-panel.ds-person:not([data-initials])::after {
  content: "👤";
  font-size: 14px;
}

/* Text rechts neben Avatar */
.ds-person-name,
.ds-person-bio {
  padding-left: 58px;
}

/* Name */
.ds-person-name {
  margin: 0 0 6px;
}
.ds-person-name strong {
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 850;
}

/* Bio */
.ds-person-bio {
  margin-top: 2px;
}
.ds-person-bio-text {
  margin: 0;
  line-height: 1.55;
}

/* Toggle als Pill */
.ds-person-bio-toggle {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 999px;

  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(9, 12, 16, 0.72);

  font-size: 12px;
  font-weight: 650;
  text-decoration: none;

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Profil/Website oben rechts */
.ds-person-link {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  z-index: 2;
  padding: 0;
}

.ds-person-link .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 10px;
  border-radius: 999px;

  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.06);
  color: rgba(9, 12, 16, 0.72);
  text-decoration: none;

  font-size: 12px;
  font-weight: 650;
}

/* Mobile: Link wieder normal fließen lassen */
@media (max-width: 640px) {
  .ds-panel.ds-person {
    padding-right: 14px;
  }

  .ds-person-link {
    position: static;
    margin-top: 10px;
    padding-left: 58px;
  }
}

/* =========================================================
   MOBILE MODAL: Compact Header (mehr Platz für Inhalt)
   ========================================================= */
@media (max-width: 640px) {
  /* Dialog nutzt die Fläche besser */
  dialog.ds-modal {
    width: calc(100% - 16px);
    border-radius: 18px;
  }

  /* Header kleiner + nicht sticky (sonst frisst er Höhe) */
  .ds-modal-head {
    position: relative; /* statt sticky */
    top: auto;
    padding: 12px 12px 10px;
    min-height: 0; /* kill 140px */
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  /* Diese Zeile ist bei dir der Haupt-Übeltäter */
  .ds-modal-head-left {
    margin-bottom: 0 !important; /* kill "60px" */
    padding: 10px 10px 9px;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.52); /* dezenter */
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  }

  /* Titel kleiner */
  .ds-modal-head .h2 {
    font-size: 18px;
    line-height: 1.15;
    margin: 0 0 6px;
  }

  /* Meta-Chips kompakter */
  .ds-modal-chips {
    gap: 6px;
    margin: 8px 0 0;
  }
  .ds-chip {
    padding: 6px 9px;
    font-size: 11px;
  }

  /* Close Button kleiner */
  .ds-icon-btn {
    width: 38px;
    height: 38px;
  }

  /* Body mehr Luft sparen */
  .ds-modal-body {
    padding: 12px;
    gap: 12px;
  }
  .ds-modal-main,
  .ds-modal-side {
    padding: 12px;
    border-radius: 16px;
  }
}

/* =========================================================
   MOBILE: Modal fast fullscreen (≈98%)
   ========================================================= */
@media (max-width: 640px) {
  dialog.ds-modal {
    width: 98vw;
    max-width: 98vw;
    height: 98vh;
    max-height: 98vh;

    margin: 1vh auto;
    border-radius: 16px;
  }

  /* der Scroll-Container soll die volle Höhe nutzen */
  .ds-modal-inner {
    max-height: 98vh;
    height: 98vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Header kompakt lassen */
  .ds-modal-head {
    position: relative; /* nicht sticky */
    padding: 12px 12px 10px;
    min-height: 0;
  }

  /* diesen "60px" Spacer killen */
  .ds-modal-head-left {
    margin-bottom: 0 !important;
  }

  /* Body: keine künstlichen Höhenlimits */
  .ds-modal-main {
    max-height: none;
    overflow: visible;
  }
}

/* =========================================================
   MOBILE: Hero Header -> collapses on scroll
   Requires JS toggling .ds-modal--scrolled on <dialog>
   ========================================================= */
@media (max-width: 640px) {
  dialog.ds-modal {
    width: 98vw;
    max-width: 98vw;
    height: 98vh;
    max-height: 98vh;
    margin: 1vh auto;
    border-radius: 16px;
    overflow: hidden;
  }

  /* IMPORTANT: the dialog scroll container */
  .ds-modal-inner {
    height: 98vh;
    max-height: 98vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Header: sticky, hero visible */
  .ds-modal-head {
    position: sticky;
    top: 0;
    z-index: 60;

    padding: 18px 14px 14px;
    min-height: 190px; /* "groß" */
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  /* Title box in header should be subtle, not huge */
  .ds-modal-head-left {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 0 !important; /* kill any old spacer */
  }

  .ds-modal-head .h2 {
    font-size: 18px;
    line-height: 1.15;
    margin: 0 0 6px;
  }

  /* Big hero background in header */
  dialog.ds-modal[data-has-hero="true"] .ds-modal-head::before {
    opacity: 1;
    filter: saturate(1.08) contrast(1.06);
  }

  /* Close button stays visible */
  .ds-icon-btn {
    width: 38px;
    height: 38px;
  }

  /* --- COLLAPSED STATE (after scroll) --- */
  dialog.ds-modal.ds-modal--scrolled .ds-modal-head {
    min-height: 64px; /* "klein" */
    padding: 10px 12px;
  }

  /* Hero becomes subtle when collapsed */
  dialog.ds-modal.ds-modal--scrolled[data-has-hero="true"]
    .ds-modal-head::before {
    opacity: 0.35;
    filter: blur(2px) saturate(1.05);
    transform: none;
  }

  /* TL;DR disappears in collapsed state */
  dialog.ds-modal.ds-modal--scrolled .ds-modal-head-left .muted {
    display: none;
  }

  /* Title slightly tighter */
  dialog.ds-modal.ds-modal--scrolled .ds-modal-head .h2 {
    font-size: 16px;
    margin: 0;
  }
}
