/* Parlune: Farben und Typografie aus apps/daily-french-dialogues/DESIGN.md */
:root {
  color-scheme: light dark;
  --paper: #F7F4EC;
  --card: #FFFFFF;
  --ink: #223D32;
  --muted: #59675D;
  --accent: #315E46;
  --on-accent: #FFFFFF;
  --sentence: #E5EDDF;
  --word: #CFDAAC;
  --line: #D8DDD3;
  --shadow: 0 1px 2px rgba(34, 61, 50, .06), 0 18px 40px rgba(34, 61, 50, .12);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171D1A;
    --card: #222C26;
    --ink: #F2F3EB;
    --muted: #B8C5BA;
    --accent: #AFD1AF;
    --on-accent: #17261A;
    --sentence: #304432;
    --word: #4D6640;
    --line: #445348;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { margin: 0; font-size: clamp(38px, 6.5vw, 64px); line-height: 1.06; letter-spacing: -.02em; max-width: 760px; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 16px; }
h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.3; }
a { color: var(--accent); }
p { margin: 0 0 1em; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 13px;
}
.lead { max-width: 640px; font-size: 19px; color: var(--muted); }
.fine { color: var(--muted); font-size: 14px; }

/* Unterseiten wie das Impressum */
main:not(.home), body > footer:not(.site-footer) { width: min(960px, calc(100% - 32px)); margin: 0 auto; }
.hero { padding: 80px 0 48px; }
main:not(.home) section { padding: 24px 0; }
body > footer:not(.site-footer) { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }

.wrap { width: min(1100px, calc(100% - 32px)); margin-inline: auto; }
.narrow { max-width: 760px; }

/* Kopf */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.brand-mark { width: 34px; height: 34px; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 10px 10px; border-radius: 10px; }
.top nav a:hover { color: var(--ink); background: var(--sentence); }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { background: var(--sentence); border-color: transparent; }
.btn .i { width: 18px; height: 18px; fill: currentColor; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible, .shots:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pill { display: inline-block; padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); }

body[data-app="soon"] .when-live, body[data-app="live"] .when-soon { display: none !important; }

/* Einstieg */
.intro { display: grid; gap: 40px; align-items: center; padding: 32px 0 72px; }
@media (min-width: 940px) { .intro { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; padding: 48px 0 96px; } }
.intro h1 + .lead { margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 28px 0 14px; }

/* Mitlese-Probe im Stil des Dialogplayers */
.demo-wrap { margin: 0; }
.demo-wrap figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.demo { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.demo-head { padding: 24px 24px 8px; }
.demo-title { margin: 0; font-size: 36px; line-height: 1.1; }
.demo-meta { margin: 10px 0 4px; color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.demo-context { margin: 0; color: var(--muted); }
.transcript { position: relative; max-height: 340px; overflow-y: auto; padding: 12px 24px 8px 16px; overscroll-behavior: contain; scrollbar-width: thin; }
.line { position: relative; margin: 0 0 16px; padding: 2px 0 2px 16px; }
.line .who { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.said { font-size: 19px; line-height: 1.6; }
.line::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: transparent; }
.line.now::before { background: var(--accent); }
.line.now .said { background: var(--sentence); -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 4px; }
.w { border-radius: 4px; }
.w.on { background: var(--word); }
.g { cursor: pointer; border-radius: 4px; }
.g:hover { background: var(--sentence); text-decoration: underline; text-decoration-color: var(--word); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.g.picked { background: var(--word); }

.demo-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 20px 10px; border-top: 1px solid var(--line); }
.demo-progress { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: 6px; }
.demo-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.speed { display: inline-flex; justify-self: start; padding: 3px; border-radius: 999px; background: var(--sentence); }
.speed button { min-height: 38px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
.speed button[aria-pressed="true"] { background: var(--word); }
.play-big { width: 62px; height: 62px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; }
.play-big svg, .p-toggle svg { width: 28px; height: 28px; fill: currentColor; }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.repeat { justify-self: end; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; border: 0; background: none; color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
.repeat svg { width: 22px; height: 22px; }
.demo-hint { margin: 0; padding: 4px 20px 18px; color: var(--muted); font-size: 14px; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; padding: 16px 22px 20px; background: var(--card); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, .14); }
@media (prefers-reduced-motion: no-preference) { .sheet:not([hidden]) { animation: rise .22s ease-out; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sentence); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.close svg, .p-close svg { width: 18px; height: 18px; }
.gx { margin: 0 0 4px; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.2; }
.gm { margin: 0 0 8px; font-size: 18px; }
.gn { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.gn:empty { display: none; }
.gline { padding: 12px 14px; border-radius: 14px; background: var(--paper); }
.glabel { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gfr { margin: 0 0 4px; font-size: 16px; }
.gtr { margin: 0; color: var(--muted); font-size: 15px; }
.gfoot { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

/* Abschnitte */
.band { padding: 80px 0; border-top: 1px solid var(--line); }
.podcast-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 860px) { .podcast-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; } }
.cover { display: block; width: 100%; max-width: 300px; height: auto; border-radius: 22px; box-shadow: var(--shadow); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 58px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--muted); }
.steps li strong { color: var(--ink); }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 12px; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent); }
.facts-inline { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts-inline li { padding: 4px 12px; border-radius: 999px; background: var(--sentence); font-size: 14px; font-weight: 500; }
.subscribe { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

.episodes-title { margin: 56px 0 16px; font-size: 26px; }
.episodes { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.episodes-note { color: var(--muted); padding: 20px 0; }
.episode { padding: 20px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.episode.current { border-color: var(--accent); }
.ep-head { display: flex; gap: 16px; align-items: baseline; }
.ep-num { min-width: 2ch; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent); }
.ep-title { margin: 0; font-size: 24px; line-height: 1.2; }
.ep-meta { margin: 6px 0 0; color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ep-context { margin: 12px 0 0; }
.chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 3px 12px; border-radius: 999px; background: var(--sentence); font-size: 14px; }
.ep-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ep-actions .btn { min-height: 44px; padding: 8px 18px; font-size: 15px; }
.ep-transcript { position: relative; max-height: 420px; overflow-y: auto; margin-top: 16px; padding: 12px 4px 4px 0; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.cue { position: relative; margin: 0 0 6px; padding: 6px 10px 6px 16px; border-radius: 10px; cursor: pointer; }
.cue:hover { background: var(--paper); }
.cue::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; }
.cue.now { background: var(--sentence); }
.cue.now::before { background: var(--accent); }
.cue .who { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cue.line-dialogue .who { color: var(--accent); }

.app-head { display: grid; gap: 24px; align-items: end; margin-bottom: 40px; }
@media (min-width: 860px) { .app-head { grid-template-columns: minmax(0, 1fr) auto; } }
/* App-Store-Knopf im Seitenstil (Apples Original-Badge darf nicht verändert werden) */
.store-btn {
  position: relative; display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 52px; padding: 6px 22px; border: 0; border-radius: 12px;
  background: var(--ink); color: var(--paper); text-align: left; text-decoration: none;
  font-family: var(--sans); line-height: 1.1; cursor: pointer;
}
.store-small { font-size: 11px; font-weight: 500; letter-spacing: .02em; }
.store-big { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.store-btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.store-note {
  position: absolute; top: -9px; right: -8px; padding: 2px 9px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; white-space: nowrap;
}

.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 20px; overflow-x: auto; padding: 8px 4px 20px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
@media (min-width: 1100px) { .shots { grid-auto-columns: 1fr; overflow: visible; } }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { display: block; width: 100%; height: auto; border-radius: 30px; border: 7px solid #1D2621; box-shadow: var(--shadow); background: #F7F4EC; }
.shots figcaption { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.shots figcaption strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 600; }
.facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts li { padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.facts li strong { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
article { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
article p { margin: 0; color: var(--muted); }
.split { display: grid; gap: 32px; margin-top: 48px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.split p { color: var(--muted); }

.site-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Player für ganze Folgen */
.player {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 24px));
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px;
  padding: 12px 14px 10px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow);
}
.player[hidden] { display: none; }
body.has-player { padding-bottom: 130px; }
.p-toggle { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; }
.p-toggle svg { width: 22px; height: 22px; }
.p-info { min-width: 0; }
.p-title { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { margin: 0; color: var(--muted); font-size: 13px; }
.p-rate { min-width: 52px; min-height: 40px; border: 0; border-radius: 999px; background: var(--sentence); color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
.p-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.p-scrub { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.p-scrub input { flex: 1; min-width: 0; accent-color: var(--accent); height: 24px; }

@media (max-width: 560px) {
  .top nav a { padding: 10px 7px; font-size: 15px; }
  .intro { padding-top: 16px; }
  .lead { font-size: 17px; }
  .demo-head { padding: 20px 18px 6px; }
  .transcript { padding: 10px 16px 6px 8px; max-height: 320px; }
  .said { font-size: 18px; }
  .demo-controls { padding: 14px 14px 8px; }
  .band { padding: 64px 0; }
  .episode { padding: 18px 16px; }
}
