/* ============================================================================
   site-chrome.css — the site-wide strip: back / forward, the way around the
   site, and whatever is playing. Loaded on every page; no page-specific rules.
   ========================================================================== */

html.sc-on { --sc-h: 46px; }

/* --sc-extra is the room a page's own player adds to the strip (radio.html moves its controls
   in and lets them wrap on a phone). Every other page leaves it unset, so nothing moves. */
html.sc-on body {
  padding-bottom: calc(var(--barh, 0px) + var(--sc-h) + var(--sc-extra, 0px)) !important;
}

.sc-bar {
  position: fixed; left: 0; right: 0; bottom: var(--barh, 0px); z-index: 70;
  display: flex; align-items: center; gap: 10px;
  min-height: var(--sc-h); padding: 0 10px 0 10px;
  padding-left: calc(10px + env(safe-area-inset-left, 0px));
  padding-right: calc(10px + env(safe-area-inset-right, 0px));
  background: rgba(12, 13, 16, .94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, .13);
  font: 400 11px/1.2 "Plex Mono", ui-monospace, monospace;
  letter-spacing: .06em; color: #EDEBE5;
  text-transform: none;
  transition: transform .2s ease;
}

/* ---- out of the way, on purpose or on a scroll down ---- */
.sc-bar[data-hid="1"] { transform: translateY(calc(100% + 2px)); }
/* the tab that brings it back: the physical handle, always on screen when the bar is gone */
.sc-hdl {
  position: fixed; left: 50%; bottom: 0; z-index: 72;
  width: 68px; height: 20px; margin-left: -34px;
  display: none; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255, 255, 255, .13); border-bottom: 0;
  border-radius: 7px 7px 0 0; background: rgba(12, 13, 16, .94);
  color: #B9B7AE; cursor: pointer;
  font: 400 11px/1 monospace;
}
.sc-hdl:hover { color: #fff; background: #1b1d22; }
.sc-hdl:focus-visible { outline: 2px solid #FFB454; outline-offset: 2px; }
.sc-hdl[data-show="1"] { display: flex; }
html.sc-on.sc-hid body { padding-bottom: calc(var(--barh, 0px) + 20px) !important; }   /* the handle's own room */

.sc-group { display: flex; align-items: center; gap: 2px; }

.sc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 3px;
  background: transparent; color: #B9B7AE; cursor: pointer;
  font: inherit; font-size: 12px; line-height: 1;
  transition: background .12s, color .12s, border-color .12s;
}
.sc-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sc-btn:active { background: rgba(255, 255, 255, .14); }
.sc-btn[disabled] { opacity: .32; cursor: default; background: none; color: #B9B7AE; }
.sc-btn:focus-visible { outline: 2px solid #FFB454; outline-offset: 2px; }

/* ---- home: one click back to the front door, on every page ---- */
a.sc-home { gap: 6px; padding: 0 9px; text-decoration: none; color: #EDEBE5; }
a.sc-home:hover { color: #fff; }
a.sc-home svg { display: block; flex: 0 0 auto; }
.sc-home-t { font-size: 10px; letter-spacing: .16em; }
a.sc-home[aria-current="page"] { color: #FFB454; }

.sc-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .13); margin: 0 4px; }

/* ---- what is playing ---- */
.sc-now {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0; padding-left: 2px;
}
.sc-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: #55575E;
}
.sc-bar[data-playing="1"] .sc-dot {
  background: #FFB454; box-shadow: 0 0 0 3px rgba(255, 180, 84, .16), 0 0 10px rgba(255, 180, 84, .5);
}
.sc-title {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; letter-spacing: .04em; color: #EDEBE5;
}
.sc-title b { font-weight: 500; }
.sc-kind {
  flex: 0 0 auto; font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: #85858B;
}
.sc-bar[data-playing="1"] .sc-kind { color: #FFB454; }

/* ---- the way around the site ---- */
.sc-menu {
  position: fixed; right: 10px; bottom: calc(var(--barh, 0px) + var(--sc-h) + 8px);
  z-index: 71; width: min(300px, calc(100vw - 20px));
  padding: 6px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 4px;
  background: #14161B; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  display: none;
}
.sc-menu[data-open="1"] { display: block; }
.sc-menu a {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 10px; min-height: 36px;
  color: #D8D6CE; text-decoration: none; border-radius: 2px;
  font: 400 11.5px/1.3 "Plex Mono", ui-monospace, monospace; letter-spacing: .05em;
}
.sc-menu a:hover, .sc-menu a:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; }
.sc-menu a span { color: #7C7F87; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; margin-left: auto; }
.sc-menu .sc-h { padding: 7px 10px 9px; color: #7C7F87; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }

@media (max-width: 640px) {
  html.sc-on { --sc-h: 48px; }
  .sc-bar { gap: 6px; }                  /* HOME costs a slot: the separators and the wide gaps go */
  .sc-sep { display: none; }
  .sc-home-t { display: none; }          /* the glyph carries it on a phone */
  a.sc-home { padding: 0 10px; }
  .sc-title { font-size: 11px; }
  .sc-kind { display: none; }
  .sc-btn { min-width: 34px; height: 34px; }
  .sc-now { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-btn { transition: none; }
  .sc-bar { transition: none; }
}

/* ---- the theme menu: eleven positions, same control on every page ---- */
.sc-theme-btn { gap: 7px; padding: 0 9px; }
.sc-theme-btn .sc-sw { width: 13px; height: 13px; border-radius: 50%; display: block;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75), 0 0 0 1px rgba(0,0,0,.55); }
.sc-theme-name { font-size: 9.5px; line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  color: #B9B7AE; }
.sc-theme-btn:hover .sc-theme-name,
.sc-theme-btn[aria-expanded="true"] .sc-theme-name { color: #fff; }
@media (max-width: 900px) {
  .sc-theme-name { display: none; }     /* the swatch carries it; the phone strip keeps its budget */
  .sc-theme-btn { padding: 0 8px; }
}
.sc-themes {
  position: fixed; right: 10px; bottom: calc(var(--barh, 0px) + var(--sc-h) + 8px); z-index: 71;
  width: min(320px, calc(100vw - 20px)); padding: 6px; display: none;
  grid-template-columns: 1fr 1fr; gap: 2px;
  background: #14161B; border: 1px solid rgba(255,255,255,.16); border-radius: 4px;
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.sc-themes[data-open="1"] { display: grid; }
.sc-themes button {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px;
  border: 1px solid transparent; background: none; color: #D8D6CE; cursor: pointer;
  font: 400 11px/1 "Plex Mono", ui-monospace, monospace; letter-spacing: .06em; text-align: left;
}
.sc-themes button:hover { background: rgba(255,255,255,.07); color: #fff; }
.sc-themes button[aria-pressed="true"] { border-color: #FFB454; color: #fff; }
.sc-themes .sc-sw { width: 11px; height: 11px; border-radius: 50%; display: block;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6), 0 0 0 1px rgba(0,0,0,.55); }
