/* The listener site's phone version (phones and tablets: html[data-platform="phone"]), on top of
   base.css. Like a listening app: a one-row app bar that slides away while reading and comes back on
   the way up, the sections as a tab bar along the bottom (site-phone.js), the mini player above it,
   room for the notch and the home bar, no website leftovers (footer, hover effects, ‹ › arrows: a
   finger swipes), presses that answer the finger, and no zoom when a field is tapped. */

html[data-platform="phone"] {
  /* Only the page scrolls, never the whole app sideways. */
  overflow-x: hidden;
}
/* No website footer in an app: the tab bar is the way around. */
html[data-platform="phone"] body.has-tabs footer.site { display: none; }
/* Hover effects stick after a tap on touch screens: none here. */
html[data-platform="phone"] body.site .prog:hover { transform: none; box-shadow: none; }
html[data-platform="phone"] body.site .songs li:hover { background: none; }
html[data-platform="phone"] body.site .play:hover { transform: none; }
/* Strips of cards scroll with a swipe: no ‹ › buttons. */
html[data-platform="phone"] .rail-nav { display: none !important; }
/* Pictures and buttons: no long-press callout or drag, no selecting the controls' words. */
html[data-platform="phone"] body.site img { -webkit-touch-callout: none; -webkit-user-drag: none; }
html[data-platform="phone"] body.site .btn, html[data-platform="phone"] body.site button,
html[data-platform="phone"] body.site .hr-tabs, html[data-platform="phone"] body.site .top { -webkit-user-select: none; user-select: none; }
/* Presses answer the finger: a short squeeze. */
html[data-platform="phone"] body.site .btn:active, html[data-platform="phone"] body.site button:active,
html[data-platform="phone"] body.site .prog:active, html[data-platform="phone"] body.site .pod:active,
html[data-platform="phone"] body.site a.way:active { transform: scale(.97); transition: transform .08s; }
/* iPhone zooms into fields under 16 px: never. */
html[data-platform="phone"] body.site input, html[data-platform="phone"] body.site textarea, html[data-platform="phone"] body.site select { font-size: 16px; }
/* Installed as an app: no bounce of the whole page, no long-press callouts on links. */
@media (display-mode: standalone) {
  html[data-platform="phone"], html[data-platform="phone"] body.site { overscroll-behavior-y: none; }
  html[data-platform="phone"] body.site a { -webkit-touch-callout: none; }
}

/* The app bar and the tab bar: phones (a tablet held wide keeps the top menu). */
@media (max-width: 760px) {
  /* App bar: brand on the left; Install and the theme as small round buttons on the right. */
  html[data-platform="phone"] body.has-tabs .top { transition: transform .22s ease; will-change: transform; }
  html[data-platform="phone"] body.has-tabs.hr-top-away .top { transform: translateY(calc(-100% - env(safe-area-inset-top, 0px))); }
  html[data-platform="phone"] body.has-tabs .top .wrap { flex-wrap: nowrap; gap: 8px; padding-block: 6px; }
  html[data-platform="phone"] body.has-tabs nav.main { display: none; }
  html[data-platform="phone"] body.has-tabs .brand { min-height: 44px; white-space: nowrap; min-width: 0; }
  html[data-platform="phone"] body.has-tabs .brand b { font-size: 1.2rem; }
  /* Narrow phones with Install showing: the name alone (the Punjabi name comes back without it). */
  @media (max-width: 430px) { html[data-platform="phone"] body.has-tabs .top:has(.install-btn:not([hidden])) .brand span { display: none; } }
  html[data-platform="phone"] body.has-tabs .install-btn { margin-left: auto; padding: 6px 12px; min-height: 36px; }
  html[data-platform="phone"] body.has-tabs .theme-btn { margin-left: auto; width: 40px; height: 40px; min-height: 40px; min-width: 40px; padding: 0; overflow: hidden; color: transparent; position: relative; border-radius: 50%; }
  html[data-platform="phone"] body.has-tabs .install-btn:not([hidden]) + .theme-btn { margin-left: 0; }
  html[data-platform="phone"] body.has-tabs .theme-btn::before { content: '◐'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); font-size: 1.1rem; }
  html[data-platform="phone"] body.has-tabs .phulkari { height: 6px; }
  /* The tab bar. */
  html[data-platform="phone"] .hr-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  html[data-platform="phone"] .hr-tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 52px; border-radius: 12px; text-decoration: none; color: var(--muted); font: 600 .7rem/1.1 var(--font-body); }
  html[data-platform="phone"] .hr-tabs svg { width: 24px; height: 24px; fill: currentColor; }
  html[data-platform="phone"] .hr-tabs a[aria-current="page"] { color: var(--red); }
  /* The chosen tab: a soft pill behind its icon, as phone apps mark it. */
  html[data-platform="phone"] .hr-tabs a svg { padding: 2px 14px; box-sizing: content-box; border-radius: 999px; transition: background .2s; }
  html[data-platform="phone"] .hr-tabs a[aria-current="page"] svg { background: var(--wash); }
  html[data-platform="phone"] .hr-tabs a:active { transform: scale(.94); }
  /* Room for it: the page's end, the mini player above it, focus never under it. */
  html[data-platform="phone"] body.has-tabs { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  html[data-platform="phone"] body.has-tabs .hr-mini { bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important; }
  html[data-platform="phone"]:has(body.has-tabs) { scroll-padding-bottom: 160px; scroll-padding-top: 16px; }
  html[data-platform="phone"] body.has-tabs.hr-playing main { padding-bottom: 72px; }
  /* Section headings a little smaller: a phone screen, not a page. */
  html[data-platform="phone"] .block-head h2 { font-size: 1.6rem; }
}
