/* ============================================================
   달빛등불 v3 — language switch, drawer, live wall, rituals,
   ASMR mixer, duo, capsule, moon phase, melt, time-of-day sky
   ============================================================ */

/* ---------- header tools ---------- */

.head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
  flex: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dim);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-link:hover { color: var(--gold-soft); }
.lang-link.is-on {
  color: #1b1304;
  background: linear-gradient(180deg, #ffe6a3, #eda62f);
}

.drawer-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--gold-soft);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.drawer-btn svg { width: 19px; height: 19px; }
.drawer-btn:hover { border-color: var(--line-strong); background: rgba(245, 158, 11, 0.09); transform: translateY(-1px); }
.drawer-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.9);
}
.menu-langs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 4px;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
}
.menu-langs .lang-link { min-width: 40px; height: 28px; border: 1px solid var(--line-soft); }

/* ---------- moon chip in hero meta ---------- */

.moon-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 7px;
  border: 1px solid rgba(188, 208, 240, 0.22);
  border-radius: 999px;
  background: rgba(20, 30, 52, 0.5);
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.moon-chip:hover { border-color: rgba(188, 208, 240, 0.45); background: rgba(28, 40, 68, 0.62); }
.moon-disc { width: 30px; height: 30px; display: grid; place-items: center; }
.moon-disc canvas { width: 30px; height: 30px; display: block; }
.moon-txt { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.moon-txt b { font-size: 12px; font-weight: 600; color: #eef2ff; }
.moon-txt span { font-size: 10px; color: var(--dim); letter-spacing: 0.04em; }
.moon-chip.is-full {
  border-color: rgba(253, 230, 138, 0.5);
  box-shadow: 0 0 22px rgba(253, 230, 138, 0.16);
}
.full-pill {
  margin-left: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #1b1304;
  background: linear-gradient(180deg, #ffe6a3, #eda62f);
  white-space: nowrap;
}

/* ---------- melt ---------- */

.melt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}
.melt-note {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.01em;
}
.melt-reset {
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.melt-reset:hover { color: var(--gold-soft); border-color: var(--line-strong); }

/* ---------- 7-day challenge bar ---------- */

.challenge-bar {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  padding: 16px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(64, 86, 140, 0.22), transparent 60%),
    rgba(11, 17, 30, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ch-head { display: flex; flex-direction: column; gap: 3px; }
.ch-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: #f8f2e4;
}
.ch-flame {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff6d8, #f59e0b 62%, rgba(245, 158, 11, 0) 70%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}
.ch-sub { font-size: 11.5px; color: var(--dim); }
.ch-stamps {
  display: flex;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ch-stamp {
  width: 44px;
  padding: 6px 0 5px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.015);
  display: grid;
  place-items: center;
  gap: 2px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.cs-moon {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(167, 176, 194, 0.4);
  background: transparent;
  position: relative;
}
.ch-stamp.is-on {
  border-color: rgba(253, 230, 138, 0.42);
  background: rgba(245, 158, 11, 0.10);
  box-shadow: inset 0 0 16px rgba(245, 158, 11, 0.12);
}
.ch-stamp.is-on .cs-moon {
  border-color: transparent;
  background: radial-gradient(circle at 38% 32%, #fffdf3, #fde68a 60%, #e8a93a 100%);
  box-shadow: 0 0 9px rgba(253, 230, 138, 0.55);
}
.ch-stamp.is-today { border-style: dashed; }
.ch-stamp.is-today.is-on { border-style: solid; }
.cs-day { font-size: 9px; color: var(--dim); letter-spacing: 0.04em; }
.cs-date { font-size: 9px; color: var(--muted); }
.ch-badges { display: flex; align-items: center; gap: 7px; }
.ch-badge,
.dw-badge {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px dashed rgba(167, 176, 194, 0.28);
  font-size: 10.5px;
  color: var(--dim);
  white-space: nowrap;
  transition: all 0.3s var(--ease);
}
.ch-badge.is-on,
.dw-badge.is-on {
  border: 1px solid rgba(253, 230, 138, 0.6);
  color: #1b1304;
  background: linear-gradient(180deg, #ffe6a3, #eda62f);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.22);
}
.ch-preview {
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 10.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ch-preview.is-on { color: var(--gold-soft); }

/* ---------- rituals tabs ---------- */

.rituals-sec .sec-head { margin-bottom: 30px; }
.ritual-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(10, 16, 31, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 26px;
}
.rt-tab {
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.rt-tab:hover { color: var(--gold-soft); }
.rt-tab.is-on {
  color: #1b1304;
  background: linear-gradient(180deg, #ffe6a3, #eda62f);
  font-weight: 600;
}
.ritual-panel { display: none; }
.ritual-panel.is-on { display: block; animation: v3-fade 0.45s var(--ease) both; }
@keyframes v3-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.rit-h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: #f8f3e7;
}

.quiz-wrap,
.duo-wrap,
.capsule-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(56, 74, 118, 0.24), transparent 55%),
    linear-gradient(180deg, rgba(14, 21, 38, 0.82), rgba(8, 12, 22, 0.86));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.quiz-wrap.has-result { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }

.quiz-steps { display: grid; gap: 18px; }
.quiz-q {
  border: 0;
  margin: 0;
  padding: 0 0 0 0;
  min-width: 0;
}
.quiz-q legend {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: #f2ecdf;
  margin-bottom: 10px;
  padding: 0;
}
.qnum {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 10.5px;
  color: var(--gold-soft);
  flex: none;
}
.quiz-opts { display: grid; gap: 7px; }
.q-opt {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}
.q-opt:hover { border-color: rgba(253, 230, 138, 0.3); color: var(--text); background: rgba(245, 158, 11, 0.05); }
.q-opt.is-on {
  border-color: rgba(253, 230, 138, 0.62);
  background: rgba(245, 158, 11, 0.12);
  color: #fff8e6;
  box-shadow: inset 0 0 18px rgba(245, 158, 11, 0.10);
}
.quiz-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.quiz-actions .hint { transition: opacity 0.3s; }

.quiz-result {
  position: relative;
  border: 1px solid rgba(253, 230, 138, 0.20);
  border-radius: 22px;
  padding: 26px 24px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(56, 76, 124, 0.5), transparent 62%),
    linear-gradient(180deg, rgba(13, 20, 36, 0.9), rgba(7, 11, 22, 0.94));
  opacity: 0.42;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  align-self: start;
}
.quiz-result.is-on {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 30px 70px -40px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: qr-pop 0.6s var(--ease) both;
}
@keyframes qr-pop {
  0% { transform: scale(0.97); }
  60% { transform: scale(1.008); }
  100% { transform: scale(1); }
}
.qr-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.qr-glyph {
  margin: 12px auto 6px;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 38px;
  color: #fff6d8;
  background: radial-gradient(circle at 50% 40%, rgba(255, 226, 160, 0.22), rgba(245, 158, 11, 0.06) 60%, transparent 72%);
  border: 1px solid rgba(253, 230, 138, 0.3);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.18);
}
.qr-glyph.th-gold { color: #ffe2a0; }
.qr-glyph.th-lotus { color: #ffd6da; border-color: rgba(245, 184, 189, 0.35); box-shadow: 0 0 40px rgba(245, 184, 189, 0.16); }
.qr-glyph.th-pure { color: #fff6e2; border-color: rgba(243, 231, 200, 0.35); }
.qr-glyph.th-moon { color: #dce7ff; border-color: rgba(188, 208, 240, 0.35); box-shadow: 0 0 40px rgba(188, 208, 240, 0.16); }
#quizTypeName { font-size: 1.5rem; }
.qr-tag {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gold-soft);
}
.qr-desc {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--muted);
}
.qr-stats {
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.qr-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.qr-stats dt { font-size: 11.5px; color: var(--dim); }
.qr-stats dd { margin: 0; font-size: 12.5px; color: #efe9dc; text-align: right; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.qr-actions .btn { min-height: 40px; padding: 0 14px; font-size: 12.5px; }

/* ---------- duo ---------- */

.duo-form, .capsule-form { display: grid; gap: 14px; }
.duo-result, .capsule-result { display: none; margin-top: 18px; }
.duo-result.is-on, .capsule-result.is-on { display: block; animation: v3-fade 0.4s var(--ease) both; }
.duo-visual,
.capsule-visual {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border-radius: 20px;
  background: radial-gradient(80% 80% at 50% 20%, rgba(64, 86, 140, 0.24), transparent 70%);
}
.duo-candle {
  position: relative;
  width: 46px;
  height: 96px;
  border-radius: 8px 8px 5px 5px;
  background: linear-gradient(90deg, #b9b1a0, #f5eeda 40%, #b9b1a0);
  box-shadow: 0 16px 30px -18px #000;
  opacity: 0.55;
  transition: opacity 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.duo-candle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -26px;
  width: 16px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 60%, #fff6d8, #f5b74a 70%, rgba(245, 158, 11, 0) 72%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.duo-candle.is-lit { opacity: 1; box-shadow: 0 0 50px rgba(245, 158, 11, 0.35), 0 16px 30px -18px #000; }
.duo-candle.is-lit::before { opacity: 1; animation: duo-flicker 2.6s ease-in-out infinite; }
@keyframes duo-flicker {
  0%, 100% { transform: translateX(-50%) scaleY(1); }
  45% { transform: translateX(-50%) scaleY(1.08) translateY(-2px); }
  70% { transform: translateX(-50%) scaleY(0.95); }
}
.duo-visual { display: flex; align-items: flex-end; justify-content: center; gap: 54px; }
.duo-slot { display: grid; justify-items: center; gap: 10px; }
.duo-name { font-size: 10.5px; letter-spacing: 0.06em; color: var(--dim); }
.duo-thread {
  position: absolute;
  left: 34%;
  right: 34%;
  top: 44%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(253, 230, 138, 0.4), transparent);
}
.duo-candle:not(.is-lit) {
  filter: saturate(0.25) brightness(0.66);
  outline: 1px dashed rgba(253, 230, 138, 0.28);
  outline-offset: 4px;
}

/* ---------- capsule ---------- */

.capsule-quick { display: flex; gap: 7px; flex-wrap: wrap; }
.chip-mini {
  padding: 6px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chip-mini:hover, .chip-mini.is-on {
  border-color: rgba(253, 230, 138, 0.5);
  color: var(--gold-soft);
  background: rgba(245, 158, 11, 0.09);
}
.seal-lamp {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(253, 230, 138, 0.35);
  background: radial-gradient(circle at 50% 35%, rgba(255, 228, 160, 0.18), rgba(20, 28, 48, 0.6) 60%, transparent 72%);
  box-shadow: inset 0 0 40px rgba(245, 158, 11, 0.12), 0 0 60px rgba(245, 158, 11, 0.10);
}
.seal-core {
  font-family: var(--serif);
  font-size: 44px;
  color: #ffe9b8;
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.6);
}
.seal-date {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

/* ---------- drawer ---------- */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(3, 6, 13, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}
.drawer-scrim.is-on { opacity: 1; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 131;
  width: min(430px, 100vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(253, 230, 138, 0.18);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(56, 76, 124, 0.35), transparent 60%),
    linear-gradient(180deg, #0b1221, #080c17 60%, #070a13);
  box-shadow: -40px 0 90px -40px #000;
  transform: translateX(102%);
  transition: transform 0.42s var(--ease);
  overflow: hidden;
}
.drawer.is-on { transform: none; }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 24px 14px;
}
.drawer-head h3 { font-size: 1.25rem; }
.drawer-sub { margin: 4px 0 0; font-size: 12px; color: var(--dim); }
.drawer-close {
  position: static;
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.drawer-close svg { width: 15px; height: 15px; }
.drawer-close:hover { color: var(--gold-soft); border-color: var(--line); }
.drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
}
.dw-tab {
  flex: 1;
  padding: 11px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dim);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.dw-tab:hover { color: var(--gold-soft); }
.dw-tab.is-on { color: var(--gold-soft); border-bottom-color: var(--gold); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 8px; }
.drawer-panel { display: none; }
.drawer-panel.is-on { display: block; animation: v3-fade 0.3s var(--ease) both; }
.dw-empty {
  padding: 26px 18px;
  border: 1px dashed var(--line-soft);
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--dim);
  text-align: center;
}
.dw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dw-item {
  padding: 14px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, background 0.3s;
}
.dw-item.is-done {
  border-color: rgba(142, 224, 192, 0.3);
  background: rgba(142, 224, 192, 0.05);
}
.dw-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dw-when { font-size: 10.5px; letter-spacing: 0.06em; color: var(--dim); }
.dw-theme {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  font-size: 9.5px;
  color: var(--muted);
}
.dw-wish {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.6;
  color: #f1ebde;
}
.dw-item.is-done .dw-wish { text-decoration: line-through; text-decoration-color: rgba(142, 224, 192, 0.5); }
.dw-item-foot { display: flex; gap: 8px; }
.dw-done, .dw-del, .dw-link {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: transparent;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.dw-done:hover { color: #8ee0c0; border-color: rgba(142, 224, 192, 0.4); }
.dw-del:hover { color: #f0a6a6; border-color: rgba(240, 166, 166, 0.4); }
.dw-link { color: var(--gold-soft); text-decoration: none; }
.dw-item.is-done .dw-done { color: #8ee0c0; border-color: rgba(142, 224, 192, 0.35); }

.dw-cardgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dw-card { margin: 0; }
.dw-card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: #0a101d;
}
.dw-card figcaption { margin-top: 5px; font-size: 10.5px; color: var(--dim); text-align: center; }

.dw-stamp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dw-stamp {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}
.ds-mark { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(167, 176, 194, 0.4); }
.dw-stamp.is-on { border-color: rgba(253, 230, 138, 0.4); background: rgba(245, 158, 11, 0.09); }
.dw-stamp.is-on .ds-mark {
  border-color: transparent;
  background: radial-gradient(circle at 38% 32%, #fffdf3, #fde68a 60%, #e8a93a 100%);
  box-shadow: 0 0 8px rgba(253, 230, 138, 0.5);
}
.ds-date { font-size: 8.5px; color: var(--dim); }
.dw-badges { display: flex; gap: 7px; margin-top: 14px; }

.drawer-foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line-soft);
  background: rgba(6, 9, 19, 0.6);
}
.dw-foot-label {
  margin: 0 0 9px;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.dw-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.dw-quick-btn {
  padding: 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.dw-quick-btn:hover { color: var(--gold-soft); border-color: var(--line-strong); background: rgba(245, 158, 11, 0.07); }
.dw-mood {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--dim);
}
.dw-mood select {
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #0b1221;
  color: var(--text);
  font-size: 11.5px;
}
body.drawer-open { overflow: hidden; }

/* ---------- asmr modal ---------- */

.asmr-modal {
  max-width: 560px;
  text-align: left;
  padding: 32px 30px 26px;
}
.asmr-head { display: flex; gap: 16px; align-items: flex-start; }
.asmr-head h3 { font-size: 1.25rem; }
.asmr-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 3px; }
.asmr-bars i {
  width: 4px;
  height: 30%;
  border-radius: 2px;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  opacity: 0.35;
  transition: opacity 0.3s;
}
.asmr-bars.is-live i { opacity: 1; animation: asmr-bar 1.6s ease-in-out infinite; }
.asmr-bars i:nth-child(2) { animation-delay: 0.25s; }
.asmr-bars i:nth-child(3) { animation-delay: 0.5s; }
@keyframes asmr-bar {
  0%, 100% { height: 22%; }
  50% { height: 92%; }
}
.asmr-body { display: grid; gap: 14px; margin: 22px 0 18px; }
.asmr-row {
  display: grid;
  grid-template-columns: 96px 1fr 34px;
  align-items: center;
  gap: 12px;
}
.asmr-name { font-size: 12.5px; color: var(--muted); }
.asmr-val { font-size: 11px; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.asmr-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(253, 230, 138, 0.8) 0,
    rgba(253, 230, 138, 0.55) var(--v, 50%),
    rgba(253, 230, 138, 0.14) var(--v, 50%));
  outline: none;
  cursor: pointer;
}
.asmr-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff3cf, #eda62f);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
  border: 0;
}
.asmr-range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: #f3c25f;
}
.asmr-presets {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-soft);
}
.asmr-preset-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-right: 4px; }
.asmr-actions { display: flex; gap: 9px; margin-top: 16px; }
.asmr-actions .btn { flex: 1; }
#asmrMaster.is-on {
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold-soft);
  border-color: var(--line-strong);
}

/* ---------- duo / capsule modals ---------- */

.duo-modal, .capsule-modal { max-width: 500px; }
.duo-stage {
  position: relative;
  height: 150px;
  margin: 4px auto 18px;
  width: 230px;
}
.duo-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 190px;
  height: 130px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.20), rgba(245, 158, 11, 0) 68%);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.duo-stage.is-both::before { opacity: 1; }
.duo-wax {
  position: absolute;
  inset: auto 0 0;
  height: 84px;
  display: flex;
  justify-content: center;
  gap: 54px;
}
.duo-wax span {
  position: relative;
  width: 46px;
  height: 80px;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #b9b1a0, #f7f0dd 38%, #e8dfc8 64%, #b3a892);
  box-shadow: 0 14px 26px -16px #000, inset 0 -16px 20px -14px rgba(90, 70, 40, 0.45);
}
.duo-wax span::before {
  content: "";
  position: absolute;
  inset: -4px 0 auto;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffaf0, #e9dfc8);
  box-shadow: inset 0 -2px 3px rgba(90, 70, 40, 0.25);
}
.duo-flame {
  position: absolute;
  bottom: 78px;
  width: 20px;
  height: 38px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 62%, #fff9e8, #f7c463 62%, rgba(245, 158, 11, 0) 76%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.duo-flame.is-lit { opacity: 1; animation: duo-flicker 2.4s ease-in-out infinite; }
#duoFlameA { left: 50%; margin-left: -66px; }
#duoFlameB { left: 50%; margin-left: 46px; }
.duo-modal h3 { margin-bottom: 8px; }
.duo-modal p { color: var(--muted); font-size: 14.5px; }
.duo-modal .quote {
  margin: 16px 0 4px;
  padding: 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  font-family: var(--serif);
  font-size: 16px;
  color: #f4efe6;
  background: rgba(255, 255, 255, 0.025);
}
.cap-seal {
  margin: 6px auto 20px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(253, 230, 138, 0.42);
  background: radial-gradient(circle at 50% 38%, rgba(255, 228, 160, 0.18), rgba(20, 28, 48, 0.6) 65%);
  box-shadow: inset 0 0 34px rgba(245, 158, 11, 0.14), 0 0 50px rgba(245, 158, 11, 0.12);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s;
}
.cap-seal span { font-family: var(--serif); font-size: 38px; color: #ffe9b8; }
.cap-seal.is-unlocked { border-color: rgba(142, 224, 192, 0.5); box-shadow: inset 0 0 34px rgba(142, 224, 192, 0.14), 0 0 50px rgba(142, 224, 192, 0.16); }
.cap-seal.is-broken { animation: seal-break 0.9s var(--ease) both; border-color: rgba(142, 224, 192, 0.7); }
@keyframes seal-break {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.12) rotate(-6deg); }
  100% { transform: scale(1) rotate(0); }
}
.capsule-modal h3 { margin-bottom: 8px; }
.capsule-modal p { color: var(--muted); font-size: 14.5px; }
.capsule-modal .quote {
  margin: 16px 0 4px;
  padding: 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  font-family: var(--serif);
  font-size: 17px;
  color: #f4efe6;
  background: rgba(255, 255, 255, 0.025);
}

/* ---------- wall moon + live lanterns ---------- */

.wall-moon {
  position: absolute;
  right: 9%;
  top: 8%;
  width: 84px;
  height: 84px;
  z-index: 1;
  pointer-events: none;
}
.wm-disc { position: absolute; inset: 0; display: grid; place-items: center; }
.wm-disc canvas { width: 84px; height: 84px; }
.wm-halo {
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 228, 255, 0.16), transparent 66%);
  z-index: -1;
}
.lantern.is-live .l-glow { opacity: 0.85; }
.lantern.is-live::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(188, 208, 240, 0.22);
  animation: live-halo 5.6s ease-in-out infinite;
}
@keyframes live-halo {
  0%, 100% { opacity: 0.25; transform: scale(0.96); }
  50% { opacity: 0.6; transform: scale(1.04); }
}

/* ---------- floating lantern sky ---------- */

.lantern-sky {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- limited talisman frame : 3일 월광 · 7일 황실 금박 성좌 ---------- */

.talisman-frame { position: relative; }
.card-ring { position: relative; }

.lim-orn {
  position: absolute;
  inset: -16px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.talisman-frame.lim-3 .lim-orn,
.talisman-frame.lim-7 .lim-orn { opacity: 1; }
.talisman-frame.lim-7 .card-ring { z-index: 1; }

.lim-orn .lo {
  position: absolute;
  width: 88px;
  height: 88px;
  background: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23f3d98a' stroke-linecap='round'><path d='M4 46C4 22 22 4 46 4' stroke-width='2.4'/><path d='M11 56C11 28 28 11 56 11' stroke-width='1.1' opacity='.72'/><path d='M4 66C4 34 18 14 40 8' stroke-width='.9' opacity='.45'/><path d='M22 44C30 32 44 22 58 20' stroke-width='1.2' opacity='.82'/><path d='M20 34C28 26 40 25 46 32C52 39 48 50 39 50C30 50 25 43 28 37' stroke-width='1.4'/></g><g fill='%23f7e6ae'><circle cx='4' cy='46' r='2.6'/><circle cx='46' cy='4' r='2.6'/><path d='M60 4l2.6 6.4L69 13l-6.4 2.6L60 22l-2.6-6.4L51 13l6.4-2.6z'/><circle cx='22' cy='44' r='1.6' opacity='.9'/></g></svg>") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.55));
}
.lo-tl { left: 0; top: 0; }
.lo-tr { right: 0; top: 0; transform: rotate(90deg); }
.lo-br { right: 0; bottom: 0; transform: rotate(180deg); }
.lo-bl { left: 0; bottom: 0; transform: rotate(270deg); }

.talisman-frame.lim-3 .lo { filter: saturate(0.15) brightness(1.5) drop-shadow(0 0 6px rgba(188, 208, 240, 0.55)); }

.lim-shimmer {
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 246, 214, 0.42) 46%, rgba(255, 246, 214, 0.06) 54%, transparent 70%);
  background-size: 260% 260%;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}
.talisman-frame.lim-7 .lim-shimmer { opacity: 0.32; animation: lim-sweep 7s linear infinite; }
@keyframes lim-sweep {
  0% { background-position: 130% 0; }
  100% { background-position: -40% 100%; }
}

/* 7일 — 삼중 금박 테두리 + 금빛 파동 */
.talisman-frame.lim-7 .card-ring::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 26px;
  border: 2px solid rgba(253, 230, 138, 0.9);
  pointer-events: none;
  z-index: 3;
  box-shadow:
    0 0 0 4px rgba(214, 160, 46, 0.38),
    0 0 0 7px rgba(253, 230, 138, 0.30),
    0 0 44px rgba(245, 158, 11, 0.38),
    inset 0 0 38px rgba(245, 158, 11, 0.16);
  animation: lim-pulse 4.6s ease-in-out infinite;
}
.talisman-frame.lim-7 .card-ring::after {
  content: "";
  position: absolute;
  inset: -26px;
  border-radius: 32px;
  background: radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.16), transparent 62%);
  filter: blur(10px);
  z-index: 2;
  pointer-events: none;
  animation: lim-breathe 6s ease-in-out infinite;
}
@keyframes lim-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(214, 160, 46, 0.30), 0 0 0 7px rgba(253, 230, 138, 0.22), 0 0 34px rgba(245, 158, 11, 0.30), inset 0 0 30px rgba(245, 158, 11, 0.12); }
  50% { box-shadow: 0 0 0 4px rgba(214, 160, 46, 0.48), 0 0 0 7px rgba(253, 230, 138, 0.38), 0 0 56px rgba(245, 158, 11, 0.5), inset 0 0 44px rgba(245, 158, 11, 0.22); }
}
@keyframes lim-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* 3일 — 월광 은빛 이중 테두리 */
.talisman-frame.lim-3 .card-ring::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 22px;
  border: 1px solid rgba(226, 236, 252, 0.55);
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 0 3px rgba(188, 208, 240, 0.14), 0 0 26px rgba(188, 208, 240, 0.28), inset 0 0 20px rgba(188, 208, 240, 0.10);
}

/* ---------- 7일 완주 등불의 벽 — 황금 이중 후광 + 왕관 별 ---------- */

.lantern .l-crown {
  position: absolute;
  left: 50%;
  top: -17px;
  width: 22px;
  height: 22px;
  transform: translateX(-50%) scale(0.7);
  background: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M20 2l4.6 11.4L36 18l-11.4 4.6L20 34l-4.6-11.4L4 18l11.4-4.6z' fill='%23fff3c4'/><path d='M20 8l2.8 6.9L30 18l-7.2 3.1L20 28l-2.8-6.9L10 18l7.2-3.1z' fill='%23e5b445'/></svg>") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.lantern.is-royal {
  width: 50px;
  height: 50px;
  z-index: 4;
}
.lantern.is-royal .l-glow {
  width: 112px;
  height: 112px;
  background: radial-gradient(circle, rgba(255, 219, 133, 0.66), rgba(255, 180, 90, 0) 64%);
  opacity: 0.95;
}
.lantern.is-royal .l-svg {
  filter: drop-shadow(0 0 10px rgba(253, 230, 138, 0.95)) drop-shadow(0 0 24px rgba(245, 158, 11, 0.6));
}
.lantern.is-royal .l-crown {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: crown-twinkle 3.4s ease-in-out infinite;
}
.lantern.is-royal::before {
  content: "";
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 230, 138, 0.9);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22), 0 0 0 9px rgba(253, 230, 138, 0.16), 0 0 28px rgba(245, 158, 11, 0.6);
  animation: royal-halo 5.2s ease-in-out infinite;
}
.lantern.is-royal::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 18%, rgba(255, 240, 190, 0.55) 23%, transparent 29%, transparent 52%, rgba(255, 240, 190, 0.4) 58%, transparent 65%, transparent 100%);
  animation: royal-spin 9s linear infinite;
  pointer-events: none;
}
@keyframes royal-halo {
  0%, 100% { opacity: 0.55; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes royal-spin { to { transform: rotate(360deg); } }
@keyframes crown-twinkle {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(0.92) rotate(-6deg); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.12) rotate(6deg); }
}

.wall-royal {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  align-self: flex-start;
  margin: 8px 0 0;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2a1a03;
  background: linear-gradient(180deg, #fff6d7, #e9bb52 55%, #a9791a);
  border: 1px solid rgba(255, 246, 214, 0.85);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}
.wall-royal[hidden] { display: none; }

/* 7일 배지도 한 단계 화려하게 */
.ch-badge.is-on[data-on="1"],
.dw-badge.is-on[data-on="1"] {
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn[hidden], .overlay .btn[hidden] { display: none !important; }

.offscreen-canvas {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.quiz-types { display: none; }

/* ---------- time-of-day sky ---------- */

html[data-phase="dusk"] body::before {
  background:
    radial-gradient(1000px 640px at 78% -10%, rgba(214, 138, 92, 0.34), transparent 62%),
    radial-gradient(760px 560px at 14% 6%, rgba(120, 74, 96, 0.42), transparent 62%),
    radial-gradient(900px 700px at 50% 106%, rgba(120, 48, 30, 0.26), transparent 66%),
    linear-gradient(180deg, #100b18 0%, #1a1020 42%, #0a0912 100%);
}
html[data-phase="dawn"] body::before {
  background:
    radial-gradient(1000px 660px at 22% -6%, rgba(120, 150, 200, 0.32), transparent 62%),
    radial-gradient(820px 600px at 88% 12%, rgba(196, 150, 160, 0.26), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(120, 96, 140, 0.16), transparent 64%),
    linear-gradient(180deg, #080d1a 0%, #101a30 46%, #080b14 100%);
}
html[data-phase="night"] body::before {
  background:
    radial-gradient(1100px 720px at 78% -8%, rgba(64, 86, 140, 0.30), transparent 62%),
    radial-gradient(820px 620px at 12% 8%, rgba(30, 44, 78, 0.55), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(180, 83, 9, 0.14), transparent 64%),
    linear-gradient(180deg, #060913 0%, #080d1a 42%, #060913 100%);
}
html[data-phase="day"] body::before {
  background:
    radial-gradient(1100px 720px at 76% -10%, rgba(120, 156, 210, 0.34), transparent 62%),
    radial-gradient(820px 620px at 10% 4%, rgba(92, 124, 178, 0.34), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(196, 168, 120, 0.14), transparent 64%),
    linear-gradient(180deg, #0a1222 0%, #101c30 44%, #080e18 100%);
}
html[data-phase="day"] .wall-sky,
html[data-phase="dusk"] .wall-sky { filter: saturate(1.05) brightness(1.04); }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .quiz-wrap, .quiz-wrap.has-result, .duo-wrap, .capsule-wrap { grid-template-columns: 1fr; gap: 24px; padding: 26px; }
  .quiz-result { order: 2; }
  .challenge-bar { grid-template-columns: 1fr; gap: 14px; padding: 16px 18px; }
  .ch-badges { justify-content: flex-start; }
  .head-tools { gap: 6px; }
}

@media (max-width: 860px) {
  .head-inner { gap: 12px; }
  .head-tools { margin-left: auto; }
  .nav { display: none; }
  .lang-switch { display: none; }
  .menu-langs { display: flex; }
  .drawer-btn { width: 38px; height: 38px; }
}

@media (max-width: 720px) {
  .moon-chip { padding: 4px 10px 4px 5px; }
  .moon-txt b { font-size: 11px; }
  .moon-txt span { font-size: 9px; }
  .ch-stamps { overflow-x: auto; padding-bottom: 2px; }
  .ch-stamp { width: 38px; flex: none; }
  .challenge-bar { margin-top: 22px; border-radius: 16px; }
  .ritual-tabs { width: 100%; }
  .rt-tab { flex: 1; padding: 9px 6px; font-size: 12.5px; }
  .quiz-wrap, .duo-wrap, .capsule-wrap { padding: 22px 18px; border-radius: 20px; }
  .qr-actions .btn, .quiz-actions .btn { flex: 1 1 100%; }
  .q-opt { font-size: 13px; padding: 10px 12px; }
  .duo-visual { min-height: 180px; }
  .drawer { width: 100%; }
  .asmr-modal { padding: 26px 20px 22px; }
  .asmr-row { grid-template-columns: 84px 1fr 30px; gap: 9px; }
  .dm-row { grid-template-columns: 1fr; }
  .dw-cardgrid { grid-template-columns: 1fr 1fr; }
  .asmr-actions { flex-direction: column; }
  .duo-stage { height: 130px; }
}

@media (max-width: 420px) {
  .brand-en { display: none; }
  .ch-badge { font-size: 9.5px; padding: 4px 8px; }
  .moon-chip .full-pill { display: none; }
  .rt-tab { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .lantern-sky { display: none; }
}

/* ============================================================
   2026-12-03 · Clickable affordance
   읽기용 카드·입력칸은 어둡고 평평하게 두고,
   누를 수 있는 요소만 밝은 표면 + 골드 테두리 + 미세 그림자로 띄운다.
   ============================================================ */

:root {
  --btn-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.065));
  --btn-surface-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(253, 230, 138, 0.10));
  --btn-edge: rgba(253, 230, 138, 0.34);
  --btn-edge-cool: rgba(226, 232, 240, 0.26);
  --btn-edge-lit: #fde68a;
  --btn-elev: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --btn-elev-hover: 0 10px 24px -12px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(253, 230, 138, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* 보조 버튼 전반 — 밝은 표면 + 골드 테두리 + 하단 그림자 */
.btn-ghost,
.btn-quiet,
.head-cta,
.menu > summary,
.drawer-btn,
.moon-chip,
.candle-chip,
.ratio-btn,
.branch-btn,
.q-opt,
.chip-mini,
.dw-quick-btn,
.dw-done,
.dw-del,
.dw-link,
.ch-preview,
.tool-btn {
  background: var(--btn-surface);
  border: 1px solid var(--btn-edge);
  box-shadow: var(--btn-elev);
  cursor: pointer;
}

.btn-ghost:hover:not(:disabled),
.btn-quiet:hover:not(:disabled),
.head-cta:hover,
.menu > summary:hover,
.drawer-btn:hover,
.moon-chip:hover,
.candle-chip:hover,
.ratio-btn:hover,
.branch-btn:hover,
.q-opt:hover,
.chip-mini:hover,
.dw-quick-btn:hover,
.dw-done:hover,
.dw-del:hover,
.dw-link:hover,
.ch-preview:hover,
.tool-btn:hover {
  background: var(--btn-surface-hover);
  border-color: var(--btn-edge-lit);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--btn-elev-hover);
}

/* 눌리는 순간 — 살짝 내려앉는 피드백 */
.btn-ghost:active:not(:disabled),
.btn-quiet:active:not(:disabled),
.head-cta:active,
.drawer-btn:active,
.moon-chip:active,
.candle-chip:active,
.ratio-btn:active,
.branch-btn:active,
.q-opt:active,
.chip-mini:active,
.dw-quick-btn:active,
.dw-done:active,
.dw-del:active,
.dw-link:active,
.ch-preview:active,
.tool-btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* 키보드 포커스도 같은 선명도로 */
.btn:focus-visible,
.btn-ghost:focus-visible,
.btn-quiet:focus-visible,
.head-cta:focus-visible,
.drawer-btn:focus-visible,
.moon-chip:focus-visible,
.candle-chip:focus-visible,
.ratio-btn:focus-visible,
.branch-btn:focus-visible,
.q-opt:focus-visible,
.chip-mini:focus-visible,
.dw-quick-btn:focus-visible,
.dw-done:focus-visible,
.dw-del:focus-visible,
.dw-link:focus-visible,
.ch-preview:focus-visible,
.tool-btn:focus-visible,
.rt-tab:focus-visible,
.dw-tab:focus-visible,
.lang-link:focus-visible {
  outline: 2px solid rgba(253, 230, 138, 0.8);
  outline-offset: 2px;
}

/* 선택된 상태는 골드로 확실히 */
.candle-chip[aria-pressed="true"],
.branch-btn[aria-pressed="true"],
.ratio-btn.is-on,
.q-opt.is-on,
.chip-mini.is-on {
  border-color: rgba(253, 230, 138, 0.7);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.20), rgba(245, 158, 11, 0.10));
  box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.22), 0 8px 22px -14px rgba(245, 158, 11, 0.9);
}

/* 탭 — 비활성 탭도 "누를 수 있는 칸"으로 보이게 */
.rt-tab {
  border: 1px solid transparent;
  color: #d9e2f2;
}
.rt-tab:not(.is-on) {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(253, 230, 138, 0.26);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.rt-tab:not(.is-on):hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: var(--btn-edge-lit);
  color: #ffffff;
  transform: translateY(-1px);
}
.rt-tab.is-on {
  border-color: rgba(253, 230, 138, 0.6);
  box-shadow: 0 6px 18px -10px rgba(245, 158, 11, 0.85);
}
.drawer-tabs { gap: 6px; padding: 10px 14px 8px; }
.dw-tab {
  color: #d7e2f4;
  border: 1px solid rgba(253, 230, 138, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: 9px 4px;
}
.dw-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border-color: #fde68a;
}
.dw-tab.is-on {
  color: #1b1304;
  border-color: rgba(253, 230, 138, 0.7);
  background: linear-gradient(180deg, #ffe6a3, #eda62f);
  box-shadow: 0 6px 16px -8px rgba(245, 158, 11, 0.85);
}

/* 언어 전환 · 닫기 버튼 */
.lang-switch { background: rgba(255, 255, 255, 0.05); border-color: var(--btn-edge-cool); }
.lang-link { color: #cfdaec; }
.lang-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(253, 230, 138, 0.4);
}
.menu-langs .lang-link {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--btn-edge-cool);
}
.drawer-close,
.modal .modal-close {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--btn-edge-cool);
  box-shadow: var(--btn-elev);
}
.drawer-close:hover,
.modal .modal-close:hover {
  border-color: var(--btn-edge-lit);
  color: #ffffff;
  transform: translateY(-1px);
}

/* 촛불 도구 pill — 한 단계 더 또렷하게 */
.tool-btn {
  background: linear-gradient(180deg, rgba(253, 230, 138, 0.16), rgba(255, 255, 255, 0.06));
  border-color: rgba(253, 230, 138, 0.46);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.tool-btn .tool-label { color: #ffffff; }

/* 서랍 분위기 선택 — 드롭다운도 조작 가능한 컨트롤로 */
.dw-mood select {
  background: var(--btn-surface);
  border: 1px solid var(--btn-edge-cool);
  box-shadow: var(--btn-elev);
  cursor: pointer;
}
.dw-mood select:hover { border-color: var(--btn-edge-lit); }

/* 최우선 CTA — 앰버 그라데이션·선명한 대비 유지 강화 */
.btn-primary {
  border: 1px solid rgba(255, 236, 179, 0.85);
  background: linear-gradient(180deg, #ffe9b0 0%, #f7c455 46%, #e89a1f 100%);
  color: #1a1103;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 34px -12px rgba(245, 158, 11, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 6px rgba(146, 82, 4, 0.35);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px -14px rgba(245, 158, 11, 0.7), 0 0 0 3px rgba(253, 230, 138, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 8px 20px -14px rgba(245, 158, 11, 0.6), inset 0 2px 6px rgba(120, 66, 2, 0.4);
}

/* 읽기용 표면은 그대로 평평하게 — 버튼과 헷갈리지 않도록 */.ritual,
.wall-card,
.fortune-card,
.gift-preview,
.dw-empty,
.input,
.textarea {
  cursor: default;
}
.input:focus,
.textarea:focus {
  border-color: rgba(253, 230, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .btn-ghost:hover, .btn-quiet:hover, .head-cta:hover, .drawer-btn:hover, .moon-chip:hover,
  .candle-chip:hover, .ratio-btn:hover, .branch-btn:hover, .q-opt:hover, .chip-mini:hover,
  .dw-quick-btn:hover, .dw-done:hover, .dw-del:hover, .dw-link:hover, .ch-preview:hover,
  .tool-btn:hover, .btn-primary:hover:not(:disabled), .rt-tab:not(.is-on):hover {
    transform: none;
  }
}

/* 좁은 화면에서는 장식이 화면 밖으로 넘치지 않게 축소 */
@media (max-width: 620px) {
  .talisman-frame.lim-7 .card-ring::before { inset: -10px; border-radius: 22px; }
  .talisman-frame.lim-7 .card-ring::after { inset: -8px; filter: blur(6px); }
  .talisman-frame.lim-3 .card-ring::before { inset: -8px; }
  .lim-orn { inset: -10px; }
  .lim-orn .lo { width: 64px; height: 64px; }
  }

/* ============================================================
   2026-12-03 · 내 촛불이 바로 보이는 등불 광장
   ============================================================ */

/* 점화 직후 히어로에 뜨는 안내 배너 */
.ignite-here {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(253, 230, 138, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(14, 21, 38, 0.82));
  box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.14), 0 18px 40px -22px rgba(245, 158, 11, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: ih-in 0.5s var(--ease) both;
}
.ignite-here[hidden] { display: none; }
.ignite-here .ih-flame {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1b1304;
  background: radial-gradient(circle at 50% 35%, #fff3c4, #f3c25f 60%, #d99b28);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.75);
}
.ignite-here .ih-flame svg { width: 19px; height: 19px; }
.ignite-here .ih-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ignite-here .ih-txt strong { font-size: 13.5px; font-weight: 700; color: #fff7e2; letter-spacing: -0.01em; }
.ignite-here .ih-txt span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.ignite-here .btn { flex: none; }
@keyframes ih-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* 등불 보기 필터 */
.wall-filter {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 6;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(7, 11, 22, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.wall-filter .chip-mini { font-size: 11px; padding: 5px 11px; }

.wall-empty-mine {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* 내 촛불 — 맨 앞자리, 조금 더 크게, 금빛 태그와 포커스 링 */
.lantern.is-mine { width: 52px; height: 52px; z-index: 6; }
.lantern.is-mine.is-royal { width: 60px; height: 60px; }
.lantern .l-tag {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1b1304;
  background: linear-gradient(180deg, #ffe9b0, #f0b73f);
  border: 1px solid rgba(255, 246, 214, 0.9);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.65);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lantern.is-mine .l-tag { opacity: 1; }
.lantern.is-mine::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(253, 230, 138, 0.65);
  animation: mine-ring 14s linear infinite;
  pointer-events: none;
}
@keyframes mine-ring { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .ignite-here { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .ignite-here .ih-txt { flex: 1 1 60%; }
  .ignite-here .btn { flex: 1 1 100%; }
  .wall-filter { left: 8px; top: 8px; }
  .wall-filter .chip-mini { font-size: 10px; padding: 4px 9px; }
}

.wall-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wall-card-actions .btn { flex: 1 1 140px; }

/* ============================================================
   부적 섹션 안의 챌린지 테두리 미리보기 — 스크롤 없이 눈앞에서 확인
   ============================================================ */

.lim-preview {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(253, 230, 138, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: 0 8px 24px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.lim-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lim-preview-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f6ecd6;
}
.lim-preview-state {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.lim-preview-state.is-on {
  color: #2a1a03;
  background: linear-gradient(180deg, #ffe9b0, #e9bb52);
  border: 1px solid rgba(255, 246, 214, 0.8);
  border-radius: 999px;
  padding: 2px 9px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}
.lim-preview-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lim-preview-chips .chip-mini { font-size: 11.5px; padding: 6px 13px; }
.lim-preview-chips .chip-mini.is-unlocked::after { content: " ✓"; color: #fde68a; }
.lim-preview-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #e7dcc2;
  padding-left: 10px;
  border-left: 2px solid rgba(253, 230, 138, 0.55);
}
.lim-preview-note[hidden] { display: none; }

.dw-preview-go { margin-top: 14px; width: 100%; }

.talisman-frame.is-flash { animation: talisman-flash 1.1s var(--ease); }
@keyframes talisman-flash {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.35) drop-shadow(0 0 26px rgba(253, 230, 138, 0.5)); }
  100% { filter: brightness(1); }
}

/* ============================================================
   v4 — plaza / panorama view, 滿願 VIP seats, cheer sparks
   ============================================================ */

.wall-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: -28px 0 20px;
}
.wall-bar-note {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--dim);
}
.wall-view {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(253, 230, 138, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 10px rgba(0, 0, 0, 0.3);
}
.view-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.view-btn:hover { color: #fde68a; }
.view-btn.is-on {
  color: #fff6d7;
  background: linear-gradient(180deg, rgba(253, 230, 138, 0.24), rgba(245, 158, 11, 0.16));
  border-color: rgba(253, 230, 138, 0.55);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.wall-pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 2;
}
.wall-sky.is-pano .wall-pano { display: block; }
.wall-sky.is-pano .wall-lanterns { visibility: hidden; pointer-events: none; }
.wall-sky.is-pano .wall-moon { display: none; }
.wall-sky.is-pano .wall-vip { display: none; }
.wall-sky.is-pano { background: #05080f; }

.wall-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

/* 滿願 특석 궤도 */
.wall-vip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34%;
  z-index: 1;
  pointer-events: none;
}
.vip-arc {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 7%;
  height: 70%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  border: 1px dashed rgba(253, 230, 138, 0.16);
  border-bottom: 0;
}
.vip-label {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(253, 230, 138, 0.62);
  white-space: nowrap;
}

.lantern.is-vip { width: 44px; height: 44px; z-index: 3; }
.lantern .l-vip {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 243, 196, 0.9);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  pointer-events: none;
  white-space: nowrap;
}

.pano-tip {
  position: absolute;
  z-index: 11;
  max-width: 244px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(6, 9, 19, 0.94);
  border: 1px solid rgba(253, 230, 138, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.pano-tip[hidden] { display: none; }
.pano-tip .pt-q {
  display: block;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.55;
  color: #f7f0e0;
  word-break: keep-all;
}
.pano-tip .pt-w {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.wall-pano-empty {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(290px, 78%);
  margin: 0;
  padding: 16px 18px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  background: rgba(6, 9, 19, 0.74);
  border: 1px solid rgba(253, 230, 138, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}
.wall-pano-empty[hidden] { display: none; }

.pano-a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .wall-bar { margin-top: -18px; margin-bottom: 14px; }
  .wall-bar-note { font-size: 11.5px; }
  .wall-view { padding: 3px; }
  .view-btn { min-height: 32px; padding: 0 12px; font-size: 11.5px; }
  .vip-label { display: none; }
  .lantern.is-vip { width: 38px; height: 38px; }
  .pano-tip { max-width: 200px; padding: 8px 10px; }
  /* 좁은 화면에서는 상단 특석 자리를 비우기 위해 광장 달을 접는다(파노라마는 자체 달) */
  .wall-sky .wall-moon { display: none; }
}
