/* ==========================================================================
   Responsive Breakpoints
   Aus oorigin.css ausgelagert; Reihenfolge und Inhalt unveraendert.
   Enthaelt nur Breakpoints fuer Basis, gemeinsame UI-Bausteine, Sidebar, Discover und Tags.
   ========================================================================== */

/* Desktop: Top-Navigation */
@media (min-width: 1025px) {
  .top-nav {
    padding: 14px 28px 0 0;
  }
  .top-nav .nav-logo {
    margin-left: 35px;
  }
  .top-nav .nav-logo .logo-word {
    font-size: 1.92rem;
  }
  .nav-sep,
  .nav-chapters {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .nav-user-cluster {
    margin-left: 18px;
  }
  .nav-account {
    margin-left: 0;
    padding-left: 0;
  }
  .nav-account-name {
    max-width: 12rem;
  }
}

/* Tablet/Desktop: Cover-Hintergrund */
@media (max-width: 1180px) and (min-width: 769px) {
  .body-wrap {
    background: var(--header-image-tablet) var(--header-bg-pos-tablet) / var(--cover-photo-size-tablet, auto) no-repeat;
  }
  body.cover-bg-intrinsic .body-wrap {
    background-size: var(--cover-photo-size-tablet, cover);
    background-position: var(--header-bg-pos-tablet);
  }
}

@media (min-width: 1025px) {
  body.single-cover-bg .body-wrap {
    background: none;
    overflow: hidden;
  }
  body.single-cover-bg .body-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--header-image-desktop) var(--header-bg-pos-desktop) / var(--cover-photo-size-desktop, cover) no-repeat;
    z-index: 0;
  }
  body.single-cover-bg .body-wrap::before {
    z-index: 1;
  }
  body.single-cover-bg.cover-tone-default {
    --cover-tone: linear-gradient(
      90deg,
      rgba(14, 14, 18, 0) 0%,
      rgba(16, 16, 22, 0.04) 14%,
      rgba(18, 18, 24, 0.09) 28%,
      rgba(16, 16, 22, 0.28) 38%,
      rgba(14, 14, 20, 0.4) 48%,
      rgba(14, 14, 20, 0.42) 56%,
      rgba(14, 14, 20, 0.48) 64%,
      rgba(12, 11, 16, 0.58) 74%,
      rgba(12, 11, 16, 0.67) 100%
    );
  }
}

@media (min-width: 1025px) and (max-width: 1220px) and (orientation: landscape) {
  body.single-cover-bg .body-wrap::after {
    background-position: var(--cover-bg-x-desktop-narrow) var(--cover-photo-y);
  }
  body.single-cover-bg.cover-bg-intrinsic .body-wrap::after {
    background-position: var(--header-bg-pos-desktop);
  }
}

/* Desktop: Kapitel-Toolbar und Slider-Layout */
@media (min-width: 981px) {
  .chapter-subs.is-eye-layout {
    --slider-frame-width: 340px;
    width: min(100%, var(--slider-frame-width));
    max-width: var(--slider-frame-width);
  }
  .chapter-subs-toolbar.is-glass-shell {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 0 0 12px;
  }
  .chapter-subs-toolbar.is-glass-shell::after {
    display: none;
  }
  .chapter-subs-toolbar.is-glass-shell .chapter-subs-intro {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    opacity: 0;
    /* Unsichtbare Fläche darf keine Klicks abfangen (Geisterhits auf darunterliegende Controls/Karte). */
    pointer-events: none;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-meta-row {
    display: none;
    grid-template-columns: max-content 1fr 2.08rem;
    align-items: center;
    gap: 18px;
    width: 100%;
    margin: 0 auto;
    color: rgba(var(--white-rgb), 0.42);
    font-size: 0.68rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    pointer-events: none;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-meta-user {
    grid-column: 1;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-meta-spacer {
    grid-column: 2;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-meta-date {
    grid-column: 3;
    white-space: nowrap;
    justify-self: center;
    transform: translateX(7px);
  }
  .slider-action-host {
    display: flex;
    justify-content: center;
    padding-top: 12px;
    width: 100%;
    max-width: none;
    margin: 0 auto;
  }
  .slider-action-host .slider-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-left: 0;
    top: -45px;
  }
  .slider-action-host .slider-nav-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transform: translateX(-50px);
  }
  .slider-action-host .slider-counter {
    top: 1px;
  }
  .slider-action-host.slider-action-host--discover {
    width: min(100%, 340px);
    max-width: 340px;
    margin: 0 0 0 40px;
  }
  .slider-action-host.slider-action-host--discover .slider-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-left: 0;
    top: 55px;
  }
  .slider-action-host.slider-action-host--discover .slider-nav-group {
    display: inline-flex;
    gap: 30px;
    transform: translateX(-50px);
  }
}

/* Tablet & Mobile: Grundlayout, Navigation und Menue */
@media (max-width: 1024px) {

  html, body {
    height: auto;
    overflow: auto;
  }

  .body-wrap {
    position: static;
    flex-direction: column;
    height: auto;
    background: none;
  }

  /* Bild oben als schmaler Header */
  .img-panel {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    background: var(--header-image-mobile) var(--header-bg-pos-mobile) / cover no-repeat;
  }
  body.single-cover-bg .img-panel {
    background: none;
  }
  body.single-cover-bg .img-panel img {
    opacity: 1;
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    object-fit: unset;
    object-position: center top;
  }

  .img-panel::after {
    background: linear-gradient(to bottom, transparent 40%, var(--bg-page) 100%);
  }

  /* Zitat zentriert im Bild */
  .hero-chapter {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    width: 90%;
    text-align: center;
  }

  .chapter-label { display: none; }
  .sidebar-nav { display: none; }
  .quick-nav { display: none; }

  /* Scroll-Panel normal */
  .scroll-panel {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    margin-left: 0;
  }
  .scroll-panel::after { height: 0; }

  /* Sections */
  .sec {
    min-height: auto;
    padding: 48px 24px 40px;
  }
  #ch01,
  #ch02 {
    padding-top: 48px;
  }
  .sec-cover {
    padding-left: 24px;
    justify-content: flex-end;
    padding-top: clamp(56px, 9vh, 88px);
    padding-bottom: clamp(36px, 7vh, 64px);
  }
  .sec-cover:not(#cover) .cover-stack,
  body.single-cover-bg:not([data-cover-layout]) #cover .cover-stack {
    width: 100%;
    max-width: none;
  }
  .sec-cover .cover-stack > .cover-tag,
  .sec-cover .cover-stack > .cover-title {
    margin-left: 5px;
  }
  .sec-cover .cover-stack > .cover-tag {
    margin-left: 15px;
  }
  .sec-cover[data-entry-state="after_enter"] .cover-stack > .cover-tag {
    margin-left: 0;
  }
  .sec-cover[data-entry-state="after_enter"] .cover-title {
    margin-bottom: 45px;
  }
  body.single-cover-bg #cover.sec-cover[data-entry-state="after_enter"] .cover-title {
    margin-bottom: 32px;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover[data-entry-state="after_enter"] .chapter-intro,
  .sec-cover:not(#cover)[data-entry-state="after_enter"] .chapter-intro {
    max-width: 260px;
  }
  .sec-cover[data-entry-state="before_enter"] .chapter-intro,
  .sec-cover:not([data-entry-state="after_enter"]):not(#cover) .chapter-intro,
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover[data-entry-state="before_enter"] .chapter-intro,
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover:not([data-entry-state="after_enter"]) .chapter-intro {
    max-width: min(280px, calc(100vw - 120px));
  }
  .sec-cover[data-entry-state="before_enter"] .cover-stack > .chapter-intro-wrap,
  .sec-cover:not([data-entry-state="after_enter"]) .cover-stack > .chapter-intro-wrap {
    max-width: min(280px, calc(100vw - 120px));
    width: auto;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover[data-entry-state="before_enter"] .cover-stack > .chapter-intro-wrap,
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover:not([data-entry-state="after_enter"]) .cover-stack > .chapter-intro-wrap {
    max-width: min(280px, calc(100vw - 120px));
    width: auto;
  }
  .sec-cover .cover-stack > .chapter-intro-wrap {
    margin-left: 0;
  }

  .sec-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
    margin-bottom: 40px;
    margin-left: 20px;
  }
  .sec:not(.sec-cover) > .sec-num,
  .sec:not(.sec-cover) > .sec-title {
    transform: none;
  }
  .sec:not(.sec-cover) > .sec-num { margin-bottom: 18px; }
  .sec:not(.sec-cover) > .sec-num { margin-left: 20px; }
  .sec:not(.sec-cover) > .sec-title { margin-bottom: 40px; }
  #ch01 .chapter-intro-wrap,
  #ch02 .chapter-intro-wrap,
  .sec:not(#cover) .chapter-intro-wrap {
    max-width: none;
    transform: none;
    margin-bottom: 28px;
  }
  .slider-action-host {
    display: flex;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: 8px;
  }
  .slider-action-host.slider-action-host--discover {
    display: flex;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .chapter-subs-toolbar.is-glass-shell {
    --glass-segment-width: 5.9rem;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    row-gap: 10px;
    width: min(100%, calc(100vw - 86px));
    padding: 0 2px 12px;
  }
  .chapter-subs-toolbar.is-glass-shell .chapter-subs-intro {
    flex: 0 0 7.9rem;
    min-width: 7.9rem;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-actions {
    margin-left: 0;
    padding-left: 0;
    width: auto;
    top: 0;
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    transform: translateY(90px);
  }
  .slider-actions {
    top: 0 !important;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-nav-group {
    display: inline-flex !important;
    transform: translateX(100px);
    justify-self: center;
  }
  .slider-nav-group {
    display: inline-flex !important;
    transform: translateX(100px) !important;
  }
  .slider-action-host.slider-action-host--discover .slider-actions {
    margin-left: 0;
    padding-left: 0;
    width: auto;
    position: static;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    transform: none;
    margin-top: 8px;
  }
  .slider-action-host.slider-action-host--discover .slider-nav-group {
    transform: translateX(100px) !important;
    justify-self: center;
  }
  .chapter-subs-toolbar.is-glass-shell .slider-actions::before {
    display: none;
  }
  .chapter-subs-toolbar.is-glass-shell + .chapter-subs-pills {
    position: static;
    width: 100%;
    padding-top: 18px;
  }
  #ch01 .chapter-intro,
  #ch02 .chapter-intro,
  .sec:not(#cover) .chapter-intro {
    max-width: none;
    margin-left: 40px;
  }
  #ch01 .chapter-intro,
  #ch02 .chapter-intro {
    max-width: calc(100vw - 120px);
    margin-right: 80px;
  }
  .sec-title--inline,
  .sec-title--brand { white-space: normal; }
  /* Top Nav */
  .top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 201;
    background: rgba(var(--bg-rgb),0.95);
    backdrop-filter: blur(8px);
    height: calc(var(--nav-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
  }
  .body-wrap { padding-top: calc(var(--nav-h) + env(safe-area-inset-top)); }
  .nav-chapters { display: none; }

  /* Cover */
  .menu-overlay {
    left: auto;
    right: 16px;
    top: calc(var(--nav-h) + env(safe-area-inset-top) + 8px);
    width: min(280px, calc(100vw - 32px - env(safe-area-inset-right)));
    min-width: 0;
    max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top) - 20px - env(safe-area-inset-bottom));
    border: 1px solid rgba(var(--purple-rgb), 0.14);
    border-radius: 16px;
    padding-top: 10px;
    padding-bottom: 8px;
  }
  .menu-overline {
    padding: 0 24px 10px;
    font-size: 0.6rem;
    letter-spacing: 0.24em;
  }
  .menu-overlay a {
    gap: 14px;
    padding: 11px 24px;
    min-height: 38px;
  }
  .menu-num {
    width: 24px;
    font-size: 0.66rem;
  }
  .menu-title {
    font-size: 0.88rem;
    letter-spacing: 0.12em;
  }
  .menu-overlay a.menu-secondary .menu-title {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
  }
}

/* Tablet & Mobile: Sidebar-Karten (Breite nur ohne tablet-col — Phone nutzt 100 %). */
@media (max-width: 768px) {
  body:not([data-cover-layout="tablet-col"]) {
    /* Schmalerer Rand links fürs Cover: Panel etwas breiter, Edge-Tabs schmaler. */
    --sidebar-panel-w: min(calc(100vw - 8px), 396px);
  }
  .sidebar-edge-tab,
  .sidebar-trigger-tab {
    --sidebar-tab-w: 26px;
    min-height: 52px;
    padding: 5px 3px;
  }
  .sidebar-edge-tab::before,
  .sidebar-edge-tab::after {
    width: 10.5px;
  }
  .sidebar-edge-tab::after {
    width: 1.15px;
    height: 10.5px;
  }
  .sidebar-trigger-tab svg {
    width: 9px;
    height: 18px;
    transform: translateX(-8px);
  }
  .sidebar-text-card {
    width: min(100%, 32rem);
    max-width: none;
    min-height: 190px;
    padding-top: clamp(14px, 2.8vh, 26px);
    padding-bottom: clamp(10px, 2.8vh, 24px);
    margin: 0 auto;
  }
}

@media (max-width: 1360px), (max-height: 920px) {
  .info-window-panel {
    width: min(calc(100vw - 40px), 1320px);
    height: min(calc(100vh - 56px), 840px);
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 56px);
    --info-gap-before-divider: clamp(16px, 2.4vh, 22px);
    --info-gap-after-divider: clamp(14px, 2vh, 18px);
    --info-gap-after-divider-inner: 8px;
    --info-fs-chapter: clamp(0.86rem, 1.02vw, 1rem);
    --info-fs-subtitle: clamp(1.98rem, 3.05vw, 3.1rem);
    --info-fs-subtitle-col23: clamp(1.84rem, 2.58vw, 2.62rem);
    --info-fs-lead: clamp(1.06rem, 1.28vw, 1.18rem);
    --info-fs-list: clamp(0.98rem, 1.15vw, 1.08rem);
    --info-fs-copy: clamp(0.98rem, 1.28vw, 1.08rem);
    --info-fs-line: clamp(0.98rem, 1.2vw, 1.06rem);
    --info-fs-line-span: clamp(1.48rem, 1.85vw, 1.78rem);
    --info-fs-line-note: clamp(1.28rem, 1.56vw, 1.52rem);
    --info-fs-focus-title: clamp(1.02rem, 1.2vw, 1.1rem);
    --info-fs-focus-copy: clamp(0.86rem, 0.94vw, 0.94rem);
    --info-fs-cta-label: 0.88rem;
    --info-fs-cta-price: clamp(1rem, 1.14vw, 1.06rem);
    --info-fs-cta-detail: clamp(0.78rem, 0.9vw, 0.84rem);
    --info-fs-access-meta: clamp(0.86rem, 0.98vw, 0.92rem);
  }

  .info-window-col {
    padding: clamp(18px, 2.2vw, 28px);
  }

  .info-window-chapter {
    margin-bottom: clamp(14px, 2.2vh, 20px);
  }

  .info-window-lead {
    line-height: 1.58;
  }

  .info-window-note {
    margin-top: clamp(14px, 2.2vh, 20px);
  }

  .info-window-finale {
    padding: 13px 20px 24px 15px;
    padding-bottom: clamp(18px, 2.8vh, 22px);
  }

  .info-window-col--two .info-window-note,
  .info-window-col--three .info-window-note {
    margin-top: clamp(10px, 1.6vh, 16px);
    padding: 0;
  }

  .info-window-note .info-window-list {
    margin-top: clamp(12px, 2vh, 18px);
    gap: clamp(10px, 1.4vh, 14px);
  }

  .info-window-note .info-window-list li {
    line-height: 1.46;
  }

  .info-window-line--note span {
    line-height: 1.14;
  }

  .info-window-access-meta {
    margin-top: 12px !important;
    font-size: var(--info-fs-access-meta) !important;
  }
}

/* Tablet Landscape (iPad Mini bis iPad Pro Querformat): enge CSS-Ränder, JS spannt Panel Logo→Sidebar */
@media (max-width: 1400px) and (orientation: landscape) and (min-height: 32.5625rem) {
  :root {
    --oorigin-panel-open-left: 12px;
    --oorigin-panel-open-right: 12px;
    --oorigin-panel-open-center-sidebar-gap: 20px;
    --oorigin-panel-open-default-offset-x: 0px;
    --oorigin-panel-open-default-offset-y: -28px;
    --oorigin-panel-open-default-area-right-inset: 96px;
  }

  body.single-cover-bg[data-cover-layout] {
    --oorigin-panel-open-left: max(12px, calc(env(safe-area-inset-left, 0px) + 84px));
  }

  .discover-grid-stage.discover-grid-stage--custom-bounds {
    --discover-overlay-content-inset-x: 16px;
  }

  .info-window-panel {
    width: min(calc(100vw - 12px), 1320px);
    height: min(calc(100vh - 12px), 960px);
    max-width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .info-window-col {
    padding: clamp(14px, 1.8vw, 22px);
  }
}

/* Große Desktop-Fläche: Panel + Spalten-Padding (greift nicht, wenn Kompakt-Query aktiv ist) */
@media (min-width: 1361px) and (min-height: 921px) {
  .info-window-panel {
    width: min(calc(100vw - 40px), 1320px);
    height: min(calc(100vh - 56px), 840px);
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 56px);
    --info-gap-before-divider: clamp(16px, 2.4vh, 22px);
    --info-gap-after-divider: clamp(14px, 2vh, 18px);
    --info-gap-after-divider-inner: 8px;
    --info-fs-chapter: clamp(0.86rem, 1.02vw, 1rem);
    --info-fs-subtitle: clamp(1.98rem, 3.05vw, 3.1rem);
    --info-fs-subtitle-col23: clamp(1.84rem, 2.58vw, 2.62rem);
    --info-fs-lead: clamp(1.06rem, 1.28vw, 1.18rem);
    --info-fs-list: clamp(0.98rem, 1.2vw, 1.08rem);
    --info-fs-copy: clamp(0.98rem, 1.28vw, 1.08rem);
    --info-fs-line: clamp(0.98rem, 1.2vw, 1.06rem);
    --info-fs-line-span: clamp(1.48rem, 1.85vw, 1.78rem);
    --info-fs-line-note: clamp(1.28rem, 1.56vw, 1.52rem);
    --info-fs-focus-title: clamp(1.02rem, 1.2vw, 1.1rem);
    --info-fs-focus-copy: clamp(0.86rem, 0.94vw, 0.94rem);
    --info-fs-cta-label: 0.88rem;
    --info-fs-cta-price: clamp(1rem, 1.14vw, 1.06rem);
    --info-fs-cta-detail: clamp(0.78rem, 0.9vw, 0.84rem);
    --info-fs-access-meta: clamp(0.86rem, 0.98vw, 0.92rem);
  }

  .info-window-col {
    padding: clamp(18px, 2.2vw, 28px);
  }
}

/* Stack + Scroll: Tablet & Phone (Portrait und Landscape) */
@media (max-width: 1024px) {
  .info-window-panel {
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    transform: none;
    min-width: 0;
    --info-fs-title: clamp(2.16rem, 9.7vw, 3.08rem);
    --info-fs-subtitle: clamp(1.82rem, 8.2vw, 2.45rem);
    --info-fs-subtitle-col23: clamp(1.74rem, 7.8vw, 2.36rem);
    --info-fs-list: clamp(0.98rem, 3.6vw, 1.06rem);
    --info-fs-lead: clamp(1.04rem, 4vw, 1.14rem);
    min-height: 0;
  }

  .info-window-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .info-window-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .info-window-col {
    overflow: visible;
    padding: clamp(16px, 3.5vw, 20px) clamp(14px, 4vw, 18px);
    box-sizing: border-box;
    width: 100%;
    max-width: none;
  }

  .info-window-col--one,
  .info-window-col--two,
  .info-window-col--three {
    grid-column: unset;
    grid-row: unset;
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    border-top: 0.5px solid rgba(120, 103, 156, 0.3);
  }

  .info-window-col--one {
    border-top: 0;
  }

  .info-window-grid::before,
  .info-window-grid::after {
    display: none;
  }

  .info-window-note,
  .info-window-col--two .info-window-note {
    margin-top: 16px;
    padding: 0;
  }

  .info-window-finale {
    padding: 15px 18px 24px;
  }

  .info-window-col--two .info-window-subtitle,
  .info-window-col--three .info-window-subtitle {
    margin-left: 0;
  }

  .info-window-col--three .info-window-note {
    flex: none;
  }

  .info-window-col--one .info-window-finale {
    margin-top: var(--info-gap-before-divider);
  }

  .info-window-col--two .info-window-finale,
  .info-window-col--three .info-window-finale.info-window-closure {
    margin-top: calc(var(--info-gap-before-divider) + 30px);
  }

  .info-window-col--two .info-window-note {
    flex: none;
  }

  .info-window-focus-slider {
    --info-focus-slider-h: 212px;
    --info-focus-gap-above-nav: 0px;
    --info-focus-nav-h: 30px;
    --info-focus-track-h: 162px;
  }

  .info-window-focus-title,
  .info-window-focus-copy {
    max-width: none;
  }

  .info-window-col--three .info-window-finale.info-window-closure {
    margin-bottom: 12px;
  }

  .info-window-resize-handle {
    display: none;
  }

  /* Single-Cover: Inhalt nutzt Panelbreite (kein seitlicher Figuren-Offset) */
  body.single-cover-bg.info-window-open .info-window-head {
    box-sizing: border-box;
    padding-left: clamp(14px, 4vw, 18px);
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  body.single-cover-bg.info-window-open .info-window-grid {
    box-sizing: border-box;
    padding-left: clamp(14px, 4vw, 18px);
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
}

/* iPad Air u. ä. Querformat (nicht Mini): drei Spalten */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) and (min-height: 781px) {
  .info-window-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(calc(100vw - 4px), 1320px);
    height: min(calc(100dvh - 4px), calc(100vh - 4px), 960px);
    max-width: calc(100vw - 4px);
    max-height: min(calc(100dvh - 4px), calc(100vh - 4px));
    min-width: var(--oorigin-panel-min-w);
    min-height: 0;
    transform: translate(-50%, -50%);
    --info-fs-title: clamp(2.42rem, 3.9vw, 4.05rem);
    --info-fs-subtitle: clamp(2.1rem, 3.38vw, 3.38rem);
    --info-fs-subtitle-col23: clamp(2.05rem, 3.22vw, 3.22rem);
    --info-fs-list: clamp(1.04rem, 1.36vw, 1.14rem);
    --info-fs-lead: clamp(1.12rem, 1.55vw, 1.34rem);
  }

  .info-window-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr) 1px minmax(0, 1fr);
    flex-direction: unset;
    align-items: unset;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .info-window-col {
    overflow: hidden;
    padding: clamp(14px, 1.8vw, 22px);
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }

  .info-window-col--one {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    flex: unset;
    min-height: 0;
    border-top: 0;
  }

  .info-window-col--two {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    flex: unset;
    min-height: 0;
    border-top: 0;
  }

  .info-window-col--three {
    grid-column: 5;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    flex: unset;
    min-height: 0;
    border-top: 0;
  }

  .info-window-grid::before,
  .info-window-grid::after {
    display: block;
  }

  .info-window-col--two .info-window-note,
  .info-window-col--three .info-window-note {
    flex: 1 1 auto;
    min-height: 0;
  }

  .info-window-col--one .info-window-finale {
    margin-top: var(--info-gap-before-divider);
    margin-bottom: revert;
  }

  .info-window-col--two .info-window-finale.info-window-focus-slider {
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-top: var(--info-col-two-slider-gap);
    margin-bottom: 0;
  }

  .info-window-col--three .info-window-finale.info-window-closure {
    margin-top: var(--info-col-two-slider-gap);
    margin-bottom: revert;
  }

  .info-window-focus-slider,
  .info-window-col--two .info-window-finale.info-window-focus-slider {
    --info-focus-slider-h: 240px;
    --info-focus-gap-above-nav: 0px;
    --info-focus-nav-h: 32px;
    --info-focus-track-h: 188px;
    display: grid;
    height: var(--info-focus-slider-h);
    min-height: var(--info-focus-slider-h);
    max-height: var(--info-focus-slider-h);
    overflow: hidden;
  }

  .info-window-col--two .info-window-finale.info-window-focus-slider > .info-window-focus-track,
  .info-window-col--two .info-window-finale.info-window-focus-slider > .info-window-focus-nav {
    position: relative;
    z-index: 1;
  }

  body.single-cover-bg.info-window-open .info-window-head,
  body.single-cover-bg.info-window-open .info-window-grid {
    padding-left: 0;
    padding-right: 0;
  }

  .info-window-panel.is-story-view {
    --story-figure-rail: 40%;
    --story-max-w: 100%;
    --story-content-pad-top: clamp(36px, 6vh, 72px);
  }
}

/* iPad Mini: untereinander, Vollbild, Inhalt rechts */
@media (max-width: 744px),
  (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) and (max-height: 780px) {
  .info-window-panel {
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    min-width: 0;
    transform: none;
    border-radius: 0;
    --info-fs-title: clamp(2.16rem, 9.7vw, 3.08rem);
    --info-fs-subtitle: clamp(1.82rem, 8.2vw, 2.45rem);
    --info-fs-subtitle-col23: clamp(1.74rem, 7.8vw, 2.36rem);
    --info-fs-list: clamp(0.98rem, 3.6vw, 1.06rem);
    --info-fs-lead: clamp(1.04rem, 4vw, 1.14rem);
  }

  .info-window-head {
    justify-content: flex-end;
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  .info-window-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .info-window-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .info-window-grid::before,
  .info-window-grid::after {
    display: none;
  }

  .info-window-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    overflow: visible;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: clamp(16px, 3.5vw, 22px) max(16px, env(safe-area-inset-right, 0px)) clamp(16px, 3.5vw, 22px)
      clamp(14px, 4vw, 20px);
  }

  .info-window-col--one,
  .info-window-col--two,
  .info-window-col--three {
    grid-column: unset;
    grid-row: unset;
    flex: 0 0 auto;
    min-height: 0;
    border-top: 0.5px solid rgba(120, 103, 156, 0.3);
  }

  .info-window-col--one {
    border-top: 0;
  }

  .info-window-grid .info-window-chapter,
  .info-window-grid .info-window-title,
  .info-window-grid .info-window-subtitle,
  .info-window-grid .info-window-lead,
  .info-window-grid .info-window-note,
  .info-window-grid .info-window-list,
  .info-window-grid .info-window-copy,
  .info-window-grid .info-window-line {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
  }

  .info-window-grid .info-window-list li {
    text-align: right;
  }

  .info-window-col--two .info-window-subtitle,
  .info-window-col--three .info-window-subtitle {
    margin-left: auto;
  }

  .info-window-col--two .info-window-note,
  .info-window-col--three .info-window-note {
    flex: none;
    width: 100%;
    max-width: 23rem;
  }

  .info-window-col--two .info-window-finale.info-window-focus-slider {
    align-self: flex-end;
    width: 100%;
    max-width: 23rem;
    margin-top: calc(var(--info-gap-before-divider) + 30px);
  }

  .info-window-focus-slider {
    --info-focus-slider-h: 212px;
    --info-focus-track-h: 162px;
    --info-focus-nav-h: 30px;
  }

  .info-window-focus-title,
  .info-window-focus-copy {
    max-width: none;
    text-align: right;
  }

  .info-window-focus-nav {
    justify-content: flex-end;
  }

  .info-window-col--three .info-window-finale.info-window-closure {
    align-items: flex-end;
    align-self: flex-end;
    width: 100%;
    max-width: 28rem;
    text-align: right;
    margin-top: calc(var(--info-gap-before-divider) + 30px);
  }

  .info-window-col--three .info-window-closure-lead,
  .info-window-col--three .info-window-closure-lead span,
  .info-window-col--three .info-window-closure-cta,
  .info-window-col--three .info-window-closure-sub,
  .info-window-col--three .info-window-closure-sub-line {
    text-align: right;
  }

  .info-window-col--three .info-window-closure-sub {
    align-items: flex-end;
  }

  .info-window-col--three > .info-window-closure-about {
    justify-content: flex-end;
  }

  .info-window-col--three .info-window-closure-cta {
    align-items: flex-end;
  }

  .info-window-col--three .info-window-closure-lead::before {
    left: auto;
    right: 0;
    margin-left: auto;
    margin-right: 0;
  }

  .info-window-col--three .info-window-closure-pill {
    align-self: flex-end;
  }

  body.single-cover-bg.info-window-open .info-window-head,
  body.single-cover-bg.info-window-open .info-window-grid {
    padding-left: clamp(14px, 4vw, 20px);
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .info-window-panel.is-story-view .info-window-story-shell {
    min-height: 0;
  }
}

/* iPhone: Info-About linksbündig (nicht Mini-Tablet-Rechtsausrichtung) */
@media (max-width: 744px) and (max-height: 956px) {
  .info-window-panel:not(.is-story-view) .info-window-col {
    align-items: flex-start;
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-chapter,
  .info-window-panel:not(.is-story-view) .info-window-title,
  .info-window-panel:not(.is-story-view) .info-window-subtitle,
  .info-window-panel:not(.is-story-view) .info-window-lead,
  .info-window-panel:not(.is-story-view) .info-window-note,
  .info-window-panel:not(.is-story-view) .info-window-list,
  .info-window-panel:not(.is-story-view) .info-window-copy,
  .info-window-panel:not(.is-story-view) .info-window-line {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
  }

  .info-window-panel:not(.is-story-view) .info-window-list li {
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--two .info-window-subtitle,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-subtitle {
    margin-left: 0;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--two .info-window-finale.info-window-focus-slider {
    align-self: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-focus-title,
  .info-window-panel:not(.is-story-view) .info-window-focus-copy {
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-focus-nav {
    justify-content: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-finale.info-window-closure {
    align-items: flex-start;
    align-self: flex-start;
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-lead,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-lead span,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-cta,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-sub,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-sub-line {
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-sub {
    align-items: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three > .info-window-closure-about {
    justify-content: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-cta {
    align-items: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-lead::before {
    left: 0;
    right: auto;
    margin-left: 0;
    margin-right: auto;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-pill {
    align-self: flex-start;
  }
}

/* Mobil: Story-Hero (Kapitel + Titel) linksbündig */
@media (max-width: 1024px) {
  .info-window-panel.is-story-view .info-window-story-hero .info-window-chapter,
  .info-window-panel.is-story-view .info-window-story-hero .info-window-title,
  .info-window-panel.is-story-view .info-window-story-hero .info-window-title-line {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
  }
}

/* iPad/iPhone Portrait, Info-About: mehr Abstand zwischen Überschrift-Blöcken (+30px) */
@media (max-width: 1024px) and (orientation: portrait) {
  .info-window-panel:not(.is-story-view) .info-window-col--two,
  .info-window-panel:not(.is-story-view) .info-window-col--three {
    padding-top: calc(clamp(16px, 3.5vw, 22px) + 30px);
  }
}

/* Tablet: Textspalte rechts neben Figur, Inhalt linksbündig im Textfeld; Panel vollflächig */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) and (max-height: 780px),
  (orientation: portrait) and (min-width: 700px) and (max-width: 768px) and (min-height: 1000px),
  (orientation: portrait) and (min-width: 769px) and (max-width: 1024px) and (min-height: 1000px) {
  .info-window-panel.is-story-view {
    --story-figure-rail: 40%;
    --story-max-w: 100%;
    --story-content-pad-top: clamp(36px, 6vh, 72px);
  }

  .info-window-panel.is-story-view .info-window-story-shell {
    min-height: 0;
    padding-top: 30px;
  }

  .info-window-panel.is-story-view .info-window-story .info-window-chapter,
  .info-window-panel.is-story-view .info-window-story .info-window-title,
  .info-window-panel.is-story-view .info-window-story .info-window-story-heading,
  .info-window-panel.is-story-view .info-window-story .info-window-story-lead,
  .info-window-panel.is-story-view .info-window-story .info-window-story-lead-intro,
  .info-window-panel.is-story-view .info-window-story .info-window-story-lead-line,
  .info-window-panel.is-story-view .info-window-story .info-window-story-body,
  .info-window-panel.is-story-view .info-window-story .info-window-story-body p,
  .info-window-panel.is-story-view .info-window-story .info-window-story-quote-text,
  .info-window-panel.is-story-view .info-window-story .info-window-story-quote-note,
  .info-window-panel.is-story-view .info-window-story .info-window-story-kette-desc,
  .info-window-panel.is-story-view .info-window-story .info-window-story-spiegel-line,
  .info-window-panel.is-story-view .info-window-story .info-window-story-vergleich-copy,
  .info-window-panel.is-story-view .info-window-story .info-window-story-narrative,
  .info-window-panel.is-story-view .info-window-story .info-window-story-narrative p,
  .info-window-panel.is-story-view .info-window-story .info-window-list,
  .info-window-panel.is-story-view .info-window-story .info-window-list li,
  .info-window-panel.is-story-view .info-window-story .info-window-closure-lead,
  .info-window-panel.is-story-view .info-window-story .info-window-closure-sub,
  .info-window-panel.is-story-view .info-window-story .info-window-closure-sub-line {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
  }

  .info-window-panel.is-story-view .info-window-story .info-window-closure-lead::before {
    left: 0;
    right: auto;
    margin-left: 0;
    margin-right: auto;
  }

  .info-window-panel.is-story-view .info-window-story .info-window-closure-pill {
    align-self: flex-start;
  }

  .info-window-panel.is-story-view .info-window-story .info-window-closure-sub {
    align-items: flex-start;
  }

  /* Info About: vollflächiges Panel, Inhaltsspalte rechts, Typo linksbündig */
  .info-window-panel:not(.is-story-view) {
    --info-figure-rail: 40%;
  }

  body.single-cover-bg.info-window-open .info-window-panel:not(.is-story-view) .info-window-head,
  body.single-cover-bg.info-window-open .info-window-panel:not(.is-story-view) .info-window-grid {
    margin-left: var(--info-figure-rail, 40%);
    width: calc(100% - var(--info-figure-rail, 40%));
    box-sizing: border-box;
    padding-left: clamp(14px, 2vw, 20px);
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .info-window-panel:not(.is-story-view) .info-window-col {
    align-items: flex-start;
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-chapter,
  .info-window-panel:not(.is-story-view) .info-window-title,
  .info-window-panel:not(.is-story-view) .info-window-subtitle,
  .info-window-panel:not(.is-story-view) .info-window-lead,
  .info-window-panel:not(.is-story-view) .info-window-note,
  .info-window-panel:not(.is-story-view) .info-window-list,
  .info-window-panel:not(.is-story-view) .info-window-copy,
  .info-window-panel:not(.is-story-view) .info-window-line {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
  }

  .info-window-panel:not(.is-story-view) .info-window-list li {
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--two .info-window-subtitle,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-subtitle {
    margin-left: 0;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--two .info-window-finale.info-window-focus-slider {
    align-self: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-focus-title,
  .info-window-panel:not(.is-story-view) .info-window-focus-copy {
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-focus-nav {
    justify-content: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-finale.info-window-closure {
    align-items: flex-start;
    align-self: flex-start;
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-lead,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-lead span,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-cta,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-sub,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-sub-line {
    text-align: left;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-sub {
    align-items: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three > .info-window-closure-about {
    justify-content: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-cta {
    align-items: flex-start;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-lead::before {
    left: 0;
    right: auto;
    margin-left: 0;
    margin-right: auto;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-closure-pill {
    align-self: flex-start;
  }
}

/* Info-Panel Story (Embed): iPad Air + iPad Mini — volle Textbreite (Startblock bleibt mittig) */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape),
  (orientation: portrait) and (min-width: 481px) and (max-width: 768px) and (min-height: 700px) {
  .info-window-panel.is-story-view {
    --story-figure-rail: 0px;
    --story-max-w: 100%;
  }
}

/* Info-Panel Story (Embed): iPad Portrait breit (Air 769–1024 + Mini 481–768) — volle Breite, keine Figur-Rail */
@media (orientation: portrait) and (min-width: 481px) and (max-width: 1180px) {
  .info-window-panel.is-story-view {
    --story-figure-rail: 0px;
    --story-max-w: 100%;
  }

  .info-window-panel.is-story-view .info-window-story {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
  }
}

/* iPad Air Portrait: Textfeld mittig im Panel, etwas breiter, Figur links frei */
@media (orientation: portrait) and (min-width: 769px) and (max-width: 1024px) and (min-height: 1000px) {
  .info-window-panel:not(.is-story-view) {
    --info-figure-rail: clamp(240px, calc(16vw + 160px), 42%);
    --info-text-max-w: min(44rem, calc(100% - 28px));
  }

  .info-window-panel.is-story-view {
    --story-figure-rail: 0px;
    --story-max-w: 100%;
  }

  body.single-cover-bg.info-window-open .info-window-panel:not(.is-story-view) .info-window-head,
  body.single-cover-bg.info-window-open .info-window-panel:not(.is-story-view) .info-window-grid {
    margin-left: 0;
    width: 100%;
    padding-left: max(var(--info-figure-rail), clamp(14px, 2.5vw, 22px));
    padding-right: clamp(14px, 2.5vw, 22px);
    box-sizing: border-box;
  }

  .info-window-panel:not(.is-story-view) .info-window-grid {
    align-items: center;
  }

  .info-window-panel:not(.is-story-view) .info-window-col {
    width: 100%;
    max-width: var(--info-text-max-w);
    margin-left: auto;
    margin-right: auto;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--two .info-window-note,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-note {
    max-width: none;
  }

  .info-window-panel:not(.is-story-view) .info-window-col--two .info-window-finale.info-window-focus-slider,
  .info-window-panel:not(.is-story-view) .info-window-col--three .info-window-finale.info-window-closure {
    align-self: center;
    width: 100%;
    max-width: var(--info-text-max-w);
  }

  .info-window-panel.is-story-view .info-window-story {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
  }

  .info-window-panel.is-story-view .info-window-story-scroll {
    padding-left: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    padding-right: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  .info-window-panel {
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    bottom: env(safe-area-inset-bottom, 0px);
    left: env(safe-area-inset-left, 0px);
    border-radius: max(0px, calc(var(--oorigin-panel-radius) - 4px));
  }

  .info-window-col {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  body.single-cover-bg.info-window-open .info-window-head,
  body.single-cover-bg.info-window-open .info-window-grid {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
}

/* Phone landscape (single-cover): gleicher Scroll-Stack wie oben, volle Breite */
@media (max-height: 30rem) and (min-width: 48.0625rem) and (orientation: landscape) {
  body.single-cover-bg.info-window-open .info-window-grid {
    box-sizing: border-box;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  body.single-cover-bg.info-window-open .info-window-head {
    box-sizing: border-box;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
}

/* Tablet & Mobile: Cover bei geoeffneter Sidebar ausblenden — iPad (tablet-col): Kapitel 00 bleibt sichtbar (auch nach Ausloggen) */
@media (max-width: 1024px) {
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #cover .cover-tag,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #cover .cover-title,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #cover .chapter-intro-wrap,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #cover .cover-enter-btn,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #cover .cover-entered-action,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #ch01 > .sec-num,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #ch01 > .sec-title,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #ch01 .chapter-intro-wrap,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #ch02 > .sec-num,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #ch02 > .sec-title,
  body.sidebar-open:not([data-cover-layout="tablet-col"]) #ch02 .chapter-intro-wrap,
  body.sidebar-open .img-panel .hero-chapter,
  body.sidebar-open .img-panel #chapterLabel {
    display: none !important;
  }

  /* iPhone Auth nach Ausloggen: Cover 00 sichtbar — nicht bei Eintreten (sidebar-open blendet sonst aus). */
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open.oorigin-phone-logout-cover-00:has(#sidebar-panel.is-page-auth) #cover .cover-tag {
    display: block !important;
  }
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open.oorigin-phone-logout-cover-00:has(#sidebar-panel.is-page-auth) #cover .cover-title {
    display: block !important;
  }
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open.oorigin-phone-logout-cover-00:has(#sidebar-panel.is-page-auth) #cover .chapter-intro-wrap {
    display: block !important;
  }
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open.oorigin-phone-logout-cover-00:has(#sidebar-panel.is-page-auth) #cover .cover-enter-slot {
    display: flex !important;
  }
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open.oorigin-phone-logout-cover-00:has(#sidebar-panel.is-page-auth) #cover .cover-enter-btn {
    display: inline-block !important;
  }

  /* Upload-Cover Phone: Scrim hinter Tag/Titel/Intro mit ausblenden (liegt auf .cover-stack::before). */
  body.sidebar-open.single-cover-bg.cover-bg-intrinsic[data-cover-layout="phone"]
    #cover.sec-cover
    .cover-stack::before {
    display: none !important;
  }

  /* iPhone Auth: kein Kapitel-01-Intro hinter der Sidebar */
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open:has(#sidebar-panel.is-page-auth) #ch01,
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open:has(#sidebar-panel.is-page-auth) #ch01 > .sec-num,
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open:has(#sidebar-panel.is-page-auth) #ch01 > .sec-title,
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open:has(#sidebar-panel.is-page-auth) #ch01 .chapter-intro-wrap,
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open:has(#sidebar-panel.is-page-auth) #ch01 .slider-action-host {
    display: none !important;
  }

  /* Kein Kapitel-01-Intro hinter Cover bei Auth — nur wo nicht phone (phone siehe oben) */
  body.sidebar-open:has(#sidebar-panel.is-page-auth):not([data-cover-layout="phone"]) #ch01 > .sec-num,
  body.sidebar-open:has(#sidebar-panel.is-page-auth):not([data-cover-layout="phone"]) #ch01 > .sec-title,
  body.sidebar-open:has(#sidebar-panel.is-page-auth):not([data-cover-layout="phone"]) #ch01 .chapter-intro-wrap {
    display: block !important;
  }
}

@media (max-width: 1024px) and (orientation: landscape) {
  .sidebar-text-card {
    padding-top: clamp(10px, 2.2vh, 20px);
    padding-bottom: clamp(8px, 2.2vh, 18px);
  }
}

/* Rotation (Einzeltext): Block in Stage zentriert — siehe oorigin-sidebar.css (sidebar-view-single) */

@media (max-height: 430px) and (orientation: landscape) {
  body.sidebar-view-single .sidebar-text-list {
    padding-bottom: clamp(12px, 4dvh, 28px);
  }
}

@media (max-width: 380px) and (orientation: portrait) {
  .sidebar-text-card {
    transform: none;
  }
}

/* Tablet & Mobile: Single-Cover-Buehne */
@media (max-width: 1024px) {
  .top-nav .menu-btn {
    display: none !important;
  }
  .discover-grid-item-pin-tip {
    display: none !important;
  }
  html:has(body.single-cover-bg),
  html:has(body.single-cover-bg) body.single-cover-bg {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  body.single-cover-bg .top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    top: 0;
    height: calc(42px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 18px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  body.single-cover-bg .nav-logo,
  body.single-cover-bg .menu-btn {
    pointer-events: auto;
  }

  /* Logo-Punkt über Sidebar-Rotation (Panel z-index 321+), weiter unter Info/Story (2300). */
  body.single-cover-bg.sidebar-open .top-nav,
  body.single-cover-bg.sidebar-pinned .top-nav {
    z-index: 360;
  }
  body.single-cover-bg.sidebar-open .nav-logo .logo-dot,
  body.single-cover-bg.sidebar-pinned .nav-logo .logo-dot {
    position: relative;
    z-index: 1;
  }

  body.single-cover-bg .nav-logo {
    margin-left: 0;
    gap: 0;
  }

  body.single-cover-bg .nav-logo .logo-word {
    display: none;
  }

  body.single-cover-bg .nav-logo .logo-dot {
    width: 9px;
    height: 9px;
    margin-left: 0;
  }

  /* Phone: Logo-Punkt auf Cover vor/nach Eintreten (Begrüßung); in Sidebar-Rotation aus. */
  body.single-cover-bg[data-cover-layout="phone"] .top-nav .nav-logo {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.single-cover-bg[data-cover-layout="phone"]:has(#cover.sec-cover[data-entry-state="before_enter"]):not(.sidebar-open):not(.sidebar-pinned) .top-nav .nav-logo,
  body.single-cover-bg[data-cover-layout="phone"]:has(#cover.sec-cover[data-entry-state="after_enter"]):not(.sidebar-open):not(.sidebar-pinned) .top-nav .nav-logo {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body.single-cover-bg[data-cover-layout="phone"].sidebar-view-single.sidebar-open .top-nav .nav-logo,
  body.single-cover-bg[data-cover-layout="phone"].sidebar-view-single.sidebar-pinned .top-nav .nav-logo {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.single-cover-bg[data-cover-layout="phone"] #sidebarAuthViewport .nav-logo .logo-word,
  body.single-cover-bg[data-cover-layout="phone"] #sidebarAuthViewport .nav-logo .logo-dot,
  body.single-cover-bg[data-cover-layout="tablet-col"] #sidebarAuthViewport .nav-logo .logo-word,
  body.single-cover-bg[data-cover-layout="tablet-col"] #sidebarAuthViewport .nav-logo .logo-dot {
    display: inline-block !important;
  }

  body.single-cover-bg .top-nav .menu-btn {
    display: none !important;
    margin-left: auto;
    background: transparent;
    border-color: rgba(var(--purple-rgb), 0.56);
    opacity: 0.82;
  }

  body.single-cover-bg .menu-backdrop {
    z-index: 260;
  }

  body.single-cover-bg .menu-overlay {
    z-index: 270;
    pointer-events: none;
  }

  body.single-cover-bg .menu-overlay.open {
    pointer-events: auto;
  }

  body.single-cover-bg .body-wrap {
    padding-top: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: none;
  }

  body.single-cover-bg .body-wrap::before {
    display: none;
  }

  body.single-cover-bg .img-panel {
    z-index: 0;
    position: fixed;
    top: calc(-1 * env(safe-area-inset-top));
    right: 0;
    bottom: calc(-1 * env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    height: calc(100vh + env(safe-area-inset-top) + env(safe-area-inset-bottom));
    height: calc(100dvh + env(safe-area-inset-top) + env(safe-area-inset-bottom));
    background-color: #0f0d14;
    background-image: var(--header-image-mobile);
    background-position: var(--cover-bg-x-mobile) var(--cover-photo-y);
    background-size: var(--cover-photo-size-mobile, auto);
    background-repeat: no-repeat;
    pointer-events: none;
    animation: none;
  }

  @media (min-width: 800px) and (max-width: 1024px) and (orientation: landscape) {
    body.single-cover-bg .img-panel {
      background-position: var(--cover-bg-x-mobile-landscape) var(--cover-photo-y);
    }
  }

  @media (max-width: 1024px) and (orientation: portrait) {
    body.single-cover-bg .img-panel {
      background-position: var(--cover-bg-x-mobile-portrait) var(--cover-photo-y);
    }
  }
  @media (min-width: 820px) and (max-width: 1024px) and (orientation: portrait) {
    body.single-cover-bg .img-panel {
      background-position: var(--cover-bg-x-mobile-portrait-wide) var(--cover-photo-y);
    }
  }

  /* Profil-Uploads: Motiv rechts — Standard-Preset (--cover-bg-x-mobile-*) bleibt für Nicht-Uploads. */
  body.single-cover-bg.cover-bg-intrinsic .img-panel {
    background-position: var(--cover-bg-x-intrinsic-mobile) var(--cover-photo-y);
  }

  @media (min-width: 800px) and (max-width: 1024px) and (orientation: landscape) {
    body.single-cover-bg.cover-bg-intrinsic .img-panel {
      background-position: var(--cover-bg-x-intrinsic-mobile-landscape) var(--cover-photo-y);
    }
  }

  @media (max-width: 1024px) and (orientation: portrait) {
    body.single-cover-bg.cover-bg-intrinsic .img-panel {
      background-position: var(--cover-bg-x-intrinsic-mobile-portrait) var(--cover-photo-y);
    }
  }

  @media (min-width: 820px) and (max-width: 1024px) and (orientation: portrait) {
    body.single-cover-bg.cover-bg-intrinsic .img-panel {
      background-position: var(--cover-bg-x-intrinsic-mobile-portrait) var(--cover-photo-y);
    }
  }

  body.single-cover-bg .img-panel img {
    opacity: 0;
    animation: none;
  }

  body.single-cover-bg .img-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    background: linear-gradient(
      90deg,
      rgba(var(--bg-rgb), 0) 0%,
      rgba(var(--bg-rgb), 0.06) 34%,
      rgba(var(--bg-rgb), 0.28) 58%,
      rgba(var(--bg-rgb), 0.42) 100%
    );
  }

  body.single-cover-bg[data-cover-layout="phone"] .img-panel::after {
    background: var(--oorigin-phone-cover-img-veil);
  }
  body.single-cover-bg[data-cover-layout="phone"].sidebar-open .img-panel::after,
  body.single-cover-bg[data-cover-layout="phone"].sidebar-pinned .img-panel::after,
  body.single-cover-bg[data-cover-layout="phone"].info-window-story-open .img-panel::after {
    background: var(--oorigin-phone-sidebar-cover-veil);
  }

  body.single-cover-bg .scroll-panel {
    position: relative;
    z-index: 2;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.single-cover-bg .sec {
    min-height: 100vh;
    min-height: 100dvh;
  }

  body.single-cover-bg .sec:not(.is-stage-active) {
    display: none;
  }

  body.single-cover-bg .sec.is-stage-active {
    display: flex;
  }

  body.single-cover-bg #cover {
    position: relative;
    z-index: 3;
  }

  body.single-cover-bg .sec {
    padding: clamp(92px, 16vh, 150px) 8vw 56px 50vw;
  }

  body.single-cover-bg #cover.sec-cover {
    padding-left: 0;
    padding-right: 0;
  }

  body.single-cover-bg #ch01,
  body.single-cover-bg #ch02 {
    padding-top: clamp(92px, 16vh, 150px);
  }

  body.single-cover-bg .sec-cover:not(#cover) {
    padding-left: 50vw;
  }

  body.single-cover-bg .sec-cover > .cover-tag,
  body.single-cover-bg .sec-cover > .cover-title,
  body.single-cover-bg .sec-cover .chapter-intro-wrap,
  body.single-cover-bg .cover-enter-btn,
  body.single-cover-bg .cover-entered-action,
  body.single-cover-bg .chapter-intro,
  body.single-cover-bg .sec:not(.sec-cover) > .sec-num,
  body.single-cover-bg .sec:not(.sec-cover) > .sec-title {
    margin-left: 0;
  }

  body.is-cover-active.single-cover-bg .sec-cover {
    min-height: 100vh;
    min-height: 100dvh;
  }
  body.single-cover-bg .cover-entered-action {
    margin-left: -30px;
  }

  @media (max-width: 1024px) and (orientation: portrait) {
    body.single-cover-bg .sec:not(#cover) {
      padding-left: 18vw;
      padding-right: 4vw;
    }

    body.single-cover-bg .sec-cover:not(#cover) {
      padding-left: 18vw;
    }
    body.single-cover-bg .sec:not(.sec-cover) .chapter-intro-wrap,
    body.single-cover-bg .sec:not(.sec-cover) .chapter-intro {
      max-width: none;
      width: 100%;
    }
    body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover .cover-stack {
      width: min(100%, 280px);
      max-width: 100%;
    }
    body.single-cover-bg:not([data-cover-layout]) #cover .chapter-intro-wrap,
    body.single-cover-bg:not([data-cover-layout]) #cover .chapter-intro {
      max-width: 280px;
      width: 100%;
    }
    body.single-cover-bg:not([data-cover-layout]) #cover .chapter-intro-wrap {
      padding-right: 20px;
      box-sizing: border-box;
    }

    body.single-cover-bg .cover-title,
    body.single-cover-bg .cover-title .cover-logo-word {
      max-width: 100%;
    }
  }
  @media (min-width: 744px) and (max-width: 1024px) and (orientation: portrait) {
    body.single-cover-bg:not([data-cover-layout="tablet-col"]) .sec:not(#cover) {
      padding-left: calc(22vw + 270px);
    }
    body.single-cover-bg:not([data-cover-layout="tablet-col"]) .sec-cover:not(#cover) {
      padding-left: calc(22vw + 270px);
    }
  }
}

/* Grosses Portrait-Tablet */
@media (min-width: 1024px) and (max-width: 1400px) and (orientation: portrait) {
  html,
  body {
    font-size: 112%;
  }
  body.single-cover-bg:not([data-cover-layout="tablet-col"]) .sec:not(#cover) {
    padding-left: calc(22vw + 280px);
  }
  body.single-cover-bg:not([data-cover-layout="tablet-col"]) .sec-cover:not(#cover) {
    padding-left: calc(22vw + 280px);
  }
  #cover.sec-cover {
    transform: none;
  }
  #cover .cover-logo-word {
    font-size: clamp(4.1rem, 6.8vw, 7.6rem);
  }
}

/* Tablet-Landscape ~iPad Pro (nur Desktop-Split, nicht Cover-Stage) */
@media (min-width: 1340px) and (max-width: 1392px) and (min-height: 880px) and (max-height: 1060px) and (orientation: landscape) {
  :root {
    /* Leicht schmalere Bildspalte → Textspalte beginnt etwas weiter links */
    --cover-left-width: 44%;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover {
    box-sizing: border-box;
    align-items: flex-start;
    padding-left: 0;
    padding-right: var(--section-pad-right, 64px);
  }
  /* Sidebar überlappt – nur moderater Freiraum, nicht volle Panel-Breite (sonst Umbruch) */
  body.single-cover-bg:not([data-cover-layout]).sidebar-open #cover.sec-cover,
  body.single-cover-bg:not([data-cover-layout]).sidebar-pinned #cover.sec-cover {
    padding-right: 112px;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover .cover-stack {
    width: min(var(--cover-panel-width), 100%);
    max-width: none;
    transform: none;
  }
  body.single-cover-bg:not([data-cover-layout]) .sec-cover[data-entry-state="after_enter"] .cover-stack {
    margin-top: 0;
    transform: none;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover .cover-enter-slot > .cover-enter-btn {
    margin-left: 12px;
    transform: none;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover .cover-stack > .cover-tag {
    margin-left: 16px;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover .cover-stack > .cover-title {
    margin-left: 12px;
  }
  body.single-cover-bg:not([data-cover-layout]) #cover.sec-cover .cover-stack > .chapter-intro-wrap {
    margin-left: 8px;
  }
  body.single-cover-bg:not([data-cover-layout]) .sec-cover[data-entry-state="after_enter"] .cover-stack > .cover-tag {
    margin-left: 16px;
  }
}

/* Desktop unter 1180px */
@media (max-width: 1180px) and (min-width: 1025px) {
  :root {
    --cover-left-width: 35%;
    --chapter-panel-width: min(calc((100% - var(--section-pad-left)) * 1.28), 1240px);
    --cover-panel-width: min(calc((100% - var(--section-pad-left)) * 1.04), 980px);
  }

  .sidebar-nav { display: none; }
  .quick-nav { display: none; }
}

/* iPad Querformat: linke 00–02-Punkte (Portal; überschreibt Ausblendung ≤1024 / ≤1180) */
@media (min-width: 744px) and (max-width: 1400px) and (orientation: landscape) and (min-height: 521px) {
  body.single-cover-bg[data-cover-layout] .sidebar-nav.is-cover-stage-portal {
    display: flex !important;
  }
}

/* Desktop-Menue */
@media (min-width: 1025px) {
  .menu-btn { display: none; }
}

/* Tablet/Desktop-Menue */
@media (min-width: 769px) {
  .menu-overlay { min-width: 420px; padding: 12px 0; }
  .menu-overlay a { padding: 16px 36px; gap: 24px; }
  .menu-overline { padding-left: 36px; padding-right: 36px; }
  .menu-title { font-size: 1.06rem; letter-spacing: 0.12em; }
  .menu-num { font-size: 0.8rem; }
}

/* Discover-Editor: geteilter Desktop- und Mobile-Aufbau */
@media (min-width: 700px) {
  .discover-edit-panel-head {
    display: grid;
    grid-template-columns: var(--discover-edit-head-back-size) minmax(0, min(275px, 46%)) 8px minmax(0, 1fr);
    align-items: center;
    gap: 0;
  }
  .discover-edit-head-back {
    grid-column: 1;
  }
  .discover-edit-title {
    grid-column: 1 / 3;
  }
  .discover-edit-head-slot {
    grid-column: 1 / -1;
    margin-left: 0;
    justify-content: flex-start;
    padding-left: 15px;
    padding-right: 0;
  }
  .discover-edit-head-tabs,
  .discover-edit-head-tabs-scroll {
    width: 100%;
    justify-content: flex-start;
  }
  .discover-edit-editor-wrap {
    flex-direction: row;
    align-items: stretch;
    gap: 14px;
    padding: var(--discover-edit-col-pad-top, 18px) 12px 26px 0;
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    --discover-edit-col-pad-top: 6px;
    --discover-edit-notiz-pad-top: max(0px, calc(var(--discover-edit-col-pad-top) - 5px));
    --discover-edit-tab-stage-head-block: calc(
      max(
        max(13.5px, calc(10.8px * var(--sidebar-profile-type-scale, 1.42))) * 1.35,
        34px
      ) + 10px
    );
    --discover-edit-right-scroll-pad-top: 10px;
  }
  .discover-edit-text-slot {
    position: relative;
    flex: 0 1 auto;
    align-self: stretch;
    width: min(275px, 46%);
    max-width: 275px;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    justify-content: flex-start;
    box-sizing: border-box;
    padding: var(--discover-edit-col-pad-top, 18px) 34px
      var(--discover-edit-col-pad-bottom, 24px) 16px;
    margin-right: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .discover-edit-text-slot::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .discover-edit-text-slot::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 0;
    bottom: 30px;
    width: 1px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(var(--purple-rgb), 0.62) 16%,
      rgba(var(--purple-rgb), 0.62) 84%,
      transparent 100%
    );
    pointer-events: none;
  }
  .discover-edit-main-text-wrap {
    align-self: stretch;
    width: 100%;
    align-items: stretch;
    padding: 0 0 var(--discover-edit-main-text-pad-bottom, 15px);
    margin-top: auto;
    margin-bottom: auto;
    box-sizing: border-box;
    box-shadow: none;
  }
  .discover-edit-main-text-wrap::before {
    display: none;
    content: "";
    position: absolute;
    left: 0;
    top: -7px;
    width: 2px;
    height: calc(100% + 7px);
    background: var(--discover-edit-quote-bar-color, rgba(var(--purple-rgb), 0.62));
    pointer-events: none;
  }
  .discover-edit-main-text-wrap .discover-edit-textarea {
    position: relative;
    z-index: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: 0;
    text-align: center;
  }
  .discover-grid-stage.is-discover-edit-tab-text
    .discover-edit-right-panel[data-discover-edit-panel="text"]
    .discover-edit-note-slot:has(.discover-edit-note-textarea:not([hidden]):placeholder-shown:not([readonly])) {
    justify-content: center;
  }
  .discover-grid-stage.is-discover-edit-tab-text
    .discover-edit-right-panel[data-discover-edit-panel="text"]
    .discover-edit-note-textarea:placeholder-shown:not([readonly]) {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: auto;
    margin-bottom: auto;
    text-align: center;
  }
  .discover-edit-text-slot > .discover-edit-main-counter {
    left: 0;
    right: 0;
    bottom: 30px;
    width: 100%;
    max-width: none;
    padding: 0 16px 0 0;
    box-sizing: border-box;
    text-align: center;
  }
  .discover-edit-stamp-stack {
    align-self: flex-start;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .discover-edit-tag-footer .discover-edit-stamp-stack {
    width: min(275px, 46%);
    max-width: 275px;
  }
  .discover-edit-main-footer,
  .discover-edit-stamp-stack > .discover-edit-main-footer,
  .discover-edit-stamp-stack > .discover-edit-note-footer {
    align-self: flex-start;
    width: 100%;
    max-width: none;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding-top: 0;
    padding-left: 0;
    padding-right: 4px;
    box-sizing: border-box;
  }
  .discover-edit-tag-footer .discover-edit-stamp-stack > .discover-edit-main-footer {
    padding-right: 0;
  }
  .discover-edit-tag-footer .discover-edit-stamp-stack > .discover-edit-note-footer,
  .discover-edit-tag-footer .discover-edit-main-meta {
    padding-right: 8px;
    box-sizing: border-box;
  }
  .discover-edit-tag-footer .discover-edit-stamp-stack {
    overflow: visible;
  }
  .discover-edit-tag-footer .discover-edit-main-meta-date {
    margin-right: -50px;
  }
  .discover-edit-text-slot .discover-edit-tag-layer {
    z-index: 3;
  }
  .discover-edit-notes-column {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: var(--discover-edit-col-pad-top, 18px) 0
      var(--discover-edit-notes-col-pad-bottom, 10px) 24px;
    border: none;
    border-radius: 0;
    background: transparent;
  }
  .discover-edit-note-head:not(.discover-edit-tab-stage-head) {
    margin-top: 0;
    margin-bottom: 5px;
    transform: none;
  }
  .discover-edit-section-head:not(.discover-edit-tab-stage-head):not(.discover-edit-note-head--readonly)::after,
  .discover-edit-note-head:not(.discover-edit-tab-stage-head):not(.discover-edit-note-head--readonly)::after,
  .discover-edit-right-panel > .discover-edit-tab-stage-head {
    border-bottom-color: rgba(255, 255, 255, 0.07);
  }
}

@media (max-width: 699px) {
  .discover-edit-panel {
    --discover-edit-grid-min-visible: 0px;
    height: var(--discover-edit-drawer-h, 68%);
    min-height: min(240px, calc(100% - var(--discover-edit-grid-min-visible)));
    max-height: var(--discover-edit-drawer-max-h, calc(100% - var(--discover-edit-grid-min-visible)));
    padding-left: 14px;
    padding-right: 14px;
  }
  .discover-edit-drawer-handle {
    width: calc(100% + 28px);
    margin-left: -14px;
    margin-right: -14px;
  }
  .discover-edit-drawer-handle::before {
    background: rgba(var(--white-rgb), 0.44);
  }
  .discover-edit-drawer-handle:hover::before,
  .discover-edit-drawer-handle:focus-visible::before {
    background: rgba(var(--white-rgb), 0.78);
  }
  .discover-overlay-drag-handle {
    color: rgba(var(--white-rgb), 0.52);
  }
  .discover-overlay-drag-handle:hover {
    color: rgba(var(--white-rgb), 0.88);
    background: rgba(255, 255, 255, 0.05);
  }
  .discover-edit-notes-column {
    margin-top: 0;
  }
  .discover-edit-note-scroll,
  .discover-edit-note-scroll--thoughts,
  .discover-edit-right-panel-scroll--tags {
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  .discover-edit-panel {
    width: 100%;
    max-width: 100%;
  }
  .discover-edit-tag-sheet {
    width: min(320px, calc(100vw - 44px));
    max-height: min(320px, calc(48vh + 20px));
  }
}

@media (max-width: 390px), (max-height: 640px) {
  body.single-cover-bg:not([data-cover-layout="phone"]) #sidebar-panel.is-page-auth .sidebar-viewport--auth {
    padding-top: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }

  body.single-cover-bg:not([data-cover-layout="phone"]) #sidebar-panel.is-page-auth .sidebar-auth-screen {
    gap: 12px;
  }

  body.single-cover-bg:not([data-cover-layout="phone"]) #sidebar-panel.is-page-auth .sidebar-auth-form {
    padding-top: 6px;
    gap: 12px;
  }

  body.single-cover-bg:not([data-cover-layout="phone"]) #sidebar-panel.is-page-auth .sidebar-auth-submit {
    margin-top: 18px;
  }

  body.single-cover-bg:not([data-cover-layout="phone"]) #sidebar-panel.is-page-auth #sidebarAuthLoginNavLink {
    margin-top: calc(18px + var(--sidebar-auth-login-cta-offset));
  }

  body.single-cover-bg:not([data-cover-layout="phone"]) #sidebar-panel.is-page-auth .sidebar-auth-screen-links {
    margin-top: 18px;
    gap: 28px;
  }
}
