/* soundroom — /sound. SUBOX home.css · pages.css 위에 얹는다
 * 구성: ① 장면(배경 · 재생 · 배경 고르기 · 집중 모드) ② 플레이어(왼쪽 분류 · 오른쪽 목록) ③ 내 사주 추천 */
.snd-page {
  padding-bottom: 110px;
}

/* ── ① 장면 ── */
.snd-scene {
  --el-a: #2c5bd1;
  --el-b: #101b3d;
  position: relative;
  margin-top: 28px;
  min-height: 440px;
  border: 2.5px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  box-shadow: 6px 6px 0 var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}
.snd-scene .sc-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      ellipse at 25% 20%,
      color-mix(in srgb, var(--el-a) 80%, #fff) 0,
      transparent 55%
    ),
    radial-gradient(ellipse at 80% 90%, var(--el-a) 0, transparent 60%),
    linear-gradient(160deg, var(--el-a), var(--el-b));
}
.snd-scene.has-img .sc-img {
  background: var(--scene-img) center / cover no-repeat;
}
.snd-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 25%,
    rgba(8, 10, 24, 0.82) 100%
  );
}
.sc-glow i {
  position: absolute;
  bottom: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff6c8;
  box-shadow: 0 0 14px #ffd86b;
  opacity: 0;
  animation: scFly linear infinite;
}
.sc-glow i:nth-child(1) {
  left: 12%;
  animation-duration: 14s;
}
.sc-glow i:nth-child(2) {
  left: 24%;
  animation-duration: 19s;
  animation-delay: -6s;
}
.sc-glow i:nth-child(3) {
  left: 38%;
  animation-duration: 16s;
  animation-delay: -3s;
}
.sc-glow i:nth-child(4) {
  left: 52%;
  animation-duration: 22s;
  animation-delay: -11s;
}
.sc-glow i:nth-child(5) {
  left: 64%;
  animation-duration: 15s;
  animation-delay: -8s;
}
.sc-glow i:nth-child(6) {
  left: 76%;
  animation-duration: 20s;
  animation-delay: -2s;
}
.sc-glow i:nth-child(7) {
  left: 86%;
  animation-duration: 17s;
  animation-delay: -13s;
}
.sc-glow i:nth-child(8) {
  left: 45%;
  animation-duration: 25s;
  animation-delay: -18s;
}
@keyframes scFly {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  50% {
    transform: translate(18px, -240px);
  }
  85% {
    opacity: 0.7;
  }
  100% {
    transform: translate(-12px, -480px);
    opacity: 0;
  }
}
.sc-in {
  padding: 0 clamp(22px, 4vw, 44px);
  max-width: 720px;
}
.sc-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.snd-scene h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 66px);
  line-height: 1.05;
  margin-top: 6px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.sc-desc {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.9;
}
/* 장면 아래 조작 줄 (유리 느낌 한 줄) */
.sc-bar {
  margin: 22px clamp(14px, 3vw, 28px) clamp(14px, 3vw, 24px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 10px;
  border-radius: 20px;
  background: rgba(10, 12, 28, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}
.sc-big {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: #ffc928;
  color: #161513;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: transform 0.12s;
}
.sc-big:hover {
  transform: scale(1.06);
}
.sc-big svg {
  width: 24px;
  height: 24px;
}
.sc-now {
  flex: 1;
  min-width: 0;
}
.sc-now b {
  display: block;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-now small {
  display: block;
  font-size: 12.5px;
  opacity: 0.75;
  margin-top: 2px;
}
.sc-select {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  opacity: 0.95;
}
.sc-select span {
  opacity: 0.7;
}
.sc-select select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: #fff;
  border: 0;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 4px 18px 4px 2px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position:
    right 6px center,
    right 2px center;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.sc-select select option {
  color: #161513;
}
.sc-focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.sc-focus:hover {
  background: rgba(255, 255, 255, 0.12);
}
.sc-focus svg {
  width: 16px;
  height: 16px;
}

/* ── ② 플레이어 ── */
.snd-player {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.snd-tabs {
  border-right: 2px solid var(--hair);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: color-mix(in srgb, var(--paper) 60%, var(--card));
}
.snd-group {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  padding: 10px 10px 6px;
}
.snd-group:first-child {
  padding-top: 0;
}
.snd-tabs button {
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 10px;
  align-items: center;
  text-align: left;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}
.snd-tabs button:hover {
  background: var(--sun-soft);
}
.snd-tabs button .dot {
  grid-row: span 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-3);
  border: 1.5px solid var(--line);
}
.snd-tabs button.e-wood .dot {
  background: var(--wood);
}
.snd-tabs button.e-fire .dot {
  background: var(--fire);
}
.snd-tabs button.e-earth .dot {
  background: var(--earth);
}
.snd-tabs button.e-metal .dot {
  background: var(--metal);
}
.snd-tabs button.e-water .dot {
  background: var(--water);
}
.snd-tabs button b {
  font-size: 14.5px;
}
.snd-tabs button small {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snd-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}
.snd-tabs button[aria-selected="true"] small {
  color: inherit;
  opacity: 0.7;
}
.snd-right {
  padding: 18px 20px;
  min-width: 0;
}
.snd-list {
  display: flex;
  flex-direction: column;
}
.snd-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--hair);
  background: none;
  color: var(--ink);
  padding: 12px 4px;
  font: inherit;
  cursor: pointer;
}
.snd-item:last-child {
  border-bottom: 0;
}
.snd-item:hover .si-ico {
  background: var(--sun);
}
.snd-item .si-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--card);
  color: #161513;
  transition: background 0.12s;
}
.snd-item .si-ico svg {
  width: 18px;
  height: 18px;
  color: var(--ink);
}
.snd-item b {
  display: block;
  font-size: 15.5px;
}
.snd-item small {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.45;
}
.snd-item .si-gen {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-3);
  white-space: nowrap;
}
.snd-item.on .si-ico {
  background: var(--sun);
}
.snd-item.on b {
  color: var(--ink);
}
.snd-item.on .si-ico svg {
  animation: sndPulse 1.2s ease-in-out infinite;
}
@keyframes sndPulse {
  50% {
    transform: scale(1.25);
  }
}
.snd-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ── ③ 내 사주 추천 ── */
.snd-recbox {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}
.snd-rec h2 {
  margin-bottom: 4px;
}
.snd-rec .rec-el {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.snd-rec .rec-dot {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: "Noto Serif KR", serif;
  font-weight: 900;
  font-size: 26px;
  color: #fff;
  flex: none;
  margin: 0;
  aspect-ratio: auto;
}
.snd-rec .rec-dot.e-earth {
  color: #161513;
}
.snd-rec h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
}
.snd-rec p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.snd-rec .rec-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 12px;
  max-width: 420px;
}
.snd-rec .rec-bars div {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}
.snd-rec .rec-bars i {
  display: block;
  height: 8px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  margin-bottom: 4px;
}
.snd-rec .btn {
  margin-top: 12px;
}
.snd-birth {
  min-width: 280px;
}
.snd-birth summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: 2.5px solid var(--line);
  border-radius: 12px;
  background: var(--sun);
  color: #161513;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--line);
}
.snd-birth summary::-webkit-details-marker {
  display: none;
}
.snd-birth[open] {
  grid-column: 1 / -1;
}
.snd-birth[open] summary {
  background: var(--card);
  box-shadow: none;
}
.snd-birth .saju-form {
  margin-top: 14px;
  box-shadow: none;
}

/* 아래 고정 재생 막대 */
.snd-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(760px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 2.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--line);
}
.snd-bar[hidden] {
  display: none;
}
.snd-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  background: var(--sun);
  color: #161513;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.snd-play svg {
  width: 18px;
  height: 18px;
}
.snd-now {
  flex: 1;
  min-width: 0;
}
.snd-now b {
  display: block;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snd-now small {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}
.snd-vol {
  display: flex;
  align-items: center;
  gap: 6px;
}
.snd-vol svg {
  width: 18px;
  height: 18px;
}
.snd-vol input {
  width: 100px;
  accent-color: #161513;
}
.snd-sleep {
  height: 38px;
  width: auto;
  font-size: 13px;
}

@media (max-width: 860px) {
  .snd-player {
    grid-template-columns: 1fr;
  }
  .snd-tabs {
    border-right: 0;
    border-bottom: 2px solid var(--hair);
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 12px;
    gap: 6px;
  }
  .snd-group {
    display: none;
  }
  .snd-tabs button {
    flex: none;
    grid-template-columns: 12px auto;
    padding: 8px 12px;
    border: 1.5px solid var(--hair);
  }
  .snd-tabs button small {
    display: none;
  }
  .snd-tabs button .dot {
    grid-row: auto;
  }
  .sc-bar {
    flex-wrap: wrap;
  }
  .sc-select {
    order: 3;
  }
  .sc-focus {
    order: 4;
    margin-left: auto;
  }
  .snd-recbox {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .snd-bar {
    flex-wrap: wrap;
  }
  .snd-vol input {
    width: 80px;
  }
  .snd-sleep {
    flex: 1;
  }
}

/* ── 집중 모드 ── */
.snd-focus {
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0f1220;
}
.snd-focus[hidden] {
  display: none;
}
.sf-img {
  position: absolute;
  inset: 0;
  background: var(--scene-img, none) center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.6s;
}
.snd-focus.has-img .sf-img {
  opacity: 1;
  box-shadow: inset 0 0 0 100vmax rgba(6, 8, 20, 0.45);
}
.sf-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 30%, var(--sf-a, #2c5bd1) 0, transparent 45%),
    radial-gradient(circle at 70% 60%, var(--sf-b, #6b3fa0) 0, transparent 50%),
    #0f1220;
  animation: sfDrift 28s ease-in-out infinite alternate;
}
.snd-focus.has-img .sf-bg {
  opacity: 0.35;
  mix-blend-mode: screen;
}
@keyframes sfDrift {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(4%, -3%) rotate(8deg) scale(1.08);
  }
  100% {
    transform: translate(-4%, 3%) rotate(-6deg) scale(1.02);
  }
}
.sf-bg i {
  position: absolute;
  bottom: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  animation: sfRise linear infinite;
}
.sf-bg i:nth-child(1) {
  left: 22%;
  animation-duration: 19s;
  animation-delay: -2s;
}
.sf-bg i:nth-child(2) {
  left: 31%;
  animation-duration: 24s;
  animation-delay: -9s;
}
.sf-bg i:nth-child(3) {
  left: 40%;
  animation-duration: 17s;
  animation-delay: -5s;
}
.sf-bg i:nth-child(4) {
  left: 48%;
  animation-duration: 28s;
  animation-delay: -14s;
}
.sf-bg i:nth-child(5) {
  left: 55%;
  animation-duration: 21s;
  animation-delay: -1s;
}
.sf-bg i:nth-child(6) {
  left: 62%;
  animation-duration: 26s;
  animation-delay: -11s;
}
.sf-bg i:nth-child(7) {
  left: 70%;
  animation-duration: 18s;
  animation-delay: -7s;
}
.sf-bg i:nth-child(8) {
  left: 77%;
  animation-duration: 30s;
  animation-delay: -18s;
}
.sf-bg i:nth-child(9) {
  left: 28%;
  animation-duration: 33s;
  animation-delay: -20s;
}
.sf-bg i:nth-child(10) {
  left: 45%;
  animation-duration: 23s;
  animation-delay: -16s;
}
.sf-bg i:nth-child(11) {
  left: 66%;
  animation-duration: 20s;
  animation-delay: -3s;
}
.sf-bg i:nth-child(12) {
  left: 36%;
  animation-duration: 27s;
  animation-delay: -24s;
}
@keyframes sfRise {
  from {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  to {
    transform: translateY(-120vh);
    opacity: 0;
  }
}
.sf-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sf-in {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  max-width: 720px;
}
.sf-mode {
  font-weight: 900;
  letter-spacing: 0.2em;
  font-size: 14px;
  opacity: 0.85;
}
.sf-time {
  font-family: var(--display);
  font-size: clamp(88px, 22vw, 200px);
  line-height: 1;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.sf-ctrl {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.sf-btn {
  border: 2px solid #fff;
  background: #fff;
  color: #161513;
  border-radius: 14px;
  padding: 10px 24px;
  font: inherit;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
}
.sf-btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.sf-round {
  margin-top: 14px;
  font-size: 13.5px;
  opacity: 0.75;
}
.sf-line {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  line-height: 1.6;
}
.sf-line b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
}
.sf-line span {
  opacity: 0.85;
}
.sf-now {
  margin-top: 22px;
  font-size: 13px;
  opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  .sf-bg,
  .sf-bg i,
  .sc-glow i,
  .snd-item.on .si-ico svg {
    animation: none;
  }
}
/* 분류 제목 (오른쪽 위) */
.snd-cathead {
  --c: var(--water);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  margin-bottom: 8px;
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 255, 255, 0.25) 0,
      transparent 40%
    ),
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #0b0a10));
}
.snd-cathead.e-wood {
  --c: var(--wood);
}
.snd-cathead.e-fire {
  --c: var(--fire);
}
.snd-cathead.e-earth {
  --c: var(--earth);
  color: #161513;
}
.snd-cathead.e-metal {
  --c: var(--metal);
}
.snd-cathead.e-water {
  --c: var(--water);
}
.ch-ico {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  flex: none;
}
.ch-ico svg {
  width: 30px;
  height: 30px;
}
.snd-cathead h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
}
.snd-cathead p {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}
.snd-cathead > div {
  flex: 1;
  min-width: 0;
}
.ch-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  background: #fff;
  color: #161513;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  flex: none;
}
.ch-play svg {
  width: 16px;
  height: 16px;
}
/* ── 내 사주 추천 카드 (다시 정리) ── */
.snd-recbox {
  grid-template-columns: 1fr;
  gap: 14px;
}
.snd-recbox .snd-rec > h2 + .sub {
  margin-top: 4px;
}
.rec-card {
  --c: var(--water);
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: stretch;
  padding: 20px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: color-mix(in srgb, var(--c) 10%, var(--card));
}
.rec-card.e-wood {
  --c: var(--wood);
}
.rec-card.e-fire {
  --c: var(--fire);
}
.rec-card.e-earth {
  --c: var(--earth);
}
.rec-card.e-metal {
  --c: var(--metal);
}
.rec-card.e-water {
  --c: var(--water);
}
.rec-kick {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-3);
}
.rec-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.rec-hj {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--c);
  color: #fff;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-family: "Noto Serif KR", serif;
  font-weight: 900;
  font-size: 26px;
  flex: none;
}
.rec-card.e-earth .rec-hj {
  color: #161513;
}
.rec-title h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
}
.rec-txt {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.rec-play {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.rec-play svg {
  width: 16px;
  height: 16px;
}
.rec-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: end;
  padding: 8px 4px 0;
  border-left: 1.5px dashed var(--hair);
  padding-left: 20px;
}
.rc {
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.rc i {
  width: 100%;
  max-width: 30px;
  border-radius: 8px 8px 4px 4px;
  border: 1.5px solid var(--line);
  opacity: 0.35;
}
.rc.low i {
  opacity: 1;
}
.rc b {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink-2);
}
.rc span {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}
.rc.low span,
.rc.low b {
  color: var(--ink);
}
.snd-birth {
  min-width: 0;
}
.snd-birth summary {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  font-size: 14.5px;
}
@media (max-width: 720px) {
  .rec-card {
    grid-template-columns: 1fr;
  }
  .rec-chart {
    border-left: 0;
    padding-left: 4px;
    border-top: 1.5px dashed var(--hair);
    padding-top: 14px;
  }
  .rc {
    height: 110px;
  }
}
/* 분류 제목 — 차분하게: 연한 바탕 · 진한 글자 · 색은 아이콘에만 */
.snd-cathead,
.snd-cathead.e-earth {
  color: var(--ink);
  background: color-mix(in srgb, var(--c) 9%, var(--card));
}
.snd-cathead .ch-ico {
  background: var(--c);
  color: #fff;
  border: 2px solid var(--line);
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.snd-cathead.e-earth .ch-ico {
  color: #161513;
}
.snd-cathead .ch-ico svg {
  width: 24px;
  height: 24px;
}
.snd-cathead h3 {
  font-size: 22px;
}
.snd-cathead p {
  color: var(--ink-3);
  opacity: 1;
}
.snd-cathead .ch-play {
  background: var(--ink);
  color: var(--paper);
  height: 40px;
}
.snd-empty { padding: 28px 8px; text-align: center; color: var(--ink-3); font-size: 14px; font-weight: 700; }

/* ══ 집중 모드 (다시 정리): 위 · 오늘의 한 줄 / 왼쪽 · 타이머 / 오른쪽 · 플레이리스트 ══ */
.snd-focus { display: flex; flex-direction: column; place-items: stretch; padding: clamp(16px, 3vw, 36px); gap: 18px; }
.snd-focus[hidden] { display: none; }
.sf-top { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sf-day { display: flex; flex-direction: column; gap: 2px; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.sf-day b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.sf-day span { font-size: 14px; opacity: .85; }
.snd-focus .sf-close { position: static; flex: none; backdrop-filter: blur(8px); }
.sf-layout { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(16px, 3vw, 36px); align-items: center; }
/* 유리 판 */
.sf-timer, .sf-player { background: rgba(10, 12, 28, .42); border: 1.5px solid rgba(255, 255, 255, .2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
/* 왼쪽: 타이머 */
.sf-timer { text-align: center; padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 48px); max-width: 640px; justify-self: center; width: 100%; }
.sf-mode { display: inline-block; font-size: 13px; font-weight: 900; letter-spacing: .25em; padding: 5px 14px; border-radius: 99px; background: rgba(255, 255, 255, .15); opacity: 1; }
.snd-focus[data-mode="break"] .sf-mode { background: #ffc928; color: #161513; }
.sf-timer .sf-time { margin-top: 12px; font-size: clamp(76px, 12vw, 150px); }
.sf-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; margin: 14px auto 0; max-width: 420px; }
.sf-bar i { display: block; height: 100%; width: 0; background: #ffc928; border-radius: 99px; transition: width 1s linear; }
.sf-timer .sf-round { margin-top: 10px; }
.sf-timer .sf-ctrl { margin-top: 20px; }
.sf-timer .sf-btn { min-width: 132px; height: 50px; border-radius: 16px; font-size: 16px; }
.sf-set { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 20px; font-size: 14px; font-weight: 800; opacity: .92; }
.sf-set select { appearance: none; -webkit-appearance: none; margin: 0 4px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-weight: 900; cursor: pointer; text-align: center; }
.sf-set select option { color: #161513; }
/* 오른쪽: 플레이리스트 */
.sf-player { padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: 100%; min-height: 0; }
.sfp-now { display: flex; align-items: center; gap: 14px; }
.sfp-art { --c: var(--water); width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #0b0a10)); border: 1.5px solid rgba(255, 255, 255, .35); }
.sfp-art.e-wood { --c: var(--wood); } .sfp-art.e-fire { --c: var(--fire); } .sfp-art.e-earth { --c: var(--earth); } .sfp-art.e-metal { --c: var(--metal); } .sfp-art.e-water { --c: var(--water); }
.sfp-art svg { width: 28px; height: 28px; }
.sfp-art.on svg { animation: sndPulse 1.4s ease-in-out infinite; }
.sfp-meta { min-width: 0; }
.sfp-meta small { display: block; font-size: 12px; opacity: .7; font-weight: 700; }
.sfp-meta b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.sfp-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; }
.sfp-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.sfp-btn svg { width: 18px; height: 18px; }
.sfp-play { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #ffc928; color: #161513; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(255, 201, 40, .35); transition: transform .12s; }
.sfp-play:hover { transform: scale(1.06); }
.sfp-play svg { width: 28px; height: 28px; }
.sfp-vol { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.sfp-vol svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.sfp-vol input { flex: 1; accent-color: #ffc928; height: 20px; }
.sfp-vol b { font-size: 13px; min-width: 28px; text-align: right; }
.sfp-cat select { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.sfp-cat select option { color: #161513; }
.sfp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; flex: 1; }
.sfp-list button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.sfp-list button:hover { background: rgba(255, 255, 255, .1); }
.sfp-list button.on { background: rgba(255, 201, 40, .2); }
.sfp-list .n { width: 22px; text-align: center; font-weight: 900; opacity: .7; flex: none; }
.sfp-list button.on .n { color: #ffc928; opacity: 1; }
.sfp-list .t { min-width: 0; }
.sfp-list b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfp-list small { display: block; font-size: 12px; opacity: .65; }
.sfp-list .empty { padding: 14px; opacity: .7; font-size: 13.5px; }
@media (max-width: 900px) {
  .snd-focus { overflow-y: auto; }
  .sf-layout { grid-template-columns: 1fr; align-items: start; }
  .sf-player { max-height: none; }
  .sfp-list { max-height: 240px; }
}

/* ══ 집중 모드 배치 v3: 타이머 가운데(옅은 유리) · 플레이리스트 아래 가로 막대 ══ */
.sf-layout { display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 0; }
.sf-timer { margin: auto; background: rgba(10, 12, 28, .08); border-color: rgba(255, 255, 255, .28); box-shadow: 0 20px 60px rgba(0, 0, 0, .12); max-width: 560px; }
.sf-timer .sf-time { text-shadow: 0 6px 30px rgba(0, 0, 0, .35); }
.sf-timer .sf-mode, .sf-timer .sf-round, .sf-set { text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
/* 아래 플레이리스트 막대 */
.sf-player { width: min(1080px, 100%); flex: none; max-height: none; padding: 14px 18px; border-radius: 24px; background: rgba(10, 12, 28, .32);
  display: grid; grid-template-columns: minmax(180px, 1.2fr) auto minmax(160px, 1fr) minmax(140px, .8fr); grid-template-areas: "now ctrl vol cat" "list list list list"; align-items: center; gap: 12px 18px; }
.sfp-now { grid-area: now; min-width: 0; }
.sfp-art { width: 52px; height: 52px; border-radius: 14px; }
.sfp-art svg { width: 24px; height: 24px; }
.sfp-ctrl { grid-area: ctrl; gap: 12px; }
.sfp-play { width: 56px; height: 56px; }
.sfp-vol { grid-area: vol; }
.sfp-cat { grid-area: cat; }
/* 목록은 가로로 넘기는 카드 */
.sfp-list { grid-area: list; flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 8px; padding-bottom: 2px; scrollbar-width: thin; }
.sfp-list li { flex: none; }
.sfp-list button { width: auto; max-width: 260px; padding: 8px 14px 8px 10px; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 14px; background: rgba(255, 255, 255, .06); }
.sfp-list button.on { border-color: #ffc928; background: rgba(255, 201, 40, .18); }
.sfp-list .n { width: 18px; }
@media (max-width: 900px) {
  .sf-player { grid-template-columns: 1fr auto; grid-template-areas: "now ctrl" "vol vol" "cat cat" "list list"; }
}
/* 모바일 */
@media (max-width: 560px) {
  .snd-focus { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); gap: 10px; overflow-y: auto; }
  .sf-day b { font-size: 16px; } .sf-day span { font-size: 12.5px; }
  .snd-focus .sf-close { width: 40px; height: 40px; }
  .sf-timer { padding: 22px 16px; border-radius: 22px; }
  .sf-timer .sf-time { font-size: clamp(64px, 22vw, 96px); margin-top: 8px; }
  .sf-timer .sf-ctrl { gap: 8px; }
  .sf-timer .sf-btn { min-width: 0; flex: 1; height: 46px; font-size: 15px; padding: 0 12px; }
  .sf-set { gap: 10px; font-size: 13px; }
  .sf-player { padding: 12px; gap: 10px; border-radius: 20px; grid-template-columns: 1fr auto; grid-template-areas: "now ctrl" "vol vol" "cat cat" "list list"; }
  .sfp-art { width: 44px; height: 44px; border-radius: 12px; }
  .sfp-meta b { font-size: 15px; }
  .sfp-ctrl { gap: 8px; }
  .sfp-btn { width: 38px; height: 38px; }
  .sfp-play { width: 50px; height: 50px; }
  .sfp-vol { padding: 8px 12px; }
  .sfp-cat select { padding: 9px 10px; }
}

/* ══ 집중 모드 미니 플레이어 (sfx) — 한 줄: 지금 소리 | 재생 | 볼륨 · 목록, 목록은 위로 열리는 서랍 ══ */
.sfx { position: relative; width: min(920px, 100%); flex: none; }
.sfx-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 22px;
  background: rgba(10, 12, 28, .38); border: 1.5px solid rgba(255, 255, 255, .22); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 50px rgba(0, 0, 0, .25); }
.sfx-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sfx-art { --c: var(--water); width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #0b0a10)); }
.sfx-art.e-wood { --c: var(--wood); } .sfx-art.e-fire { --c: var(--fire); } .sfx-art.e-earth { --c: var(--earth); } .sfx-art.e-metal { --c: var(--metal); } .sfx-art.e-water { --c: var(--water); }
.sfx-art svg { width: 22px; height: 22px; }
.sfx-art.on svg { animation: sndPulse 1.4s ease-in-out infinite; }
.sfx-meta { min-width: 0; }
.sfx-meta b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfx-meta small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfx-ctrl { display: flex; align-items: center; gap: 10px; }
.sfx-ic { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; opacity: .9; }
.sfx-ic:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.sfx-ic svg { width: 20px; height: 20px; }
.sfx-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: #161513; display: grid; place-items: center; cursor: pointer; transition: transform .12s; }
.sfx-play:hover { transform: scale(1.06); }
.sfx-play svg { width: 24px; height: 24px; }
.sfx-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.sfx-vol { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sfx-vol svg { width: 18px; height: 18px; opacity: .8; flex: none; }
.sfx-vol input { width: 120px; accent-color: #fff; }
.sfx-vol b { font-size: 12.5px; opacity: .75; min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.sfx-listbtn.on { background: #fff; color: #161513; opacity: 1; }
/* 서랍 */
.sfx-drawer { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); max-height: min(52vh, 420px); display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 22px; background: rgba(10, 12, 28, .62); border: 1.5px solid rgba(255, 255, 255, .22); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: sfxUp .18s ease; }
.sfx-drawer[hidden] { display: none; }
@keyframes sfxUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sfx-cats { display: flex; gap: 6px; overflow-x: auto; flex: none; padding-bottom: 2px; scrollbar-width: none; }
.sfx-cats::-webkit-scrollbar { display: none; }
.sfx-cats button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.sfx-cats button i { width: 8px; height: 8px; border-radius: 50%; background: var(--water); }
.sfx-cats button.e-wood i { background: var(--wood); } .sfx-cats button.e-fire i { background: var(--fire); } .sfx-cats button.e-earth i { background: var(--earth); } .sfx-cats button.e-metal i { background: var(--metal); }
.sfx-cats button[aria-selected="true"] { background: #fff; color: #161513; }
.sfx-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.sfx-list button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.sfx-list button:hover { background: rgba(255, 255, 255, .08); }
.sfx-list button.on { background: rgba(255, 255, 255, .14); }
.sfx-list .n { width: 20px; text-align: center; font-weight: 900; opacity: .6; flex: none; font-variant-numeric: tabular-nums; }
.sfx-list button.on .n { opacity: 1; color: #ffc928; }
.sfx-list .t { min-width: 0; }
.sfx-list b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfx-list small { display: block; font-size: 12px; opacity: .6; }
.sfx-list .empty { padding: 12px; opacity: .7; font-size: 13.5px; }
/* 태블릿 · 모바일: 1줄 = 지금 소리 + 목록 / 2줄 = 재생 버튼 + 볼륨 */
@media (max-width: 720px) {
  .sfx-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "now right" "ctrl ctrl"; gap: 10px 12px; padding: 12px; border-radius: 20px; }
  .sfx-now { grid-area: now; }
  .sfx-right { grid-area: right; }
  .sfx-right .sfx-vol { display: none; }
  .sfx-ctrl { grid-area: ctrl; justify-content: space-between; }
  .sfx-ctrl::after { content: none; }
  .sfx-mvol { display: flex; }
}
@media (max-width: 720px) {
  /* 볼륨 · 목록 버튼을 바로 줄 칸에 놓는다 */
  .sfx-bar { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "now now list" "ctrl vol vol"; }
  .sfx-right { display: contents; }
  .sfx-listbtn { grid-area: list; }
  .sfx-right .sfx-vol { display: flex; grid-area: vol; justify-content: flex-end; }
  .sfx-vol input { width: 100%; min-width: 0; flex: 1; }
  .sfx-ctrl { justify-content: flex-start; gap: 4px; }
  .sfx-play { width: 46px; height: 46px; }
  .sfx-ic { width: 38px; height: 38px; }
  .sfx-drawer { max-height: 55vh; }
}

/* ══ 모바일 메인 화면 정리 ══ */
@media (max-width: 720px) {
  .snd-scene { min-height: 0; padding-top: 140px; border-radius: 22px; }
  .sc-in { padding: 0 18px; }
  .snd-scene h1 { font-size: 40px; }
  .sc-desc { font-size: 14px; }
  /* 조작 줄: 1줄 = 재생 + 지금 소리 / 2줄 = 배경 고르기 + 집중 모드 */
  .sc-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "play now" "sel focus"; gap: 12px 12px; margin: 16px 12px 12px; padding: 12px; border-radius: 18px; }
  .sc-big { grid-area: play; width: 52px; height: 52px; }
  .sc-now { grid-area: now; }
  .sc-now b { font-size: 15px; }
  .sc-now small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sc-select { grid-area: sel; order: 0; min-width: 0; }
  .sc-select select { width: 100%; min-width: 0; max-width: 100%; }
  .sc-focus { grid-area: focus; order: 0; margin-left: 0; justify-self: end; height: 40px; padding: 0 14px; }
  /* 분류 칩 줄: 스크롤바 숨기고 손가락으로 넘기기 */
  .snd-tabs { scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding: 12px 12px 12px; }
  .snd-tabs::-webkit-scrollbar { display: none; }
  .snd-tabs button { scroll-snap-align: start; border-radius: 99px; padding: 8px 14px; background: var(--card); }
  .snd-tabs button[aria-selected="true"] { border-color: var(--ink); }
  .snd-right { padding: 14px; }
  .snd-cathead { padding: 14px; gap: 12px; }
  .snd-cathead h3 { font-size: 19px; }
  .ch-play { height: 38px; padding: 0 12px; }
  .snd-item { grid-template-columns: 40px 1fr; padding: 12px 2px; }
  .snd-item .si-gen { display: none; }
}
@media (max-width: 720px) {
  .sc-bar { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "play now now" "sel sel focus"; }
  .sc-select { white-space: nowrap; }
  .sc-select span { flex: none; }
  .snd-cathead p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* 분류 칩 위 좌 · 우 버튼 (모바일만) */
.snd-tabs-head { display: none; }
@media (max-width: 860px) {
  .snd-player { grid-template-columns: 1fr; }
  .snd-tabs-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 0; }
  .snd-tabs-head b { flex: 1; font-size: 13px; font-weight: 900; color: var(--ink-3); }
  .snd-tabs-arrow { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
  .snd-tabs-arrow svg { width: 16px; height: 16px; }
  .snd-tabs-arrow:disabled { opacity: .3; cursor: default; }
  .snd-tabs { padding-top: 8px; scroll-behavior: smooth; }
}
@media (max-width: 860px) { .snd-tabs { scroll-padding-inline: 12px; } }

/* 아래 재생 막대: 제목 · 설명은 한 줄로 자르고, 모바일은 두 줄 배치
   1줄: 재생 | 지금 소리 | 집중 모드   2줄: 볼륨 | 끄기 예약 */
.snd-now small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snd-bar > .btn {
  flex: none;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .snd-bar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas: "play now focus" "vol vol sleep";
    gap: 10px 10px;
    padding: 10px 12px;
    width: calc(100% - 20px);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .snd-bar .snd-play { grid-area: play; }
  .snd-bar .snd-now { grid-area: now; }
  .snd-bar > .btn { grid-area: focus; height: 38px; padding: 0 12px; font-size: 13px; }
  .snd-bar .snd-vol { grid-area: vol; min-width: 0; }
  .snd-bar .snd-vol input { width: auto; flex: 1; min-width: 0; }
  .snd-bar .snd-sleep { grid-area: sleep; flex: none; width: auto; max-width: 150px; }
}
@media (max-width: 360px) {
  .snd-bar > .btn { padding: 0 10px; }
  .snd-bar > .btn svg { display: none; }
}
