/* ==========================================================================
   FarmerTV – Gestaltung
   Schrift: Archivo (schmal & kräftig für Titel, normal für Text)
   Farben: Tinte (fast schwarzes Grün), Papier, Ohrmarken-Gelb als einziger Akzent,
           Signalrot nur für LIVE.
   ========================================================================== */
:root {
  --ink: #101511;
  --ink-2: #19201a;
  --ink-3: #242c25;
  --ink-line: #2f3830;
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --card: #fbfaf7;
  --line: #d8d2c4;
  --text: #141814;
  --muted: #676b62;
  --muted-dark: #9aa196;
  --forest: #1f5a39;
  --tag: #f6c800;          /* Ohrmarken-Gelb */
  --tag-dark: #d9b000;
  --live: #e4362c;
  --ok: #1f7a44;
  --radius: 4px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font-family: inherit; }

h1, h2, h3 {
  margin: 0 0 .4em;
  font-weight: 800;
  font-stretch: 72%;
  line-height: 1.02;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }
.section { padding: 56px 0; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Kleine Überschrift mit Linie – das wiederkehrende Gestaltungselement */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.dark .eyebrow { color: var(--muted-dark); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* ---- Kopfzeile ---------------------------------------------------------- */
.site-header { background: var(--paper); color: var(--text); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand .logo { height: 34px; width: auto; display: block; }
.brand-footer .logo { height: 44px; }
/* Tally-Licht: das Loch der Ohrmarke leuchtet rot, solange etwas live ist */
.brand .tally { transition: fill .3s; }
.site-footer .brand .tally { fill: var(--paper-2); }
.brand.is-live .tally { fill: var(--live); animation: tally 2.4s ease-in-out infinite; }
@keyframes tally { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .brand.is-live .tally { animation: none; } }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; height: 100%; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 0 12px; height: 100%; display: flex; align-items: center;
  font-size: .92rem; font-weight: 600; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom-color: var(--ink); }
.nav a.cta { height: auto; padding: 8px 14px; margin-left: 8px; background: var(--tag); color: var(--ink); border-radius: var(--radius); border: 0; }
.nav a.cta:hover { background: var(--tag-dark); }
@media (max-width: 680px) {
  .nav a.hide-sm { display: none; }
  .brand .logo { height: 28px; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font: 700 1rem var(--font); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  background: var(--ink); color: #fff;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink-3); border-color: var(--ink-3); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.gold { background: var(--tag); border-color: var(--tag); color: var(--ink); }
.btn.gold:hover { background: var(--tag-dark); border-color: var(--tag-dark); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.dark .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.dark .btn.ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn.danger { background: transparent; border-color: var(--live); color: var(--live); }
.btn.danger:hover { background: var(--live); color: #fff; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.arrow::after { content: "→"; font-weight: 400; }

/* ---- Badges ------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px 4px; border-radius: 2px; background: var(--paper-2); color: var(--text); line-height: 1;
}
.badge.live { background: var(--live); color: #fff; }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.badge.tag { background: var(--tag); color: var(--ink); }
.dark .badge:not(.live):not(.tag) { background: var(--ink-3); color: #dfe4dc; }
@keyframes pulse { 50% { opacity: .2; } }

/* ---- Startseite: Bühne -------------------------------------------------- */
.dark { background: var(--ink); color: #eef1eb; }
.stage-hero { padding: 48px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 5fr 6fr; gap: 56px; } }
.hero-copy h1 { margin-bottom: .3em; }
.hero-meta { color: var(--muted); font-size: 1.05rem; margin-bottom: 28px; }
.hero-meta strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 22px; font-size: .9rem; color: var(--muted); }

/* 16:9-Bildfläche – Vorschaubild oder typografischer Platzhalter */
.frame {
  position: relative; aspect-ratio: 16/9; background: var(--forest) center/cover no-repeat;
  border: 0; overflow: hidden; display: block; color: #fff; text-decoration: none;
}
.frame .badge { position: absolute; top: 14px; left: 14px; }
.frame .play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; background: var(--tag); display: grid; place-items: center;
  transition: transform .15s;
}
.frame:hover .play-btn { transform: translate(-50%, -50%) scale(1.06); }
.frame .play-btn svg { width: 30px; height: 30px; margin-left: 5px; fill: var(--ink); }
.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255,255,255,.1), transparent 70%),
    var(--forest);
}
.placeholder span { font-weight: 800; font-stretch: 68%; text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1; color: rgba(255,255,255,.9); }
.placeholder small { color: rgba(255,255,255,.75); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 8px; }

/* ---- Programm (Liste wie TV-Programm) ----------------------------------- */
.schedule { border-top: 2px solid var(--ink); }
.schedule-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.schedule-row:hover .sr-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.sr-date { line-height: 1; }
.sr-date .d { display: block; font-weight: 800; font-stretch: 68%; font-size: 2.4rem; }
.sr-date .m { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.sr-title { font-weight: 800; font-stretch: 78%; font-size: 1.45rem; line-height: 1.1; }
.sr-sub { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.sr-side { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
@media (max-width: 600px) {
  .schedule-row { grid-template-columns: 64px 1fr; }
  .sr-date .d { font-size: 1.9rem; }
  .sr-side { grid-column: 2; }
}

/* ---- Preise: schlichte Spalten ------------------------------------------ */
.price-cols { display: grid; border-top: 2px solid var(--ink); }
/* So viele gleich breite Spalten wie Angebote (2 ohne Saisonabo, 3 mit) */
@media (min-width: 800px) { .price-cols { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.price-col { padding: 26px 0 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 800px) {
  .price-col { padding: 26px 28px 30px; border-bottom: 0; border-left: 1px solid var(--line); }
  .price-col:first-child { border-left: 0; padding-left: 0; }
}
.price-col h3 { margin: 0; text-transform: uppercase; font-size: 1.1rem; letter-spacing: .02em; font-stretch: 85%; }
.price-col .amount { font-weight: 800; font-stretch: 68%; font-size: 3rem; line-height: 1; }
.price-col .amount small { font-size: .95rem; font-weight: 500; font-stretch: 100%; color: var(--muted); margin-left: 6px; }
.price-col ul { list-style: none; margin: 4px 0 auto; padding: 0; }
.price-col li { padding: 7px 0 7px 22px; position: relative; border-top: 1px solid var(--line); font-size: .97rem; }
.price-col li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 5px; border-left: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(-45deg); }
.price-col .flag { align-self: flex-start; }
.price-col .btn { margin-top: 14px; align-self: flex-start; }
.price-col select { margin-top: 6px; }

/* ---- Partner ------------------------------------------------------------ */
.partners { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sponsor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 56px; }
.sponsor-row img { height: 44px; width: auto; max-width: 180px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.sponsor-row .haupt img { height: 62px; max-width: 240px; }
.sponsor-row a:hover img, .sponsor-row div:hover img { filter: none; opacity: 1; }
.sponsor-title { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

/* ---- App-Leiste --------------------------------------------------------- */
.app-promo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.dark .app-promo { border-color: var(--ink-line); }
.app-promo-text { flex: 1 1 260px; display: flex; gap: 14px; align-items: center; }
.app-promo-text .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tag); color: var(--ink); flex: none; }
.app-promo-text .ico svg { width: 20px; height: 20px; }
.app-promo-text strong { display: block; font-size: 1rem; }
.app-promo-text span { color: var(--muted); font-size: .92rem; }
.dark .app-promo-text span { color: var(--muted-dark); }
.app-promo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
aside .app-promo { border: 1px solid var(--line); padding: 18px; background: var(--card); }
aside .app-promo-actions { width: 100%; }
aside .app-promo-actions .btn { flex: 1; }

/* ---- Eventseite: Bühne mit Player ---------------------------------------- */
.stage { background: var(--paper); padding: 24px 0 0; }
.stage .wrap { max-width: 1280px; }
.player { position: relative; background: #000; aspect-ratio: 16/9; width: 100%; overflow: hidden; }
.player:fullscreen { aspect-ratio: auto; }
.player video.live { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player iframe.embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .watermark {
  position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.92); padding: 6px 10px; border-radius: 2px;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.player .watermark img { height: 24px; width: auto; }
.player .live-tag { position: absolute; top: 14px; left: 14px; z-index: 3; }
.player .startscreen {
  position: absolute; inset: 0; z-index: 4; border: 0; width: 100%; cursor: pointer; display: grid; place-items: center;
  background: var(--forest);
  background-size: cover; background-position: center;
}
.player .startscreen .play {
  width: 92px; height: 92px; border-radius: 50%; background: var(--tag); display: grid; place-items: center; transition: transform .15s;
}
.player .startscreen:hover .play { transform: scale(1.06); }
.player .startscreen .play svg { width: 34px; height: 34px; margin-left: 6px; fill: var(--ink); }
.player .controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 4px; padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff;
  opacity: 0; transition: opacity .2s;
}
.player:hover .controls, .player.show-controls .controls, .player.paused .controls { opacity: 1; }
.controls button { background: none; border: 0; color: #fff; width: 44px; height: 44px; cursor: pointer; display: grid; place-items: center; border-radius: 2px; }
.controls button:hover { background: rgba(255,255,255,.14); }
.controls svg { width: 24px; height: 24px; fill: currentColor; }
.controls input[type=range] { width: 90px; accent-color: var(--tag); }
.controls .spacer { flex: 1; }
.controls .golive { width: auto; padding: 0 10px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
@media (max-width: 520px) { .controls input[type=range] { display: none; } }
.player .offline {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; text-align: center; padding: 24px; color: #fff;
  background: var(--forest);
}
.player .offline h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.player .offline p { color: rgba(255,255,255,.8); max-width: 46ch; margin-inline: auto; }

.event-head { padding: 28px 0 32px; }
.event-head h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: .25em; }
.event-head .meta { color: var(--muted); font-size: 1.02rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }

.event-body { display: grid; gap: 40px; padding: 40px 0 8px; }
@media (min-width: 940px) { .event-body { grid-template-columns: 1fr 360px; align-items: start; } }
.event-body .desc { font-size: 1.08rem; max-width: 62ch; white-space: pre-line; font-variant-numeric: tabular-nums; }
.event-sponsors { display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; }
.event-sponsors img { height: 40px; width: auto; max-width: 160px; object-fit: contain; }

.access { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--tag); padding: 22px; }
.access h3 { text-transform: uppercase; font-size: 1.25rem; margin-bottom: .5em; }
.access .btn { width: 100%; margin-top: 10px; }
.access.adfree { border-top-color: var(--ok); }
.access .fine { font-size: .86rem; color: var(--muted); margin: 14px 0 0; }
.check-line { display: flex; gap: 10px; align-items: flex-start; }
.check-line svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--ok); }

/* ---- Ranglisten --------------------------------------------------------- */
.rank-filter { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.chip {
  border: 0; background: none; color: var(--muted); padding: 12px 16px; margin-bottom: -1px;
  font: 700 .95rem var(--font); cursor: pointer; border-bottom: 3px solid transparent;
}
.chip:hover { color: var(--text); }
.chip.active { color: var(--text); border-bottom-color: var(--ink); }
#rankings { display: grid; gap: 28px 32px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 420px) { #rankings { grid-template-columns: 1fr; } }
.rank-card { border-top: 2px solid var(--ink); }
.rank-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 0 10px; }
.rank-card .breed { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rank-card h3 { margin: 2px 0 0; font-size: 1.5rem; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 44px 46px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.rank-no { font-weight: 800; font-stretch: 68%; font-size: 2.1rem; line-height: 1; text-align: center; color: var(--text); }
.rank-list li:not(.top) .rank-no { color: var(--muted); font-size: 1.7rem; }
/* Startnummer als Ohrmarke */
.ear-tag {
  width: 42px; height: 46px; background: var(--tag); color: var(--ink);
  border-radius: 12px 12px 8px 8px; display: grid; place-items: end center; padding-bottom: 7px;
  font-weight: 800; font-stretch: 80%; font-size: .95rem; position: relative; line-height: 1;
}
.ear-tag::before { content: ""; position: absolute; top: 6px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--paper); }
.ear-tag.empty { background: var(--paper-2); }
.rank-main { min-width: 0; }
.rank-main strong { font-size: 1.08rem; }
.rank-main .father { color: var(--muted); font-size: .9rem; }
.rank-main .owner { color: var(--muted); font-size: .92rem; }
.rank-award { display: inline-block; margin-top: 4px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); }

/* ---- Hinweise ----------------------------------------------------------- */
.notice { padding: 14px 16px; margin: 16px 0; font-weight: 600; border-left: 4px solid; background: var(--card); }
.notice.ok { border-color: var(--ok); color: #155b33; }
.notice.warn { border-color: var(--tag-dark); color: #6a5200; background: #fff9de; }
.notice.err { border-color: var(--live); color: #8c1d16; }
.player-notices .notice { margin: 0 0 16px; }

/* ---- Formulare ---------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea, select {
  font: inherit; font-size: 1rem; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; width: 100%; color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(246,200,0,.45); }
.form .row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.form .check input { width: 20px; height: 20px; accent-color: var(--ink); }
.form input.code-input { font-size: 2.2rem; letter-spacing: .35em; text-align: center; font-weight: 800; font-stretch: 80%; padding: 14px 8px; }

.auth { min-height: calc(100vh - 60px - 120px); display: grid; place-items: start center; padding: 64px 16px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); }
.auth-box .lead { color: var(--muted); font-size: 1.05rem; }

/* ---- Allgemeine Flächen (Konto, Admin) ---------------------------------- */
.panel { background: var(--card); border: 1px solid var(--line); padding: 22px; }
.panel.adfree { border-left: 4px solid var(--ok); }
.page-title { padding: 48px 0 8px; }

/* Tabs (Admin, Login) */
.tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; padding: 12px 16px; margin-bottom: -1px; font: 700 .95rem var(--font);
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--ink); }

/* Tabellen */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
td img { height: 32px; width: auto; max-width: 120px; object-fit: contain; }
.actions-cell { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }

dialog { border: 0; border-radius: var(--radius); padding: 28px; width: min(640px, calc(100vw - 32px)); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(16,21,17,.6); }
dialog h2 { font-size: 1.8rem; }
.upload-preview { height: 48px; margin-top: 6px; object-fit: contain; }

/* Kennzahlen (Admin) */
.plans { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 2px solid var(--ink); }
.plan { padding: 18px 20px 20px 0; border-bottom: 1px solid var(--line); }
.plan h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-stretch: 100%; font-weight: 700; margin: 0 0 6px; }
.plan .price { font-weight: 800; font-stretch: 68%; font-size: 2.6rem; line-height: 1; }
.status-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 8px 0 32px; border-top: 2px solid var(--ink); }
.status-grid > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.status-grid strong { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--ok); }
.dot.warn { background: var(--tag-dark); }
.dot.off { background: var(--live); }
.warn-list { color: #8c1d16; font-size: .84rem; margin: 6px 0 0; padding-left: 1.1em; }

/* ---- Fusszeile ---------------------------------------------------------- */
.site-footer { background: var(--paper-2); color: var(--muted); border-top: 1px solid var(--line); padding: 48px 0 36px; margin-top: 72px; font-size: .92rem; }
.site-footer .wrap { display: grid; gap: 28px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { margin: 0 0 10px; color: var(--text); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer a { color: var(--text); text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; font-size: .82rem; }
body:has(main > .partners:last-child) .site-footer { margin-top: 0; }

/* Player nie höher als der Bildschirm – Titel bleibt sichtbar */
.stage .wrap { max-width: var(--wrap); }
.player { width: min(100%, calc((100vh - 200px) * 16 / 9)); margin: 0 auto; }
@media (max-width: 700px) { .stage { padding-top: 0; } .stage .wrap { padding: 0; } .event-head { padding-left: 16px; padding-right: 16px; } .player-notices { padding: 0 16px; } }
.event-head .meta span + span::before { content: "·"; margin-right: 18px; color: var(--line); }
aside .app-promo-actions { flex-direction: column; }
aside .app-promo-actions .btn { width: 100%; }
section[id] { scroll-margin-top: 76px; }

/* ==========================================================================
   Auftritt eines Anlasses (Co-Branding)
   --event = Akzentfarbe des Anlasses (Fallback: Ohrmarkengelb).
   Nur für Linien, Datum, Hervorhebungen – Kauf-Buttons bleiben FarmerTV-Gelb.
   ========================================================================== */
.frame, .player { container-type: inline-size; }

/* Plakat-Platzhalter: Titel gestapelt, Datum im Akzent, Lichtkegel wie im Ring */
.poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6% 8%; gap: 3cqw;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(255,255,255,.16), transparent 70%),
    var(--event, var(--forest));
  color: var(--on-event, #fff);
}
.poster-title span {
  display: block; font-weight: 900; font-stretch: 66%; text-transform: uppercase;
  font-size: clamp(1.8rem, 10.5cqw, 7rem); line-height: .86; letter-spacing: -.005em;
  color: currentColor; opacity: .9;
}
.poster-date {
  color: currentColor; font-weight: 700; text-transform: uppercase;
  letter-spacing: .22em; font-size: clamp(.68rem, 2.3cqw, 1.25rem);
}
.poster .play-btn.static, .poster .play {
  position: static; transform: none; width: clamp(52px, 11cqw, 84px); height: auto; aspect-ratio: 1; flex: none;
  margin-top: 1cqw; transition: transform .15s;
}
.poster .play-btn.static svg, .poster .play svg { width: 40%; height: 40%; }
.poster .play-btn.static, .poster .play { background: var(--ink); }
.poster .play-btn.static svg, .poster .play svg { fill: var(--tag); }
.frame:hover .poster .play-btn.static, .startscreen:hover .poster .play { transform: scale(1.06); }

/* Akzent in den Modulen eines Anlasses */
.hero-copy .eyebrow, .event-head .eyebrow { color: var(--muted); }
.hero-copy .eyebrow::after, .event-head .eyebrow::after { background: var(--event, currentColor); opacity: 1; height: 3px; }
.stage { border-bottom: 1px solid var(--line); }
.rank-card { border-top-color: var(--event, var(--ink)); border-top-width: 3px; }
.schedule-row[style*="--event"] { box-shadow: inset 4px 0 0 var(--event); padding-left: 18px; }
@media (max-width: 600px) { .schedule-row[style*="--event"] { padding-left: 14px; } }

/* Schild «Ein Anlass von …» */
.org-plate {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 28px;
  color: var(--text); text-decoration: none; max-width: 100%;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.org-plate .lbl { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.org-plate img { height: 64px; width: auto; max-width: 220px; object-fit: contain; }
.org-plate strong { font-size: .95rem; line-height: 1.25; }
a.org-plate:hover strong { text-decoration: underline; }
.poster-note { color: currentColor; opacity: .85; font-size: clamp(.8rem, 1.9cqw, 1rem); margin: 0; }

/* ==========================================================================
   Sender-Auftritt: Aufmacher + Reihen mit Vorschaubildern (wie eine Mediathek)
   ========================================================================== */
.aufmacher-section { padding: 24px 0 8px; }
.aufmacher {
  position: relative; overflow: hidden; border-radius: 6px;
  aspect-ratio: 21 / 9; min-height: 380px;
  display: flex; align-items: flex-end;
  background:
    radial-gradient(ellipse 55% 70% at 78% 40%, rgba(255,255,255,.22), transparent 70%),
    radial-gradient(ellipse 40% 50% at 15% 110%, rgba(0,0,0,.18), transparent 70%),
    var(--event, var(--forest));
  background-size: cover; background-position: center;
  color: var(--on-event, #fff);
}
.aufmacher.has-img { color: #fff; }
.aufmacher.has-img::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,14,11,.78) 0%, rgba(10,14,11,.45) 45%, transparent 75%),
              linear-gradient(0deg, rgba(10,14,11,.55), transparent 50%);
}
.aufmacher-link { position: absolute; inset: 0; z-index: 1; }
.aufmacher-text { position: relative; z-index: 2; padding: clamp(22px, 4vw, 48px); max-width: 640px; pointer-events: none; }
.aufmacher-text a { pointer-events: auto; }
.aufmacher-text .badge { margin-bottom: 14px; }
.aufmacher h1 { color: inherit; font-size: clamp(2.4rem, 6vw, 5rem); margin-bottom: .25em; }
.aufmacher-meta { font-size: 1.05rem; opacity: .92; margin-bottom: 22px; }
.aufmacher-meta strong { font-weight: 700; }
.btn.on-media { background: transparent; color: inherit; border-color: currentColor; }
.btn.on-media:hover { background: var(--on-event, #fff); color: var(--event, var(--ink)); border-color: transparent; }
.aufmacher.has-img .btn.on-media:hover { background: #fff; color: var(--ink); }
@media (max-width: 760px) {
  .aufmacher-section { padding-top: 0; }
  .aufmacher-section .wrap { padding: 0; }
  .aufmacher { aspect-ratio: 4 / 5; min-height: 0; border-radius: 0; }
  .aufmacher.has-img::before { background: linear-gradient(0deg, rgba(10,14,11,.85) 0%, rgba(10,14,11,.4) 55%, transparent 80%); }
  .aufmacher-foot { padding: 0 16px; }
}
.aufmacher-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.aufmacher-foot .org-plate { margin-top: 18px; border-top: 0; padding-top: 0; }
.aufmacher-foot .hero-note { margin: 18px 0 0; }

/* Reihen */
.rail { padding: 36px 0 4px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.rail-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.rail-more { font-weight: 700; font-size: .92rem; color: var(--muted); text-decoration: none; }
.rail-more::after { content: " →"; }
.rail-more:hover { color: var(--text); }
.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px;
}
.rail-track::-webkit-scrollbar { display: none; }
@media (max-width: 1000px) { .rail-track { grid-auto-columns: calc((100% - 2 * 18px) / 3); } }
@media (max-width: 700px) {
  .rail-track { grid-auto-columns: 78%; gap: 12px; margin: 0 -16px; padding: 0 16px 6px; scroll-padding: 0 16px; }
}
#appPromo:not(:empty) { margin-top: 36px; }

/* Kachel */
.tile { scroll-snap-align: start; text-decoration: none; color: inherit; display: block; min-width: 0; }
.tile-media { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.tile-img { position: absolute; inset: 0; background: center / cover no-repeat; container-type: inline-size; transition: transform .35s ease; }
.tile:hover .tile-img { transform: scale(1.04); }
.tile-img .poster { padding: 6%; gap: 2cqw; }
.tile-img .poster-title span { font-size: 13cqw; }
.tile-img .poster-date { font-size: 3.4cqw; }
.tile-media .badge, .tile-date { position: absolute; left: 10px; bottom: 10px; z-index: 2; }
.tile-date {
  background: var(--paper); color: var(--text); font-size: .74rem; font-weight: 700;
  padding: 4px 8px; border-radius: 2px; letter-spacing: .02em;
}
.tile-play {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: var(--tag); display: grid; place-items: center; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.tile-play svg { width: 16px; height: 16px; margin-left: 3px; fill: var(--ink); }
.tile:hover .tile-play, .tile:focus-visible .tile-play { opacity: 1; transform: none; }
@media (hover: none) { .tile-play { opacity: 1; transform: none; } }
.tile-title { font-weight: 800; font-stretch: 80%; font-size: 1.12rem; line-height: 1.15; margin-top: 10px; }
.tile:hover .tile-title { text-decoration: underline; text-underline-offset: 3px; }
.tile-sub { color: var(--muted); font-size: .88rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:focus-visible { outline: 3px solid var(--tag); outline-offset: 4px; border-radius: 4px; }
.tile-img .poster-date { display: none; }
.aufmacher-logo {
  position: absolute; z-index: 0; right: 7%; top: 50%; transform: translateY(-50%);
  width: min(32%, 340px); height: auto; max-height: 60%; object-fit: contain;
}
@media (max-width: 760px) { .aufmacher-logo { top: 9%; right: 50%; transform: translateX(50%); width: 52%; max-height: 28%; } }
@media (max-width: 760px) {
  .aufmacher { aspect-ratio: auto; min-height: 420px; }
  .aufmacher:has(.aufmacher-logo) { padding-top: 150px; }
  .aufmacher-logo { top: 28px; right: 50%; transform: translateX(50%); width: auto; height: 96px; max-width: 70%; max-height: none; }
}

/* ---- Ranglisten grosser Schauen: Suche, Kategorie-Leiste, Auszeichnungen ---- */
.rank-filter { display: block; border-bottom: 0; margin-bottom: 20px; }
.breed-chips { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.rank-search {
  display: flex; align-items: center; gap: 10px; max-width: 520px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 14px; height: 50px;
}
.rank-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(246,200,0,.45); }
.rank-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.rank-search input { border: 0; outline: 0; background: none; font: 500 1rem var(--font); width: 100%; height: 100%; color: var(--text); }
.rank-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.rank-tools .rank-search { flex: 1 1 280px; }
.rank-tabs { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 4px; gap: 2px; }
.rank-tabs button {
  border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 10px 18px;
  font: 700 .95rem var(--font); color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
}
.rank-tabs button span { font-size: .78rem; font-weight: 800; background: var(--line); color: var(--text); border-radius: 999px; padding: 1px 8px; }
.rank-tabs button:hover { color: var(--text); }
.rank-tabs button.active { background: var(--ink); color: #fff; }
.rank-tabs button.active span { background: var(--tag); color: var(--ink); }

/* Championwahlen */
.wahl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.wahl {
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--event, var(--forest));
  border-radius: var(--radius); padding: 16px 18px 6px; scroll-margin-top: 90px; transition: box-shadow .3s;
}
.wahl.flash { box-shadow: 0 0 0 4px var(--tag); }
.wahl header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wahl h3 { margin: 0 0 10px; font-size: 1.3rem; line-height: 1.15; }
.wahl ol { list-style: none; margin: 0; padding: 0; }
.wahl li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.wahl-medal {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font: 800 1.1rem var(--font); background: var(--paper-2); color: var(--text);
}
.wahl li.pos-1 .wahl-medal { background: var(--tag); color: var(--ink); }
.wahl li.pos-2 .wahl-medal { background: #D9D6CE; }
.wahl li.pos-3 .wahl-medal { background: #E8C9A8; }
.wahl-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wahl-pos { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--forest); }
.wahl li.pos-1 strong { font-size: 1.12rem; }
.wahl-owner { color: var(--muted); font-size: .9rem; }
.wahl-cat {
  align-self: flex-start; margin-top: 6px; border: 0; cursor: pointer; padding: 3px 8px; border-radius: 3px;
  background: var(--paper-2); font: 700 .78rem var(--font); color: var(--text);
}
.wahl-cat:hover { background: var(--ink); color: #fff; }

/* Kategorie-Wähler: ‹ Kategorie 12 › + aufklappbares Zahlenraster */
.cat-picker { max-width: 820px; margin-bottom: 8px; scroll-margin-top: 90px; }
.cat-stepper { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; }
.cat-step {
  border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius); cursor: pointer;
  font: 400 2rem/1 var(--font); color: var(--text);
}
.cat-step:hover:not(:disabled) { border-color: var(--ink); }
.cat-step:disabled { opacity: .35; cursor: default; }
.cat-current {
  border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius); cursor: pointer;
  padding: 10px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; font: inherit; color: inherit;
}
.cat-current:hover, .cat-current[aria-expanded="true"] { border-color: var(--ink); }
.cat-current-breed { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cat-current-name { font-weight: 800; font-stretch: 80%; font-size: 1.5rem; line-height: 1.1; }
.cat-current-meta { font-size: .82rem; color: var(--muted); }
.cat-current[aria-expanded="true"] .caret { display: inline-block; transform: rotate(180deg); }
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px;
  margin-top: 8px; padding: 12px; background: var(--paper-2); border-radius: var(--radius);
}
.cat-grid[hidden] { display: none; }
.cat-cell {
  position: relative; height: 44px; border: 1px solid var(--line); background: var(--card); border-radius: 4px; cursor: pointer;
  font: 800 1rem var(--font); font-stretch: 80%; color: var(--text); padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-cell:hover { border-color: var(--ink); }
.cat-cell.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-cell.has-champ::after, .cat-legend .dot {
  content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--tag);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.cat-cell.is-new { box-shadow: inset 0 -3px 0 var(--live); }
.cat-legend { grid-column: 1 / -1; margin: 4px 0 0; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cat-legend .dot { position: static; display: inline-block; }
.rank-title { display: inline-block; margin: 4px 8px 0 0; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--tag); color: var(--ink); padding: 2px 6px; border-radius: 2px; }
#rankings.stack { display: block; }
#rankings.stack .rank-card { max-width: 820px; margin-top: 20px; }
.rank-card { scroll-margin-top: 90px; }
@media (max-width: 600px) {
  .rank-tabs { width: 100%; }
  .rank-tabs button { flex: 1; justify-content: center; padding: 10px 8px; }
  .cat-stepper { grid-template-columns: 48px 1fr 48px; }
  .wahl-grid { grid-template-columns: 1fr; }
}

.rank-card-side { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.rank-cat { border: 0; cursor: pointer; font-family: var(--font); display: inline-block; margin: 4px 10px 0 0; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); background: var(--paper-2); padding: 2px 6px; border-radius: 2px; }
.rank-hits { margin: 0 0 8px; }
.cat-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
/* Ranglisten-Raster: Auszeichnungen, Treffer und Blättern über die ganze Breite */
#rankings > .champs, #rankings > .cat-nav, #rankings > .rank-hits, #rankings > .rank-list, #rankings > p { grid-column: 1 / -1; }
#rankings > .rank-card:only-of-type { grid-column: 1 / -1; max-width: 760px; }
.poster-cta { margin-top: 1.5cqw; min-height: 0; padding: clamp(8px, 1.6cqw, 14px) clamp(14px, 3cqw, 26px); font-size: clamp(.85rem, 1.9cqw, 1.05rem); }
