/* Listening controls v9.7: clearer actions and compact player popovers. */

.space-lounge .natural-lounge .nature-secondary-actions {
  width: min(100%, 196px);
  gap: 9px;
}

.space-lounge .natural-lounge .nature-secondary-actions > * {
  width: 100%;
}

.space-lounge .natural-lounge .nature-listening-options > summary,
.space-lounge .natural-lounge .nature-comment-entry {
  min-height: 47px;
  box-sizing: border-box;
  padding: 0 15px;
  border: 1px solid rgba(230, 220, 179, 0.34);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(43, 72, 54, 0.9), rgba(27, 52, 39, 0.86));
  color: #f5efd9;
  box-shadow: 0 8px 18px rgba(10, 24, 16, 0.18), inset 0 1px rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  list-style: none;
  font: 600 14px/1.15 "Noto Serif SC", "Songti SC", serif;
  cursor: pointer;
}

.space-lounge .natural-lounge .nature-listening-options > summary::-webkit-details-marker {
  display: none;
}

.space-lounge .natural-lounge .nature-listening-options > summary::after {
  margin-left: auto;
  color: rgba(245, 239, 217, 0.78);
}

.space-lounge .natural-lounge .nature-comment-entry::before {
  content: none;
}

.space-lounge .natural-lounge .nature-listening-options > summary svg,
.space-lounge .natural-lounge .nature-comment-entry svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.space-lounge .natural-lounge .nature-comment-wall {
  width: min(97%, 650px);
}

.space-lounge .natural-lounge .nature-comment-head span {
  font-size: 18px;
  letter-spacing: 0.12em;
}

.space-lounge .natural-lounge .nature-comment-viewport {
  height: 92px;
}

.space-lounge .natural-lounge .nature-comment-track p {
  min-height: 46px;
  font-size: 20px;
  line-height: 1.42;
}

.space-lounge .natural-lounge .nature-comment-track b {
  font-size: 14px;
}

@keyframes natureCommentDrift {
  0%, 25% { transform: translateY(0); }
  33%, 58% { transform: translateY(-46px); }
  66%, 91% { transform: translateY(-92px); }
  100% { transform: translateY(-138px); }
}

body.space-lounge #songDrawer.nature-player-popover {
  position: fixed !important;
  inset: auto auto var(--nature-popover-bottom) var(--nature-popover-left) !important;
  width: var(--nature-popover-width) !important;
  height: auto !important;
  max-width: calc(100vw - 20px) !important;
  max-height: min(62dvh, var(--nature-popover-max-height)) !important;
  overflow: auto !important;
  transform: none !important;
  border: 1px solid rgba(92, 79, 47, 0.2) !important;
  border-radius: 18px !important;
  background: radial-gradient(circle at 88% 4%, rgba(255, 241, 187, 0.2), transparent 34%), linear-gradient(150deg, rgba(246, 240, 217, 0.98), rgba(226, 224, 199, 0.98)) !important;
  color: #263b2e !important;
  box-shadow: 0 24px 58px rgba(12, 30, 20, 0.3), inset 0 1px rgba(255, 255, 255, 0.82) !important;
  z-index: 1200 !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.space-lounge #songDrawer.nature-player-popover::after {
  content: "";
  position: absolute;
  right: 29px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-right: 1px solid rgba(92, 79, 47, 0.2);
  border-bottom: 1px solid rgba(92, 79, 47, 0.2);
  background: #e2e0c7;
  transform: rotate(45deg);
}

body.space-lounge #songDrawer.nature-player-popover #drawerContent {
  max-height: 330px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.space-lounge #songDrawer.nature-settings-popover {
  overflow: auto !important;
}

body.space-lounge #songDrawer.nature-player-popover .nature-legacy-loop {
  display: none !important;
}

.nature-play-modes {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid rgba(45, 65, 50, 0.16);
}

.nature-play-modes h3 {
  margin: 0 0 12px;
  color: #263b2e;
  font: 700 17px/1.2 "Noto Serif SC", "Songti SC", serif;
}

.nature-play-mode-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nature-play-mode {
  min-height: 72px;
  padding: 9px 5px;
  border: 1px solid rgba(52, 82, 61, 0.18);
  border-radius: 12px;
  background: rgba(255, 252, 239, 0.56);
  color: #35523e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 13px/1.1 "Noto Sans SC", sans-serif;
}

.nature-play-mode svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nature-play-mode[aria-pressed="true"] {
  border-color: #315d43;
  background: linear-gradient(145deg, #3d6a4f, #284a38);
  color: #fff8df;
  box-shadow: 0 7px 16px rgba(27, 61, 42, 0.2);
}

@media (max-width: 600px) {
  .space-lounge .natural-lounge .listening-room {
    grid-template-columns: minmax(0, 1.28fr) minmax(105px, 0.46fr);
  }

  .space-lounge .natural-lounge .nature-secondary-actions {
    width: 100%;
    max-width: none;
  }

  .space-lounge .natural-lounge .nature-secondary-actions > * {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  .space-lounge .natural-lounge .nature-listening-options > summary,
  .space-lounge .natural-lounge .nature-comment-entry {
    min-height: 43px;
    padding: 0 9px;
    gap: 6px;
    font-size: 13px;
  }

  .space-lounge .natural-lounge .nature-comment-wall {
    width: 100%;
  }

  .space-lounge .natural-lounge .nature-comment-head span {
    font-size: 17px;
  }

  .space-lounge .natural-lounge .nature-comment-viewport {
    height: 78px;
  }

  .space-lounge .natural-lounge .nature-comment-track p {
    min-height: 39px;
    font-size: 18px;
  }

  .space-lounge .natural-lounge .nature-comment-track b {
    font-size: 12px;
  }

  body.space-lounge #songDrawer.nature-player-popover {
    border-radius: 15px !important;
  }
}
