/* AEIK streaming layout — same palette as styles.css, Spotify-like structure. Used with js/aeik-shell.js. */

body.stream {
  background: #070504;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
body.stream #aeik-account-bar { flex: 0 0 auto; }

.sx-app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 8px 96px; /* room for the player dock */
}

/* ─── Sidebar ─────────────────────────────────────────────────────────── */
.sx-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.sx-panel {
  background: var(--bg-elev);
  border-radius: var(--radius);
  border: 1px solid rgba(232, 196, 160, 0.06);
}
.sx-brand {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 1.1rem 1.25rem 0.4rem;
}
.sx-brand b { font-size: 1.35rem; letter-spacing: 0.22em; color: var(--text); }
.sx-brand span { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.sx-nav { display: flex; flex-direction: column; padding: 0.4rem 0.5rem 0.8rem; }
.sx-nav a {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 700; font-size: 0.95rem;
  transition: color .15s ease, background .15s ease;
}
.sx-nav a:hover { color: var(--text); }
.sx-nav a.is-on { color: var(--text); background: rgba(232, 196, 160, 0.06); }
.sx-nav svg { width: 22px; height: 22px; flex: 0 0 auto; }

.sx-lib { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.sx-lib__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem 0.5rem;
  color: var(--text-muted); font-weight: 700; font-size: 0.9rem;
}
.sx-lib__head small { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.sx-lib__list { overflow-y: auto; padding: 0.25rem 0.5rem 0.75rem; }
.sx-lib__label {
  padding: 0.9rem 0.75rem 0.35rem;
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim);
}
.sx-lib__item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
}
.sx-lib__item:hover { background: rgba(255, 255, 255, 0.04); }
.sx-lib__item.is-on { background: rgba(232, 196, 160, 0.08); }
.sx-lib__item b { display: block; font-size: 0.92rem; color: var(--text); font-weight: 600; }
.sx-lib__item span { display: block; font-size: 0.78rem; color: var(--text-dim); }

/* Round artist avatar, with a monogram fallback */
.sx-ava {
  position: relative;
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 999px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 25%, var(--brand-red-hi), var(--brand-red) 55%, #2a0a04);
  display: grid; place-items: center;
  color: var(--accent-hi); font-weight: 800; letter-spacing: 0.04em;
}
.sx-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ─── Main column ─────────────────────────────────────────────────────── */
.sx-app main.sx-main {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 0;
  overflow-y: auto;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid rgba(232, 196, 160, 0.06);
}
.sx-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: rgba(26, 18, 16, 0.72);
  backdrop-filter: blur(14px);
}
.sx-search {
  flex: 0 1 380px;
  display: flex; align-items: center; gap: 0.55rem;
  height: 44px; padding: 0 1rem;
  border-radius: 999px;
  background: var(--bg-hi);
  border: 1px solid transparent;
  color: var(--text-muted);
}
.sx-search:focus-within { border-color: var(--border-hi); color: var(--text); }
.sx-search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--text); font: inherit; font-size: 0.92rem;
}
.sx-top__grow { flex: 1; }
.sx-pill {
  display: inline-flex; align-items: center; height: 34px; padding: 0 0.95rem;
  border-radius: 999px; border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 700; color: var(--accent);
  white-space: nowrap;
}
.sx-pill--solid { background: var(--accent); color: #1a1010; border-color: var(--accent); }

.sx-view { padding: 0 1.5rem 2.5rem; }

/* Hero (home + artist) */
.sx-hero {
  position: relative;
  margin: 0 -1.5rem;
  padding: 3.25rem 1.5rem 1.6rem;
  background:
    linear-gradient(180deg, rgba(115, 23, 7, 0.75) 0%, rgba(26, 18, 16, 0) 100%);
  overflow: hidden;
}
.sx-hero__bg {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center 30%;
  filter: blur(42px) saturate(1.2);
  opacity: 0.45;
}
.sx-hero > *:not(.sx-hero__bg) { position: relative; }
.sx-hero__row { display: flex; align-items: flex-end; gap: 1.5rem; }
.sx-hero .sx-ava { width: 200px; height: 200px; font-size: 3.4rem; box-shadow: 0 18px 50px rgba(0,0,0,0.55); }
.sx-kicker {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-hi);
}
.sx-kicker svg { width: 16px; height: 16px; }
.sx-title {
  margin: 0.25rem 0 0.4rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.98; letter-spacing: -0.02em;
  color: #fff;
}
.sx-meta { color: var(--text-muted); font-size: 0.9rem; }
.sx-meta b { color: var(--text); }

.sx-actions { display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem 0 0.6rem; }
.sx-play {
  width: 56px; height: 56px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--accent); color: #1a1010;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  transition: transform .15s ease, background .15s ease;
}
.sx-play:hover { transform: scale(1.05); background: var(--accent-hi); }
.sx-play svg { width: 24px; height: 24px; margin-left: 3px; }
.sx-ghost {
  height: 34px; padding: 0 1rem; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--border-hi); color: var(--text);
  font: inherit; font-size: 0.82rem; font-weight: 700;
}
.sx-ghost:hover { border-color: var(--accent); }

/* Sections + shelves */
.sx-section { margin-top: 2rem; }
.sx-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.sx-section__head h2 { margin: 0; font-size: 1.45rem; color: var(--text); letter-spacing: -0.01em; }
.sx-section__head a { font-size: 0.8rem; font-weight: 700; color: var(--text-dim); }
.sx-section__head a:hover { color: var(--text); text-decoration: underline; }

.sx-shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 1fr);
  gap: 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}
.sx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.6rem;
}

.sx-card {
  position: relative;
  display: block;
  padding: 0.75rem;
  border-radius: var(--radius);
  scroll-snap-align: start;
  transition: background .2s ease;
}
.sx-card:hover { background: rgba(255, 255, 255, 0.05); }
.sx-card__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-hi);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}
.sx-card__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sx-card--artist .sx-card__art { border-radius: 999px; }
.sx-card--artist .sx-ava { width: 100%; height: 100%; font-size: 2.4rem; }
.sx-card b {
  display: block; margin-top: 0.65rem;
  font-size: 0.95rem; color: var(--text); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sx-card span {
  display: block; margin-top: 0.15rem;
  font-size: 0.8rem; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sx-card__fab {
  position: absolute; right: 8px; bottom: 8px;
  width: 46px; height: 46px; border-radius: 999px; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--accent); color: #1a1010;
  box-shadow: 0 8px 18px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.sx-card__fab svg { width: 20px; height: 20px; margin-left: 2px; }
.sx-card:hover .sx-card__fab, .sx-card:focus-within .sx-card__fab { opacity: 1; transform: none; }
.sx-badge {
  display: inline-block; margin-left: 0.35rem; padding: 0 0.4rem;
  border-radius: 4px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
  background: rgba(156, 232, 168, 0.14); color: var(--unlocked); vertical-align: middle;
}
.sx-soon {
  position: absolute; inset: auto 0 12%; text-align: center;
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-hi);
}

/* Quick-pick tiles (home, Spotify "recent" style) */
.sx-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.sx-quick a {
  display: flex; align-items: center; gap: 0.85rem;
  height: 64px; padding-right: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  font-weight: 700; font-size: 0.92rem; color: var(--text);
  transition: background .15s ease;
}
.sx-quick a:hover { background: rgba(255, 255, 255, 0.11); }
.sx-quick img, .sx-quick .sx-ava { width: 64px; height: 64px; border-radius: 0; flex: 0 0 auto; object-fit: cover; }
.sx-quick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Track table */
.sx-tracks { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sx-tracks th.sx-col-album { width: 32%; }
.sx-tracks th.sx-add { width: 2.75rem; }
.sx-tracks th {
  text-align: left; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border);
}
.sx-tracks td { padding: 0.4rem 0.75rem; font-size: 0.88rem; color: var(--text-muted); }
.sx-tracks tr.sx-row { cursor: pointer; }
.sx-tracks tr.sx-row:hover td { background: rgba(255, 255, 255, 0.05); }
.sx-tracks tr.sx-row td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.sx-tracks tr.sx-row td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.sx-num { width: 2.5rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.sx-row:hover .sx-num__n { display: none; }
.sx-num__p { display: none; color: var(--text); }
.sx-row:hover .sx-num__p { display: inline-block; }
.sx-num__p svg { width: 14px; height: 14px; }
.sx-tt { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.sx-tt img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: 0 0 auto; }
.sx-tt b { display: block; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-tt span { display: block; font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-tt div { min-width: 0; }
.sx-col-album a:hover { color: var(--text); text-decoration: underline; }
.sx-dur { width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.sx-add {
  width: 2.5rem; text-align: center;
}
.sx-add button {
  background: none; border: 0; cursor: pointer; color: var(--text-dim);
  font-size: 1.15rem; line-height: 1; padding: 0.25rem;
  opacity: 0;
}
.sx-row:hover .sx-add button, .sx-add button.is-in { opacity: 1; }
.sx-add button:hover { color: var(--text); }
.sx-add button.is-in { color: var(--unlocked); }

.sx-empty {
  margin: 2rem 0; padding: 2rem; text-align: center;
  border: 1px dashed var(--border-hi); border-radius: var(--radius);
  color: var(--text-muted);
}
.sx-empty b { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 0.3rem; }

.sx-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sx-chip {
  height: 32px; padding: 0 0.9rem; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.07); border: 0; color: var(--text);
  font: inherit; font-size: 0.82rem; font-weight: 600;
}
.sx-chip.is-on { background: var(--accent); color: #1a1010; }

.sx-foot { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.78rem; }
.sx-foot a { color: var(--text-muted); }

/* Mobile tab bar */
.sx-tabs { display: none; }

@media (max-width: 900px) {
  body.stream { display: block; height: auto; }
  .sx-app { grid-template-columns: minmax(0, 1fr); padding: 0 0 132px; min-height: 100dvh; }
  .sx-side { display: none; }
  .sx-app main.sx-main { overflow: visible; border-radius: 0; border: 0; }
  .sx-top { padding: 0.7rem 1rem; }
  .sx-top .sx-pill:not(.sx-pill--solid) { display: none; }
  .sx-view { padding: 0 1rem 2rem; }
  .sx-hero { margin: 0 -1rem; padding: 2rem 1rem 1.2rem; }
  .sx-hero__row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .sx-hero .sx-ava { width: 148px; height: 148px; font-size: 2.6rem; }
  .sx-shelf { grid-auto-columns: 42%; }
  .sx-quick { grid-template-columns: 1fr 1fr; }
  .sx-quick a { height: 56px; font-size: 0.8rem; }
  .sx-quick img, .sx-quick .sx-ava { width: 56px; height: 56px; }
  .sx-col-album, .sx-tracks th.sx-col-album { display: none; }
  .sx-add button { opacity: 1; }
  .sx-tabs {
    display: flex; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(7,5,4,0.85), #070504 40%);
  }
  .sx-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.66rem; color: var(--text-dim); font-weight: 600; }
  .sx-tabs a.is-on { color: var(--text); }
  .sx-tabs svg { width: 22px; height: 22px; }
  body.stream #aeik-dock { bottom: 58px !important; }
}

/* Old page chrome inside the shell */
body.stream > .site-header { display: none; }
body.stream .sx-view > main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 0 3rem; }
body.stream .sx-view > .site-footer { margin: 0 auto 1rem; max-width: 1200px; }
.sx-lib__head a:hover { color: var(--text); }
.sx-search { margin: 0; }
@media (max-width: 900px) {
  body.stream .sx-view > main { padding: 1rem 0 2rem; }
}
.eyebrow-link { color: inherit; border-bottom: 1px solid transparent; }
.eyebrow-link:hover { border-bottom-color: currentColor; }
