/* Ein Dokumentlauf und eine gemeinsame Einstiegskante für alle Besucherseiten. */
html { scrollbar-gutter: stable; }
:root { --content-gap-base: clamp(36px, calc((100svh - 560px) * .32), 126px); --content-gap: clamp(28px, calc(var(--content-gap-base) - max(0px, var(--ticker-height,0px) - 44px)), 126px); --content-heading: clamp(40px, min(6vw,8.5svh), 84px); }
body { display: flex; flex-direction: column; min-height: 100dvh; }
.topbar { flex: none; }
main { display: flex; flex: 1 0 auto; flex-direction: column; min-width: 0; }
.player-area { flex: none; padding-top: clamp(12px,2dvh,25px); padding-bottom: 0; }
.hero { flex: 1; min-height: 0; aspect-ratio: auto; align-items: flex-start; padding-block: var(--content-gap) 48px; }
.hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); column-gap: 32px; }
.hero-stage { position: static; order: 2; width: 100%; height: auto; align-self: start; justify-self: end; min-width: 0; max-width: min(100%, var(--hero-stage-width,100%)); }
.hero-stage .stage-illustration { width: 100%; height: auto; object-fit: contain; }
.hero-copy { order: 1; }
@media (max-width:1000px) {
  .hero { display: flex; flex-direction: column; gap: 24px; min-height: 0; }
  .hero-stage { flex: none; max-width: 800px; margin: auto; }
}
.hero-copy { max-width: 560px; margin: 0; }
.hero h1 { margin: 0 0 20px; font-size: var(--content-heading); line-height: 1.02; text-wrap: balance; }
.page-view { flex: 1; min-height: 0; height: auto; overflow: visible; padding: var(--content-gap) 0 24px; }
:is(.team-heading,.wishbox-heading,.schedule-head,.history-head,.charts-heading) { max-width: 560px; padding-top: 0; text-align: left; }
:is(#page-team,#page-wunschbox,#page-sendeplan,#page-historie,#page-hoerercharts) :is(.team-heading,.wishbox-heading,.schedule-head,.history-head,.charts-heading) h2 { margin: 0 0 20px; font-size: max(40px,calc(var(--content-heading) * .82)); font-weight: 720; line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; }
.page-view :is(.team-heading,.wishbox-heading,.schedule-head,.history-head,.charts-heading) > p,.page-view .schedule-head p { margin: 0; color: #bab8b2; font-size: 17px; line-height: 1.7; }
.schedule-head,#schedule-editor-content,.schedule-day,.history-card,.wishbox-card,.team-local-editor { margin-inline: 0; }
.schedule-days { justify-items: start; }
.history-status:empty { display: none; }
.history-table td { padding-block: 8px; }
/* Rückmeldungen stehen unter den Daten; Aktualisierungen erzeugen keine neue Zeile. */
.data-feedback { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; }
.data-feedback :is(#team-status,#schedule-status) { margin: 0; font-size: 14px; line-height: 1.5; }
.data-retry { flex: none; min-height: 44px; padding: 4px 8px; border: 0; background: transparent; color: var(--gold); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.data-retry[hidden] { display: none; }
#team-members[aria-busy="true"] { min-height: 280px; grid-template-columns: repeat(2,minmax(0,1fr)); }
#team-members[aria-busy="true"]::before,#team-members[aria-busy="true"]::after { content: ""; display: block; width: 100%; height: 280px; border: 1px solid #ffffff0d; border-radius: 15px; background: linear-gradient(#141414 0 64%,transparent 64%),linear-gradient(100deg,#101010,#141414); }
#schedule-days[aria-busy="true"] { min-height: 180px; }
#schedule-days[aria-busy="true"]::before { content: ""; display: block; width: 100%; height: 180px; border-block: 1px solid #ffffff12; background: repeating-linear-gradient(to bottom,#121212 0 62px,transparent 62px 64px); }
#team-members[aria-busy="true"] > *,#schedule-days[aria-busy="true"] > * { display: none; }
@media (max-width:1000px) {
  .history-layout,.schedule-layout,.wishbox-layout,.team-layout,.charts-layout { grid-template-columns: minmax(0,1fr); gap: 28px; }
}
@media (max-width:760px) {
  :root { --content-gap: 40px; --content-heading: clamp(40px,11vw,58px); }
  .hero-copy > p,.page-view :is(.team-heading,.wishbox-heading,.schedule-head,.history-head,.charts-heading) > p { font-size: 16px; }
  .hero { min-height: 360px; }
  .team-card-copy { gap: 7px; }
}
@media (min-width:1001px) and (max-height:820px) {
  :root { --content-gap: 28px; --content-heading: clamp(38px,7svh,54px); }
  .team-card-copy { gap: 5px; padding: 10px 12px; }
  .team-card-image { aspect-ratio: 2 / 1; max-height: 17svh; }
  .team-card-name { margin-bottom: 4px; }
}

/* Die verfügbare Browserfläche führt das Layout; nur einzelne Lese- und Bedienmaße bleiben begrenzt. */
@media (min-width:1001px) {
  .wrap:not(.editor-toolbar) { width: calc(100% - clamp(64px, 4.444vw, 160px)); max-width: none; }
}
@media (min-width:1001px) {
  :root { --layout-unit: max(1px,min(calc((100vw + 100svh) / 2340),calc(100vw / 1150))); --content-heading: clamp(40px,min(6vw,calc(76.5 * var(--layout-unit))),calc(84 * var(--layout-unit))); }
  .topbar { min-height: calc(82 * var(--layout-unit)); }
  .wordmark-name,.wordmark-radio-label { font-size: calc(20 * var(--layout-unit)); }
  .wordmark-separator { height: calc(34 * var(--layout-unit)); }
  .nav { gap: calc(8 * var(--layout-unit)); }
  .nav a { min-height: calc(44 * var(--layout-unit)); padding-inline: calc(14 * var(--layout-unit)); font-size: calc(13 * var(--layout-unit)); }
  .nav-icon { width: calc(18 * var(--layout-unit)); height: calc(18 * var(--layout-unit)); }
  .hero-copy, :is(.team-heading,.wishbox-heading,.schedule-head,.history-head,.charts-heading) { max-width: calc(560 * var(--layout-unit)); }
  .hero h1 { max-width: none; }
  .hero-copy > p:not(.eyebrow), .page-view :is(.team-heading,.wishbox-heading,.schedule-head,.history-head,.charts-heading) > p, .page-view .schedule-head p { max-width: 50ch; font-size: calc(17 * var(--layout-unit)); }
  .team-layout,.history-layout,.schedule-layout,.wishbox-layout,.charts-layout { gap: clamp(40px,6vw,calc(100 * var(--layout-unit))); }
  .team-selection,.charts-content,.history-card,#schedule-editor-content,.charts-admin { max-width: none; }
  .wishbox-card { width: 100%; max-width: calc(1000 * var(--layout-unit)); }
  .page-welcome { max-width: calc(1000 * var(--layout-unit)); }
  #team-members { grid-template-columns: repeat(auto-fit,minmax(min(100%,calc(240 * var(--layout-unit))),calc(320 * var(--layout-unit)))); gap: calc(20 * var(--layout-unit)); }
  #team-members[data-member-count="1"] { grid-template-columns: minmax(0,calc(320 * var(--layout-unit))); }
  #team-members[data-member-count="2"] { grid-template-columns: repeat(2,minmax(0,calc(320 * var(--layout-unit)))); }
  .team-selection #team-members .team-card { max-width: calc(320 * var(--layout-unit)); }
  .team-card-image { aspect-ratio: 1; max-height: none; }
  .team-card-copy { padding: calc(18 * var(--layout-unit)); }
  .team-card-name { font-size: calc(27 * var(--layout-unit)); }
  .team-functions { font-size: calc(11 * var(--layout-unit)); }
  .team-card-link { font-size: calc(13 * var(--layout-unit)); }
  .team-profile-dialog { width: min(calc(100% - 24px),calc(540 * var(--layout-unit))); }
  .team-profile-section p { font-size: calc(15 * var(--layout-unit)); }
  .team-profile-section h3 { font-size: calc(17 * var(--layout-unit)); }
  .team-profile-copy h2 { font-size: calc(40 * var(--layout-unit)); }
  .team-photo-adjust canvas { max-width: calc(420 * var(--layout-unit)); }
  .team-local-editor h3 { font-size: calc(26 * var(--layout-unit)); }
  .team-local-editor label,.team-local-editor > p,.team-photo-adjust p,.wishbox-form label,.wishbox-status p { font-size: calc(14 * var(--layout-unit)); }
  .team-local-editor input,.team-local-editor select,.team-local-editor textarea,.rich-content,.wishbox-form input { font-size: calc(16 * var(--layout-unit)); }
  .team-local-editor :is(input,select,button),.wishbox-form input,.wishbox-submit { min-height: calc(44 * var(--layout-unit)); }
  .team-local-editor button,.wishbox-submit { font-size: calc(14 * var(--layout-unit)); }
  .wishbox-rules { font-size: calc(13 * var(--layout-unit)); }
  #wishbox-availability { font-size: calc(12 * var(--layout-unit)); }
  .history-title,.schedule-topic { font-size: calc(20 * var(--layout-unit)); }
  .history-time,.history-artist,.history-table th,.schedule-time,.schedule-moderator,.schedule-columns { font-size: calc(16 * var(--layout-unit)); }
  .history-time-column { width: calc(112 * var(--layout-unit)); }
  .schedule-columns,.schedule-entry { grid-template-columns: minmax(0,1fr) calc(152 * var(--layout-unit)); }
  .chart-song h3 { font-size: calc(22 * var(--layout-unit)); }
  .chart-song-artist,.charts-meta { font-size: calc(16 * var(--layout-unit)); }
  .chart-song { min-height: calc(120 * var(--layout-unit)); padding: calc(8 * var(--layout-unit)) calc(12 * var(--layout-unit)); }
  .chart-star-option,.chart-star-input,.chart-star-label { width: calc(44 * var(--layout-unit)); height: calc(44 * var(--layout-unit)); }
  .chart-star-label svg { width: calc(25 * var(--layout-unit)); height: calc(25 * var(--layout-unit)); }
  .chart-song-feedback { width: calc(238 * var(--layout-unit)); }
  .chart-song-status,.chart-song-retry { font-size: calc(12 * var(--layout-unit)); line-height: calc(17 * var(--layout-unit)); }
}
@media (min-width:1200px) {
  .radio-deck { --play-size: calc(80 * var(--layout-unit)); grid-template-columns: calc(150 * var(--layout-unit)) calc(100 * var(--layout-unit)) minmax(0,1fr) calc(316 * var(--layout-unit)) calc(74 * var(--layout-unit)); padding-block: calc(12 * var(--layout-unit)); }
  .disc-zone::before { left: calc(-44 * var(--layout-unit)); width: calc(200 * var(--layout-unit)); height: calc(200 * var(--layout-unit)); }
  .play-button { left: calc(16 * var(--layout-unit)); }
  .play-button svg { width: calc(32 * var(--layout-unit)); height: calc(32 * var(--layout-unit)); }
  .brand-mark img { width: calc(100 * var(--layout-unit)); height: calc(100 * var(--layout-unit)); }
  .radio-metadata { grid-template-rows: calc(160 * var(--layout-unit)); }
  .track-title { font-size: calc(26 * var(--layout-unit)); line-height: 1.35; max-height: calc(72 * var(--layout-unit)); }
  .track-subtitle { font-size: calc(17 * var(--layout-unit)); max-height: calc(40 * var(--layout-unit)); }
  .show-title { font-size: calc(20 * var(--layout-unit)); }
  .show-note { font-size: calc(15 * var(--layout-unit)); }
  .mini-label,.show-context .mini-label { font-size: calc(11 * var(--layout-unit)); line-height: 1.3; }
  .show-context { padding-right: calc(60 * var(--layout-unit)); }
  .volume-control { grid-template-columns: calc(52 * var(--layout-unit)); grid-template-rows: calc(18 * var(--layout-unit)) calc(64 * var(--layout-unit)) calc(44 * var(--layout-unit)); width: calc(52 * var(--layout-unit)); height: calc(126 * var(--layout-unit)); }
  .volume-value { width: calc(52 * var(--layout-unit)); height: calc(18 * var(--layout-unit)); font-size: calc(12 * var(--layout-unit)); line-height: calc(18 * var(--layout-unit)); }
  .volume-knob { width: calc(44 * var(--layout-unit)); height: calc(44 * var(--layout-unit)); }
  .volume-knob::before { inset: calc(8 * var(--layout-unit)); }
  .volume-knob svg { width: calc(18 * var(--layout-unit)); height: calc(18 * var(--layout-unit)); }
  .volume-range { width: calc(44 * var(--layout-unit)); height: calc(64 * var(--layout-unit)); padding-inline: calc(20 * var(--layout-unit)); }
  .radio-controls { height: calc(160 * var(--layout-unit)); }
  .radio-actions { max-width: calc(300 * var(--layout-unit)); }
  .action-link { min-height: calc(64 * var(--layout-unit)); font-size: calc(14 * var(--layout-unit)); }
  .action-icon { width: calc(24 * var(--layout-unit)); height: calc(24 * var(--layout-unit)); }
  .action-copy small { font-size: calc(12 * var(--layout-unit)); line-height: 1.4; }
  .own-wish-slot { height: calc(42 * var(--layout-unit)); }
  #own-wish-title { font-size: calc(14 * var(--layout-unit)); }
  #own-wish-rank { font-size: calc(16 * var(--layout-unit)); }
  #own-wish-stage { font-size: calc(12 * var(--layout-unit)); }
  .radio-listener-brand { width: calc(90 * var(--layout-unit)); }
}
@media (min-width:1500px) {
  .radio-deck { grid-template-columns: calc(170 * var(--layout-unit)) calc(120 * var(--layout-unit)) minmax(0,1fr) calc(420 * var(--layout-unit)) calc(100 * var(--layout-unit)); }
}
@media (min-width:1001px) and (max-height:820px) {
  :root { --content-heading: calc(54 * var(--layout-unit)); }
  .team-card-copy { padding: calc(10 * var(--layout-unit)) calc(12 * var(--layout-unit)); }
}
