
/* Danmi v48 — fit the entire songbook rounded frame inside the real viewport */

/* The route height supplied by JS is now the actual remaining viewport height. */
@media (min-width: 761px) {
  #routePage.route-songbook-mode:not([hidden]) {
    height: var(--songbook-route-height) !important;
    min-height: 0 !important;
    max-height: var(--songbook-route-height) !important;
    padding-bottom: 0 !important;
  }

  #routePage.route-songbook-mode .route-page-body {
    min-height: 0 !important;
    height: 100% !important;
    padding-bottom: 12px !important;
    overflow: hidden !important;
  }

  #routePage.route-songbook-mode .route-song-table {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    margin-bottom: 0 !important;
    padding: 7px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  #routePage.route-songbook-mode .route-song-list {
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    padding-bottom: 28px !important;
    scroll-padding-bottom: 28px !important;
  }

  #routePage.route-songbook-mode .route-song-row:last-child {
    margin-bottom: 6px !important;
  }
}

/* Keep a small guaranteed inset on shorter notebook/desktop viewports too. */
@media (min-width: 761px) and (max-height: 900px) {
  #routePage.route-songbook-mode .route-page-body {
    padding-bottom: 10px !important;
  }

  #routePage.route-songbook-mode .route-song-list {
    padding-bottom: 24px !important;
    scroll-padding-bottom: 24px !important;
  }
}
