/* ============================================================
   수월암(水月庵) — 시간 기반 집중 수행 몰입 모드
   검정 + 금색. 빨강 미사용. 기존 관리 UI와 완전히 분리된 야간 수행 공간.
   ============================================================ */

:root {
  --sw-black: #0A0A0F;       /* 칠흑 */
  --sw-ink: #121218;         /* 먹색 (기본 배경) */
  --sw-ink-warm: #1A1A12;    /* 따뜻한 먹 (등불 근처) */
  --sw-gold: #C5A059;        /* 차분한 금 (테두리/라인) */
  --sw-gold-bright: #FFDF8C; /* 하이라이트 금 (타이머 숫자/빛나는 텍스트) */
  --sw-gold-deep: #B88E3E;   /* 진한 금 (그라데이션 끝) */
  --sw-gold-hi: #F3D075;     /* 밝은 금 (그라데이션 시작) */
  --sw-jade: #7FB3A8;        /* 옥색 포인트 (선택 상태에만, 극히 절제) */
  --sw-text: #F5F0E6;        /* 따뜻한 흰색 */
  --sw-text-dim: #9A9488;    /* 흐린 텍스트 */
}

/* ── 루트 오버레이: 풀스크린, 기존 화면 위를 덮음 ─────────── */
/* active일 때 칠흑 배경을 깔아 뒤(오늘 탭 등)가 절대 비치지 않게 한다 */
#samadhi-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#samadhi-root.active { pointer-events: auto; background: var(--sw-black); }

.sw-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  color: var(--sw-text);
  font-family: 'Noto Serif KR', serif;
  background: var(--sw-black);   /* 불투명 — 화면 자체가 뒤를 가린다 */
  overflow: hidden;
  opacity: 0;
  transition: opacity .55s ease;
}
.sw-screen.show { opacity: 1; }
/* 재렌더(칩 클릭 등) 시에는 페이드 없이 즉시 — 깜빡임/겹침 방지 */
.sw-screen.instant { transition: none; opacity: 1; }

/* 화면 폭 제한(모바일 셸과 정렬) */
.sw-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 28rem; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column;
  padding: max(env(safe-area-inset-top), 18px) 22px max(env(safe-area-inset-bottom), 24px);
}

/* ── 배경 레이어 (이미지 + 그라데이션 오버레이) ───────────── */
.sw-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  /* 위/아래로 어둡게 비네팅해 텍스트 가독성 확보 */
}
/* 배경이 잘 보이도록 오버레이를 옅게 — 상/하단만 살짝 어둡게(텍스트 가독성), 중앙은 거의 투명 */
.sw-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,15,.55) 0%,
    rgba(10,10,15,.18) 22%,
    rgba(10,10,15,.04) 45%,
    rgba(10,10,15,.04) 58%,
    rgba(10,10,15,.30) 80%,
    rgba(10,10,15,.62) 100%);
}
.sw-bg-prepare  { background-image: url('/static/img/sw-practice-bg.webp'); }
.sw-bg-practice { background-image: url('/static/img/sw-practice-bg.webp'); }
/* 준비 화면은 배경을 살짝 더 가라앉혀(옵션 가독성) */
.sw-screen-prepare .sw-bg::after {
  background: linear-gradient(180deg,
    rgba(10,10,15,.62) 0%,
    rgba(10,10,15,.42) 30%,
    rgba(10,10,15,.5) 60%,
    rgba(10,10,15,.72) 100%);
}

/* 은은한 금빛 입자 (향 연기) — CSS만으로 표현 */
.sw-particles { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.sw-particle {
  position: absolute; bottom: -10px;
  width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,223,140,.9), rgba(255,223,140,0));
  opacity: 0; animation: sw-float linear infinite;
}
@keyframes sw-float {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: .7; }
  90%  { opacity: .35; }
  100% { transform: translateY(-105vh) translateX(var(--drift, 12px)); opacity: 0; }
}

/* ── 헤더 ─────────────────────────────────────────────── */
.sw-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sw-header .sw-title-wrap { text-align: center; flex: 1; }
.sw-title { font-size: 20px; font-weight: 600; letter-spacing: 2px; color: var(--sw-gold-bright);
  text-shadow: 0 0 18px rgba(255,223,140,.25); }
.sw-subtitle { font-size: 12px; color: var(--sw-text-dim); margin-top: 3px; letter-spacing: .5px; }
.sw-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--sw-gold); background: rgba(20,20,24,.5);
  border: 1px solid rgba(197,160,89,.25); font-size: 15px;
  cursor: pointer; transition: all .25s ease;
}
.sw-icon-btn:hover { color: var(--sw-gold-bright); border-color: rgba(197,160,89,.55); }

/* 작은 연꽃 로고 마크 */
.sw-lotus-mark { color: var(--sw-gold); filter: drop-shadow(0 0 8px rgba(197,160,89,.4)); }

/* ── 준비 화면: 어두운 글래스 카드 ────────────────────── */
.sw-prepare-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.sw-prepare-scroll::-webkit-scrollbar { width: 0; }

.sw-card {
  background: rgba(20,20,26,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(197,160,89,.22);
  border-radius: 18px; padding: 16px 18px; margin-bottom: 16px;
}
.sw-section-label { font-size: 12.5px; color: var(--sw-text-dim); letter-spacing: 1px;
  margin: 18px 2px 10px; display: flex; align-items: center; justify-content: space-between; }
.sw-section-label .hint { font-size: 11px; color: rgba(197,160,89,.6); }

/* 선택된 수행 항목 카드 (강조) */
.sw-item-card { display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(40,34,18,.6), rgba(20,20,26,.55));
  border: 1px solid rgba(197,160,89,.4); }
.sw-item-card .label { font-size: 11px; color: var(--sw-gold); letter-spacing: 1px; }
.sw-item-card .name { font-size: 18px; font-weight: 600; color: var(--sw-text); margin-top: 4px; }
.sw-item-card .desc { font-size: 11.5px; color: var(--sw-text-dim); margin-top: 4px; }
.sw-item-card .ico { font-size: 26px; color: var(--sw-gold); opacity: .85;
  filter: drop-shadow(0 0 10px rgba(197,160,89,.3)); }

/* 칩 (수행 대상 / 목표 시간) */
.sw-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.sw-chip {
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  background: rgba(20,20,26,.5); color: var(--sw-text-dim);
  border: 1px solid rgba(197,160,89,.2); transition: all .25s ease;
  white-space: nowrap;
}
.sw-chip:hover { border-color: rgba(197,160,89,.45); color: var(--sw-text); }
.sw-chip.sel {
  background: linear-gradient(135deg, rgba(243,208,117,.18), rgba(184,142,62,.12));
  color: var(--sw-gold-bright); border-color: var(--sw-gold);
  box-shadow: 0 0 16px rgba(197,160,89,.2);
}

/* 소리 선택: 아이콘 그리드 (동적 개수) */
.sw-sound-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 10px; }
.sw-sound {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 6px; border-radius: 14px; cursor: pointer;
  background: rgba(20,20,26,.5); border: 1px solid rgba(197,160,89,.2);
  color: var(--sw-text-dim); transition: all .25s ease;
}
.sw-sound i { font-size: 20px; }
.sw-sound span { font-size: 11px; letter-spacing: .3px; }
.sw-sound:hover { border-color: rgba(197,160,89,.4); color: var(--sw-text); }
.sw-sound.sel {
  background: linear-gradient(135deg, rgba(243,208,117,.16), rgba(184,142,62,.1));
  color: var(--sw-gold-bright); border-color: var(--sw-gold);
  box-shadow: 0 0 16px rgba(197,160,89,.18);
}
/* 유료 예비 음원(잠금 더미) — 클릭 불가, '유료 준비 중' */
.sw-sound.locked {
  position: relative; cursor: not-allowed;
  border-style: dashed; border-color: rgba(197,160,89,.28);
  color: var(--sw-text-dim); opacity: .92;
  background-color: rgba(20,20,26,.5);
  background-image: repeating-linear-gradient(45deg,
    rgba(197,160,89,.05) 0, rgba(197,160,89,.05) 6px,
    transparent 6px, transparent 12px);
}
.sw-sound.locked:hover { border-color: rgba(197,160,89,.28); color: var(--sw-text-dim); }
.sw-sound.locked i { opacity: .55; }
.sw-sound-lock {
  position: absolute; top: 6px; right: 7px; font-size: 9px;
  color: var(--sw-gold); opacity: .7;
}
.sw-sound-badge {
  display: inline-block; margin-top: 1px;
  font-size: 8.5px; letter-spacing: .2px; line-height: 1;
  padding: 3px 6px; border-radius: 999px;
  color: #0A0A0F; background: linear-gradient(135deg, var(--sw-gold-bright), var(--sw-gold));
  font-weight: 600; white-space: nowrap;
}

/* 종료음 토글 */
.sw-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.sw-toggle-row .t-label { font-size: 14px; color: var(--sw-text); }
.sw-toggle-row .t-sub { font-size: 11px; color: var(--sw-text-dim); margin-top: 3px; }
.sw-switch { position: relative; width: 50px; height: 28px; flex-shrink: 0; cursor: pointer; }
.sw-switch input { display: none; }
.sw-switch .track { position: absolute; inset: 0; border-radius: 999px;
  background: rgba(60,56,48,.8); border: 1px solid rgba(197,160,89,.25); transition: all .3s; }
.sw-switch .thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sw-text-dim); transition: all .3s; }
.sw-switch input:checked + .track { background: linear-gradient(135deg, var(--sw-gold-hi), var(--sw-gold-deep)); border-color: var(--sw-gold); }
.sw-switch input:checked + .track + .thumb { left: 25px; background: #2A2418; box-shadow: 0 0 8px rgba(255,223,140,.5); }

/* 주요 버튼: 금색 (입장/회향) */
.sw-btn-gold {
  width: 100%; padding: 16px; border-radius: 16px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--sw-gold-hi), var(--sw-gold-deep));
  color: #2A2010; font-size: 16px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 6px 24px rgba(184,142,62,.35);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.sw-btn-gold:hover { box-shadow: 0 8px 30px rgba(184,142,62,.5); }
.sw-btn-gold:active { transform: scale(.98); }
/* 입장 버튼 숨쉬기 */
.sw-btn-breathe { animation: sw-breathe 4s ease-in-out infinite; }
@keyframes sw-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.018); } }

/* 보조 버튼 (어두운 금테) */
.sw-btn-ghost {
  width: 100%; padding: 14px; border-radius: 14px; cursor: pointer;
  background: rgba(20,20,26,.6); color: var(--sw-gold-bright);
  border: 1px solid rgba(197,160,89,.4); font-size: 14.5px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .25s ease;
}
.sw-btn-ghost:hover { border-color: var(--sw-gold); background: rgba(40,34,18,.5); }

.sw-prepare-footer { padding-top: 12px; }

/* ── 수행 중 화면 ──────────────────────────────────────── */
.sw-practice-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8vh; }

/* 원형 타이머 */
.sw-timer-wrap { position: relative; width: 290px; height: 290px; display: flex; align-items: center; justify-content: center; }
/* 호흡하는 halo */
.sw-halo { position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,223,140,.16) 0%, rgba(255,223,140,0) 65%);
  animation: sw-halo-breathe 8s ease-in-out infinite; }
@keyframes sw-halo-breathe { 0%,100% { transform: scale(.92); opacity: .55; } 50% { transform: scale(1.08); opacity: 1; } }

.sw-ring-svg { position: absolute; inset: 0; transform: rotate(-90deg); }
/* 타이머 중앙 텍스트가 밝은 배경 위에서도 또렷하게 보이도록 어두운 라디얼 백드롭 */
.sw-timer-center { position: relative; z-index: 2; text-align: center; }
.sw-timer-center::before { content: ''; position: absolute; inset: -38px -30px; z-index: -1;
  background: radial-gradient(circle, rgba(8,8,12,.62) 0%, rgba(8,8,12,.30) 55%, rgba(8,8,12,0) 78%); }
.sw-time-big { font-size: 56px; font-weight: 600; color: var(--sw-gold-bright); letter-spacing: 2px; line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,.6), 0 0 24px rgba(255,223,140,.45); font-variant-numeric: tabular-nums; }
.sw-time-label { font-size: 13px; color: var(--sw-text-soft, #d9c7a3); margin-top: 8px; letter-spacing: 3px;
  text-shadow: 0 1px 3px rgba(0,0,0,.7); }

/* 12시 방향 연꽃/등불 마크 */
.sw-ring-lotus { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 3;
  color: var(--sw-gold-bright); font-size: 18px;
  filter: drop-shadow(0 0 10px rgba(255,223,140,.7)); animation: sw-flicker 3.5s ease-in-out infinite; }
@keyframes sw-flicker { 0%,100% { opacity: .85; } 50% { opacity: 1; transform: translateX(-50%) scale(1.08); } }

/* 소리 상태 표시 — 가독성 필터 강화 */
.sw-sound-status { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 30px; font-size: 13px; color: #FFE9B0; font-weight: 600; letter-spacing: .5px;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  padding: 8px 18px; border-radius: 999px;
  background: rgba(8,8,12,.62); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(197,160,89,.32);
  box-shadow: 0 4px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); }
.sw-sound-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sw-jade);
  box-shadow: 0 0 8px var(--sw-jade); animation: sw-pulse 1.8s ease-in-out infinite; }
@keyframes sw-pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }

/* 하단 조작 버튼 — 어두운 반투명 패널로 묶어 가독성 향상 */
.sw-controls { display: flex; align-self: center; align-items: flex-start; justify-content: center; gap: 30px; margin-top: 8px;
  padding: 14px 24px; border-radius: 22px;
  background: rgba(8,8,12,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 6px 22px rgba(0,0,0,.4); }
.sw-ctrl { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.sw-ctrl .circle {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: rgba(20,20,26,.66); border: 1px solid rgba(197,160,89,.45);
  color: var(--sw-gold-bright); transition: all .25s ease;
}
.sw-ctrl:hover .circle { border-color: var(--sw-gold); box-shadow: 0 0 20px rgba(197,160,89,.3); }
.sw-ctrl:active .circle { transform: scale(.93); }
.sw-ctrl .lbl { font-size: 12px; color: #F0E6CF; font-weight: 600; letter-spacing: .5px;
  text-shadow: 0 1px 3px rgba(0,0,0,.85); }
.sw-ctrl.primary .circle { background: linear-gradient(135deg, var(--sw-gold-hi), var(--sw-gold-deep)); color: #2A2010; border: none; }

/* 하단 시구 — 텍스트 배경 필터(반투명 어두운 알약 + 블러) */
.sw-verse { display: inline-block; align-self: center; text-align: center; font-size: 13.5px; color: rgba(255,250,240,.92);
  line-height: 1.85; margin-top: 26px; padding: 12px 22px; letter-spacing: .5px;
  border-radius: 18px;
  background: rgba(8,8,12,.5); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(197,160,89,.22);
  text-shadow: 0 1px 4px rgba(0,0,0,.85);
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
  animation: sw-verse-fade 7s ease-in-out infinite; }
@keyframes sw-verse-fade { 0%,100% { opacity: .82; } 50% { opacity: 1; } }

/* ── 완료 화면 (따뜻한 금) ─────────────────────────────── */
.sw-screen-complete { background: linear-gradient(180deg, #14110A 0%, #1A1509 55%, #0F0C06 100%); }
.sw-complete-moon { position: absolute; bottom: 0; left: 0; right: 0; z-index: 0;
  height: 42%; background-image: url('/static/img/sw-moon-water.webp');
  background-size: cover; background-position: center top; opacity: .85;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 35%); }
.sw-complete-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sw-complete-title { font-size: 23px; font-weight: 600; color: var(--sw-gold-bright); line-height: 1.5;
  text-shadow: 0 0 20px rgba(255,223,140,.3); animation: sw-rise .9s ease both; }
@keyframes sw-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.sw-summary-card {
  width: 100%; margin: 26px 0; padding: 22px 18px; border-radius: 20px;
  background: rgba(28,24,14,.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(197,160,89,.35); text-align: center;
}
.sw-summary-buddha { width: 78px; height: 78px; margin: 0 auto 12px; border-radius: 50%;
  background: url('/static/img/sw-buddha.webp') center/cover; }
.sw-summary-card .p-name { font-size: 18px; font-weight: 600; color: var(--sw-text); }
.sw-summary-card .p-deity { font-size: 13px; color: var(--sw-gold); margin-top: 5px; }
.sw-summary-card .p-time { font-size: 14px; color: var(--sw-gold-bright); margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px; }

.sw-check-row { display: flex; align-items: center; gap: 10px; justify-content: center;
  font-size: 13.5px; color: var(--sw-text); margin: 9px 0; opacity: 0;
  animation: sw-check-in .5s ease forwards; }
.sw-check-row i { color: var(--sw-jade); font-size: 15px; }
@keyframes sw-check-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

.sw-complete-actions { width: 100%; display: flex; flex-direction: column; gap: 11px; margin-top: 24px; }

/* 페이드 to black 전환 레이어 */
.sw-fade-black { position: fixed; inset: 0; z-index: 70; background: #0A0A0F; opacity: 0;
  pointer-events: none; transition: opacity .55s ease; }
.sw-fade-black.on { opacity: 1; pointer-events: auto; }

/* 오늘 카드의 '시간 수행' 진입 버튼 (밝은 화면 안에서 수월암 예고) */
.sw-enter-btn {
  width: 100%; margin-top: 10px; padding: 11px 14px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #1E1B14, #15130E);
  border: 1px solid rgba(197,160,89,.55); color: #E6C97A;
  display: flex; align-items: center; gap: 10px; transition: all .25s ease;
}
.sw-enter-btn:hover { border-color: #C5A059; box-shadow: 0 0 14px rgba(197,160,89,.25); }
.sw-enter-btn .ico { font-size: 15px; color: var(--sw-gold); }
.sw-enter-btn .txt { font-size: 13.5px; font-weight: 600; }
.sw-enter-btn .sub { font-size: 11px; color: rgba(230,201,122,.6); font-weight: 400; }

/* 섹션 상단 '수월암 입장' 미니 버튼 */
.sw-enter-mini {
  font-size: 12px; color: var(--gold-deep, #B88E3E); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border: 1px solid rgba(197,160,89,.4); border-radius: 999px; background: #1E1B14;
}
.sw-enter-mini:hover { border-color: #C5A059; }

/* ── 완료 화면 묵상 작성 인라인 모달 (오버레이 안에서) ───────── */
.sw-reflect-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding: 22px; background: rgba(8,8,12,.72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .25s ease;
}
.sw-reflect-overlay.show { opacity: 1; }
.sw-reflect-card {
  width: 100%; max-width: 24rem; border-radius: 18px; padding: 20px 18px;
  background: linear-gradient(135deg, rgba(30,27,20,.96), rgba(18,17,12,.97));
  border: 1px solid rgba(197,160,89,.4); box-shadow: 0 12px 40px rgba(0,0,0,.6);
  transform: translateY(10px); transition: transform .25s ease;
}
.sw-reflect-overlay.show .sw-reflect-card { transform: translateY(0); }
.sw-reflect-title { font-family: 'Noto Serif KR', serif; font-size: 16px; font-weight: 700;
  color: var(--sw-gold-bright); display: flex; align-items: center; gap: 8px; }
.sw-reflect-sub { font-size: 12.5px; color: var(--sw-text-dim); margin: 6px 0 12px; line-height: 1.5; }
.sw-reflect-textarea {
  width: 100%; border-radius: 12px; padding: 12px 13px; font-size: 14px; line-height: 1.6;
  background: rgba(10,10,14,.6); border: 1px solid rgba(197,160,89,.3); color: var(--sw-text);
  font-family: 'Noto Serif KR', serif; resize: none; outline: none;
}
.sw-reflect-textarea:focus { border-color: var(--sw-gold); box-shadow: 0 0 0 2px rgba(197,160,89,.18); }
.sw-reflect-actions { display: flex; gap: 10px; margin-top: 14px; }
.sw-reflect-actions .sw-btn-ghost,
.sw-reflect-actions .sw-btn-gold { flex: 1; }

/* ── 수월암 입장 — 눈에 띄는 독립 배너(오늘의 수행 위) ─────── */
.sw-enter-banner {
  position: relative; overflow: hidden; cursor: pointer;
  margin: 12px 20px 4px; padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(120deg, #15130C 0%, #211B0F 55%, #15130C 100%);
  border: 1px solid rgba(197,160,89,.5);
  box-shadow: 0 6px 22px rgba(0,0,0,.25), inset 0 0 24px rgba(197,160,89,.06);
  display: flex; align-items: center; gap: 14px; transition: all .25s ease;
}
.sw-enter-banner:hover { border-color: #C5A059; box-shadow: 0 8px 28px rgba(197,160,89,.22), inset 0 0 30px rgba(197,160,89,.1); }
.sw-enter-banner .moon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #FFE9A8, #E3B45C 60%, #B88E3E);
  box-shadow: 0 0 16px rgba(255,223,140,.5); position: relative;
}
.sw-enter-banner .moon i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(40,32,16,.8); font-size: 17px; }
.sw-enter-banner .txt { flex: 1; min-width: 0; }
.sw-enter-banner .t1 { font-family: 'Noto Serif KR', serif; font-size: 15.5px; font-weight: 700; color: #F3D89A; }
.sw-enter-banner .t2 { font-size: 11.5px; color: rgba(230,201,122,.65); margin-top: 2px; }
.sw-enter-banner .arrow { color: var(--sw-gold); font-size: 14px; opacity: .8; }

/* ════════════════════════════════════════════════════════
   수월암 신규 UI — 곡 선택 / 자연 하위그룹 / 자체수행 / 목표시간 모달 / 나가기
   ════════════════════════════════════════════════════════ */

/* 소리 카드 내부 레이아웃 */
.sw-sound-card { display: flex; flex-direction: column; gap: 12px; }
.sw-sound-empty {
  font-size: 12.5px; color: var(--sw-text-dim); text-align: center;
  padding: 8px 4px; line-height: 1.5;
}
.sw-sound-empty i { color: var(--sw-gold); margin-right: 5px; }

/* 자연소리 하위그룹 칩 */
.sw-subgroup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-subchip {
  font-size: 12.5px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(20,20,26,.5); border: 1px solid rgba(127,179,168,.25);
  color: var(--sw-text-dim); transition: all .2s ease;
}
.sw-subchip:hover { color: var(--sw-text); border-color: rgba(127,179,168,.5); }
.sw-subchip.sel {
  background: rgba(127,179,168,.14); color: var(--sw-jade);
  border-color: var(--sw-jade); box-shadow: 0 0 10px rgba(127,179,168,.18);
}

/* 곡 목록 */
.sw-track-list { display: flex; flex-direction: column; gap: 7px; max-height: 230px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sw-track-list::-webkit-scrollbar { width: 3px; }
.sw-track-list::-webkit-scrollbar-thumb { background: rgba(197,160,89,.3); border-radius: 3px; }
.sw-track {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 12px; cursor: pointer; transition: all .2s ease;
  background: rgba(20,20,26,.45); border: 1px solid rgba(197,160,89,.14);
}
.sw-track:hover { border-color: rgba(197,160,89,.34); }
.sw-track.sel {
  background: linear-gradient(135deg, rgba(243,208,117,.14), rgba(184,142,62,.08));
  border-color: var(--sw-gold);
}
.sw-track-play {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(197,160,89,.16); border: 1px solid rgba(197,160,89,.35);
  color: var(--sw-gold-bright); font-size: 11px; cursor: pointer; transition: all .2s ease;
}
.sw-track-play:hover { background: rgba(197,160,89,.3); }
.sw-track-name { flex: 1; font-size: 13.5px; color: var(--sw-text); line-height: 1.35; }
.sw-track.sel .sw-track-name { color: var(--sw-gold-bright); }
.sw-track-chk { color: var(--sw-gold-bright); font-size: 14px; flex: 0 0 auto; }
/* 유료 예비 트랙(잠금) — 클릭 불가, '유료 준비 중' */
.sw-track.locked {
  cursor: not-allowed; border-style: dashed; border-color: rgba(197,160,89,.22);
  background-color: rgba(20,20,26,.4);
  background-image: repeating-linear-gradient(45deg,
    rgba(197,160,89,.045) 0, rgba(197,160,89,.045) 6px,
    transparent 6px, transparent 12px);
}
.sw-track.locked:hover { border-color: rgba(197,160,89,.22); }
.sw-track.locked .sw-track-name { color: var(--sw-text-dim); }
.sw-track-lock {
  background: transparent; border-color: rgba(197,160,89,.28);
  color: var(--sw-gold); opacity: .7;
}
.sw-track-badge {
  flex: 0 0 auto; font-size: 9px; letter-spacing: .2px; line-height: 1;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap; font-weight: 600;
  color: #0A0A0F; background: linear-gradient(135deg, var(--sw-gold-bright), var(--sw-gold));
}

/* 자체수행 직접추가 칩 + 입력 */
.sw-chip-add { border-style: dashed !important; }
.sw-chip-add i { margin-right: 4px; font-size: 11px; }
.sw-custom-add { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.sw-custom-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px;
  background: rgba(10,10,15,.6); border: 1px solid var(--sw-gold);
  color: var(--sw-text); font-size: 14.5px; outline: none;
  font-family: 'Noto Serif KR', serif;
}
.sw-custom-input::placeholder { color: var(--sw-text-dim); }
.sw-custom-input:focus { box-shadow: 0 0 12px rgba(197,160,89,.22); }
.sw-custom-hint { font-size: 11.5px; color: var(--sw-text-dim); padding-left: 2px; }
.sw-custom-hint i { color: var(--sw-gold); margin-right: 4px; }

/* 목표시간 인앱 모달 */
.sw-min-card { text-align: center; }
.sw-min-display { font-family: 'Noto Serif KR', serif; margin: 14px 0 6px; }
.sw-min-display #sw-min-val { font-size: 46px; font-weight: 700; color: var(--sw-gold-bright); }
.sw-min-unit { font-size: 18px; color: var(--sw-text-dim); margin-left: 4px; }
.sw-min-steppers { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
.sw-min-step {
  flex: 1; max-width: 64px; padding: 10px 0; border-radius: 11px; cursor: pointer;
  background: rgba(20,20,26,.6); border: 1px solid rgba(197,160,89,.28);
  color: var(--sw-text); font-size: 14px; font-weight: 600; transition: all .18s ease;
}
.sw-min-step:hover { border-color: var(--sw-gold); color: var(--sw-gold-bright); }
.sw-min-range { width: 100%; margin: 14px 0 4px; accent-color: var(--sw-gold); }
.sw-min-presets { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 8px 0 4px; }
.sw-min-preset {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(20,20,26,.5); border: 1px solid rgba(197,160,89,.22);
  color: var(--sw-text-dim); font-size: 12.5px; transition: all .18s ease;
}
.sw-min-preset:hover { color: var(--sw-gold-bright); border-color: var(--sw-gold); }

/* 수행 중 소리 시트 */
.sw-sound-sheet-card { max-height: 80vh; overflow-y: auto; }

/* 완료화면 나가기 버튼 */
.sw-btn-exit {
  width: 100%; padding: 13px; border-radius: 14px; cursor: pointer;
  background: transparent; border: 1px solid rgba(197,160,89,.4);
  color: var(--sw-text); font-size: 14.5px; font-weight: 600; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s ease; font-family: 'Noto Serif KR', serif;
}
.sw-btn-exit:hover { background: rgba(197,160,89,.1); border-color: var(--sw-gold); color: var(--sw-gold-bright); }
.sw-btn-exit i { font-size: 13px; }

/* ── 테마(분위기) 선택 ─────────────────────────────────
   현재 '수월'만 무료. 나머지는 잠금(유료, '준비 중'). 금/먹 톤만. */
.sw-theme-card { padding: 12px 10px; position: relative; }
.sw-theme-row {
  display: flex; gap: 10px; overflow-x: auto;
  /* 우측 패딩을 충분히 둬 마지막 카드(극락왕생)의 '유료 준비 중' 배지가
     컨테이너 가장자리/페이드에 잘리지 않도록 한다. */
  padding: 0 8px 6px 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.sw-theme-row::-webkit-scrollbar { display: none; }
.sw-theme { scroll-snap-align: start; }
/* 우측 페이드 힌트 — 더 많은 테마가 옆에 있음을 암시(가로 스크롤 가능 표시).
   배지 영역(하단)까지 덮지 않도록 썸네일 높이 구간에만 살짝 깐다. */
.sw-theme-card::after {
  content: ''; position: absolute; top: 12px; bottom: 44px; right: 2px;
  width: 18px; pointer-events: none; border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(20,20,26,0), rgba(18,18,24,.7) 92%);
}
.sw-theme {
  flex: 0 0 auto; width: 80px; cursor: pointer; text-align: center;
  transition: transform .18s ease, opacity .18s ease;
}
.sw-theme:active { transform: scale(.97); }
.sw-theme-thumb {
  width: 80px; height: 80px; border-radius: 14px; overflow: hidden;
  background-color: #15140e; background-size: cover; background-position: center;
  border: 1.5px solid rgba(197,160,89,.32);
  display: flex; align-items: center; justify-content: center;
  color: var(--sw-text-dim); font-size: 20px; position: relative;
}
.sw-theme.sel .sw-theme-thumb {
  border-color: var(--sw-gold);
  box-shadow: 0 0 0 1px var(--sw-gold), 0 0 16px rgba(197,160,89,.45);
}
.sw-theme.sel .sw-theme-thumb i {
  color: var(--sw-gold-bright); font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(255,223,140,.8));
  background: rgba(10,10,15,.35); width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.sw-theme-name { font-size: 12.5px; font-weight: 600; color: var(--sw-text); margin-top: 7px; }
.sw-theme.sel .sw-theme-name { color: var(--sw-gold-bright); }
.sw-theme-sub { font-size: 10px; color: var(--sw-text-dim); margin-top: 2px; line-height: 1.3; }
/* 잠금(준비 중) 테마 */
.sw-theme.locked { cursor: default; }
.sw-theme.locked .sw-theme-thumb {
  background-image:
    repeating-linear-gradient(135deg, rgba(197,160,89,.05) 0 8px, rgba(0,0,0,0) 8px 16px);
  border-style: dashed; border-color: rgba(197,160,89,.25);
  color: rgba(197,160,89,.5);
}
.sw-theme.locked .sw-theme-thumb i { font-size: 18px; }
.sw-theme.locked .sw-theme-name { color: var(--sw-text-dim); }
.sw-theme-badge {
  display: inline-block; margin-top: 5px; font-size: 9px; letter-spacing: .2px;
  color: var(--sw-gold); border: 1px solid rgba(197,160,89,.4);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   입장 의식(threshold) — "깊은 암자로 들어가는" 전환 연출
   입장 버튼 → 칠흑 위로 금빛이 차오르며 안내 문구가 떠오른다.
   이 시간 동안 세션 생성/화면 준비가 끝나 로딩 공백이 의식으로 바뀐다.
   ════════════════════════════════════════════════════════════════════ */
.sw-threshold {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 50%, #1A140A 0%, #0A0A0F 70%);
  opacity: 0; transition: opacity .6s ease;
  pointer-events: none;
}
.sw-threshold.show { opacity: 1; }
.sw-threshold.fade-out { opacity: 0; transition: opacity .7s ease; }

/* 가운데서 번지는 금빛(연등/촛불) */
.sw-threshold .sw-th-glow {
  position: absolute; width: 60vw; height: 60vw; max-width: 380px; max-height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,223,140,.32) 0%, rgba(255,200,90,.12) 38%, transparent 68%);
  filter: blur(2px);
  animation: sw-th-glow 3.2s ease-in-out infinite;
}
@keyframes sw-th-glow {
  0%,100% { transform: scale(.82); opacity: .55; }
  50%     { transform: scale(1.06); opacity: 1; }
}

/* 작은 연꽃/등불 마크 */
.sw-threshold .sw-th-mark {
  position: relative; z-index: 2;
  font-size: 40px; color: var(--sw-gold-bright);
  filter: drop-shadow(0 0 18px rgba(255,223,140,.6));
  opacity: 0; animation: sw-th-rise .9s ease .15s forwards;
}

/* 안내 문구 */
.sw-threshold .sw-th-text {
  position: relative; z-index: 2;
  margin-top: 20px; max-width: 17rem; text-align: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 16px; line-height: 1.85; letter-spacing: .5px;
  color: var(--sw-text);
  text-shadow: 0 1px 14px rgba(0,0,0,.6);
  opacity: 0; animation: sw-th-rise 1s ease .5s forwards;
}
.sw-threshold .sw-th-sub {
  position: relative; z-index: 2;
  margin-top: 12px; font-size: 12px; letter-spacing: 3px;
  color: rgba(197,160,89,.7);
  opacity: 0; animation: sw-th-rise 1s ease .9s forwards;
}
@keyframes sw-th-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 위로 천천히 떠오르는 향 입자 (입장 분위기) */
.sw-threshold .sw-particles { z-index: 1; }
