/* ===== Handy-Ansicht (Bildschirme bis 920 Pixel Breite) ===== */
@media (max-width: 920px) {
  body { overflow-y: auto !important; }

  #canvas { display: flex; flex-direction: column; width: auto; height: auto; margin: 0; padding: 10px; position: static; box-sizing: border-box; }
  #header { order: 1; position: static; width: auto; height: auto; font-size: 26px; line-height: 1.2; }
  #languages { order: 2; position: static; width: auto; height: auto; text-align: left; line-height: 1.6; margin: 4px 0; }
  #languages a { margin-right: 14px; }
  #menu { order: 3; position: static; width: auto; height: auto; text-align: left; line-height: 1.4; margin: 4px 0 10px; }
  #menu a { display: inline-block; padding: 6px 12px 6px 0; }
  #content { order: 4; position: static; width: auto; height: auto; padding: 8px; box-sizing: border-box; }
  #footer-legal { order: 5; position: static; margin-top: 14px; font-size: 13px; line-height: 1.6; }

  #content .padding { position: static; width: auto; height: auto; }
  #content_news, #content_biography, #content_reviews, #content_contact, #content_scriabin, #content_scriabin2, #content_melartin, #content_schnittke, #content_poemedelextase, #content_enchantedgarden, #content_europolis, #content_levina { padding-top: 45.7%; background-size: 100% auto; background-position: top center; background-repeat: no-repeat; }

  #content #content_home { position: relative; padding-top: 45.7%; padding-bottom: 56px; background-size: 100% auto; background-position: top center; }
  #content #content_home #player { position: absolute; left: 50%; top: auto; bottom: 10px; transform: translateX(-50%); }

  #content .scroll-pane, #content .jspContainer, #content .jspPane { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; top: auto !important; left: auto !important; right: auto !important; }
  #content .jspVerticalBar { display: none !important; }
  #content #contentbox { width: auto !important; }
  #content #innerbox { padding: 10px !important; font-size: 16px; line-height: 1.5; overflow-wrap: break-word; }
  #innerbox img { max-width: 100%; height: auto; }

  #content a.zurueck { position: static !important; display: block; text-align: right; margin: 0 0 8px; }

  .news-layout { flex-direction: column; }
  .news-left, .news-left.news-left-en { width: auto; }
  .news-divider { width: auto; height: 2px; margin: 12px 0; }
  .news-right { margin-left: 0; }

  .press-wrap { width: auto; }
  .cd-pair { flex-wrap: wrap; gap: 30px; }
  #content_recordings #innerbox { overflow-x: auto; }
}

@media (max-width: 920px) {
  .grammy-logo { display: none; }
  .news-left > p:first-child, .news-right > p:first-child { display: none; }
}

@media (max-width: 920px) {
  #innerbox > br:first-child { display: none; }
  #content #innerbox { padding-top: 6px !important; }
  #innerbox > p:first-child, .grammy-logo + p { margin-top: 0; }
  .news-right .center { text-align: left; }
}

/* Tablet: Name und Sprachwahl in einer Zeile, kleinere Abstände */
@media (min-width: 601px) and (max-width: 920px) {
  #canvas { flex-direction: row; flex-wrap: wrap; align-items: baseline; padding-top: 4px; }
  #header { flex: 1 1 auto; line-height: 1.1; }
  #languages { flex: 0 0 auto; margin: 0; text-align: right; }
  #languages a:last-child { margin-right: 0; }
  #menu { flex: 1 1 100%; margin: 2px 0 6px; }
  #content { flex: 1 1 100%; }
  #footer-legal { flex: 1 1 100%; }
}

/* Abstände oben auf null (Handy und Tablet) */
@media (max-width: 920px) {
  html, body { margin: 0 !important; padding: 0 !important; height: auto !important; min-height: 0 !important; }
  #canvas { margin: 0 !important; top: 0 !important; transform: none !important; height: auto !important; min-height: 0 !important; align-content: flex-start !important; row-gap: 0 !important; }
  #header, #languages, #menu { margin-top: 0 !important; margin-bottom: 0 !important; height: auto !important; min-height: 0 !important; }
  #menu { margin-bottom: 4px !important; }
}

/* Tablet: CD-Raster nimmt die verfügbare Breite */
@media (min-width: 601px) and (max-width: 920px) {
  .rec-grid { width: auto; }
}

/* Startseite: Verschiebung aus der Computeransicht aufheben */
@media (max-width: 920px) {
  #content #content_home { left: 0; top: 0; }
}

/* Handy: aufnahmen/recordings, eine CD unter der anderen (10 CDs) */
@media (max-width: 700px) {
  .rec-grid { display: flex; flex-direction: column; align-items: center; width: auto; gap: 6px; }
  .rec-grid > div:empty { display: none; }
  .rec-grid > .span4 { display: none; }

  .rec-grid > :nth-child(1)  { order: 11; }
  .rec-grid > :nth-child(5)  { order: 12; }
  .rec-grid > :nth-child(9)  { order: 13; }
  .rec-grid > :nth-child(13) { order: 14; }

  .rec-grid > :nth-child(2)  { order: 21; }
  .rec-grid > :nth-child(6)  { order: 22; }
  .rec-grid > :nth-child(10) { order: 23; }
  .rec-grid > :nth-child(14) { order: 24; }

  .rec-grid > :nth-child(3)  { order: 31; }
  .rec-grid > :nth-child(7)  { order: 32; }
  .rec-grid > :nth-child(11) { order: 33; }
  .rec-grid > :nth-child(15) { order: 34; }

  .rec-grid > :nth-child(4)  { order: 41; }
  .rec-grid > :nth-child(8)  { order: 42; }
  .rec-grid > :nth-child(12) { order: 43; }
  .rec-grid > :nth-child(16) { order: 44; }

  .rec-grid > :nth-child(18) { order: 61; }
  .rec-grid > :nth-child(22) { order: 62; }
  .rec-grid > :nth-child(26) { order: 63; }
  .rec-grid > :nth-child(30) { order: 64; }

  .rec-grid > :nth-child(19) { order: 71; }
  .rec-grid > :nth-child(23) { order: 72; }
  .rec-grid > :nth-child(27) { order: 73; }
  .rec-grid > :nth-child(31) { order: 74; }

  .rec-grid > :nth-child(20) { order: 81; }
  .rec-grid > :nth-child(24) { order: 82; }
  .rec-grid > :nth-child(28) { order: 83; }
  .rec-grid > :nth-child(32) { order: 84; }

  .rec-grid > :nth-child(21) { order: 91; }
  .rec-grid > :nth-child(25) { order: 92; }
  .rec-grid > :nth-child(29) { order: 93; }
  .rec-grid > :nth-child(33) { order: 94; }

  .rec-grid > :nth-child(36) { order: 101; }
  .rec-grid > :nth-child(40) { order: 102; }
  .rec-grid > :nth-child(44) { order: 103; }
  .rec-grid > :nth-child(48) { order: 104; }
  .rec-grid > :nth-child(52) { order: 105; }

  .rec-grid > :nth-child(37) { order: 111; }
  .rec-grid > :nth-child(41) { order: 112; }
  .rec-grid > :nth-child(45) { order: 113; }
  .rec-grid > :nth-child(49) { order: 114; }
  .rec-grid > :nth-child(53) { order: 115; }

  .rec-grid > :nth-child(-n+4), .rec-grid > :nth-child(18), .rec-grid > :nth-child(19), .rec-grid > :nth-child(20), .rec-grid > :nth-child(21), .rec-grid > :nth-child(36), .rec-grid > :nth-child(37) { margin-top: 22px; }
}

/* Levina: beide CDs auf einer Höhe (Handy und Tablet) */
@media (max-width: 920px) {
  #content_levina .cd-side { justify-content: flex-start; }
  #content_levina .cd-side > b { display: block; height: 3em; min-height: 0; line-height: 1.5; text-align: center; }
  #content_levina .cd-side img { width: 150px; height: 150px; object-fit: cover; }
  #content_levina .cd-side audio { margin-top: auto; }
}
/* Handy: Menü in zwei Spalten, in beiden Sprachen gleich hoch */
@media (max-width: 600px) {
  #menu { display: grid; grid-template-columns: 1fr 1fr; }
  #menu a { padding: 6px 6px 6px 0; font-size: 15px; }
}
/* Tablet: Menü in festem Raster, CD-Übersicht mit kleinerer Schrift */
@media (min-width: 601px) and (max-width: 920px) {
  #menu { display: grid; grid-template-columns: repeat(4, 1fr); }
  #menu a { padding: 4px 6px 4px 0; font-size: 15px; }
  .rec-grid { font-size: 13px; gap: 6px; padding: 0; }
}
@media (min-width: 601px) and (max-width: 700px) {
  #menu { grid-template-columns: 1fr 1fr; }
}
/* Englische Seite "news": Grammy-Logo auf Handy und Tablet ausblenden, wie auf "aktuell" */
@media (max-width: 920px) {
  .news-left-en > p:nth-child(-n+3) { display: none; }
  .news-left-en > p:nth-child(4) { margin-top: 0; }
}
/* Tablet: Menü in einer Zeile, gleichmäßig verteilt */
@media (min-width: 761px) and (max-width: 920px) {
  #menu { display: flex; flex-wrap: nowrap; justify-content: space-between; margin: 2px 0 8px; }
  #menu a { padding: 4px 0; font-size: 14px; white-space: nowrap; }
}

/* Schmales Tablet: Menü in zwei Zeilen mit festem Abstand */
@media (min-width: 601px) and (max-width: 760px) {
  #menu { display: flex; flex-wrap: wrap; justify-content: flex-start; column-gap: 18px; row-gap: 2px; margin: 2px 0 8px; }
  #menu a { padding: 4px 0; font-size: 15px; }
}
/* Handy und Tablet: Schrägstrich vor deutsch/english ausblenden */
@media (max-width: 920px) {
  #languages .sl { display: none; }
}
/* Tablet: Menü und Sprachwahl enden bündig am rechten Rand */
@media (min-width: 601px) and (max-width: 920px) {
  #menu a { padding-right: 0 !important; margin-right: 0 !important; }
  #menu a:last-child { padding-right: 0 !important; margin-right: 0 !important; text-align: right; }
  #languages a { padding-right: 0 !important; }
  #languages a:last-child { margin-right: 0 !important; }
  #languages img { vertical-align: middle; }
}
/* Tablet: Kopfzeile als festes Raster, alle Teile teilen sich denselben rechten Rand */
@media (min-width: 601px) and (max-width: 920px) {
  #canvas { display: grid !important; grid-template-columns: 1fr auto; align-items: baseline; padding: 4px 10px 6px !important; }
  #header { grid-column: 1; grid-row: 1; }
  #languages { grid-column: 2; grid-row: 1; margin: 0 !important; padding: 0 !important; text-align: right; }
  #menu { grid-column: 1 / -1; grid-row: 2; width: 100% !important; box-sizing: border-box; margin: 2px 0 8px !important; padding: 0 !important; }
  #content { grid-column: 1 / -1; grid-row: 3; }
  #footer-legal { grid-column: 1 / -1; grid-row: 4; }
}
/* Tablet (ab 761 Pixel): Menü sicher in einer Zeile, bündig am rechten Rand */
@media (min-width: 761px) and (max-width: 920px) {
  #canvas #menu { display: flex !important; flex-wrap: nowrap !important; justify-content: space-between !important; grid-template-columns: none !important; width: 100% !important; box-sizing: border-box; padding: 0 !important; }
  #canvas #menu a { padding: 4px 0 !important; margin: 0 !important; white-space: nowrap; font-size: 14px; }
}
/* Tablet 601-920: Menü in einer Zeile, erstes Wort links, letztes Wort am rechten Rand */
@media (min-width: 601px) and (max-width: 920px) {
  #canvas #menu { display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; column-gap: 8px !important; row-gap: 2px !important; grid-template-columns: none !important; width: 100% !important; box-sizing: border-box; padding: 0 !important; }
  #canvas #menu a { padding: 4px 0 !important; margin: 0 !important; white-space: nowrap; font-size: 14px; }
}
/* Tablet: CD-Seiten, Titel, Cover und Player im freien Bereich rechts vom Foto */
@media (min-width: 601px) and (max-width: 920px) {
  #content #content_scriabin, #content #content_scriabin2, #content #content_poemedelextase, #content #content_enchantedgarden, #content #content_melartin, #content #content_schnittke, #content #content_europolis, #content #content_levina { padding-top: 0; }

  .cd-banner { position: relative; height: 0; padding-bottom: 40%; }
  .cd-hero { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; background: #CCCCCC; overflow: hidden; }
  .cd-hero p { margin: 0; }
  .cd-hero img { width: auto; height: auto; max-width: 100%; max-height: 19vw; }
  .cd-hero .cd-title { font-size: 15px; line-height: 1.25; }
  .cd-hero .cd-pair { margin: 0; gap: 20px; }

  #content #content_schnittke .cd-hero { width: 53%; }
  #content #content_europolis .cd-hero, #content #content_levina .cd-hero { width: 49%; }
}
/* Tablet: Levina, Überschriften im Kasten kompakter */
@media (min-width: 601px) and (max-width: 920px) {
  #content #content_levina .cd-hero .cd-side > b { height: 2.6em; font-size: 14px; line-height: 1.3; }
  #content #content_levina .cd-hero .cd-side { gap: 6px; }
}
/* Tablet: CD-Seiten, grauer Streifen oben so dick wie der Streifen mit "Zurück zur Übersicht" */
@media (min-width: 601px) and (max-width: 920px) {
  #content #content_scriabin, #content #content_scriabin2, #content #content_poemedelextase, #content #content_enchantedgarden, #content #content_melartin, #content #content_schnittke, #content #content_europolis, #content #content_levina { margin-top: 16px; }

  #content #content_scriabin a.zurueck, #content #content_scriabin2 a.zurueck, #content #content_poemedelextase a.zurueck, #content #content_enchantedgarden a.zurueck, #content #content_melartin a.zurueck, #content #content_schnittke a.zurueck, #content #content_europolis a.zurueck, #content #content_levina a.zurueck { line-height: 16px; margin: 0 0 8px; }
}
/* Handy: CD-Seiten ohne Hintergrundfoto */
@media (max-width: 600px) {
  #content #content_scriabin, #content #content_scriabin2, #content #content_poemedelextase, #content #content_enchantedgarden, #content #content_melartin, #content #content_schnittke, #content #content_europolis, #content #content_levina { background-image: none !important; padding-top: 0 !important; }
}
/* 1. Aktuell/News: Grammy-Logo auf Handy und Tablet rechts im Foto */
@media (max-width: 920px) {
  #content #content_news { position: relative; left: 0; top: 0; }
  #content #content_news .grammy-logo,
  #content #content_news .news-left-en > p:nth-child(3) { display: block; position: absolute; top: 0; right: 0; width: 50%; aspect-ratio: 1.094; margin: 0; padding: 0; }
  #content #content_news .grammy-logo a,
  #content #content_news .news-left-en > p:nth-child(3) a { position: absolute; top: 10%; right: 10%; bottom: 10%; left: 10%; display: block; }
  #content #content_news .grammy-logo img,
  #content #content_news .news-left-en > p:nth-child(3) img { display: block; width: 100%; height: 100%; max-width: none; object-fit: scale-down; }
}

/* 2 und 4. Skrjabin und Melartin auf dem Handy: Titel, Cover und Player zuerst, dann der Text */
@media (max-width: 600px) {
  #content_scriabin #innerbox, #content_melartin #innerbox { display: flex; flex-direction: column; }
  #content_scriabin #innerbox > *, #content_melartin #innerbox > * { margin-top: 0; margin-bottom: 1em; }
  #content_scriabin #innerbox > p:first-child, #content_melartin #innerbox > p:first-child { order: -5; }
  html[lang="en"] #content_melartin #innerbox > p:nth-child(2) { order: -4; }
  #content_scriabin #innerbox > p:has(img), #content_melartin #innerbox > p:has(img) { order: -3; }
  #content_scriabin #innerbox > p:has(audio), #content_melartin #innerbox > p:has(audio) { order: -2; }
}

/* 3. Skrjabin 2 auf dem Handy: Cover oben, CD-Rückseite darunter */
@media (max-width: 600px) {
  #content_scriabin2 #innerbox > p:has(img) { display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; }
  #content_scriabin2 #innerbox > p:has(img) > a { display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; }
}
/* Alle CD-Seiten auf Handy und Tablet: Fließtext linksbündig, Titel, Bilder und Player bleiben zentriert */
@media (max-width: 920px) {
  #content_scriabin #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_scriabin2 #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_poemedelextase #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_enchantedgarden #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_melartin #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_schnittke #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_europolis #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)),
  #content_levina #innerbox p.center:not(.cd-title):not(:has(img, audio)):not(:has(> strong:only-child)) { text-align: left; }
}
/* Handy, Opus Posthum (englisch): Information/PDF zentriert unter den Player */
@media (max-width: 600px) {
  html[lang="en"] #content_scriabin2 #innerbox { display: flex; flex-direction: column; }
  html[lang="en"] #content_scriabin2 #innerbox > * { margin-top: 0; margin-bottom: 1em; }
  html[lang="en"] #content_scriabin2 #innerbox > p:nth-child(3) { order: 1; text-align: center !important; }
  html[lang="en"] #content_scriabin2 #innerbox > p:nth-child(n+6) { order: 2; }
}
/* Tablet: Kasten rechts im Foto breiter (Skrjabin, Skrjabin 2, Poème de l'extase), rechter Rand bleibt */
@media (min-width: 601px) and (max-width: 920px) {
  #content #content_scriabin .cd-hero, #content #content_scriabin2 .cd-hero, #content #content_poemedelextase .cd-hero { width: 68%; }
}
/* Tablet: Kasten rechts im Foto auf allen CD-Seiten breiter, rechter Rand bleibt */
@media (min-width: 601px) and (max-width: 920px) {
  #content #content_scriabin .cd-hero, #content #content_scriabin2 .cd-hero, #content #content_poemedelextase .cd-hero, #content #content_enchantedgarden .cd-hero, #content #content_melartin .cd-hero { width: 68%; }
  #content #content_schnittke .cd-hero { width: 59%; }
  #content #content_europolis .cd-hero, #content #content_levina .cd-hero { width: 52%; }
}

/* Zaubergarten: gleichmäßiger Abstand zwischen den Titelzeilen (Handy) */
@media (max-width: 600px) {
  #content_enchantedgarden #innerbox > p.cd-title:nth-child(1) { line-height: 1.7; margin-bottom: 0; }
  #content_enchantedgarden #innerbox > p.cd-title:nth-child(2) { line-height: 1.7; margin-top: 0; }
}

/* Zaubergarten: gleichmäßiger Abstand zwischen den Titelzeilen (Tablet) */
@media (min-width: 601px) and (max-width: 920px) {
  #content_enchantedgarden .cd-hero { gap: 0; }
  #content_enchantedgarden .cd-hero .cd-title:nth-child(1) { line-height: 1.6; }
  #content_enchantedgarden .cd-hero .cd-title:nth-child(2) { line-height: 1.6; }
}

/* Schnittke: kleinerer Abstand zwischen den beiden Textteilen (Handy und Tablet) */
@media (max-width: 920px) {
  #content_schnittke #innerbox > p:has(+ p.cd-title) { display: none; }
}
/* 1. Zaubergarten: Kasten auf dem Tablet 65 % breit */
@media (min-width: 601px) and (max-width: 920px) {
  #content #content_enchantedgarden .cd-hero { width: 65%; }
}

/* 2. Aktuell (deutsch), Handy: Neuerscheinung zuerst */
@media (max-width: 600px) {
  html[lang="de"] #content_news .news-layout .news-right { order: -2; }
  html[lang="de"] #content_news .news-layout .news-divider { order: -1; }
}

/* 3. Schnittke, Tablet: Player so breit wie die Cover */
@media (min-width: 601px) and (max-width: 920px) {
  #content_schnittke .cd-hero .cd-side { width: min(150px, 18.8vw); }
  #content_schnittke .cd-hero .cd-side img { width: 100%; height: auto; max-height: none; }
  #content_schnittke .cd-hero .cd-side audio { width: 100%; }
}

/* 4. Schnittke (englisch): kleinere Abstände, alle Ansichten */
html[lang="en"] #content_schnittke #innerbox > p:has(+ p.cd-title),
html[lang="en"] #content_schnittke #innerbox > p:has(+ p > a[href*="nmz"]) { display: none; }