/* ClearLoop V15.5.2: quiet, source-audited soundscape library. */
body.soundscape-open { overflow: hidden; }
.soundscape-layer[hidden],
.soundscape-layer:not([open]) { display: none; }
.soundscape-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #302d43;
  overflow: hidden;
}
.soundscape-layer::backdrop { background: transparent; }
.soundscape-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(29, 25, 48, 0.52);
  backdrop-filter: blur(6px);
}
.soundscape-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 560px);
  max-height: min(90dvh, 790px);
  margin: 0 auto;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(95, 82, 134, 0.13);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(120% 58% at 78% 0%, rgba(227, 222, 246, 0.68), transparent 62%),
    linear-gradient(180deg, #faf8fc 0%, #f8f6f1 57%, #eef6f2 100%);
  box-shadow: 0 -22px 58px rgba(35, 29, 61, 0.2);
}
.soundscape-grabber {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 15px;
  border-radius: 4px;
  background: rgba(88, 78, 118, 0.18);
}
.soundscape-sheet header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.soundscape-sheet header small { color: #74699a; font-size: 12px; line-height: 1.4; }
.soundscape-sheet h2 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.38;
  letter-spacing: 0;
}
.soundscape-sheet header > button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(103, 93, 158, 0.07);
  color: #51477f;
}
.soundscape-sheet header svg { width: 19px; height: 19px; }
.soundscape-intro { margin: 11px 0 17px; color: #6d6774; font-size: 13px; line-height: 1.72; }
.soundscape-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.soundscape-list-heading strong { color: #5c5569; font-size: 12px; font-weight: 620; }
.soundscape-list-heading button {
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #655a91;
  font-size: 12px;
}
.soundscape-list { display: grid; gap: 7px; }
.soundscape-list > button,
.soundscape-list section > div > button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 63px;
  padding: 9px 11px;
  border: 1px solid rgba(91, 78, 128, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #484357;
  text-align: left;
}
.soundscape-list button > svg {
  width: 22px;
  height: 22px;
  justify-self: center;
  color: #6b61a1;
  stroke-width: 1.8;
}
.soundscape-list button span { min-width: 0; }
.soundscape-list button strong,
.soundscape-list button small { display: block; overflow-wrap: anywhere; }
.soundscape-list button strong { font-size: 13px; font-weight: 650; }
.soundscape-list button small { margin-top: 3px; color: #817a8c; font-size: 11px; line-height: 1.45; }
.soundscape-list button b { color: #675d9e; font-size: 11px; font-weight: 600; }
.soundscape-list button:hover,
.soundscape-list button.is-active {
  border-color: rgba(103, 93, 158, 0.3);
  background: rgba(238, 234, 248, 0.76);
}
.soundscape-list button:active { transform: translateY(1px); }
.soundscape-list.is-expanded { display: block; }
.soundscape-list section + section { margin-top: 16px; }
.soundscape-list section h3 {
  margin: 0 0 7px;
  color: #756d80;
  font-size: 11px;
  font-weight: 620;
}
.soundscape-list section > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.soundscape-list section > div > button { grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 69px; }
.soundscape-list section > div > button > svg { grid-row: 1 / 3; }
.soundscape-list section > div > button b { grid-column: 2; }
.soundscape-source-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #746d7e;
  font-size: 11px;
}
.soundscape-source-toggle svg { width: 15px; height: 15px; }
.soundscape-source-toggle svg:last-child { transition: transform 180ms ease; }
.soundscape-source-toggle.is-open svg:last-child { transform: rotate(180deg); }
.soundscape-credits {
  max-height: 190px;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(91, 78, 128, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}
.soundscape-credits > p { margin: 0 0 10px; color: #716b77; font-size: 11px; line-height: 1.65; }
.soundscape-credits ul { margin: 0; padding: 0; list-style: none; }
.soundscape-credits li + li { margin-top: 9px; }
.soundscape-credits span,
.soundscape-credits small { display: block; }
.soundscape-credits span { color: #55505e; font-size: 11px; font-weight: 620; }
.soundscape-credits small { margin-top: 2px; color: #837c88; font-size: 10px; line-height: 1.5; }
.soundscape-credits a { color: #655a91; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.soundscape-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 16px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(91, 78, 128, 0.1);
}
.soundscape-controls strong,
.soundscape-controls label > span { display: block; margin-bottom: 8px; color: #625b71; font-size: 12px; font-weight: 600; }
.soundscape-segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 8px; background: rgba(103, 93, 158, 0.07); }
.soundscape-segment button { min-height: 36px; padding: 0 5px; border: 0; border-radius: 6px; background: transparent; color: #6d6678; font-size: 11px; }
.soundscape-segment button.is-active { background: #fff; color: #51477f; box-shadow: 0 2px 8px rgba(61, 52, 88, 0.09); }
.soundscape-controls input { width: 100%; accent-color: #675d9e; }
.soundscape-now { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 8px; background: rgba(225, 242, 237, 0.7); }
.soundscape-now > span { width: 9px; height: 9px; border-radius: 50%; background: #79b8ad; box-shadow: 0 0 0 5px rgba(121, 184, 173, 0.14); animation: soundscapePulse 2.8s ease-in-out infinite; }
.soundscape-now small,
.soundscape-now strong { display: block; }
.soundscape-now small { color: #6e7774; font-size: 10px; }
.soundscape-now strong { margin-top: 2px; font-size: 13px; }
.soundscape-now time { color: #5d5671; font-size: 12px; font-variant-numeric: tabular-nums; }
.soundscape-now button { min-height: 36px; padding: 0 12px; border: 1px solid rgba(81, 71, 127, 0.14); border-radius: 8px; background: rgba(255, 255, 255, 0.72); color: #51477f; }
.soundscape-check { margin-top: 15px; padding-top: 14px; border-top: 1px solid rgba(91, 78, 128, 0.1); }
.soundscape-check > strong { font-size: 13px; font-weight: 650; }
.soundscape-check > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.soundscape-check button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(91, 78, 128, 0.13); border-radius: 8px; background: rgba(255, 255, 255, 0.64); color: #5d5671; font-size: 12px; }
.soundscape-check p { margin: 8px 0 0; color: #51477f; font-size: 13px; line-height: 1.65; }
.soundscape-status { min-height: 18px; margin: 9px 0 0; color: #756d80; font-size: 12px; }
.soundscape-sheet button { cursor: pointer; transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), opacity 160ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms cubic-bezier(0.16, 1, 0.3, 1); }
.soundscape-sheet button:focus-visible,
.soundscape-sheet input:focus-visible,
.soundscape-credits a:focus-visible { outline: 3px solid rgba(85, 74, 142, 0.4); outline-offset: 2px; }
.soundscape-sheet button:disabled { opacity: 0.5; cursor: not-allowed; }
@keyframes soundscapePulse { 50% { opacity: 0.62; transform: scale(0.82); } }
@media (max-width: 360px) {
  .soundscape-sheet { padding-inline: 14px; }
  .soundscape-list section > div { grid-template-columns: 1fr; }
  .soundscape-controls { grid-template-columns: 1fr; }
  .soundscape-now { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .soundscape-now button { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  .soundscape-sheet button { transition-duration: 100ms; }
  .soundscape-now > span { animation: none; }
}
