/* Poison Karaoke Bar – Songs. Gleicher Look wie die Getraenkekarte:
   anthrazit #231f20, Signalrot, Open Sans, roter Rahmen mit Titel und Logo
   auf der Linie. Gebaut fuer das Handy in der Hand an der Bar: grosse
   Trefferflaechen, nichts zu wischen, alles mit einem Daumen. */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/open-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/open-sans-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/open-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/open-sans-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/open-sans-800.woff2) format("woff2"); }

:root {
  --bg: #231f20;
  --bg-hoch: #2e292a;     /* Felder, Blatt */
  --red: #ff3131;
  --text: #ffffff;
  --muted: #cfcbcc;       /* 10,6:1 auf --bg */
  --rule: #8a8486;
  --radius: 22px;
  --gutter: 16px;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: calc(28px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) env(safe-area-inset-bottom) max(var(--gutter), env(safe-area-inset-left));
  line-height: 1.35;
  font-size: 16px;
  overflow-x: clip;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Rahmen ---------- */
.frame {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 8px 14px 64px;
}
.title {
  margin: -1.05em auto 0;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 0 .35em;
  background: var(--bg);
  color: var(--red);
  font-weight: 700;
  font-size: clamp(1.9rem, 8.5vw, 2.6rem);
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.intro { margin: 2px 0 12px; text-align: center; font-size: 1.02rem; }
.intro strong { color: var(--red); font-weight: 800; }

/* ---------- Suche: klebt oben, damit sie beim Scrollen greifbar bleibt ---------- */
.such {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -14px; padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
  background: var(--bg);
}
.such__feld { position: relative; display: block; }
.such__feld::before { /* Lupe */
  content: ""; position: absolute; left: 17px; top: 50%; width: 15px; height: 15px; margin-top: -10px;
  border: 2.5px solid var(--red); border-radius: 50%; pointer-events: none;
}
.such__feld::after {
  content: ""; position: absolute; left: 30px; top: 50%; width: 8px; height: 2.5px; margin-top: 4px;
  background: var(--red); transform: rotate(45deg); border-radius: 2px; pointer-events: none;
}
#q {
  width: 100%; min-height: 56px;
  padding: 0 46px 0 46px;
  background: var(--bg-hoch);
  border: 2px solid var(--red); border-radius: 999px;
  font-size: 1.1rem;           /* >= 16px: kein Auto-Zoom auf dem iPhone */
  -webkit-appearance: none; appearance: none;
}
#q::placeholder { color: #aaa4a6; }
#q::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
#q:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 49, 49, .35); }
.such__x {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 1.9rem; line-height: 1;
}

/* ---------- Schnellfilter: umbrechen statt wischen ---------- */
.schnell { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.chip {
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--red); border-radius: 999px;
  background: transparent; font-weight: 700; font-size: .98rem;
}
.chip[aria-pressed="true"], .chip.an { background: var(--red); color: #fff; }
.chip__n { font-weight: 600; }
.chip--mehr { border-color: var(--rule); }
.chip--mehr[aria-expanded="true"] { border-color: var(--text); }
@media (hover: hover) and (pointer: fine) { .chip:hover { background: rgba(255, 49, 49, .18); } .chip[aria-pressed="true"]:hover { background: var(--red); } }

.filter {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin: 0 0 12px; padding: 12px;
  border: 1px solid var(--rule); border-radius: 16px;
}
.filter__feld { display: grid; gap: 4px; min-width: 0; }
.filter__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.wahl {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 50px; padding: 0 14px 0 16px;
  background: var(--bg-hoch); border: 2px solid var(--rule); border-radius: 14px;
  font-size: 1rem; font-weight: 700; text-align: left;
}
.wahl::after { /* Pfeil nach unten */
  content: ""; flex: 0 0 10px; height: 10px; margin-top: -5px;
  border-right: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red);
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) { .wahl::after { transition: transform .2s; } }
.wahl[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: 5px; }
.wahl__wert { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wahl.an { border-color: var(--red); }
.wahl.an .wahl__wert { color: var(--red); }
.wahl:active { background: rgba(255, 49, 49, .12); }

.filter__check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 1rem; cursor: pointer; }
.filter__check input {
  -webkit-appearance: none; appearance: none; flex: 0 0 26px; height: 26px; margin: 0;
  border: 2px solid var(--red); border-radius: 8px; background: var(--bg-hoch);
  display: grid; place-content: center; cursor: pointer;
}
.filter__check input::before { /* Haken */
  content: ""; width: 7px; height: 13px; margin-top: -3px;
  border-right: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(45deg) scale(0);
}
.filter__check input:checked { background: var(--red); }
.filter__check input:checked::before { transform: rotate(45deg) scale(1); }
@media (prefers-reduced-motion: no-preference) { .filter__check input::before { transition: transform .15s; } }

/* Klappliste der Filter: unter dem Knopf, auf Handy und Desktop gleich */
.auswahl {
  position: fixed; margin: 0; padding: 6px 0; max-width: calc(100vw - 24px);
  background: var(--bg); color: var(--text);
  border: 2px solid var(--red); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.auswahl[open] { display: flex; flex-direction: column; }
.auswahl::backdrop { background: rgba(0, 0, 0, .35); }
.auswahl__titel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.auswahl__liste { list-style: none; margin: 0; padding: 0 6px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 50px; padding: 0 12px 0 8px;
  border: 0; border-radius: 10px; background: none; text-align: left; font-size: 1.05rem;
}
.option::before { /* Platz fuer den Haken, damit nichts springt */
  content: ""; flex: 0 0 9px; height: 16px; margin: -4px 4px 0 4px;
  border-right: 3px solid transparent; border-bottom: 3px solid transparent;
  transform: rotate(45deg);
}
.option[aria-selected="true"] { color: var(--red); font-weight: 800; background: rgba(255, 49, 49, .12); }
.option[aria-selected="true"]::before { border-color: var(--red); }
.option + .option, li + li .option { box-shadow: 0 -1px 0 rgba(255, 255, 255, .06); }
.option__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.option__zahl { flex: 0 0 auto; font-size: .82rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.option:active { background: rgba(255, 49, 49, .2); }
.option:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .option { min-height: 42px; font-size: 1rem; }
  .option:hover { background: rgba(255, 255, 255, .06); }
}
@media (prefers-reduced-motion: no-preference) {
  .auswahl[open] { animation: klapp .16s ease-out; }
}
@keyframes klapp { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Zufall: der grosse rote Knopf ---------- */
.zufall {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 68px; margin: 4px 0 18px; padding: 10px 18px;
  border: 0; border-radius: 18px;
  background: var(--red); color: #fff; text-align: left;
}
.zufall:disabled { opacity: .5; cursor: default; }
.zufall:active:not(:disabled) { transform: scale(.98); }
.zufall__wuerfel { /* Wuerfel mit fuenf Augen, gezeichnet */
  flex: 0 0 40px; height: 40px; border-radius: 9px; background: #fff;
  --p: radial-gradient(circle, var(--red) 0 3.6px, transparent 4.2px);
  background-image: var(--p), var(--p), var(--p), var(--p), var(--p);
  background-size: 14px 14px;
  background-position: 5px 5px, 21px 5px, 13px 13px, 5px 21px, 21px 21px;
  background-repeat: no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .zufall:active:not(:disabled) .zufall__wuerfel { transform: rotate(90deg); transition: transform .2s; }
}
.zufall__text { display: flex; flex-direction: column; min-width: 0; }
.zufall__titel { font-weight: 800; font-size: 1.3rem; line-height: 1.15; }
.zufall__info { font-size: .85rem; opacity: .92; }

/* ---------- Ergebnis-Kopf + Liste ---------- */
.kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 0 2px 7px; border-bottom: 2px solid var(--red); }
.kopf__text { margin: 0; font-weight: 700; font-size: 1.08rem; }
.kopf__reset { border: 0; background: none; padding: 6px 0; color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.liste { list-style: none; margin: 0; padding: 0; }
.song { display: flex; align-items: stretch; }
.song + .song { border-top: 1px solid rgba(255, 255, 255, .08); }
.song__haupt {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 11px 2px; border: 0; background: none; text-align: left;
}
.song__titel { font-size: 1.06rem; font-weight: 700; overflow-wrap: anywhere; }
.song__kuenstler { font-size: .92rem; color: var(--muted); overflow-wrap: anywhere; }
.song__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.song__meta:empty { display: none; }
.song__stern {
  flex: 0 0 52px; border: 0; background: none;
  color: var(--red); font-size: 1.6rem; line-height: 1;
}
.song__haupt:active { background: rgba(255, 49, 49, .12); }
@media (hover: hover) and (pointer: fine) { .song__haupt:hover { background: rgba(255, 255, 255, .04); } }

.tag { font-size: .72rem; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.tag--duett { border-color: var(--red); color: #fff; }
.tag--neu { background: var(--red); border-color: var(--red); color: #fff; }
.tag--e { border-color: var(--muted); }
.mehr { height: 1px; }
.weiter { display: block; width: 100%; margin: 14px 0 0; }
.hinweis { text-align: center; color: var(--muted); }

/* ---------- Detailblatt (Bottom-Sheet am Handy) ---------- */
.blatt {
  width: min(560px, 100%); max-width: 100%; max-height: 92dvh;
  margin: auto auto 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  border: 2px solid var(--red); border-bottom: 0; border-radius: 22px 22px 0 0;
  background: var(--bg); color: var(--text);
}
.blatt::backdrop { background: rgba(0, 0, 0, .7); }
@media (min-width: 600px) { .blatt { margin: auto; border-bottom: 2px solid var(--red); border-radius: 22px; } }
@media (prefers-reduced-motion: no-preference) {
  .blatt[open] { animation: hoch .26s cubic-bezier(.2, .8, .2, 1); }
  .blatt.gelandet .blatt__titel { animation: landen .7s ease-out; }
}
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } }
@keyframes landen { 0% { transform: scale(1.08); color: var(--red); } 100% { transform: none; } }
.blatt.rollt .blatt__titel, .blatt.rollt .blatt__titel:focus { outline: none; }
.blatt__kuenstler { opacity: .6; }
.blatt.rollt .blatt__knoepfe { visibility: hidden; }
.blatt__zu { position: absolute; right: 8px; top: 6px; margin: 0; }
.blatt__zu button { width: 48px; height: 48px; border: 0; background: none; color: var(--muted); font-size: 2rem; line-height: 1; }
.blatt__kicker { margin: 0 0 4px; color: var(--red); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.blatt__titel { margin: 0 44px 4px 0; font-size: 1.7rem; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; min-height: 1.15em; }
.blatt__kuenstler { margin: 0 0 10px; font-size: 1.15rem; color: var(--muted); overflow-wrap: anywhere; }
.blatt__meta { margin: 0 0 18px; font-size: .85rem; color: var(--muted); }
.blatt__knoepfe { display: grid; gap: 10px; }
.knopf {
  min-height: 52px; padding: 0 16px;
  border: 2px solid var(--red); border-radius: 999px;
  background: transparent; font-weight: 700; font-size: 1.02rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.knopf--voll, .knopf[aria-pressed="true"] { background: var(--red); color: #fff; }

/* ---------- "Groß zeigen": dem Host am Pult den Song zeigen ---------- */
.gross {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 24px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
  background: var(--bg); border: 4px solid var(--red); text-align: center;
}
.gross__titel { margin: 0 0 12px; font-size: clamp(2.2rem, 11vw, 5rem); font-weight: 800; line-height: 1.05; overflow-wrap: anywhere; color: var(--red); }
.gross__kuenstler { margin: 0 0 18px; font-size: clamp(1.4rem, 7vw, 3rem); font-weight: 700; overflow-wrap: anywhere; }
.gross__nr { margin: 0; font-size: 1.1rem; color: var(--muted); }
.gross__hinweis { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); margin: 0; font-size: .85rem; color: var(--rule); }

html.gross-offen { overflow: hidden; }

/* ---------- Fuß ---------- */
.foot { text-align: center; padding-bottom: 28px; }
.logo {
  display: block; width: 132px; height: auto;
  margin: -64px auto 10px; position: relative;
  padding: 0 10px; background: var(--bg); box-sizing: content-box;
}
.addr { font-style: normal; font-size: 1.05rem; }
.links { margin: 14px 0 0; }
.links a { color: var(--red); font-weight: 700; text-decoration: none; display: inline-block; padding: 10px 6px; }
.stand { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }

@media (min-width: 600px) {
  body { padding-top: 48px; }
  .frame { padding: 8px 32px 72px; }
  .such { margin: 0 -32px; padding-left: 32px; padding-right: 32px; }
  .filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter__check { grid-column: 1 / -1; }
  .blatt__knoepfe { grid-template-columns: 1fr 1fr; }
  .knopf--voll { grid-column: 1 / -1; }
}

/* Hinweis auf den Macher der Seite: dezent, aber gut antippbar */
.credit { margin: 18px 0 0; font-size: .78rem; color: var(--muted); }
.credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); display: inline-block; padding: 8px 4px; }
.credit a:active { color: var(--red); }
@media (hover: hover) and (pointer: fine) { .credit a:hover { color: var(--red); text-decoration-color: var(--red); } }

/* ---------- Umschalter Drinks | Songs (gemeinsam/wechsel.css, von beiden Builds eingebaut) ----------
   Ein Schalter statt zweier Links: die rote Pille gleitet beim Tippen zur
   anderen Seite, dann wird gewechselt. Ohne JS ein normaler Link. */
.wechsel {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  width: min(100%, 300px); margin: 0 auto 44px; padding: 4px;
  border: 2px solid var(--red); border-radius: 999px;
}
.wechsel__pille {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: var(--red);
}
.wechsel--songs .wechsel__pille { transform: translateX(100%); }
@media (prefers-reduced-motion: no-preference) {
  .wechsel__pille { transition: transform .2s cubic-bezier(.3, .7, .2, 1); }
}
.wechsel__a {
  position: relative; /* ueber der Pille */
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 10px;
  border-radius: 999px; color: #fff; text-decoration: none;
  font-weight: 800; font-size: 1.05rem;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.wechsel__a svg {
  width: 21px; height: 21px; flex: 0 0 21px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.wechsel__a:not([aria-current]) { color: var(--muted); }
.wechsel__a:not([aria-current]):active { color: #fff; }
@media (hover: hover) and (pointer: fine) { .wechsel__a:not([aria-current]):hover { color: #fff; } }
.wechsel__a:focus-visible { outline-offset: -4px; border-radius: 999px; }

/* ---------- Sprachwahl im Fuß (gemeinsam) ---------- */
.sprache { margin: 10px 0 0; font-size: .9rem; color: var(--rule); }
.sprache a { display: inline-block; padding: 10px 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.sprache a[aria-current] { color: var(--red); font-weight: 800; }
