/* sh-history: StreemOS "Recently played" widget. Flat, two fixed rows, no scrolling. No dependencies.
   Theme it with the 4 variables below (or call setTheme). */
.sh-history{
  --sh-bg:#1a1b1e; --sh-text:#ffffff; --sh-accent:#ff7700; --sh-radius:20px;
  container-type:inline-size; box-sizing:border-box; width:100%; overflow:hidden;
  border-radius:var(--sh-radius); background:var(--sh-bg); color:var(--sh-text);
  border:1px solid color-mix(in srgb,var(--sh-text) 13%,transparent);
  font-family:"Poppins",system-ui,-apple-system,"Segoe UI",sans-serif;
  padding:24px 24px 16px;
}
.sh-history *{box-sizing:border-box}
.sh-history svg{width:34%;height:34%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sh-history [hidden]{display:none!important}
.sh-head{font-size:14px;font-weight:600;letter-spacing:.02em;margin:0 0 20px;opacity:.9}
/* GRID: always two rows, all 14 tracks, full width (no max-width).
   700px and up: 7 across, nothing scrolls. Below that: the same two rows swipe sideways (no scrollbar). */
.sh-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:24px 14px;margin:0;padding:0;list-style:none}
@container (max-width:699px){
  .sh-grid{grid-template-columns:none;grid-template-rows:auto auto;grid-auto-flow:column;grid-auto-columns:22%;gap:20px 14px;
    overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;overscroll-behavior-x:contain}
  .sh-grid::-webkit-scrollbar{display:none}
  .sh-item{scroll-snap-align:start}
}
@container (max-width:479px){.sh-grid{grid-auto-columns:38%;gap:18px 12px}}
.sh-item{min-width:0;margin:0}
.sh-art{position:relative;aspect-ratio:1/1;width:100%;overflow:hidden;border-radius:calc(var(--sh-radius)*.45);background:color-mix(in srgb,var(--sh-text) 10%,transparent)}
.sh-art-img{width:100%;height:100%;object-fit:cover;display:block}
.sh-art-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--sh-accent);color:var(--sh-accent-contrast,#fff)}
/* NOW marker on the track that is playing right now */
.sh-now{position:absolute;left:6px;top:6px;padding:2px 7px;border-radius:999px;font-size:9px;font-weight:600;letter-spacing:.08em;background:var(--sh-accent);color:var(--sh-accent-contrast,#fff)}
.sh-title{font-size:13px;font-weight:500;line-height:1.3;margin:10px 0 0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.sh-artist{font-size:12px;font-weight:400;line-height:1.3;opacity:.65;margin:3px 0 0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
@container (min-width:1000px){.sh-title{font-size:14px}.sh-artist{font-size:13px}}
.sh-empty{font-size:13px;opacity:.6;text-align:center;margin:0;padding:28px 0}
.sh-powered{display:flex;justify-content:center;margin-top:14px}
.sh-powered a{display:inline-flex;align-items:center;gap:6px;font-size:10px;color:inherit;opacity:.5;text-decoration:none}
.sh-powered img{height:12px;width:auto;display:block}
.sh-item[data-clickable]{cursor:pointer}
