/* Someone Left a Jacket — Slide layout with Heming headings */

/* =============================================
   FONTS
   ============================================= */

@font-face {
  font-family: "Heming";
  src: url("../fonts/heming.woff2") format("woff2"),
       url("../fonts/heming.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

/* =============================================
   DESIGN TOKENS
   ============================================= */

:root {
  --font-heading: "Heming", Georgia, "Times New Roman", serif;
  --font-body: "Space Grotesk", "Helvetica Neue", system-ui, sans-serif;

  --bg: #ffffff;
  --text: #2a2a2a;
  --text-strong: #1a1a1a;
  --text-sub: #3a3a3a;
  --muted: rgba(42, 42, 42, 0.45);
  --line: rgba(26, 26, 26, 0.03);
  --line-strong: rgba(26, 26, 26, 0.08);
  --surface-2: #f5f5f5;

  --shell-max: 1600px;
  --shell-pad: clamp(0.75rem, 3vw, 1.25rem);
  --header-height: 3.5rem;

  /* Typography scale */
  --fs-h1: clamp(1.75rem, 2.5vw + 1rem, 3rem);
  --fs-h2: clamp(1.5rem, 0.85rem + 1.35vw, 1.95rem);
  --fs-h3: 1.5rem;
  --fs-body: 1.375rem;

  /* Calendar tokens */
  --hour-height: 36px;
  --time-col-width: 52px;
  --cal-border: #dadce0;
  --cal-head-bg: #f8f9fa;
  --cal-time-bg: #f8f9fa;
  --cal-grid-line: #e8eaed;
  --cal-half-line: #f1f3f4;
  --cal-day-bg: var(--bg);
  --cal-label-color: #70757a;
  --cal-day-name-color: #70757a;
  --cal-day-num-color: #3c4043;
}

/* =============================================
   RESET & BASE
   ============================================= */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100dvh;
  overflow: hidden;
}

/* =============================================
   SKIP LINK
   ============================================= */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: #fff;
}

.skip-link:focus { left: 0.5rem; }

/* =============================================
   LAYOUT SHELL
   ============================================= */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-left: 0;
  margin-right: auto;
  padding-inline: var(--shell-pad);
}

.shell--wide {
  max-width: min(100%, 1680px);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
  background: var(--bg);
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  max-width: 100%;
  margin-right: 0;
}

.site-header__top {
  display: contents;
}

.site-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 3vw + 1rem, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;
  font-variant-ligatures: none;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-strong);
}

.site-title a,
.site-title a:visited,
.site-title a:active {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* Hamburger — hidden on desktop */
.nav-toggle { display: none; }

/* =============================================
   NAVIGATION
   ============================================= */

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0 clamp(0.6rem, 1.5vw, 1.25rem);
  margin-top: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text);
}

/* =============================================
   MAIN — scroll container for slides
   ============================================= */

.main {
  height: 100dvh;
  background: var(--bg);
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  text-align: left;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main::-webkit-scrollbar { display: none; }

/* =============================================
   SLIDES (page sections)
   ============================================= */

.page-section--stage {
  min-height: 100dvh;
  padding: calc(var(--header-height) + 1.5rem) var(--shell-pad) 6rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

/* =============================================
   TYPOGRAPHY — Headings

   Spacing rule: margin-top separates from previous content,
   margin-bottom binds heading to its content.
   ============================================= */

h1, .prose h1, .page-section--stage > h1 {
  width: 100%;
  max-width: 64rem;
  margin: 1.25rem 0 0.5rem;
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-align: left;
  font-variant-ligatures: none;
  color: var(--text-strong);
}

.page-section--stage > h1:first-child,
.prose > h1:first-child {
  margin-top: 0;
}

h2, .section-title, .prose h2, .page-section--stage > h2 {
  width: 100%;
  max-width: 64rem;
  margin: 2rem 0 0.5rem;
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: left;
  font-variant-ligatures: none;
  font-synthesis: none;
  color: var(--text-strong);
}

.page-section--stage > h2:first-child,
.prose > h2:first-child {
  margin-top: 0;
}

h3, .prose h3, .page-section--stage > h3 {
  width: 100%;
  max-width: 64rem;
  margin: 1.25rem 0 0.15rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-sub);
  font-synthesis: none;
}

.page-section--stage > h3:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

/* h3 directly after h2: tightly coupled */
h2 + h3,
.prose h2 + h3,
.page-section--stage > h2 + h3 {
  margin-top: 0.25rem;
}

/* =============================================
   TYPOGRAPHY — Prose content
   ============================================= */

.prose {
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: left;
}

.page-section--stage > p,
.page-section--stage > ul,
.page-section--stage > ol,
.page-section--stage > blockquote,
.prose > p,
.prose > ul,
.prose > ol,
.prose > blockquote {
  max-width: 64rem;
}

.page-section--stage > p,
.prose > p {
  margin: 0 0 0.5em;
  line-height: 1.68;
  text-wrap: pretty;
}

/* Inline emphasis: Heming serif as contrast to Space Grotesk body */
.page-section--stage em,
.prose em {
  font-style: normal;
}

.page-section--stage > p:last-child,
.prose > p:last-child {
  margin-bottom: 0;
}

.page-section--stage ul,
.prose ul {
  padding-left: 0;
  list-style: none;
  margin: 0 0 1rem;
}

.page-section--stage li,
.prose li {
  position: relative;
  padding-left: 0;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.page-section--stage li::before,
.prose li::before {
  content: none;
}

.page-section--stage li strong,
.prose li strong {
  display: block;
  font-weight: 400;
  font-size: 1.15rem;
  font-variant: all-small-caps;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

/* =============================================
   INLINE LINKS — plain, no decoration
   ============================================= */

.page-section--stage a,
.prose a {
  color: inherit;
  text-decoration: none;
}

.page-section--stage a:visited,
.prose a:visited {
  color: inherit;
}

.page-section--stage a:hover,
.prose a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.page-section--stage h1 a:hover,
.page-section--stage h2 a:hover,
.page-section--stage h3 a:hover,
.page-section--stage h4 a:hover,
.prose h1 a:hover,
.prose h2 a:hover,
.prose h3 a:hover,
.prose h4 a:hover {
  text-decoration: none;
}

/* =============================================
   WIDE BLOCKS — Calendar, Maps break out of reading width
   ============================================= */

.calendar-block,
.embeds,
.page-section--stage-wide {
  width: 100%;
  max-width: var(--shell-max);
  margin-left: 0;
  margin-right: 0;
}

.calendar-block.page-section--stage {
  overflow: hidden;
  padding: 0;
  background: var(--bg);
}

.page-section--stage-wide { max-width: none; }
.page-section--stage-wide .embeds { max-width: none; }

/* =============================================
   SECTIONS (legacy)
   ============================================= */

.section {
  margin-top: 0;
  text-align: left;
}

.section:first-of-type { margin-top: 0; }
.shell--wide > .section { margin-top: 0; }

/* =============================================
   WEEK CALENDAR — Google Calendar Style
   ============================================= */

.cal-week {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--cal-day-bg);
  max-width: 100%;
  border: 1px solid var(--cal-border);
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: #dadce0 transparent;
}

.cal-week::-webkit-scrollbar { height: 4px; }
.cal-week::-webkit-scrollbar-track { background: transparent; }
.cal-week::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 4px; }

@media (min-width: 901px) {
  .cal-week { max-width: min(100%, 1180px); }
}

.cal-head {
  display: grid;
  grid-template-columns: var(--time-col-width) repeat(6, minmax(0, 1fr));
  min-width: min(100%, 520px);
  background: var(--cal-head-bg);
  border-bottom: 1px solid var(--cal-border);
}

.cal-corner {
  background: var(--cal-head-bg);
  border-right: 1px solid var(--cal-border);
}

.cal-head-cell {
  padding: 0.5rem 0.5rem 0.4rem;
  text-align: center;
  font-size: 0.75rem;
}

.cal-head-cell + .cal-head-cell {
  border-left: 1px solid var(--cal-border);
}

.cal-head-cell__wd {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--cal-day-name-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.6rem;
}

.cal-head-cell__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--cal-day-num-color);
  font-size: 0.9375rem;
  transition: background 0.15s;
}

.cal-head-cell.is-today .cal-head-cell__date {
  background: #1a73e8;
  color: #fff;
}

.cal-body {
  display: grid;
  grid-template-columns: var(--time-col-width) repeat(6, minmax(0, 1fr));
  min-width: min(100%, 520px);
}

.cal-times-column {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  background: var(--cal-time-bg);
  border-right: 1px solid var(--cal-border);
}

.cal-time-label {
  flex: 0 0 var(--hour-height);
  height: var(--hour-height);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 3px 0.4rem 0 2px;
  font-size: 0.625rem;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--cal-label-color);
  text-align: right;
  line-height: 1.2;
  user-select: none;
}

.cal-days { display: contents; }

.cal-day {
  position: relative;
  height: calc(var(--hour-height) * var(--hour-count, 15));
  background: var(--cal-day-bg);
  min-width: 0;
}

.cal-day + .cal-day {
  border-left: 1px solid var(--cal-border);
}

.cal-day__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--hour-height) / 2 - 1px),
      var(--cal-half-line) calc(var(--hour-height) / 2 - 1px),
      var(--cal-half-line) calc(var(--hour-height) / 2),
      transparent calc(var(--hour-height) / 2),
      transparent calc(var(--hour-height) - 1px),
      var(--cal-grid-line) calc(var(--hour-height) - 1px),
      var(--cal-grid-line) var(--hour-height)
    );
}

/* Calendar events */
.cal-event {
  position: absolute;
  left: 2px;
  right: 2px;
  top: var(--top);
  height: var(--h);
  z-index: 1;
  background: color-mix(in srgb, var(--bg) 12%, #ffffff);
  border-left: 4px solid var(--bg);
  border-radius: 4px;
  color: color-mix(in srgb, var(--bg) 30%, #1a1a1a);
  overflow: hidden;
  min-height: 18px;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
}

.cal-event__inner {
  padding: 3px 5px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: flex-start;
  overflow: hidden;
}

.cal-event__time {
  font-size: 0.5625rem;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event__title {
  font-size: 0.625rem;
  line-height: 1.25;
  font-weight: 600;
  font-family: var(--font-body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cal-event__note {
  font-size: 0.5rem;
  line-height: 1.3;
  font-weight: 400;
  opacity: 0.55;
  font-family: var(--font-body);
  display: block;
  margin-top: 2px;
}

.cal-event__attendance {
  font-size: 0.375rem;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.4;
  margin-top: auto;
  padding-top: 4px;
}

/* =============================================
   CALENDAR — Tablet (max-width: 900px)
   ============================================= */

@media (max-width: 900px) {
  :root {
    --hour-height: 28px;
    --time-col-width: 42px;
  }

  .cal-head,
  .cal-body {
    min-width: 480px;
  }

  .cal-time-label {
    font-size: 0.5625rem;
    padding: 2px 0.3rem 0 1px;
  }

  .cal-head-cell {
    padding: 0.35rem 0.2rem 0.3rem;
  }

  .cal-head-cell__date {
    width: 1.375rem;
    height: 1.375rem;
    font-size: 0.75rem;
  }

  .cal-head-cell__wd { font-size: 0.5rem; }

  .cal-event {
    left: 1px;
    right: 1px;
    border-left-width: 2px;
    border-radius: 3px;
  }

  .cal-event__title { font-size: 0.5625rem; }
  .cal-event__time { font-size: 0.5rem; }
}

/* =============================================
   CALENDAR — Mobile (max-width: 640px)
   ============================================= */

@media (max-width: 640px) {
  :root {
    --hour-height: 24px;
    --time-col-width: 28px;
  }

  .page-section--stage:has(.calendar-block) {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }

  .calendar-block {
    width: 100%;
    margin: 0;
  }

  .cal-week {
    border-radius: 0;
    border-left: 1px solid var(--cal-border);
    border-right: 1px solid var(--cal-border);
    overflow-x: visible;
  }

  .cal-head,
  .cal-body {
    min-width: 0;
    width: 100%;
  }

  .cal-head-cell { padding: 0.3rem 0.1rem 0.25rem; }
  .cal-head-cell__wd { font-size: 0.5rem; letter-spacing: 0; }

  .cal-head-cell__date {
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.625rem;
    margin-top: 0.15rem;
  }

  .cal-time-label {
    font-size: 0.5rem;
    padding: 2px 0.2rem 0 1px;
  }

  .cal-day { min-width: 0; }

  .cal-event {
    left: 1px;
    right: 1px;
    border-left-width: 2px;
    border-radius: 2px;
  }

  .cal-event__time { display: none; }

  .cal-event__title {
    font-size: 0.5rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* =============================================
   MOBILE LAYOUT (max-width: 1100px)
   ============================================= */

@media (max-width: 1100px) {
  :root {
    --shell-pad: 1.125rem;
    --header-height: 5.5rem;
  }

  body {
    font-size: 1.0625rem;
    line-height: 1.65;
  }

  .page-section--stage {
    padding: calc(var(--header-height) + 1rem) var(--shell-pad) 3rem;
  }

  /* Header: title left, burger right */
  .site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    gap: 1rem;
  }

  .site-header .shell {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-title {
    font-size: clamp(2.1rem, 8.5vw, 2.6rem);
    white-space: normal;
    line-height: 1.05;
    flex: 1;
    min-width: 0;
  }

  /* Hamburger: 44x44px touch target */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin-right: -0.5rem;
  }

  .nav-toggle span {
    display: block;
    width: 1.25rem;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  .nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Nav dropdown — als Overlay unter der Titelzeile.
     Wichtig: position:fixed nimmt das Menü aus dem Header-Fluss, damit das
     Öffnen die gemessene Header-Höhe NICHT verändert. Sonst schießt
     --header-height hoch (Titelzeile + ganze Liste) und schiebt über das
     padding-top jeder Sektion den kompletten Inhalt nach unten.
     max-height + overflow-y machen die Liste scrollbar, falls sie höher als
     der Viewport wird — sonst sind die unteren Einträge auf kurzen Displays
     nicht erreichbar (fixer Header scrollt nicht mit). */
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    /* Basisregel setzt flex-end (rechtsbündig fürs Desktop-Menü). In einer
       vertikalen Scrollfläche würde flex-end den oberen Eintrag wegklippen
       und unerreichbar machen — daher hier explizit oben ausrichten. */
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--bg);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    padding: 0.5rem var(--shell-pad) 1.5rem;
    margin: 0;
    border-top: 1px solid var(--line-strong);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    margin: 0;
  }

  .site-nav a:last-child { border-bottom: none; }
  .site-nav a.is-active { color: var(--text); }
  .site-nav a.is-active::after { display: none; }

  /* --- Mobile heading spacing --- */

  h1, .prose h1, .page-section--stage > h1 {
    margin: 0.5rem 0 0.25rem;
  }

  .page-section--stage > h1:first-child,
  .prose > h1:first-child {
    margin-top: 0;
  }

  h2, .section-title, .prose h2, .page-section--stage > h2 {
    margin: 1.5rem 0 0.25rem;
  }

  .page-section--stage > h2:first-child,
  .prose > h2:first-child {
    margin: 0 0 0.25rem;
  }

  h3, .prose h3, .page-section--stage > h3 {
    margin: 0.75rem 0 0.1rem;
  }

  .page-section--stage > h3:first-child,
  .prose > h3:first-child {
    margin-top: 0;
  }

  h2 + h3,
  .prose h2 + h3,
  .page-section--stage > h2 + h3 {
    margin-top: 0.15rem;
  }

  /* --- Mobile prose spacing --- */

  .page-section--stage > p,
  .prose > p {
    margin-bottom: 0.35em;
  }

  .page-section--stage li,
  .prose li {
    margin-bottom: 0.75rem;
  }

  .cal-event__note { display: none !important; }
  .embed-frame { max-width: 100%; }
  .embed-venue-block { max-width: 100%; }
}

/* =============================================
   EMBEDS — Map + Address
   ============================================= */

.embed-map-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .embed-map-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem 1.5rem;
  }
}

.embed-card {
  overflow: hidden;
  background: transparent;
  text-align: left;
}

.embed-card--placeholder {
  padding: 0 0 1rem;
}

.page-section p {
  margin: 0 0 1.5rem;
  white-space: pre-line;
}

.embed-card__title {
  padding: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 1rem + 1.25vw, 1.85rem);
  font-weight: 400;
  background: transparent;
  text-align: left;
  letter-spacing: 0.01em;
  font-synthesis: none;
}

.embed-venue-block {
  flex: 1 1 10rem;
  max-width: 28rem;
  text-align: left;
}

.embed-venue-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 1rem + 1.25vw, 1.85rem);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0.01em;
  white-space: pre-line;
  text-align: left;
  font-synthesis: none;
}

.embed-address {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  line-height: 1.5;
  white-space: pre-line;
  text-align: left;
}

.embed-frame {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: 700px;
  aspect-ratio: 4 / 3;
  height: auto;
  padding: 0;
  background: transparent;
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .embed-frame {
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }
}

.embed-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: left;
}

.embed-hint code {
  font-size: 0.8125rem;
  font-family: var(--font-body);
  background: transparent;
  padding: 0;
}

.embed-mail {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  text-align: left;
}

.embed-mail a { color: inherit; }

/* =============================================
   CALENDAR LEGEND
   ============================================= */

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1rem 0.25rem 0.5rem;
}

.cal-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-legend__dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.cal-legend__label {
  font-size: 0.65rem;
  font-family: var(--font-body);
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .cal-legend {
    gap: 0.75rem 1rem;
    margin-top: 1rem;
    justify-content: flex-start;
  }

  .cal-legend__label { font-size: 0.6rem; }
}

/* =============================================
   TASK POOL — background catalog
   ============================================= */

.task-pool {
  margin: 1.5rem 0;
  max-width: 64rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-2);
  border-radius: 4px;
  color: var(--text-sub);
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.65;
}

.task-pool h2,
.task-pool h3,
.task-pool h4 {
  width: auto;
  max-width: none;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 1.5rem 0 0.35rem;
  line-height: 1.2;
}

.task-pool h2:first-child,
.task-pool h3:first-child {
  margin-top: 0;
}

.task-pool p {
  margin: 0 0 0.25em;
}

/* =============================================
   Q-LIST / TIMELINE — calendar-styled cue sheet
   ============================================= */

.qlist-block {
  width: 100%;
  max-width: var(--shell-max);
  margin: 1.5rem 0 0;
}

.qlist-scroll {
  /* Slightly stronger lines than the calendar for legibility over the row tints */
  --ql-line: #cdd0d4;
  --ql-edge: #b6b9bd;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  max-width: min(100%, 1400px);
  border: 1px solid var(--ql-edge);
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: #dadce0 transparent;
}

.qlist-scroll::-webkit-scrollbar { height: 6px; }
.qlist-scroll::-webkit-scrollbar-track { background: transparent; }
.qlist-scroll::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 4px; }

.qlist {
  border-collapse: collapse;
  width: 100%;
  min-width: 960px;
  background: var(--cal-day-bg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-sub);
}

.qlist thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--cal-head-bg);
  border-bottom: 1px solid var(--ql-edge);
  border-left: 1px solid var(--ql-line);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: bottom;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cal-label-color);
  white-space: nowrap;
}

.qlist tbody td {
  border-bottom: 1px solid var(--ql-line);
  border-left: 1px solid var(--ql-line);
  padding: 0.6rem 0.75rem;
  vertical-align: top;
}

.qlist tbody tr:last-child td { border-bottom: none; }

.qlist th:first-child,
.qlist td:first-child { border-left: none; }

/* Row grouping — subtle monochrome tints for readability.
   frame = white, wait = light, work = mid, song = set apart, night = darkest */
.qlist tbody tr[data-group="frame"] td { background: #ffffff; }
.qlist tbody tr[data-group="wait"]  td { background: #f2f2f2; }
.qlist tbody tr[data-group="work"]  td { background: #e6e6e6; }
.qlist tbody tr[data-group="song"]  td { background: #ededed; }
.qlist tbody tr[data-group="night"] td { background: #dcdcdc; }

.qlist tbody tr:hover td { filter: brightness(0.96); }

/* Index column — mirrors the calendar's time column */
.qlist__num {
  width: 2.25rem;
  text-align: center !important;
  background: var(--cal-time-bg);
  color: var(--cal-label-color);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 0.7rem;
}

thead .qlist__num { color: var(--cal-label-color); }

/* Cue name — the row's label */
.qlist__cell--cue {
  font-weight: 500;
  color: var(--text-strong);
  white-space: nowrap;
}

.qlist__cell--state { white-space: nowrap; }

/* Time column — tabular and muted, like the time axis */
.qlist__cell--time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--cal-label-color);
  text-align: right;
}

@media (max-width: 1100px) {
  .qlist { font-size: 0.75rem; min-width: 880px; }
  .qlist thead th,
  .qlist tbody td { padding: 0.5rem 0.6rem; }
}

/* =============================================
   MOODBOARD SLIDER
   ============================================= */

.moodboard-slider {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 2rem 6rem;
}

.moodboard-slider::-webkit-scrollbar {
  display: none;
}

.moodboard-slider__track {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  width: max-content;
}

.moodboard-slider__item {
  scroll-snap-align: start;
  flex-shrink: 0;
  height: clamp(200px, calc(100dvh - 22rem), 700px);
  min-width: 200px;
  overflow: hidden;
}

.moodboard-slider__item img {
  height: 100%;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .moodboard-slider {
    flex: 1;
    min-height: 0;
    padding-block: 0.75rem 1.5rem;
  }

  .moodboard-slider__track {
    height: 100%;
    align-items: stretch;
  }

  .moodboard-slider__item {
    width: calc(100vw - 2 * var(--shell-pad));
    height: 100%;
    min-height: 0;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .moodboard-slider__item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
}
/* =============================================
   SCROLL NAVIGATION ARROWS (moodboard, calendar, etc.)
   ============================================= */

.scroll-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
  position: sticky;
  bottom: 2rem;
  z-index: 50;
  pointer-events: none; /* Let clicks pass through the container... */
}

.scroll-nav__btn {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  padding: 0.6rem;
  color: var(--text-strong);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
  outline: none;
  pointer-events: auto; /* ...but catch clicks on the buttons */
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.scroll-nav__btn:hover {
  transform: scale(1.1);
}

.scroll-nav__btn:active {
  transform: scale(0.95);
}

.scroll-nav__btn svg {
  width: 20px;
  height: 20px;
}

/* =============================================
   HORIZONTAL CALENDAR / TASK SCROLLER
   ============================================= */

.cal-h-scroll {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 2rem;
  width: 100%;
}

.cal-h-scroll::-webkit-scrollbar { display: none; }

.cal-h-pane {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.cal-h-pane > h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* =============================================
   TODO PANEL
   ============================================= */

.todo-panel {
  width: 100%;
}

.todo-panel__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.todo-panel__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-strong);
}

.todo-panel__sub {
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.todo-panel__cols {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  max-width: min(100%, 1180px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  overflow: hidden;
}

.todo-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
}

.todo-col:nth-child(6n) {
  border-right: none;
}

.todo-col__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid var(--line-strong);
  background: var(--cal-head-bg);
}

.todo-col__wd {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.todo-col__date {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-strong);
  line-height: 1;
}

.todo-col__list {
  list-style: none;
  padding: 1rem 0.75rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.todo-item {
  margin: 0;
}

.todo-item__label {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  cursor: pointer;
  line-height: 1.35;
}

.todo-item__check {
  appearance: none;
  -webkit-appearance: none;
  width: 0.85rem;
  height: 0.85rem;
  min-width: 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  margin-top: 0.1rem;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  background: transparent;
}

.todo-item__check:checked {
  background: var(--text-sub);
  border-color: var(--text-sub);
}

.todo-item__check:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 6px;
  height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.todo-item__text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-sub);
  line-height: 1.35;
  transition: opacity 0.2s;
}

.todo-item--done .todo-item__text {
  opacity: 0.35;
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}

/* Mobile: fewer columns */
@media (max-width: 1100px) {
  .todo-panel__cols {
    grid-template-columns: repeat(3, 1fr);
  }
  .todo-col:nth-child(6n) {
    border-right: 1px solid var(--line-strong);
  }
  .todo-col:nth-child(3n) {
    border-right: none;
  }
  .todo-col:not(:nth-last-child(-n+3)) {
    border-bottom: 1px solid var(--line-strong);
  }
}

@media (max-width: 640px) {
  .todo-panel__cols {
    grid-template-columns: 1fr;
  }
  .todo-col {
    border-right: none !important;
    border-bottom: 1px solid var(--line-strong) !important;
  }
  .todo-col:last-child {
    border-bottom: none !important;
  }
  .todo-col__head {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    justify-content: flex-start;
  }
}

/* =============================================
   SCORE — long-tone field, styled like the cue sheet
   ============================================= */

.score {
  width: 100%;
  max-width: var(--shell-max);
}

.score__grid {
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) repeat(var(--score-points, 9), minmax(0, 1fr));
  width: 100%;
  max-width: min(100%, 1180px);
  border: 1px solid var(--ql-edge, #b6b9bd);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.score__corner,
.score__point {
  background: var(--cal-head-bg);
  border-bottom: 1px solid var(--ql-edge, #b6b9bd);
}

.score__point {
  border-left: 1px solid var(--ql-line, #cdd0d4);
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cal-label-color);
  font-variant-numeric: tabular-nums;
}

.score__label {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--ql-line, #cdd0d4);
  background: var(--cal-time-bg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-strong);
  white-space: nowrap;
}

.score__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.65rem 0.35rem;
  border-bottom: 1px solid var(--ql-line, #cdd0d4);
  border-left: 1px solid var(--ql-line, #cdd0d4);
  text-align: center;
}

/* last instrument row: no inner bottom border (radius handles the edge) */
.score__grid > .score__label:last-of-type,
.score__grid > .score__label:last-of-type ~ .score__cell {
  border-bottom: none;
}

.score__pitch {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-strong);
  font-variant-ligatures: none;
  line-height: 1;
}

.score__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.score__midi {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1;
}

.score__written { color: var(--muted); }

/* Reading instructions */
.score__legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 2.5rem;
  margin-top: 1.75rem;
  width: 100%;
  max-width: min(100%, 1180px);
}

.score__note-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.score__note-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-sub);
}

@media (max-width: 1100px) {
  .score__grid { grid-template-columns: minmax(3.5rem, max-content) repeat(var(--score-points, 9), minmax(0, 1fr)); }
  .score__midi { display: none; }
  .score__pitch { font-size: 0.8rem; }
  .score__label { font-size: 0.7rem; padding: 0.5rem; }
  .score__cell { padding: 0.55rem 0.2rem; }
  .score__legend { grid-template-columns: 1fr; gap: 1rem; }
}


