/* Slice Time host chrome — warm sand frost overlays above water canvas. No dark fill. */
@font-face {
  font-family: Outfit;
  src: url("../assets/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

#chrome {
  position: fixed;
  z-index: 20;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  width: min(280px, 32vw);
  max-width: min(280px, calc(100vw - 24px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 18px;
  /* TT / store warm sand frost — light glass, no purple dark fill */
  background: rgba(255, 255, 255, 0.28);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 248, 235, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  color: #fff;
  font-family: Outfit, system-ui, sans-serif;
  pointer-events: auto;
  overflow: hidden;
}

#chrome .brand {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
}

#chrome .brand__logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

#chrome .brand__star {
  display: none !important;
}

#radio {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
  color: #fff;
  --lmp-fg: #fff;
  --lmp-muted: rgba(255, 255, 255, 0.34);
  --lmp-eq: #c8f4ff;
  --lmp-gain-fill: #fff;
  --lmp-title-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 0 6px rgba(0, 0, 0, 0.35);
}

#radio.lmp,
#radio.glass-panel {
  background: transparent !important;
}

#radio .lmp-title {
  text-shadow: var(--lmp-title-shadow);
  font: 650 13px/1.2 Outfit, system-ui, sans-serif;
}

#radio .lmp-art {
  border-radius: 12px;
}

#radio .lmp-btn {
  color: #fff;
}

#radio .lmp-gain,
#radio input.lmp-gain[type="range"] {
  height: 22px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

#radio .lmp-gain::-webkit-slider-runnable-track {
  height: 11px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.55) var(--lmp-gain-pct, var(--vol-pct, 80%)),
    rgba(8, 30, 40, 0.28) var(--lmp-gain-pct, var(--vol-pct, 80%))
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

#radio .lmp-gain::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
}

#radio .lmp-gain::-moz-range-thumb {
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
}

@media (width <= 900px) {
  #chrome {
    width: min(100%, calc(100vw - 20px));
    max-width: min(100%, calc(100vw - 20px));
    max-height: none;
    padding: 8px 10px;
    gap: 8px;
    border-radius: 14px;
  }

  #chrome .brand__logo {
    height: 30px;
    max-width: min(260px, 78vw);
  }

  #radio,
  #radio.lmp,
  #radio.glass-panel {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: 28px 36px;
    grid-template-areas:
      "art title"
      "controls controls";
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    --lmp-title-shadow: 0 1px 1px #000, 0 0 2px rgba(0, 0, 0, 0.85);
  }

  #radio .lmp-art {
    grid-area: art;
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 9px;
    z-index: 1;
  }

  #radio .lmp-title {
    grid-area: title;
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-align: left;
    font: 650 12px/1 Outfit, system-ui, sans-serif;
    min-width: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-text-stroke: 0.85px #000;
    paint-order: stroke fill;
  }

  #radio .lmp-eq {
    grid-area: title;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 50%;
    transform: translateY(-50%);
    width: 100% !important;
    max-width: none !important;
    height: 22px !important;
    max-height: 22px !important;
    z-index: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
  }

  #radio .lmp-seek,
  #radio .lmp-times,
  #radio .lmp-vol-row,
  #radio .lmp-gain,
  #radio input.lmp-gain[type="range"] {
    display: none !important;
  }

  #radio .lmp-controls {
    grid-area: controls;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 36px;
    gap: 0;
    z-index: 1;
  }

  #radio .lmp-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 36px;
  }
}
