/* ══ 공통: 화면 머리말 ═══════════════════════════════════ */
.head h1 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 6.2vw, 25px);
  font-weight: 700;
  line-height: 1.38;
  color: var(--burgundy-deep);
  white-space: pre-line;
}
.head p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.head .eyebrow + h1 {
  margin-top: 6px;
}
.topbar__skip {
  justify-self: end;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
}
.topbar__right {
  grid-column: 3;
  justify-self: end;
}


/* ══ STEP 1. 첫 화면 ═══════════════════════════════════ */
.intro {
  padding: 16px var(--gutter) 14px;
  gap: 18px;
}
.intro-hero {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 18px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 80% 110%, rgba(94, 162, 238, 0.45), transparent 70%),
    radial-gradient(60% 45% at 10% -10%, rgba(94, 162, 238, 0.3), transparent 70%),
    var(--navy);
  box-shadow: var(--shadow-m);
}
.intro-hero__logo {
  position: relative;
  width: min(86%, 300px);
  height: auto; /* 원본 비율 유지 */
  animation: art-in 700ms var(--ease) both;
}
.intro-hero__art {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
}
.intro-hero__art::before {
  content: '';
  position: absolute;
  width: min(70%, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 195, 255, 0.35), transparent 65%);
  animation: breathe-soft 5s var(--ease-soft) infinite;
}
.intro-hero__art .mini-rosary {
  position: relative;
  height: min(100%, 230px);
  width: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}
@keyframes art-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
}
@keyframes text-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.intro__line {
  text-align: center;
  font-size: clamp(22px, 6.4vw, 26px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--navy);
  animation: text-in 700ms 120ms var(--ease) both;
}
.intro__cta .btn {
  min-height: 56px;
  font-size: 17px;
}

/* ══ STEP 2. 기도 준비 (3페이지) ═════════════════════════ */
.setup .card {
  padding: 18px 16px;
}
.setup__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}
.setup__body .field:last-child {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.setup__body .textarea {
  flex: 1;
  min-height: 110px;
  max-height: 260px;
}
.section-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy);
  background: var(--burgundy-soft);
  vertical-align: 2px;
}

/* 묵주 선택 */
.design-stage {
  position: relative;
  flex: 1;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  background:
    radial-gradient(60% 70% at 50% 45%, #fff, rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #eef5fd, #eaf2fb 60%, #e6eef9);
  border: 1px solid var(--line);
  overflow: hidden;
}
.design-stage__beads {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  zoom: var(--design-zoom, 1.6);
}
.design-stage__beads > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
}
.design-stage__name {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--burgundy-deep);
  animation: text-in 400ms var(--ease) both;
}
.design-stage__en {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--gold-text);
  text-transform: uppercase;
}
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 2px;
  margin-top: 14px;
}
.swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 92px;
  padding: 10px 2px 8px;
  border-radius: 18px;
  border: 1.5px solid transparent;
  transition: background var(--dur-s), border-color var(--dur-s), transform var(--dur-s) var(--ease);
}
.swatch:active {
  transform: scale(0.96);
}
.swatch[aria-checked='true'] {
  background: #fff;
  border-color: var(--burgundy);
  box-shadow: var(--shadow-s);
}
.swatch__bead {
  zoom: 1.15;
}
.swatch__new {
  position: absolute;
  z-index: 1;
  top: -7px;
  left: -2px;
  padding: 0 5px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: #f2a900;
}
.swatch__name {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-2);
  text-align: center;
}
.swatch[aria-checked='true'] .swatch__name {
  color: var(--burgundy);
  font-weight: 700;
}
.swatch .check-mark {
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
}
.swatch .check-mark svg {
  width: 12px;
  height: 12px;
}

/* 신비 선택 */
.today-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(214, 231, 251, 0.45), rgba(234, 242, 252, 0.6));
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
}
.today-note b {
  color: var(--burgundy);
}
.setup .mystery-grid {
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  margin-top: 12px;
}
.setup .mystery-card {
  min-height: 0;
  justify-content: flex-end;
  padding: 14px;
}
.setup .mystery-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
}
.setup .mystery-card__name {
  font-size: 19px;
}
.help {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}

/* ══ STEP 3. 묵주기도 ═══════════════════════════════════ */
.pray {
  padding-top: 0;
  gap: 10px;
}
.pray__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pray__title {
  min-width: 0;
}
.pray__title h1 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--burgundy-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pray__title p {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-text);
}
.video-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--burgundy);
  background: #fff;
  border: 1px solid var(--line-strong);
}
.video-toggle .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--burgundy);
}
.video-toggle .dot svg {
  width: 11px;
  height: 11px;
  margin-left: 1px;
}
.video-toggle[aria-expanded='true'] {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}
.video-toggle[aria-expanded='true'] .dot {
  background: #fff;
  color: var(--burgundy);
}
.intention-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  width: 100%;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  text-align: left;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink);
}
.intention-line span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.intention-line b {
  flex: none;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--rose);
  color: #2f6db5;
}
.intention-line.is-empty {
  color: var(--ink-3);
  font-family: var(--font-sans);
  font-size: 13px;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0f1a2e;
  flex: none;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.video__fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 48, 0.62);
}
.video__fallback > * {
  position: relative;
}
.video__fallback p {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.9;
}
.video__fallback a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--burgundy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.video__fallback a svg {
  width: 14px;
  height: 14px;
}
.video-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
  font-size: 12px;
  color: var(--ink-3);
}
.video-tools a {
  color: var(--ink-3);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

/* 진행 상태 */
.progress-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.progress-line .progress {
  flex: 1;
  height: 6px;
}
.progress-line .now {
  color: var(--burgundy);
  font-weight: 700;
}
.save-dot {
  display: inline-flex;
  color: #3f7a55;
}
.save-dot svg {
  width: 16px;
  height: 16px;
}
.save-dot.is-error {
  color: var(--burgundy);
}

/* 지금 바칠 기도 */
.guide {
  flex: none;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #eef5fd);
  border: 1px solid var(--gold-line);
}
.guide__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.guide__eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-text);
  white-space: nowrap;
}
.guide__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2px;
}
.guide__steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 8px -14px 0;
  padding: 0 14px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.guide__steps::-webkit-scrollbar {
  display: none;
}
.guide__steps li {
  flex: none;
}
.dialog .guide__steps {
  flex-wrap: wrap;
  margin-inline: 0;
  padding: 0;
}
.guide__steps li {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy);
  background: #fff;
  border: 1px solid var(--line);
}
.guide__note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.guide.is-changing {
  animation: guide-in var(--dur-m) var(--ease);
}
@keyframes guide-in {
  from {
    opacity: 0.3;
    transform: translateY(4px);
  }
}
.pray.is-video .guide {
  display: none;
}

/* 묵주 캐러셀 */
.rosary {
  --panel-w: min(328px, calc(100% - 48px));
  --stage-zoom: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-inline: calc(var(--gutter) * -1);
}
.rosary__scroller {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 4px calc((100% - var(--panel-w)) / 2);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.rosary__scroller::-webkit-scrollbar {
  display: none;
}
.panel {
  position: relative;
  flex: 0 0 var(--panel-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.panel__inner {
  --pos-op: 1;
  --state-op: 1;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  opacity: calc(var(--pos-op) * var(--state-op));
  transform-origin: 50% 50%;
  transition: opacity var(--dur-m), box-shadow var(--dur-m), border-color var(--dur-m);
  overflow: hidden;
}
.panel.is-current .panel__inner {
  border-color: var(--gold-line);
  box-shadow: 0 0 0 1px rgba(93, 163, 236, 0.15), var(--shadow-m);
  background:
    radial-gradient(70% 55% at 50% 56%, rgba(214, 231, 251, 0.35), transparent 70%),
    var(--cream);
}
.panel.is-future .panel__inner {
  --state-op: 0.55;
}
.panel.is-done .panel__inner {
  --state-op: 0.9;
  background: #f7fafe;
}
.panel.is-future .bead,
.panel.is-done .bead {
  pointer-events: none;
}
.panel__tag {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--burgundy-deep);
}
.panel__status {
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink-3);
}
.panel__status[data-kind='current'] {
  background: var(--burgundy);
  color: #fff;
}
.panel__status[data-kind='done'] {
  background: var(--gold-soft);
  color: #1d4b8f;
}
.stage {
  position: relative;
  flex: none;
  zoom: var(--stage-zoom);
}
.stage__string {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.stage__string line,
.stage__string circle {
  fill: none;
  stroke: var(--b-metal);
  stroke-opacity: 0.55;
  stroke-width: 1.4;
}
.stage__string .stage__tail {
  stroke-dasharray: 2 4;
  stroke-opacity: 0.35;
}
.stage__string .stage__knot {
  fill: var(--b-metal);
  stroke: none;
  fill-opacity: 0.8;
}
.stage__medal {
  fill: #ece2f4;
  stroke: var(--b-metal);
  stroke-width: 1.4;
}
.stage__cross {
  fill: var(--b-metal);
  fill-opacity: 0.85;
}
.stage__label {
  position: absolute;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-2);
  white-space: nowrap;
  pointer-events: none;
}
.stage__label b {
  font-weight: 700;
  color: var(--ink);
}
.stage__label small {
  font-size: 11px;
  color: var(--ink-3);
}
.stage__center {
  position: absolute;
  width: 128px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
.stage__center-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-text);
}
.stage__center-count {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--burgundy-deep);
  font-variant-numeric: tabular-nums;
}
.stage__center.is-long .stage__center-count {
  font-size: 19px;
  line-height: 1.5;
}
.stage__center-sub {
  font-size: 12.5px;
  color: var(--ink-3);
}
.stage__center.is-done .stage__center-count {
  color: var(--gold-text);
}
.panel.is-celebrating .panel__inner {
  animation: celebrate 1.6s var(--ease) both;
}
.panel.is-celebrating .stage__string circle {
  animation: ring-glow 1.6s var(--ease) both;
}
.panel.is-celebrating .stage__center {
  animation: center-pop 900ms var(--ease) both;
}
@keyframes celebrate {
  30% {
    box-shadow: 0 0 0 3px rgba(120, 180, 245, 0.5), 0 0 48px rgba(120, 180, 245, 0.55);
  }
}
@keyframes ring-glow {
  30% {
    stroke: #78b4f5;
    stroke-opacity: 1;
    stroke-width: 4;
  }
}
@keyframes center-pop {
  40% {
    transform: translate(-50%, -50%) scale(1.15);
  }
}
.rosary__nav {
  position: relative;
  flex: none;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rosary__dots {
  display: flex;
}
.rosary__dot {
  width: 26px;
  height: 32px;
  display: grid;
  place-items: center;
}
.rosary__dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: all var(--dur-s);
}
.rosary__dot.is-done::before {
  background: var(--gold);
}
.rosary__dot.is-current::before {
  width: 18px;
  border-radius: 8px;
  background: var(--burgundy);
}
.rosary__dot[aria-current='true']::before {
  box-shadow: 0 0 0 2px var(--ivory), 0 0 0 3.5px var(--gold);
}
.rosary__return {
  position: absolute;
  right: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy);
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-s);
  animation: fade-in var(--dur-s);
}
.rosary__return[hidden] {
  display: none;
}
.rosary__return svg {
  width: 14px;
  height: 14px;
}

/* 하단 버튼 */
.pray-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pray-actions .btn--primary {
  flex-direction: column;
  gap: 0;
  line-height: 1.3;
  min-height: 56px;
}
.pray-actions .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}
.finish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--burgundy);
}
.finish-btn[disabled] {
  color: var(--ink-3);
  font-weight: 600;
  cursor: default;
}
.finish-btn svg {
  width: 18px;
  height: 18px;
}

/* 메뉴 시트 */
.menu-list {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  text-align: left;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}
.menu-item:active {
  background: var(--paper);
}
.menu-item[disabled] {
  opacity: 0.4;
}
.menu-item .ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--burgundy);
}
.menu-item .ico svg {
  width: 19px;
  height: 19px;
}
.menu-item > span:last-child {
  text-align: left;
}
.menu-item small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

/* 잠시 멈춤 */
.pause-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px calc(32px + var(--safe-b));
  text-align: center;
  background: rgba(243, 247, 252, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-in var(--dur-m) both;
}
.pause-layer .candle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-text);
  background: radial-gradient(circle, rgba(120, 180, 245, 0.35), transparent 70%);
  animation: breathe-soft 4s var(--ease-soft) infinite;
}
.pause-layer .candle svg {
  width: 32px;
  height: 32px;
}
@keyframes breathe-soft {
  50% {
    transform: scale(1.08);
  }
}
.pause-layer h2 {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--burgundy-deep);
}
.pause-layer p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 15px;
  white-space: pre-line;
}
.pause-layer .btn {
  margin-top: 28px;
  max-width: 320px;
}

/* ══ STEP 4. 완료 ═══════════════════════════════════════ */
.done {
  padding: 0;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.done > :not(.brand-footer) {
  margin-inline: var(--gutter);
}
.done__hero {
  text-align: center;
  padding-top: 18px;
}
.done__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e3edf9;
  animation: seal-in 900ms var(--ease) both;
}
.done__icon svg {
  width: 52px;
  height: 52px;
}
@keyframes seal-in {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}
.done__title {
  font-size: clamp(21px, 6vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.done__sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-2);
}
.result-card {
  position: relative;
  margin-top: 16px;
  padding: 14px 16px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d6e3f3;
  box-shadow: var(--shadow-s);
  text-align: center;
}
.result-card__share {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
}
.result-card__share svg {
  width: 19px;
  height: 19px;
}
.result-card__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink);
}
.result-card__date svg {
  width: 20px;
  height: 20px;
  color: var(--navy);
}
.result-card__text {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}
.result-card__text .line {
  display: block;
}
.result-card__text .name {
  font-size: 19px;
  font-weight: 800;
  color: var(--burgundy);
}
.result-card__text .intention {
  font-size: 18px;
  font-weight: 800;
  color: var(--burgundy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-card__text em {
  font-style: normal;
  font-size: 20px;
  font-weight: 800;
  color: var(--burgundy);
}
.decade-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px auto 0;
}
.decade-dots span {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #aecdf2;
  background: #fff;
}
.decade-dots span + span {
  margin-left: 22px;
}
.decade-dots span + span::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  width: 23px;
  height: 1.5px;
  margin-right: 0.5px;
  background: #aecdf2;
}
.decade-dots span.is-on {
  border-color: #3e86da;
  background: radial-gradient(circle at 35% 30%, #9fcbfa, #5ea2ee 60%, #3e86da);
}
.decade-dots span.is-on + span.is-on::before {
  background: #3e86da;
}
.result-card__wish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.result-card__wish::before,
.result-card__wish::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--line-strong);
}
.word-card {
  margin-top: 12px;
  padding: 12px 16px 14px;
  border-radius: 18px;
  background: #edf3fb;
  border: 1px solid #dce7f5;
  text-align: center;
}
.word-card__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d6e2f2;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}
.word-card__head svg {
  width: 22px;
  height: 22px;
  color: #7fb4ee;
}
.word-card__body {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-line;
}
.word-card__verse {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink);
}
.word-card__ref {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.done-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 16px;
}
.done .brand-footer {
  margin-top: auto;
}
.share-sheet__opts {
  margin-top: 16px;
  text-align: left;
}

/* ══ 공유 페이지 ═══════════════════════════════════════ */
.share-page .done {
  padding-bottom: 16px;
}

/* 디버그 */
.debug-fab {
  position: absolute;
  z-index: 90;
  top: 64px;
  left: 12px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(58, 90, 140, 0.85);
  box-shadow: var(--shadow-m);
}
.debug-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  text-align: left;
}
.debug-list .btn {
  min-height: 44px;
  font-size: 14px;
  justify-content: flex-start;
}
.debug-log {
  max-height: 140px;
  overflow: auto;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #101a2c;
  color: #dbe6f5;
  font: 11px/1.5 ui-monospace, Menlo, monospace;
  text-align: left;
  white-space: pre-wrap;
}
.dialog {
  max-height: calc(100% - 24px);
  overflow-y: auto;
}

/* ── 낮은 화면(높이 720 이하) 압축 ─────────────────── */
@media (max-height: 720px) {
  .head p,
  .done__sub,
  .guide__note,
  .field__help {
    display: none;
  }
  .setup__body {
    margin-top: 12px;
  }
  .field + .field {
    margin-top: 14px;
  }
  .seal {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
  }
  .seal svg {
    width: 24px;
    height: 24px;
  }
  .done {
    gap: 12px;
  }
  .result-list div {
    padding: 8px 2px;
  }
  .swatch {
    min-height: 80px;
    padding-top: 6px;
  }
  .intro__text {
    min-height: 180px;
  }
  .intro__body {
    font-size: 15px;
  }
  .pray {
    gap: 8px;
  }
  .guide {
    padding: 10px 12px;
  }
  .pray-actions .btn--primary {
    min-height: 50px;
  }
  .finish-btn {
    min-height: 40px;
  }
}
.done-actions .btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.done-actions .btn--primary {
  padding: 0 14px;
  font-size: 15px;
}

@media (max-height: 720px) {
  .design-stage__beads {
    zoom: 1.25;
  }
}

/* ── 음성·영상 탭 ─────────────────────────────────── */
.media-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.media-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.media-tab svg {
  width: 15px;
  height: 15px;
}
.media-tab[aria-selected='true'] {
  background: #fff;
  color: var(--burgundy);
  box-shadow: var(--shadow-s);
}
.media-tab:disabled {
  opacity: 0.5;
}
.video-toggle.is-playing .dot {
  animation: media-pulse 1.6s var(--ease-soft) infinite;
}
@keyframes media-pulse {
  50% {
    box-shadow: 0 0 0 5px rgba(93, 163, 236, 0.35);
  }
}

/* ── 음성 플레이어 ─────────────────────────────────── */
.audio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--burgundy));
  color: #fff;
  flex: none;
}
.audio audio {
  display: none;
}
.audio__main {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.audio__play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--burgundy);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.audio__icon {
  display: grid;
  place-items: center;
}
.audio__play svg {
  width: 20px;
  height: 20px;
}
.audio:not(.is-playing) .audio__play svg {
  margin-left: 3px;
}
.audio.is-loading .audio__play {
  animation: media-pulse 1.2s var(--ease-soft) infinite;
}
.audio__skip {
  width: 36px;
  height: 44px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
}
.audio__skip svg {
  width: 22px;
  height: 22px;
}
.audio__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.audio__status {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio__seek {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.audio__seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, 0.28) var(--p));
}
.audio__seek::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, 0.28) var(--p));
}
.audio__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}
.audio__seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}
.audio__time {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.75);
}
.audio.is-error {
  opacity: 0.75;
}
.audio.is-error button,
.audio.is-error input {
  opacity: 0.45;
  cursor: default;
}

/* ══ v6 첫 화면 캐릭터 ═══════════════════════════════ */
.intro-hero__char {
  position: relative;
  height: min(100%, 250px);
  width: auto;
  max-width: 82%;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
  animation: art-in 800ms var(--ease) 120ms both, char-float 4.5s var(--ease-soft) 1s infinite;
}
@keyframes char-float {
  50% {
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro-hero__char {
    animation: none;
  }
}

/* ══ v6 기도 화면 — 돌리는 묵주 · 음성 카드 ═══════════════════ */
.pray {
  gap: 10px;
  padding-bottom: 4px;
}
.pray__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
}
.pray__title {
  min-width: 0;
}
.pray__title p:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pray__title h1 {
  margin-top: 2px;
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--burgundy-deep);
}
.pray__title .pray__subject {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pray__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 20px;
}
.pray__count {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.pray__count b {
  font-size: 26px;
  font-weight: 800;
  color: var(--burgundy-deep);
}
.pray .intention-line {
  min-height: 34px;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.7);
}

/* 돌리는 묵주 */
.wheel {
  --label-top: 170px;
  --label-w: 260px;
  position: relative;
  flex: 1;
  min-height: 240px;
  margin-inline: calc(var(--gutter) * -1);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.wheel__chain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.wheel__chain circle {
  fill: none;
  stroke: var(--b-metal);
  stroke-opacity: 0.55;
  stroke-width: 2.4;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
}
.wheel__beads {
  position: absolute;
  inset: 0;
}
.wheel__node {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.wheel .bead {
  cursor: pointer;
}
.wheel .bead[data-state='active'] .bead__glow {
  opacity: 1;
}
.wheel.is-dragging .wheel__node {
  transition: none;
}
.wheel__deco {
  display: grid;
  place-items: center;
  width: 40px;
  height: 52px;
}
.deco-cross {
  fill: var(--b-metal);
  stroke: rgba(0, 0, 0, 0.12);
  stroke-width: 1;
}
.deco-medal {
  fill: #fff;
  stroke: var(--b-metal);
  stroke-width: 2;
}
.deco-medal-in {
  stroke: var(--b-metal);
}
.wheel__label {
  position: absolute;
  left: 50%;
  top: var(--label-top);
  width: var(--label-w);
  transform: translate(-50%, -40%);
  text-align: center;
  pointer-events: none;
}
.wheel__label-body.is-changing {
  animation: guide-in var(--dur-m) var(--ease);
}
.wheel__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wheel__name {
  font-size: 22px;
  line-height: 1.25;
  word-break: keep-all;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--burgundy-deep);
}
.wheel__badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--burgundy);
}
.wheel__badge[hidden] {
  display: none;
}
.wheel__note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  word-break: keep-all;
}
.wheel__hint {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--burgundy);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: opacity var(--dur-m);
}
.wheel__hint-arrow {
  display: inline-flex;
  animation: hint-swing 2.4s var(--ease-soft) infinite;
}
@keyframes hint-swing {
  50% {
    transform: translateX(4px) rotate(18deg);
  }
}
.wheel.is-dragging .wheel__hint,
.wheel.is-done .wheel__hint {
  opacity: 0;
}
.wheel.is-celebrate::after {
  content: '';
  position: absolute;
  left: 50%;
  top: var(--bead-top);
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  border: 3px solid var(--b-glow);
  animation: wheel-ring 1.2s var(--ease) forwards;
  pointer-events: none;
}
@keyframes wheel-ring {
  from {
    opacity: 0.9;
    transform: scale(0.6);
  }
  to {
    opacity: 0;
    transform: scale(2.4);
  }
}

/* 음성 기도 카드 */
.pray .audio {
  flex: none;
  gap: 14px;
  padding: 14px 16px 12px 14px;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(26, 52, 102, 0.1);
}
.pray .audio__play {
  flex: none;
  width: 56px;
  height: 56px;
  color: #fff;
  background: linear-gradient(145deg, #3d86e6, var(--burgundy));
  box-shadow: 0 8px 18px rgba(29, 75, 143, 0.35);
}
.pray .audio__play svg {
  width: 22px;
  height: 22px;
}
.audio__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pray .audio__status {
  font-size: 16px;
  font-weight: 800;
  color: var(--burgundy-deep);
}
.audio__tools {
  flex: none;
  display: inline-flex;
  align-items: center;
}
.pray .audio__skip {
  width: 32px;
  height: 34px;
  color: var(--ink-3);
}
.pray .audio__skip svg {
  width: 19px;
  height: 19px;
}
.audio__rate {
  min-width: 42px;
  height: 30px;
  margin-left: 2px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  color: var(--burgundy);
  border: 1.5px solid #c9dbf2;
  background: #f5f9ff;
  font-variant-numeric: tabular-nums;
}
.pray .audio__seek {
  height: 18px;
}
.pray .audio__seek::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #3d86e6 var(--p), #e2e9f3 var(--p));
}
.pray .audio__seek::-moz-range-track {
  background: linear-gradient(90deg, #3d86e6 var(--p), #e2e9f3 var(--p));
}
.pray .audio__seek::-webkit-slider-thumb {
  background: var(--burgundy);
  box-shadow: 0 0 0 3px #fff, 0 1px 4px rgba(0, 0, 0, 0.2);
}
.pray .audio__seek::-moz-range-thumb {
  background: var(--burgundy);
}
.pray .audio__time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
}
.pray .audio__cur {
  color: var(--ink-2);
  font-weight: 700;
}

/* 하단 텍스트 버튼 */
.pray-actions {
  align-items: center;
  gap: 0;
}
.pray-actions .btn[hidden],
.text-link[hidden] {
  display: none;
}
.text-link {
  min-height: 40px;
  padding: 0 12px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--burgundy-deep);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}
.text-link--sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
}
.text-link.is-disabled {
  opacity: 0.55;
}

@media (max-height: 720px) {
  .pray__title h1 {
    font-size: 25px;
  }
  .pray__subject,
  .pray .intention-line {
    display: none;
  }
  .wheel__name {
    font-size: 22px;
  }
  .wheel__note {
    font-size: 13px;
  }
  .pray .audio {
    padding: 10px 12px;
  }
  .pray .audio__play {
    width: 48px;
    height: 48px;
  }
  .text-link {
    min-height: 34px;
  }
}

/* ══ v7 첫 화면 캐릭터 가운데 · 작은 화면 대응 ═══════════ */
.intro-hero__art {
  min-height: 90px;
}
.intro-hero__art .intro-hero__char {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: 100%;
  max-height: 260px;
  max-width: 78%;
  object-fit: contain;
}
.intro-hero__art::before {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* ══ v7 기도 화면 (시안 반영) ═══════════════════════════ */
.pray {
  gap: 8px;
}
.intention-card {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  text-align: left;
  background: linear-gradient(135deg, #ffffff, #f2f7ff);
  border: 1px solid #d6e3f5;
  box-shadow: 0 4px 14px rgba(26, 52, 102, 0.06);
}
.intention-card__ico {
  flex: none;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #5d9df0, var(--burgundy));
}
.intention-card__ico svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}
.intention-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.intention-card__body b {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-text);
}
.intention-card__body span {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--burgundy-deep);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.pray__head {
  padding-top: 4px;
}
.pray__title .pray__eyebrow {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-text);
}
.pray__title h1 {
  font-size: 32px;
}
.pray__side {
  padding-top: 18px;
}
.pray__count {
  font-size: 22px;
}
.pray__count b {
  font-size: 34px;
}

/* 끈으로 이은 묵주 */
.wheel {
  --cross-top: 90px;
  --cross-h: 120px;
  --arrow-x: 80%;
  --arrow-y: 80%;
}
.wheel__chain {
  -webkit-mask-image: linear-gradient(to bottom left, #000 38%, rgba(0, 0, 0, 0.15) 72%, transparent 88%);
  mask-image: linear-gradient(to bottom left, #000 38%, rgba(0, 0, 0, 0.15) 72%, transparent 88%);
}
.wheel__chain .rope {
  fill: none;
  stroke: #c9a47a;
  stroke-width: 4.5;
  stroke-dasharray: none;
  stroke-opacity: 1;
}
.wheel__chain .rope-twist {
  fill: none;
  stroke: #9a7550;
  stroke-width: 4.5;
  stroke-dasharray: 1.6 3.4;
  stroke-linecap: butt;
  stroke-opacity: 0.75;
}
.wheel__chain .rope--hang {
  stroke-width: 3.6;
}
.wheel__crucifix {
  position: absolute;
  left: 50%;
  top: var(--cross-top);
  height: var(--cross-h);
  aspect-ratio: 120 / 170;
  transform: translateX(-50%);
  pointer-events: none;
}
.wheel__crucifix::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: 230%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 140, 0.55), rgba(255, 214, 140, 0.18) 38%, transparent 66%);
}
.wheel__crucifix svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}
.wheel__label {
  top: var(--label-top);
  transform: translateX(-50%);
}
.wheel__name {
  font-size: 23px;
  font-weight: 800;
}
.wheel__note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.wheel__note[hidden] {
  display: none;
}
.wheel .wheel__hint {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}
.wheel__arrow {
  position: absolute;
  left: var(--arrow-x);
  top: var(--arrow-y);
  transform: translate(-60%, -40%);
  color: #6f8fbd;
  pointer-events: none;
  animation: arrow-nudge 2.6s var(--ease-soft) infinite;
}
.wheel__arrow svg {
  stroke: currentColor;
}
@keyframes arrow-nudge {
  50% {
    transform: translate(-52%, -52%);
    opacity: 0.7;
  }
}
.wheel.is-dragging .wheel__arrow,
.wheel.is-done .wheel__arrow,
.wheel.is-done .wheel__hint {
  opacity: 0;
}
.wheel__deco--medal {
  width: 40px;
  height: 52px;
}
.wheel.is-celebrate::after {
  top: var(--bead-top);
}
.wheel.is-compact .wheel__note {
  display: none;
}
.wheel.is-compact .wheel__name {
  font-size: 19px;
}
.wheel.is-compact .wheel__hint {
  font-size: 13px;
}
.pray .audio__status {
  font-size: 17px;
}

@media (max-height: 720px) {
  .intention-card {
    padding: 8px 12px;
  }
  .intention-card__body span {
    -webkit-line-clamp: 1;
    font-size: 14px;
  }
  .intention-card__ico {
    width: 26px;
    height: 26px;
  }
  .pray__title h1 {
    font-size: 26px;
  }
  .pray__count b {
    font-size: 28px;
  }
}

/* ══ v8 기도 화면 — 은빛 줄 · 진주 묵주 · 은빛 십자고상 (시안) ══ */
.wheel__chain {
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, #000 30%, #000 100%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, #000 30%, #000 100%);
  filter: drop-shadow(0 1px 1px rgba(40, 50, 70, 0.25));
}
.wheel__chain .rope {
  stroke: #a9afb8;
  stroke-width: 2.6;
}
.wheel__chain .rope-twist {
  stroke: #f3f5f8;
  stroke-width: 0.9;
  stroke-dasharray: none;
  stroke-opacity: 0.95;
}
.wheel__chain .rope--hang {
  stroke-width: 2.2;
}
.wheel__chain .rope-twist.rope--hang {
  stroke-width: 0.8;
}
.wheel__chain .jump-ring {
  fill: none;
  stroke: #9aa1ab;
  stroke-width: 1.8;
}
.wheel__crucifix {
  aspect-ratio: 100 / 160;
}
.wheel__crucifix::before {
  top: 38%;
  width: 260%;
  background: radial-gradient(circle, rgba(255, 222, 160, 0.5), rgba(255, 226, 170, 0.16) 36%, transparent 64%);
}
.wheel__arrow {
  color: #7f9cc6;
}

/* ══ v10 처음 시작 안내 (반짝이는 첫 알 · 손가락) ═══════════ */
.coach,
.coach__bubble {
  position: absolute;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.wheel.coach-tap .coach--tap,
.wheel.coach-tap .coach__bubble,
.wheel.coach-swipe .coach--swipe {
  opacity: 1;
  visibility: visible;
}
.wheel.is-dragging .coach--swipe {
  opacity: 0;
}
.coach--tap {
  left: 50%;
  top: var(--bead-top);
  width: 0;
  height: 0;
  pointer-events: none;
}
.coach__ring {
  position: absolute;
  left: -44px;
  top: -44px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid #ffc94a;
  box-shadow: 0 0 18px rgba(255, 190, 60, 0.7);
  animation: coach-ring 1.8s ease-out infinite;
}
.coach__ring--2 {
  animation-delay: 0.9s;
}
@keyframes coach-ring {
  0% {
    transform: scale(0.85);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}
.coach__spark {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  animation: coach-twinkle 1.6s ease-in-out infinite;
}
.coach__spark svg {
  display: block;
  filter: drop-shadow(0 0 4px rgba(255, 200, 80, 0.9));
}
.coach__spark--0 { left: -52px; top: -24px; animation-delay: 0s; }
.coach__spark--1 { left: 50px; top: -30px; animation-delay: 0.35s; transform: scale(0.8); }
.coach__spark--2 { left: -40px; top: 30px; animation-delay: 0.7s; }
.coach__spark--3 { left: 58px; top: 22px; animation-delay: 1.05s; }
.coach__spark--4 { left: 4px; top: -58px; animation-delay: 0.5s; }
@keyframes coach-twinkle {
  0%, 100% {
    opacity: 0;
    scale: 0.3;
    rotate: 0deg;
  }
  50% {
    opacity: 1;
    scale: 1.15;
    rotate: 45deg;
  }
}
.coach--tap .coach__finger {
  position: absolute;
  left: 14px;
  top: 12px;
  animation: coach-tap 1.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(26, 52, 102, 0.3));
}
@keyframes coach-tap {
  0%, 100% {
    transform: translate(8px, 10px) rotate(-12deg);
  }
  45% {
    transform: translate(0, 0) rotate(-12deg) scale(0.92);
  }
  55% {
    transform: translate(0, 0) rotate(-12deg) scale(0.92);
  }
}
.coach__bubble {
  left: 50%;
  top: calc(var(--bead-top) + 64px);
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3d86e6, var(--burgundy));
  box-shadow: 0 8px 22px rgba(29, 75, 143, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.7);
  animation: coach-bob 1.6s ease-in-out infinite;
}
.coach__bubble b {
  font-weight: 800;
  color: #ffe08a;
}
.coach__bubble::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: #3a7fdc;
  transform: rotate(45deg);
  border-radius: 2px;
}
@keyframes coach-bob {
  50% {
    transform: translate(-50%, 5px);
  }
}
.wheel.coach-tap .bead[data-state='active'] .bead__body {
  animation: coach-glow 1.4s ease-in-out infinite;
}
@keyframes coach-glow {
  50% {
    box-shadow: inset 0 0 0 2px var(--b-glow), 0 0 0 4px #fff, 0 0 26px 8px rgba(255, 196, 70, 0.85);
  }
}
.wheel.coach-tap .wheel__hint,
.wheel.coach-tap .wheel__arrow {
  opacity: 0;
}
/* 두세 번째 알: 손가락이 오른쪽 아래에서 위로 묵주를 돌리는 모습 */
.coach--swipe {
  left: var(--arrow-x);
  top: var(--arrow-y);
  pointer-events: none;
}
.coach--swipe .coach__finger {
  position: absolute;
  left: -6px;
  top: -8px;
  animation: coach-swipe 2.2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(26, 52, 102, 0.3));
}
@keyframes coach-swipe {
  0% {
    transform: translate(0, 20px);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  70% {
    transform: translate(-22px, -62px);
    opacity: 1;
  }
  100% {
    transform: translate(-26px, -70px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .coach__ring,
  .coach__spark,
  .coach__finger,
  .coach__bubble,
  .wheel.coach-tap .bead[data-state='active'] .bead__body {
    animation: none;
  }
  .coach__spark {
    opacity: 1;
  }
}
.coach__finger {
  display: block;
  width: 40px;
  height: 46px;
}
.coach__finger svg {
  display: block;
  width: 40px;
  height: 46px;
  max-width: none;
}

/* ══ v11 십자고상 · 성모 메달 그림 ═══════════════════ */
.wheel__crucifix {
  aspect-ratio: 263 / 420;
}
.wheel__crucifix img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(40, 52, 75, 0.28));
  -webkit-user-drag: none;
  user-select: none;
}
.wheel__deco--medal {
  width: 36px;
  height: 58px;
}
.wheel__deco--medal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(90, 60, 20, 0.3));
  -webkit-user-drag: none;
}
/* 기도 준비 제목: 두 줄이 그대로 유지되도록 */
.setup .head h1 {
  font-size: clamp(19px, 6.4vw, 25px);
  word-break: keep-all;
}


/* ══ v12 어떤 기기에서도 아래가 잘리지 않게 ═══════════════ */
/* 실제 보이는 높이(--app-h, iOS 주소창 대응) 사용 */
#app {
  height: 100vh;
  height: 100dvh;
  height: var(--app-h, 100dvh);
}
@media (min-width: 520px) {
  #app {
    height: min(844px, calc(var(--app-h, 100dvh) - 40px));
  }
}
/* 화면이 낮아 내용이 다 안 들어가면 세로 스크롤로 볼 수 있게 */
.screen.pray {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.screen.pray::-webkit-scrollbar {
  display: none;
}
.pray .wheel {
  min-height: 300px;
}
.pray .audio {
  scroll-margin-bottom: 12px;
}
@media (max-height: 700px) {
  .pray .wheel {
    min-height: 260px;
  }
}

/* ── v12 기도 안내 문구: 기도 순서를 크게 ───────────── */
.pray .wheel__name {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  word-break: keep-all;
}
.pray .wheel__note {
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
}
/* ── v12 시작 안내 말풍선: 십자가·상단을 가리지 않도록 라벨 아래로 ── */
.wheel {
  overflow: visible;
  touch-action: none;
}
.wheel__label {
  pointer-events: none;
}
.coach__bubble {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 15px 9px 11px;
  pointer-events: auto;
  white-space: normal;
  word-break: keep-all;
  text-align: left;
  font-size: 14px;
  line-height: 1.35;
  transform: none;
  animation: coach-bob-s 1.7s ease-in-out infinite;
}
.coach__bubble::before {
  display: none;
}
.coach__bubble-ico {
  flex: none;
  display: block;
  width: 22px;
  height: 25px;
}
.coach__bubble-ico svg {
  width: 22px;
  height: 25px;
  max-width: none;
}
@keyframes coach-bob-s {
  50% {
    transform: translateY(-3px);
  }
}
.wheel.coach-tap .wheel__hint {
  display: none;
}

/* 낮은 화면: 안내 문구·말풍선을 조금 작게 */
.wheel.is-compact .coach__bubble {
  margin-top: 8px;
  padding: 7px 12px 7px 9px;
  font-size: 13px;
}
.wheel.is-compact .coach__bubble-ico,
.wheel.is-compact .coach__bubble-ico svg {
  width: 18px;
  height: 21px;
}
.pray .wheel.is-compact .wheel__name {
  font-size: 18px;
}

/* ══ v13 기도문 자막 — 음성 플레이어 바로 위, 이전 · 현재 · 다음 세 줄 ══ */
.lyrics {
  flex: none;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 3px;
  padding: 2px 10px;
  text-align: center;
  overflow: hidden;
}
.lyrics[hidden] {
  display: none;
}
.lyrics__line {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  transition: opacity var(--dur-s) var(--ease-soft);
}
/* 이전 · 다음: 작고 흐리게 (누르면 그 줄로 이동) */
.lyrics__line--prev,
.lyrics__line--next {
  min-height: 1.35em;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-3);
  opacity: 0.55;
  cursor: pointer;
}
.lyrics__line.is-empty {
  cursor: default;
}
/* 현재 줄: 크고 진하게, 길면 두 줄까지 (높이는 두 줄로 고정해 화면이 흔들리지 않게) */
.lyrics__line--cur {
  white-space: normal;
  min-height: calc(2 * 1.38em);
  max-height: calc(2 * 1.38em);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16.5px;
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--burgundy-deep);
  text-wrap: balance;
}
.lyrics__line--cur.is-waiting {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  opacity: 0.8;
}
/* 다음 줄로 넘어갈 때 살짝 올라오는 효과 */
.lyrics.is-moving .lyrics__line {
  animation: lyrics-up 360ms var(--ease) both;
}
.lyrics.is-moving .lyrics__line--prev {
  animation-name: lyrics-up-dim;
}
.lyrics.is-moving .lyrics__line--next {
  animation-name: lyrics-up-dim;
}
@keyframes lyrics-up {
  from {
    opacity: 0.35;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes lyrics-up-dim {
  from {
    opacity: 0.15;
    transform: translateY(9px);
  }
  to {
    opacity: 0.55;
    transform: none;
  }
}
/* 화면이 낮은 기기: 더 촘촘하게 (현재 줄은 한 줄 높이, 길면 두 줄까지) */
@media (max-height: 700px) {
  .lyrics {
    gap: 1px;
    padding-block: 0;
  }
  .lyrics__line--cur {
    min-height: 1.3em;
    font-size: 15px;
    line-height: 1.3;
    max-height: calc(2 * 1.3em);
  }
  .lyrics__line--prev,
  .lyrics__line--next {
    font-size: 12px;
    line-height: 1.3;
    min-height: 1.3em;
  }
  .pray:has(.lyrics:not([hidden])) {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lyrics.is-moving .lyrics__line {
    animation: none;
  }
}

/* ══ v15 음성 기도 재생 중에는 "눌러 시작" 안내를 숨김 ══ */
.wheel.is-listening .coach--tap,
.wheel.is-listening .coach__bubble,
.wheel.is-listening .coach--swipe,
.wheel.is-listening .wheel__hint {
  opacity: 0;
  visibility: hidden;
}
.wheel.is-listening .bead[data-state='active'] .bead__body {
  animation: none;
}

/* ══ v16 글자 입력 중(키보드 열림): 화면을 줄이지 않고 페이지 스크롤로 아래 버튼까지 ══ */
html.kb-open,
html.kb-open body {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
}
html.kb-open #app {
  /* 키보드가 열리기 전 높이 그대로 (--app-h 는 입력 중 갱신하지 않음) */
  overflow: visible;
}

/* ══ v17 전체 화면 전환 버튼 (상단 바 오른쪽) ══ */
.topbar {
  grid-template-columns: 92px 1fr 92px;
}
.topbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}
.fs-btn {
  width: 40px;
  height: 40px;
  color: var(--ink-3);
}
.fs-btn .icon {
  width: 21px;
  height: 21px;
}
.fs-btn.is-on {
  color: var(--burgundy);
}

/* ══ v18 자막 + 음성 플레이어를 화면 아래에 고정 ══
   카카오톡·사파리처럼 보이는 높이가 낮은 브라우저에서도 플레이어가 밀려나지 않게.
   화면이 넉넉하면 원래 자리 그대로, 모자라면 아래에 붙어 있고 묵주가 그 뒤로 스크롤됨 */
.pray__media {
  position: sticky;
  bottom: 0;
  z-index: 250;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 10px var(--gutter) 2px;
  background: linear-gradient(to bottom, rgba(243, 247, 252, 0) 0, var(--ivory) 16px);
}
.pray__media .lyrics {
  padding-block: 0;
}

/* 낮은 화면: 묵주 안내 문구·말풍선을 작게 해 묵주가 최대한 한 화면에 */
@media (max-height: 760px) {
  .pray {
    gap: 6px;
  }
  .pray .wheel {
    min-height: 200px;
  }
  .pray .wheel__name {
    font-size: 17px;
    line-height: 1.28;
  }
  .pray .wheel__note {
    margin-top: 3px;
    font-size: 12.5px;
  }
  .pray .coach__bubble {
    margin-top: 8px;
    padding: 7px 12px 7px 9px;
    font-size: 13px;
  }
  .pray__media {
    gap: 4px;
    padding-top: 6px;
  }
}
@media (max-height: 760px) {
  /* 재생 전 안내 자막은 낮은 화면에서 숨겨 묵주·말풍선 공간 확보 (재생하면 바로 나타남) */
  .pray__media .lyrics.is-waiting {
    display: none;
  }
  .pray .pray__title .pray__subject {
    display: none;
  }
}
/* 아주 낮은 화면 (아이폰 SE + 카카오톡 등) */
@media (max-height: 620px) {
  .pray__title h1 {
    font-size: 21px;
  }
  .pray .wheel {
    min-height: 180px;
  }
  .pray .wheel__note {
    display: none;
  }
  .pray .audio {
    gap: 10px;
    padding: 8px 12px 6px 10px;
    border-radius: 18px;
  }
  .pray .audio__play {
    width: 44px;
    height: 44px;
  }
  .pray .audio__status {
    font-size: 14.5px;
  }
  .pray .audio__time {
    font-size: 11px;
  }
}
/* 아주 낮은 화면: 음성이 나오는 동안은 묵주 안내 문구 대신 아래 자막으로 (겹침 방지) */
@media (max-height: 620px) {
  .wheel.is-listening .wheel__label {
    opacity: 0;
  }
  .pray__media {
    background: linear-gradient(to bottom, rgba(243, 247, 252, 0) 0, var(--ivory) 10px);
  }
}

/* ══ v21 안드로이드 앱 시작 화면(스플래시) — index.php 에서 앱일 때만 표시 ══ */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 12vw;
  padding-bottom: var(--safe-b);
  background:
    radial-gradient(70% 55% at 80% 110%, rgba(94, 162, 238, 0.45), transparent 70%),
    radial-gradient(60% 45% at 10% -10%, rgba(94, 162, 238, 0.3), transparent 70%),
    var(--navy);
  opacity: 1;
  transition: opacity 0.5s ease;
  -webkit-tap-highlight-color: transparent;
}
html.splash-on .app-splash {
  display: flex;
}
.app-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.app-splash__logo {
  display: block;
  width: min(72vw, 320px);
  height: auto;
  animation: app-splash-in 0.9s var(--ease) both;
}
@keyframes app-splash-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-splash__logo {
    animation: none;
  }
}

/* ══ v23 마침 화면 하단: [오늘의 묵주 처음으로] [카카오톡 공유하기] 가로 배치 ══ */
.done-actions__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.done-actions__row .btn {
  min-width: 0;
  gap: 5px;
  padding: 0 6px;
  font-size: clamp(12.5px, 3.9vw, 15px);
  letter-spacing: -0.03em;
}
/* 카카오 공식 공유 버튼 색 (#FEE500 바탕 · 검은 말풍선 · 85% 검정 글자) */
.btn--kakao {
  color: rgba(0, 0, 0, 0.85);
  background: #fee500;
  border: 1.5px solid var(--navy); /* 옆 '오늘의 묵주 처음으로' 버튼과 같은 테두리 */
  box-shadow: 0 6px 16px rgba(204, 184, 0, 0.28);
}
.btn--kakao .icon {
  flex: none;
  width: 19px;
  height: 19px;
  color: #000;
}
.btn--kakao:active {
  background: #f5dc00;
}
@media (max-width: 350px) {
  .done-actions__row {
    gap: 6px;
  }
  .done-actions__row .btn {
    padding: 0 4px;
  }
  .btn--kakao .icon {
    width: 17px;
    height: 17px;
  }
}

/* ══ v25 기도 화면 레이아웃 개편 ═══════════════════════════════ */
/* 1) 기도 지향: 한 줄 막대 ("♥ ○○님의 기도 지향 | 내용 →"), 누르면 전체 보기 */
.pray .intention-card {
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 7px 12px 7px 8px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid #cfe0f6;
  box-shadow: 0 2px 10px rgba(26, 52, 102, 0.05);
}
.pray .intention-card__ico {
  width: 28px;
  height: 28px;
  margin-top: 0;
}
.pray .intention-card__ico svg {
  width: 13px;
  height: 13px;
}
.pray .intention-card__body {
  flex: 1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.pray .intention-card__body b {
  flex: none;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gold-text);
  white-space: nowrap;
}
.intention-card__bar {
  flex: none;
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}
.pray .intention-card__body span {
  display: block;
  min-width: 0;
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}
.intention-card__go {
  flex: none;
  display: grid;
  color: var(--ink-3);
}
.intention-card__go svg {
  width: 17px;
  height: 17px;
}

/* 2) 상단: 신비 칩 · 큰 제목 | 단계 · 번호 */
.pray__head--compact {
  align-items: flex-start;
  padding-top: 6px;
}
.pray__head--compact .pray__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--burgundy-deep);
  background: #e6eefa;
}
.pray__head--compact h1 {
  font-size: 30px;
  line-height: 1.15;
}
.pray__head--compact .pray__side {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.pray__head--compact .pray__count {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 20px;
  color: var(--ink-3);
  white-space: nowrap;
}
.pray__stage {
  margin-right: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.pray__head--compact .pray__count b {
  font-size: 32px;
  color: var(--burgundy-deep);
}
@media (max-height: 720px) {
  .pray__head--compact h1 {
    font-size: 25px;
  }
  .pray__head--compact .pray__count b {
    font-size: 27px;
  }
  .pray__head--compact .pray__side {
    padding-top: 20px;
  }
}

/* 3) 묵주 아래 안내 글자 없앰 (처음 시작 말풍선만 남김) */
.pray .wheel__label-body,
.pray .wheel__hint {
  display: none;
}

/* 4) 기도문 + 음성 플레이어 한 카드 (기도문 보기/접기) */
.pray .audio {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 16px 12px;
  border-radius: 22px;
  color: var(--ink);
  background: #faf7f0;
  border: 1px solid #ece4d3;
  box-shadow: 0 10px 26px rgba(26, 52, 102, 0.1);
}
.audio__toggle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--burgundy-deep);
  background: #fff;
  border: 1px solid #d9dfe9;
}
.audio__toggle[hidden] {
  display: none;
}
.audio__toggle-ico {
  display: grid;
}
.audio__toggle-ico svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.audio__lyrics {
  display: none;
}
.audio.is-expanded .audio__lyrics {
  display: block;
}
.pray__media .audio .lyrics.is-waiting:not([hidden]) {
  display: grid; /* 펼쳤을 때는 재생 전 안내도 보여 줌 */
}
.pray .audio .lyrics {
  padding: 2px 2px 4px;
}
.audio__row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.audio.is-expanded .audio__status {
  display: none; /* 펼치면 제목 대신 기도문이 보임 */
}
.pray .audio__top {
  justify-content: flex-start;
  gap: 10px;
}
.pray .audio__status {
  font-size: 17px;
  font-weight: 800;
  color: var(--burgundy-deep);
}
.pray .audio__tools {
  margin-left: auto;
}
.audio.is-expanded .audio__tools {
  margin-left: 0;
}
@media (max-height: 620px) {
  .pray .audio {
    gap: 6px;
    padding: 8px 12px 8px;
  }
  .audio__row {
    gap: 12px;
  }
}

/* ════════════════════════════════════════════════════════════
   v26 · 설정 (전체 화면) — 기존 '기도 메뉴' 대체
   ════════════════════════════════════════════════════════════ */
.settings {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  animation: settings-in var(--dur-s) var(--ease) both;
}
.settings.is-closing {
  animation: settings-out 180ms var(--ease-soft) both;
}
@keyframes settings-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes settings-out {
  to { opacity: 0; transform: translateX(24px); }
}
.settings__bar {
  flex: none;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: calc(var(--safe-t) + 6px) 8px 6px;
  background: var(--cream);
  box-shadow: 0 1px 0 var(--line);
}
.settings__title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings__title:focus { outline: none; }
.settings__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) calc(var(--safe-b) + 24px);
}
.settings-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.settings-group {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 14px 0 18px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row:not(.is-static):active { background: var(--rose-soft); }
.settings-row__chev { width: 20px; height: 20px; color: var(--ink-3, #8a97ab); flex: none; }
.settings-row.is-static { cursor: default; font-weight: 500; }
.settings-row__val { color: var(--ink-2, #4a5a73); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 현재 묵주 기도 진행 — 강조 박스 */
.settings-now {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, #ffffff 0%, var(--burgundy-soft) 100%);
  border: 1.5px solid var(--navy);
  box-shadow: var(--shadow-m);
}
.settings-now__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--navy);
}
.settings-now__head strong { font-weight: 700; }
.settings-now__pct {
  flex: none;
  padding: 3px 10px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.settings-now__pct b { font-weight: 800; }
.settings-now.is-done .settings-now__pct { background: var(--navy); color: #fff; }
.settings-now__text {
  margin: 12px 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.settings-now__meta { font-size: 13px; color: var(--ink-3, #8a97ab); }
.settings-now__bar {
  height: 6px;
  margin: 12px 0 14px;
  border-radius: 999px;
  background: rgba(30, 58, 110, 0.12);
  overflow: hidden;
}
.settings-now__bar i { display: block; height: 100%; border-radius: inherit; background: var(--navy); }
.settings-now__btn { gap: 6px; }
.settings-now__btn svg { width: 18px; height: 18px; }
.settings-now__expired { margin: 8px 0 0; font-size: 13px; text-align: center; color: var(--ink-3, #8a97ab); }
.settings-now__done {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.settings-now__done svg { width: 18px; height: 18px; }
.settings-now.is-empty .settings-now__text { font-size: 15px; font-weight: 500; color: var(--ink-3, #8a97ab); margin-bottom: 0; }

.settings__copy {
  margin: auto 0 0;
  padding-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3, #8a97ab);
}

/* 묵주기도 바치는 방법 — 이미지 전체 */
.settings[data-page='howto'] .settings__body { padding: 0 0 calc(var(--safe-b) + 16px); background: #f6f1e7; }
.settings-howto { overflow: auto; cursor: zoom-in; }
.settings-howto img { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; }
.settings-howto.is-zoom { cursor: zoom-out; }
.settings-howto.is-zoom img { width: 200%; max-width: none; }
.settings-howto__tip { margin: 10px 0 0; text-align: center; font-size: 12px; color: #8a7b62; }

/* 내 기도 지향 — 게시판 목록 */
.settings-board {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.settings-board__head {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3, #8a97ab);
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}
.settings-board__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 18px;
}
.settings-board__item + .settings-board__item { border-top: 1px solid var(--line); }
.settings-board__main { flex: 1; min-width: 0; }
.settings-board__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-board__meta { margin: 3px 0 0; font-size: 12px; color: var(--ink-3, #8a97ab); }
/* 내 기도 지향 — 삭제 (하나씩 / 선택·전체 선택) */
.settings-board__bar { display: flex; align-items: center; gap: 6px; min-height: 40px; margin: 0 0 8px; padding: 0 2px; }
.settings-board__bar [hidden] { display: none !important; }
.settings-board__count { font-size: 13px; font-weight: 600; color: var(--ink-3, #8a97ab); }
.settings-board__all { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.settings-board__sp { flex: 1; }
.settings-board__tool {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 12px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--navy);
  background: var(--cream); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
}
.settings-board__tool svg { width: 16px; height: 16px; }
.settings-board__tool.is-danger { color: #fff; background: #c4362f; border-color: #c4362f; }
.settings-board__tool:disabled { opacity: 0.4; cursor: default; }
.settings-check { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); flex: none; cursor: pointer; }
.settings-board__pick { display: none; }
.is-selecting .settings-board__pick { display: inline-flex; }
.is-selecting .settings-board__row { cursor: pointer; }
.settings-board__tip { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--ink-3, #8a97ab); }
.settings-board__tip[hidden] { display: none; }

/* 밀어서 삭제 — 줄(앞)이 왼쪽으로 밀리면 뒤의 빨간 삭제 버튼이 드러남 */
.settings-board__item {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--cream);
}
.settings-board__item.is-removing { transition: height 0.3s var(--ease, ease), opacity 0.3s; opacity: 0; }
.settings-board__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--cream);
  touch-action: pan-y; /* 세로 스크롤은 그대로, 가로 밀기만 잡음 */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.3, 1);
  will-change: transform;
}
.settings-board__item.is-open .settings-board__row { box-shadow: 6px 0 14px -6px rgba(20, 35, 70, 0.28); }
.settings-board__action {
  --p: 0;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: max(84px, var(--w, 0px)); /* 끝을 넘겨 밀면 빨간 영역도 따라 넓어짐 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: #c4362f;
  border: 0;
  cursor: pointer;
}
.settings-board__action svg { width: 22px; height: 22px; transform: scale(calc(0.6 + var(--p) * 0.4)); opacity: var(--p); transition: transform 0.2s, opacity 0.2s; }
.settings-board__action span { opacity: var(--p); transition: opacity 0.2s; }
.settings-board__action:active { background: #a92a24; }
.dialog .btn--danger { color: #fff; background: #c4362f; box-shadow: 0 8px 20px rgba(196, 54, 47, 0.22); }
.dialog__body { white-space: pre-line; }
/* 설정 화면 위에 뜨는 확인 창 */
.settings ~ .overlay { z-index: 950; }

/* 내 기도 지향 — 더 불러오는 중 표시 */
.settings-board__more { display: flex; justify-content: center; gap: 6px; padding: 14px 0 6px; }
.settings-board__more i { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); opacity: 0.25; animation: board-more 0.9s infinite ease-in-out; }
.settings-board__more i:nth-child(2) { animation-delay: 0.15s; }
.settings-board__more i:nth-child(3) { animation-delay: 0.3s; }
@keyframes board-more { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 0.9; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .settings-board__more i { animation: none; } }
.settings-badge {
  flex: none;
  min-width: 52px;
  padding: 4px 8px;
  border: 1.5px solid var(--sky-deep);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sky-deep);
  font-variant-numeric: tabular-nums;
}
.settings-badge.is-done { border-color: var(--navy); color: var(--navy); background: var(--burgundy-soft); }
.settings-empty { margin: 40px 0; text-align: center; color: var(--ink-3, #8a97ab); }

/* ════════════════════════════════════════════════════════════
   v27 · 스마트폰 기본 상단·하단 네비게이션을 보이게 두고
         그만큼 앱의 상단 로고 바와 하단 버튼 영역을 줄임
         (cpbc플러스 앱 비율 참고: 로고 바 약 44px, 로고 높이 20px)
   ════════════════════════════════════════════════════════════ */
:root {
  --topbar-h: 44px;
}
.topbar {
  grid-template-columns: 52px 1fr 52px;
  padding-left: 4px;
  padding-right: 4px;
}
.topbar .icon-btn {
  width: 40px;
  height: 40px;
}
.topbar .icon-btn svg {
  width: 22px;
  height: 22px;
}
.cpbc-logo {
  height: 20px;
}
@media (min-width: 520px) {
  .topbar {
    height: calc(var(--topbar-h) + 8px);
  }
}
.bottombar {
  padding: 6px var(--gutter) calc(8px + var(--safe-b));
  gap: 4px;
}
.bottombar .btn {
  min-height: 48px;
}
.pray-actions .btn--primary {
  min-height: 48px;
}
.pray-actions .text-link,
.pray-actions .finish-btn {
  min-height: 34px;
}
.settings__bar {
  grid-template-columns: 40px 1fr 40px;
  padding: calc(var(--safe-t) + 2px) 4px 2px;
  min-height: 44px;
}
.settings__bar .icon-btn {
  width: 40px;
  height: 40px;
}
.settings__title {
  font-size: 16px;
}

/* ── v30 · 설정 > 버전 정보·업데이트 (앱 전용) ── */
.settings-row__right { display: inline-flex; align-items: center; gap: 8px; }
.settings-badge--new { min-width: 0; padding: 2px 8px; border-radius: 999px; border-color: #d9480f; color: #d9480f; font-size: 11.5px; font-style: normal; }
.settings-update { display: flex; flex-direction: column; gap: 10px; }
.settings-update__status { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.settings-update__status:empty { display: none; }
.settings-update__actions { display: flex; flex-direction: column; gap: 8px; }
.settings-update__actions:empty { display: none; }
.settings-update__tip { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

/* ── v31 · 앱: 키보드가 열려도 상단 바는 그대로, 화면 안에서만 스크롤 ── */
html.kb-inner #app {
  height: var(--app-h, 100%);
}
html.kb-inner .screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-padding-top: 12px;
}
