/* Preview: the Archives as the iOS Files app (phones only) */
.ios {
  --ios-bg: #fbf7ec; --ios-cell: #fff; --ios-ink: #000; --ios-2: #8e8e93; --ios-3: #c7c7cc; --ios-sep: rgba(90, 70, 40, .16); --ios-blue: #007aff;
  position: fixed; inset: 0; z-index: 50; background: var(--ios-bg); color: var(--ios-ink); overflow: hidden;
  font: 15px/1.3 -apple-system, "SF Pro Text", "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.ios.opening { animation: iosIn .42s var(--ease) both; }
.ios.closing { animation: iosIn .3s var(--ease) reverse both; }
@keyframes iosIn { from { opacity: 0; transform: scale(.92); border-radius: 40px; } }
.ios button { font: inherit; }

/* screen stack with iOS push and pop */
.ios-stack { position: absolute; inset: 0; }
.ios-screen {
  position: absolute; inset: 0; background: var(--ios-bg); display: flex; flex-direction: column;
  transition: transform .38s cubic-bezier(.32, .72, 0, 1), filter .38s;
  box-shadow: -8px 0 24px -16px rgba(0, 0, 0, .35);
}
.ios-screen.enter, .ios-screen.leave { transform: translateX(100%); }
.ios-screen.behind { transform: translateX(-28%); filter: brightness(.92); }

/* nav bar: back on the left, small title fades in once the large title scrolls away */
.ios-nav {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  height: calc(44px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0;
  background: rgba(251, 247, 236, .86); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 .5px 0 transparent; transition: box-shadow .2s;
}
.scrolled .ios-nav { box-shadow: 0 .5px 0 var(--ios-sep); }
.ios-navtitle { font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.scrolled .ios-navtitle { opacity: 1; }
.ios-back, .ios-done { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 8px; border: 0; background: none; color: var(--ios-blue); font-size: 15px; }
.ios-back { justify-self: start; max-width: 40vw; }
.ios-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-back svg { flex: 0 0 auto; width: 12px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ios-done { justify-self: end; font-weight: 600; }

.ios-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.ios-large { margin: 2px 0 8px; font: 700 26px/1.15 -apple-system, "SF Pro Display", "Inter Tight", system-ui, sans-serif; letter-spacing: .01em; }
.ios-sub { margin: -4px 0 14px; font-size: 13px; color: var(--ios-2); }
.ios-section { margin: 20px 4px 10px; font-size: 11px; font-weight: 600; color: var(--ios-2); text-transform: uppercase; letter-spacing: .02em; }

/* search field */
.ios-search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; background: rgba(120, 95, 50, .09); }
.ios-search svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: var(--ios-2); stroke-width: 2; stroke-linecap: round; }
.ios-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; color: var(--ios-ink); }
.ios-search input::placeholder { color: var(--ios-2); }
.ios-body.searching .ios-section, .ios-body.searching .ios-grid { display: none; }
.ios-results .ios-list { margin-top: 14px; }
.ios-empty { margin: 24px 4px; color: var(--ios-2); font-size: 13px; }

/* icon grid: folders and covers, like Files' icon view */
.ios-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; }
.ios-cell { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 0; border: 0; background: none; text-align: center; }
.ios-cell b { max-width: 100%; font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ios-cell small { margin-top: -3px; font-size: 11px; color: var(--ios-2); }
.ios-cell:active { opacity: .55; }
.ios-folder { position: relative; display: block; width: 72px; height: 57px; margin-bottom: 2px; background: url("icons/folder.svg") center / contain no-repeat; filter: drop-shadow(0 4px 8px rgba(60, 40, 10, .14)); }
.ios-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; }
.ios-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 6px 14px -8px rgba(0, 0, 0, .4); }
.ios-pk { position: absolute; right: -5px; top: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ios-blue); color: #fff; font: 600 12px/22px -apple-system, system-ui, sans-serif; font-style: normal; box-shadow: 0 0 0 2px var(--ios-bg); }

/* inset grouped list for songs */
.ios-hero { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.ios-hero img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45); }
.ios-hero b { display: block; font-size: 13px; font-weight: 600; }
.ios-hero span { display: block; margin-top: 2px; font-size: 13px; color: var(--ios-2); }
.ios-list { list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--ios-cell); }
.ios-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 11px; min-height: 54px; padding: 7px 4px 7px 12px; }
.ios-row + .ios-row::before { content: ""; position: absolute; top: 0; left: 63px; right: 0; height: .5px; background: var(--ios-sep); }
.ios-art { position: relative; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: #eee; }
.ios-art img { width: 100%; height: 100%; object-fit: cover; }
.ios-art i { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .22); }
.ios-art i::before { content: ""; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.ios-art.playing i { background: rgba(0, 0, 0, .4); }
.ios-art.playing i::before { border: 0; width: 9px; height: 11px; margin: 0; background: linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65%); }
.ios-t { min-width: 0; }
.ios-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 400; line-height: 1.25; }
.ios-t span { display: block; margin-top: 1px; font-size: 12px; color: var(--ios-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-row.on .ios-t b { font-weight: 600; }
.ios-add { justify-self: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--ios-blue); }
.ios-add svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ios-row.on .ios-add svg circle { fill: var(--ios-blue); stroke: var(--ios-blue); }
.ios-row.on .ios-add svg path { stroke: #fff; stroke-width: 2.2; }
.ios-add.full { color: var(--ios-3); }
.ios-add:active { transform: scale(.9); }

/* tab bar */
.ios-tabs {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: rgba(251, 247, 236, .9);
  backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 -.5px 0 var(--ios-sep);
}
.ios-tab { position: relative; display: grid; justify-items: center; gap: 2px; padding: 4px 0; border: 0; background: none; color: var(--ios-2); }
.ios-tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ios-tab[data-tab="browse"] svg { fill: currentColor; stroke: none; }
.ios-tab svg circle { fill: currentColor; stroke: none; }
.ios-tab span { font-size: 10px; font-weight: 500; }
.ios-tab[aria-current="true"] { color: var(--ios-blue); }
.ios-badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font: 600 11px/18px -apple-system, system-ui, sans-serif; font-style: normal; }

/* the My Setlist tab sits over the browse stack */
.ios-setscreen { z-index: 3; transform: translateX(0); opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: none; }
.ios.on-set .ios-setscreen { opacity: 1; pointer-events: auto; }
.ios-setscreen .setview { padding: 0; background: none; display: block; }
.ios-setscreen .side { position: static !important; transform: none !important; max-height: none !important; padding: 0 !important; background: none !important; box-shadow: none !important; overflow: visible !important; }
.ios-setscreen .fl-head { display: none; }
.ios-setscreen .t-list { border-radius: 12px; overflow: hidden; background: #fff; font: 15px/1.25 -apple-system, "SF Pro Text", system-ui, sans-serif !important; }
.ios-setscreen .line { grid-template-columns: 28px minmax(0, 1fr) 36px !important; min-height: 50px !important; padding: 0 6px 0 14px !important; background: #fff !important; position: relative; }
.ios-setscreen .line:nth-child(even) { background: #fff !important; }
.ios-setscreen .line + .line::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: .5px; background: var(--ios-sep); }
.ios-setscreen .line .n { color: var(--ios-2); font-size: 13px; }
.ios-setscreen .line.filled .n::after { display: none; }
.ios-setscreen .line .t img { width: 32px !important; height: 32px !important; border-radius: 6px !important; }
.ios-setscreen .c-alb, .ios-setscreen .c-yr { display: none !important; }
.ios-setscreen .line .ph { color: var(--ios-3); }
.ios-setscreen .line .rm { width: 32px; height: 32px; font-size: 20px; color: var(--ios-3); }
.ios-setscreen .status { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); margin-top: 16px; padding: 0; border: 0; background: none; display: block; }
.ios-setscreen .st-txt { display: none; }
.ios-setscreen .st-btns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
.ios-setscreen .st-btns .send { grid-column: 1 / -1; order: -1; }
.ios-setscreen .mbtn, .ios-setscreen .send.mbtn, .ios-setscreen .send.mbtn[disabled] {
  height: 44px !important; border-radius: 12px !important; font: 600 15px/1 -apple-system, system-ui, sans-serif !important; box-shadow: none !important;
  background: #fff !important; color: var(--ios-blue) !important; width: 100% !important;
}
.ios-setscreen .send.mbtn { background: var(--ios-blue) !important; color: #fff !important; }
.ios-setscreen .send.mbtn[disabled] { background: #e5e5ea !important; color: #aeaeb2 !important; }

@media (min-width: 701px) { .ios { display: none !important; } }
/* the set's buttons sit under the list, on the page background */
.ios-setscreen .status { position: static !important; margin-top: 18px !important; }
.ios-setscreen .st-btns .mbtn { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06) !important; }

/* tighter type on the tracklists and the setlist */
.ios-row { min-height: 48px; padding: 6px 4px 6px 12px; grid-template-columns: 36px minmax(0, 1fr) 38px; gap: 10px; }
.ios-row + .ios-row::before { left: 58px; }
.ios-art { width: 36px; height: 36px; border-radius: 6px; }
.ios-t b { font-size: 14px; line-height: 1.22; }
.ios-row.on .ios-t b { font-weight: 600; }
.ios-t span { font-size: 11.5px; }
.ios-add svg { width: 21px; height: 21px; }
.ios-hero b, .ios-hero span { font-size: 12.5px; }
.ios-setscreen .t-list { font-size: 13.5px !important; }
.ios-setscreen .line { min-height: 44px !important; grid-template-columns: 24px minmax(0, 1fr) 32px !important; padding: 0 4px 0 12px !important; }
.ios-setscreen .line + .line::before { left: 44px; }
.ios-setscreen .line .n { font-size: 11.5px; }
.ios-setscreen .line .t { gap: 9px !important; }
.ios-setscreen .line .t img { width: 28px !important; height: 28px !important; border-radius: 5px !important; }
.ios-setscreen .line .rm { width: 28px; height: 28px; font-size: 17px; }
.ios-setscreen .mbtn, .ios-setscreen .send.mbtn, .ios-setscreen .send.mbtn[disabled] { height: 42px !important; font-size: 14px !important; }
.ios-setscreen .ios-sub { font-size: 12px; }
.ios-add { width: 36px; height: 36px; }

/* ---------- release dates, About and song notes ---------- */
.ios-about { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--ios-cell); font-size: 14px; line-height: 1.4; }
.ios-about-h { margin: 0 0 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--ios-2); }
.ios-about-b p { margin: 0 0 6px; }
/* one line until "More" */
.ios-about:not(.open) .ios-about-b { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ios-about:not(.open) .ios-about-b p { display: inline; margin: 0; }
.ios-about:not(.open) .ios-about-b p + p::before { content: " "; }
.ios-about:not(.open) .nt-src, .ios-about:not(.open) .nt-tag { display: none !important; }
.ios-about.open .ios-more { display: none; }
.ios-more { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ios-blue); font-size: 14px; }
.nt-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #fff2d6; color: #8a5a00; font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.nt-src { font-size: 12px; color: var(--ios-2); }
.nt-src a { color: var(--ios-blue); text-decoration: none; }
/* the small blue (i) */
.ios-row.has-i { grid-template-columns: 40px minmax(0, 1fr) 18px 40px; }
.ios .ios-i { display: grid; place-items: center; width: 16px; height: 16px; padding: 0 0 0 1px; border: 1.1px solid var(--ios-blue); border-radius: 50%; background: none; color: var(--ios-blue); font: italic 600 10.5px/1 Georgia, "Times New Roman", serif; }
.ios-i:active { background: rgba(0, 122, 255, .12); }
/* the sheet */
.ios-sheetwrap { position: absolute; inset: 0; z-index: 20; }
.ios-sheetwrap[hidden] { display: none; }
.ios-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .28s; }
.ios-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; overflow-y: auto; padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: var(--ios-bg);
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .35); transform: translateY(100%); transition: transform .32s cubic-bezier(.32, .72, 0, 1); }
.ios-sheetwrap.up .ios-scrim { opacity: 1; }
.ios-sheetwrap.up .ios-sheet { transform: none; }
.ios-sheet .grab { display: block; width: 36px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: #cfc8b8; }
.sh-head { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.sh-head img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.sh-head b { display: block; font-size: 18px; } .sh-head span { font-size: 13px; color: var(--ios-2); }
.sh-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(120, 95, 50, .12); color: #6e6a60; font-size: 20px; line-height: 1; }
.sh-facts { list-style: none; margin: 0 0 16px; padding: 0 14px; border-radius: 12px; background: var(--ios-cell); }
.sh-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 14px; }
.sh-facts li + li { border-top: .5px solid var(--ios-sep); }
.sh-facts span { color: var(--ios-2); } .sh-facts b { font-weight: 500; text-align: right; }
.sh-notes { padding: 12px 14px; border-radius: 12px; background: var(--ios-cell); font-size: 14px; line-height: 1.45; }
.sh-notes p { margin: 0 0 8px; }
.sh-add { width: 100%; height: 48px; margin-top: 16px; border: 0; border-radius: 12px; background: var(--ios-blue); color: #fff; font-size: 16px; font-weight: 600; }
.sh-add.on { background: var(--ios-cell); color: var(--ios-blue); box-shadow: 0 0 0 .5px var(--ios-sep); }
