/* Guardrails for the second Books mobile pass. */

@media (max-width: 900px) {
  /* The World instruction is removed in JS; keep its legend visible when the
     legend becomes the footer's first remaining child. */
  .books-map-footer > .books-map-legend:first-child {
    display: flex !important;
  }

  /* The heatmap-adjacent zoom control is meaningful only in Reading Journey. */
  #books-timeline-view:not(:has([data-timeline-mode="reading"][aria-pressed="true"])) .books-timeline-zoom-proxy {
    display: none !important;
  }
}

@media (min-width: 901px) {
  /* Year/Month controls belong to the Full Reading Log they drill into, not to
     the mode switch above it. Keep the original control as the state source but
     show its desktop mirror directly below the stable heatmap block. */
  #books-timeline-view .books-timeline-controls > .books-timeline-zoom {
    display: none !important;
  }

  .books-timeline-desktop-zoom-proxy {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    margin: 10px 0 16px;
  }
}
