/* Directmusic — Handy-Fixes (23.11.2026, iPhone-Test Chris auf early).
   Nur fürs Handy (max-width 720px bzw. html.isPhone), alles hier gebündelt.
   Rückbau: <link rel="stylesheet" href="./handy.css"> aus index.html entfernen. */

/* 1) Eingabefelder mit mindestens 16 px Schrift: darunter zoomt iOS beim Antippen hinein, das ändert die
      Fenstergröße, die Seite baut sich um und das Feld verliert den Fokus (Tastatur verschwindet).
      Im <main> wird alles mit --uiScale (0,92) verkleinert, deshalb dort 16 px / 0,92. */
@media (max-width: 720px){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=color]):not([type=file]):not([type=image]),
  textarea, select{ font-size:16px !important; }
  main input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=color]):not([type=file]):not([type=image]),
  main textarea, main select{ font-size:calc(16px / var(--uiScale, 1)) !important; }
}
html.isPhone input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=color]):not([type=file]):not([type=image]),
html.isPhone textarea, html.isPhone select{ font-size:16px !important; }
html.isPhone main input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=color]):not([type=file]):not([type=image]),
html.isPhone main textarea, html.isPhone main select{ font-size:calc(16px / var(--uiScale, 1)) !important; }

/* 2) Sammlung › gewählte Playlist: am Handy Cover + Titel + Interpret in einer Zeile, Länge und Info rechts.
      Vorher zeigte die Handy-Ansicht die Interpret-Spalte allein („—“) und schnitt den Titel ab. */
@media (max-width: 720px){
  body.routeLibrary .collectionSelectedPlaylist .libList{ overflow-x:visible !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .libHeaderRow{ display:none !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .libRow{
    min-width:0 !important; display:grid !important; grid-template-columns:minmax(0,1fr) auto 34px !important;
    align-items:center !important; gap:8px !important; padding:6px 2px !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .rTitle{ grid-column:1 !important; display:flex !important; align-items:center !important; gap:10px !important; min-width:0 !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .rTitle .miniCover{ flex:0 0 44px !important; width:44px !important; height:44px !important; border-radius:10px !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .rTitle > div:last-child{ min-width:0 !important; flex:1 1 auto; }
  body.routeLibrary .collectionSelectedPlaylist .libList .tTitle,
  body.routeLibrary .collectionSelectedPlaylist .libList .tSub{ display:block !important; min-width:0; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .tTitle{ font-size:14px; font-weight:700; color:#eaf0ff; }
  body.routeLibrary .collectionSelectedPlaylist .libList .tSub{ font-size:12px; color:rgba(234,240,255,.66); margin-top:2px; }
  body.routeLibrary .collectionSelectedPlaylist .libList .rArtist,
  body.routeLibrary .collectionSelectedPlaylist .libList .rKind,
  body.routeLibrary .collectionSelectedPlaylist .libList .rBpm,
  body.routeLibrary .collectionSelectedPlaylist .libList .rRel{ display:none !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .rLen{ grid-column:2 !important; justify-self:end; font-size:12px; color:rgba(234,240,255,.6); }
  body.routeLibrary .collectionSelectedPlaylist .libList .rAct{ grid-column:3 !important; justify-self:end; display:flex !important; }
  body.routeLibrary .collectionSelectedPlaylist .libList .rAct .iconBare{ display:grid !important; place-items:center; width:32px; height:32px; border-radius:50%; border:1px solid rgba(255,255,255,.14); }
  body.routeLibrary .collectionSelectedPlaylist .libRow.dmTitelOffen .tTitle{ color:rgba(234,240,255,.55); font-style:italic; font-weight:600; }
  body.routeLibrary .collectionSelectedPlaylist .dmGpKnoepfe{ flex-wrap:wrap; }
}

/* 3) Vollbild-Player („Jetzt läuft“): Höhe nach dem sichtbaren Bereich (100dvh), damit die Safari-Leiste die
      SFX-Knöpfe nicht abschneidet; reicht der Platz nicht, lässt sich der Inhalt scrollen. Griff mit großer Tippfläche. */
#dmFokus{ height:100vh; height:100dvh; bottom:auto; overflow-y:auto; overscroll-behavior:contain;
  padding-bottom:calc(18px + env(safe-area-inset-bottom)) !important; }
#dmFokus .dmFkCover{ width:min(100%, 40vh); max-width:min(520px, 40vh); }
@supports (height:100dvh){ #dmFokus .dmFkCover{ width:min(100%, 40dvh); max-width:min(520px, 40dvh); } }
#dmFokus .dmFkPads{ margin-top:auto; flex:none; }
#dmFokus .dmFkBg{ position:fixed; }   /* unscharfer Hintergrund ragt 40 px über den Rand – sonst wäre das Fenster immer scrollbar */
#dmFokus .dmFkGrip{ position:absolute; left:50%; top:-6px; width:120px; height:44px; margin-left:-60px; padding:0; border:0; background:transparent; cursor:pointer; z-index:2; }
#dmFokus .dmFkGrip::before{ content:""; position:absolute; left:50%; top:10px; width:46px; height:5px; margin-left:-23px; border-radius:3px; background:rgba(255,255,255,.32); }
#dmFokus .dmFkHead{ padding-top:22px; }

/* 4) „＋ Zur Playlist“ am Handy als Blatt von unten statt kleinem Fenster an der Fingerstelle */
@media (max-width: 720px){
  #plPick{ left:10px !important; right:10px !important; top:auto !important; bottom:calc(10px + env(safe-area-inset-bottom)) !important;
    width:auto !important; max-height:70vh !important; max-height:70dvh !important; border-radius:18px !important; padding:16px !important; }
  #plPick .btn{ min-height:46px; }
  #plPick .dmPlZuletzt{ font-size:11px; opacity:.7; margin-left:auto; }
}

/* 5) Playlist-Fenster am Handy: Nummer, Cover, Titel (mit Interpret darunter) und Knöpfe in einer Zeile –
      vorher schoben Bibliotheks-Regeln die Spalten durcheinander, der Titel war nach ~8 Zeichen abgeschnitten. */
@media (max-width: 720px){
  #plModal #dmPlModalListe .libHeaderRow{ display:none !important; }
  #plModal #dmPlModalListe .libRow{ grid-template-columns:40px 48px minmax(0,1fr) auto !important; gap:8px !important; min-width:0 !important; align-items:center !important; }
  #plModal #dmPlModalListe .libRow > .rTitle:nth-child(1){ grid-column:1 !important; justify-content:center; }
  #plModal #dmPlModalListe .libRow > .rTitle:nth-child(2){ grid-column:2 !important; }
  #plModal #dmPlModalListe .libRow > .rTitle:nth-child(2) .miniCover{ width:44px !important; height:44px !important; }
  #plModal #dmPlModalListe .libRow > .rArtist{ grid-column:3 !important; display:block !important; min-width:0 !important; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:14px; }
  #plModal #dmPlModalListe .libRow > .rArtist .tSub{ overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12px; }
  #plModal #dmPlModalListe .libRow > .rKind{ display:none !important; }
  #plModal #dmPlModalListe .libRow > .rAct{ grid-column:4 !important; display:flex !important; gap:2px !important; }
  #plModal #dmPlModalListe .libRow > .rAct .iconBare{ width:36px; height:36px; display:grid !important; place-items:center; }
  #plModal #dmPlModalListe .libRow > .rAct .iconBare svg{ width:18px; height:18px; }
}
