:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #242424;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --primary: #edf1f5;
  --primary-dark: #4b5563;
  --primary-soft: #f7f8fa;
  --ok: #4f6f52;
  --warn: #7a651f;
  --danger-soft: #f8eeee;
  --shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(250, 250, 250, 0) 34rem),
    var(--bg);
  line-height: 1.55;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

button, input, textarea { font: inherit; }
button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus,
button:focus-visible,
.btn:focus,
.btn:focus-visible,
[role="button"]:focus,
[role="button"]:focus-visible {
  outline: none;
  box-shadow: none;
}

input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline: none;
}


.app {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px 30px;
}

.screen { display: none; animation: rise 180ms ease-out; }
.screen.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  min-height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.hero-card, .panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card { padding: 22px 18px; }
.panel { padding: 18px; margin: 14px 0; }
.compact-panel { padding: 16px; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1, h2, h3 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.22;
}
h1 { font-size: clamp(25px, 6.4vw, 32px); }
h2 { font-size: clamp(22px, 5.4vw, 28px); }
h3 { font-size: 16px; }

.sub, .help, .muted {
  color: var(--muted);
  font-size: 15px;
}
.sub { margin: 14px 0 0; }
.help { margin: 8px 0 0; }
.muted { font-size: 13px; }

.reference {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.actions { display: grid; gap: 10px; margin-top: 18px; }

.btn {
  min-height: 48px;
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
  background: #f6f7f9;
  border: 1px solid #e5e7eb;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-dark); border-color: #d9e0e8; }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); border-color: #e5e7eb; }
.btn-outline { background: rgba(255,255,255,0.88); color: var(--primary-dark); border-color: var(--line); }
.btn-light { background: #fbfbfc; border-color: var(--line); color: var(--muted); }
.btn-quiet { background: #f8f8f8; border-color: var(--line); color: var(--muted); }

.btn-row {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.btn-row.one { grid-template-columns: 1fr; }
.btn-row.two { grid-template-columns: 1fr 1fr; }
.btn-row.three { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .btn-row.three { grid-template-columns: 0.8fr 1.4fr 1fr; }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}
.topbar .ghost-link {
  flex: 0 0 auto;
  white-space: nowrap;
}
.topbar .reference {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.ghost-link {
  padding: 9px 3px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

#practiceScreen .topbar,
#soloScreen .topbar {
  padding: 8px 0 10px;
  margin: 0 0 18px;
  background: var(--bg);
}

#practiceScreen .topbar .reference,
#soloScreen .topbar .reference {
  max-width: none;
  justify-content: flex-end;
}


.section-head, .practice-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.step-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.passage-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.passage-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  border: 1px solid var(--line);
}
.passage-card.current {
  border-color: rgba(75, 85, 99, 0.28);
  background: rgba(255,255,255,0.72);
}
.passage-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.passage-title {
  margin: 0;
  font-weight: 850;
  font-size: 16px;
}
.passage-meta {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(75, 85, 99, 0.09);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.passage-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.passage-actions .btn { min-height: 42px; padding: 9px 10px; font-size: 14px; }
.passage-delete-btn {
  flex: 0 0 auto;
  min-width: 0;
  align-self: flex-start;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: rgba(107,114,128,0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  cursor: pointer;
}
.passage-delete-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.verse-list { display: grid; gap: 10px; margin-top: 16px; }
.verse-card {
  width: 100%;
  display: block;
  text-align: left;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
  color: var(--ink);
  border: 1px solid var(--line);
}
.verse-card.confirmed {
  border-color: rgba(229, 231, 235, 0.9);
  background: rgba(249, 250, 251, 0.82);
}
.verse-card.near {
  border-color: rgba(209, 213, 219, 0.9);
  background: rgba(255, 255, 255, 0.74);
}
.verse-ref {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 850;
  font-size: 12px;
  line-height: 1.2;
}
.verse-text {
  display: block;
  min-width: 0;
  font-weight: 760;
  font-size: 17px;
  line-height: 1.72;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.verse-list.read-mode {
  gap: 14px;
  margin-top: 18px;
}
.verse-list.read-mode .verse-read-card {
  padding: 16px 15px;
  border-radius: 17px;
  background: rgba(255,255,255,0.58);
  border-color: rgba(229, 231, 235, 0.72);
  box-shadow: none;
}
.verse-list.read-mode .verse-ref {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 680;
  color: rgba(107, 114, 128, 0.86);
}
.verse-read-text {
  margin: 0;
  color: var(--ink);
  font-size: clamp(18px, 4.8vw, 20px);
  font-weight: 430;
  line-height: 1.88;
  letter-spacing: -0.025em;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* 2026-05-23: 연습 화면은 말씀과 제목 강조를 줄여 읽기 부담을 낮춘다. */
#practiceScreen .verse-list:not(.read-mode) .verse-text,
#practiceScreen .verse-list:not(.read-mode) .full-visible-word,
#practiceScreen .verse-list:not(.read-mode) .hint-char {
  font-weight: 430;
}

#practiceScreen .practice-head h2 {
  font-weight: 650;
}

#practiceScreen .step-pill,
#practiceScreen .reference-recall-head span:first-child {
  font-weight: 650;
}

.masked-bars {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 430px;
}
.masked-bars span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(229,231,235,0.95), rgba(243,244,246,0.85));
}
.masked-bars span:nth-child(2) { width: 82%; }
.masked-bars span:nth-child(3) { width: 56%; }

.hint-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 0.42em;
  align-items: center;
}
.hint-word {
  display: inline;
  white-space: nowrap;
  vertical-align: baseline;
}
.full-verse-words .full-visible-word {
  font-weight: 760;
  color: inherit;
}

.inline-hidden-text {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background-color: rgba(229, 231, 235, 0.96);
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hint-char {
  display: inline;
  min-width: 0;
  height: auto;
  font-weight: 900;
  color: var(--primary-dark);
}
.revealed-word {
  padding: 0;
  border-radius: 4px;
  color: inherit;
  font-weight: 850;
  background: transparent;
}
.hint-word-tappable {
  cursor: pointer;
  border-radius: 7px;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.hint-word-tappable:hover {
  background: rgba(75,85,99,0.05);
}
.hint-word-tappable:focus-visible {
  outline: none;
  box-shadow: none;
}
.manual-hint-char {
  color: var(--primary-dark);
}
.manual-revealed-word {
  background: transparent;
  color: inherit;
}

.keyword-hint-words .keyword-hidden-word {
  padding: 0;
}

/* 2026-05-23: 연습 화면 말씀 본문은 열림/힌트 상태에서도 굵기가 변하지 않게 유지한다. */
#practiceScreen .verse-list:not(.read-mode) .hint-word,
#practiceScreen .verse-list:not(.read-mode) .full-visible-word,
#practiceScreen .verse-list:not(.read-mode) .hint-char,
#practiceScreen .verse-list:not(.read-mode) .manual-hint-char,
#practiceScreen .verse-list:not(.read-mode) .revealed-word,
#practiceScreen .verse-list:not(.read-mode) .manual-revealed-word {
  font-weight: 430;
}

.practice-line-card {
  position: relative;
  cursor: text;
}
.practice-line-card.active {
  border-color: rgba(75,85,99,0.24);
  box-shadow: 0 0 0 1px rgba(75,85,99,0.06);
  background: rgba(255,255,255,0.76);
}
.practice-line-body {
  position: relative;
  min-width: 0;
}
.practice-line-input {
  width: 100%;
  min-height: 28px;
  margin-top: 5px;
  padding: 4px 0 0;
  border: 0;
  border-top: 1px dashed rgba(75,85,99,0.18);
  background: transparent;
  color: rgba(55,65,81,0.68);
  outline: none;
  resize: none;
  font: inherit;
  line-height: 1.35;
}
.practice-line-input::placeholder {
  color: rgba(107,114,128,0.62);
}
.practice-line-card.confirmed .practice-line-input {
  min-height: 28px;
  margin-top: 5px;
  padding: 4px 0 0;
  border: 0;
  border-top: 1px dashed rgba(75,85,99,0.18);
  opacity: 1;
  pointer-events: auto;
}

.recitation-opening,
.recitation-ending {
  margin: 14px 0 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.recitation-opening {
  font-size: 17px;
}

.recitation-ending {
  text-align: left;
  font-size: 16px;
}

.reference-preview[hidden] {
  display: none;
}

.reference-preview {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(243, 244, 246, 0.95);
  color: var(--primary-dark);
}

.solo-panel { position: relative; }
.solo-guide {
  margin: 10px 0 12px;
  color: var(--muted);
  font-weight: 750;
}
.solo-guide small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 650;
}
.input-wrap { position: relative; }
textarea, .text-input, .large-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
}
#reciteInput, .large-input {
  min-height: 145px;
  resize: vertical;
}

.passage-body-input {
  min-height: min(58dvh, 460px);
  max-height: 62dvh;
  overflow-y: auto;
  line-height: 1.65;
  resize: vertical;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 520px) {
  .passage-body-input {
    min-height: 48dvh;
    max-height: 60dvh;
  }
}
#reciteInput:focus, .text-input:focus, .large-input:focus {
  border-color: rgba(75,85,99,0.32);
  box-shadow: none;
}
.field-label {
  display: block;
  margin: 16px 0 7px;
  color: var(--ink);
  font-weight: 800;
}

.mini-feedback {
  position: absolute;
  right: 13px;
  bottom: 13px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}
.mini-feedback.show { animation: feedbackPop 540ms ease-out forwards; }
.mini-feedback.near { background: var(--warn); }
@keyframes feedbackPop {
  0% { opacity: 0; transform: scale(0.85); }
  16% { opacity: 1; transform: scale(1); }
  74% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95); }
}

.hint-drawer { display: none; margin-top: 15px; }
.hint-drawer.open { display: block; }

.result-block {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.56);
}
.result-block h3 { margin-bottom: 8px; }
.spoken {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  color: #374151;
  background: rgba(255,255,255,0.62);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(229,231,235,0.95);
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}
.empty-note { margin: 0; color: var(--muted); }
.quiet-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.quiet-list li { margin: 4px 0; }
.status-actions { display: grid; gap: 9px; margin-top: 12px; }
@media (min-width: 560px) { .status-actions { grid-template-columns: 1fr 1fr; } }
.status-btn {
  min-height: 62px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}
.status-btn.selected { background: var(--primary); color: var(--primary-dark); border-color: #d9e0e8; }
.status-btn strong { display: block; font-size: 17px; margin-bottom: 2px; }
.status-btn span { font-size: 13px; opacity: 0.78; }

.finish-card { text-align: center; padding: 24px 18px; }
.finish-icon {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 950;
  margin-bottom: 12px;
}
.stats-grid { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 16px; }
@media (min-width: 560px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.64);
  text-align: left;
}
.stat-num {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-weight: 850;
  color: var(--ink);
  margin-bottom: 5px;
}
.stat-label { color: var(--muted); font-size: 14px; font-weight: 750; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 20;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.footer-note { margin-top: 2px; color: var(--muted); font-size: 12px; text-align: center; }
[hidden] { display: none !important; }
.status-actions.single {
  grid-template-columns: 1fr;
}
.practice-done-card {
  text-align: left;
}

.scripture-compare {
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.scripture-line {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(18px, 4.8vw, 20px);
  font-weight: 430;
  line-height: 1.88;
  letter-spacing: -0.025em;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.scripture-line:last-child { margin-bottom: 0; }
.scripture-verse-label {
  display: none;
}
.compare-label { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.result-block { text-align: left; }


.reference-recall {
  margin: 14px 0 16px;
  padding: 13px;
  border: 1px solid rgba(75, 85, 99, 0.13);
  border-radius: 18px;
  background: rgba(255,255,255,0.54);
}

.reference-recall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.reference-recall-guide {
  flex: 1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
}

.reference-recall-guide[hidden] {
  display: none;
}

.reference-recall-status {
  min-width: 24px;
  text-align: right;
  color: var(--primary-dark);
  font-weight: 900;
}

.reference-recall-status.near {
  color: var(--warn);
}

.reference-recall-status.review {
  color: var(--muted);
}

.reference-recall .recitation-opening {
  margin: 4px 0 0;
}

.reference-recall-input {
  min-height: 46px;
  margin-top: 4px;
}

.reference-recall.is-read .reference-recall-input {
  display: none;
}

.reference-result-text {
  margin-top: 8px;
}

.reference-result-status.exact {
  color: var(--primary-dark);
  font-weight: 850;
}

.reference-result-status.near {
  color: var(--warn);
  font-weight: 850;
}

.reference-result-status.review {
  color: var(--muted);
  font-weight: 750;
}


.reference-recall.is-read {
  padding: 0;
  border: 0;
  background: transparent;
}

.reference-recall.is-read .reference-recall-head {
  display: none;
}

.reference-recall.is-read .recitation-opening {
  margin: 10px 0 14px;
  font-size: 17px;
  font-weight: 800;
}


.reference-recall-head span:first-child,
#referenceResultBlock h3 {
  line-height: 1.35;
  word-break: keep-all;
}

.reference-recall-head {
  flex-wrap: wrap;
}

.reference-recall-status {
  flex-shrink: 0;
}


#practiceTip {
  white-space: pre-line;
}

.mic-restart-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.mic-restart-note.show {
  opacity: 1;
  transform: translateY(0);
}


/* 화면 전체 크기와 색 강조 정리 */
.hero-card h1 {
  margin-top: 0;
  font-weight: 850;
}

.home-current {
  margin: 8px 0 16px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.panel h2,
.practice-head h2,
.finish-card h2 {
  font-weight: 850;
}

.result-block h3,
.reference-recall-head span:first-child,
.field-label {
  font-size: 16px;
}

.badge {
  background: rgba(17, 24, 39, 0.05);
  color: var(--muted);
}

.verse-ref,
.scripture-verse-label,
.compare-label {
  color: var(--muted);
  font-weight: 750;
}

.reference-recall-status,
.reference-result-status.exact,
.reference-result-status.near,
.reference-result-status.review {
  font-weight: 750;
}

.home-actions { margin-top: 18px; }
.home-menu-grid {
  display: grid;
  gap: 10px;
}
.menu-card {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  color: var(--ink);
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}
.menu-title {
  font-weight: 850;
  font-size: 16px;
  letter-spacing: -0.03em;
}
.menu-desc {
  color: var(--muted);
  font-size: 14px;
}
.list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.list-add-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}
.empty-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.discipleship-section {
  margin-top: 18px;
}
.discipleship-section h3 {
  margin-bottom: 10px;
}
.course-list {
  display: grid;
  gap: 10px;
}
.course-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  cursor: pointer;
}
.course-card .passage-title,
.course-card .passage-meta {
  display: block;
}
.course-chevron {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.join-btn {
  width: 100%;
  margin-top: 10px;
}
@media (max-width: 480px) {
  .list-head {
    display: grid;
  }
  .list-add-btn {
    width: 100%;
  }
}

.home-language-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}
.language-toggle {
  padding: 6px 4px;
  font-size: 13px;
  letter-spacing: 0;
}

.solo-keyword-hint-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.solo-keyword-hint-title {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.keyword-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  font-size: 0.92rem;
  line-height: 1.2;
}


.help-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-icon-btn[data-global-help="true"] {
  position: static;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.help-icon-btn:active,
.help-close-btn:active {
  transform: translateY(1px);
}
.help-modal[hidden] {
  display: none;
}
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.28);
}
.help-dialog {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.18);
  padding: 18px;
}
.help-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.help-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.help-list {
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  font-size: 15px;
}
.help-list li + li {
  margin-top: 9px;
}


/* 2026-05-25: 버튼/카드 공통 UI 정리
   같은 역할의 요소는 화면이 달라도 같은 색, 굵기, 테두리, 간격을 사용한다. */
:root {
  --ui-page: #fafafa;
  --ui-surface: #ffffff;
  --ui-surface-soft: #fbfbfb;
  --ui-surface-muted: #f6f6f6;
  --ui-border: #e6e6e6;
  --ui-border-strong: #d8d8d8;
  --ui-text: #242424;
  --ui-text-muted: #6f7378;
  --ui-action: #eeeeef;
  --ui-action-border: #d9d9dc;
  --ui-action-subtle: #f7f7f8;
  --ui-radius-panel: 20px;
  --ui-radius-card: 17px;
  --ui-radius-input: 14px;
  --ui-shadow-panel: 0 10px 28px rgba(17, 24, 39, 0.055);
  --ui-shadow-card: none;
}

body {
  background: var(--ui-page);
  color: var(--ui-text);
}

/* 화면 단위 큰 카드 */
.hero-card,
.panel,
.finish-card,
.help-dialog {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-panel);
  box-shadow: var(--ui-shadow-panel);
}

.panel,
.finish-card {
  padding: 18px;
}

/* 내부 카드: 목록/연습/비교/도움말 안에서 반복되는 카드 */
.menu-card,
.passage-card,
.course-card,
.verse-card,
.verse-list.read-mode .verse-read-card,
.result-block,
.stat-card,
.status-btn,
.reference-recall,
.solo-keyword-hint-card,
.spoken,
.scripture-compare,
.reference-preview,
.keyword-chip,
.chip {
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-card);
  box-shadow: var(--ui-shadow-card);
}

.verse-list.read-mode .verse-read-card,
.verse-card,
.passage-card,
.course-card,
.result-block,
.reference-recall {
  padding: 14px;
}

.passage-card.current,
.verse-card.confirmed,
.verse-card.near,
.practice-line-card.active,
.status-btn.selected {
  background: var(--ui-surface-soft);
  border-color: var(--ui-border-strong);
  box-shadow: none;
}

/* 버튼: 역할별 공통 스타일 */
.btn,
.help-icon-btn,
.help-close-btn,
.status-btn,
.menu-card,
.course-card {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ui-text);
  background: var(--ui-action-subtle);
  border: 1px solid var(--ui-border);
  box-shadow: none;
}

.btn-primary,
.btn-soft {
  color: var(--ui-text);
  background: var(--ui-action);
  border-color: var(--ui-action-border);
}

.btn-outline,
.btn-light,
.btn-quiet {
  color: var(--ui-text-muted);
  background: var(--ui-surface-soft);
  border-color: var(--ui-border);
}

.passage-actions .btn,
.list-add-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 650;
  border-radius: 13px;
}

.btn:active,
.menu-card:active,
.course-card:active,
.help-icon-btn:active,
.help-close-btn:active {
  transform: translateY(1px);
}

button:focus,
button:focus-visible,
.btn:focus,
.btn:focus-visible,
.menu-card:focus,
.menu-card:focus-visible,
.course-card:focus,
.course-card:focus-visible,
.status-btn:focus,
.status-btn:focus-visible,
.help-icon-btn:focus,
.help-icon-btn:focus-visible,
.help-close-btn:focus,
.help-close-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

/* 입력창 */
textarea,
.text-input,
.large-input,
.reference-recall-input {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-input);
  color: var(--ui-text);
  box-shadow: none;
}

#reciteInput:focus,
.text-input:focus,
.large-input:focus,
.reference-recall-input:focus,
textarea:focus {
  border-color: var(--ui-border-strong);
  box-shadow: none;
}

/* 제목/보조문구/참조 표기 */
h1,
h2,
.panel h2,
.practice-head h2,
.finish-card h2,
#helpDialogTitle {
  color: var(--ui-text);
  font-weight: 650;
  letter-spacing: -0.035em;
}

h1 { font-size: clamp(24px, 6vw, 30px); }
h2 { font-size: clamp(21px, 5.2vw, 26px); }
h3,
.result-block h3,
.reference-recall-head span:first-child,
.field-label,
.menu-title,
.passage-title,
.solo-keyword-hint-title {
  color: var(--ui-text);
  font-weight: 650;
}

.help,
.sub,
.muted,
.reference,
.verse-ref,
.menu-desc,
.passage-meta,
.course-chevron,
.compare-label,
.footer-note,
.reference-recall-guide,
.stat-label,
.help-list {
  color: var(--ui-text-muted);
}

.reference,
.home-current,
.verse-ref,
.step-pill,
.badge,
.chip,
.stat-label {
  font-weight: 600;
}

/* 말씀 본문: 읽기/연습/비교 화면의 기본 인상 통일 */
.verse-text,
.verse-read-text,
.scripture-line,
.full-visible-word,
.hint-char,
.manual-hint-char,
.revealed-word,
.manual-revealed-word {
  color: var(--ui-text);
  font-weight: 430;
}

.verse-list.read-mode .verse-ref {
  display: none;
}

/* 상태/작은 배지 */
.step-pill,
.badge,
.chip,
.keyword-chip,
.finish-icon,
.help-close-btn,
.help-icon-btn {
  background: var(--ui-surface-muted);
  color: var(--ui-text-muted);
  border: 1px solid var(--ui-border);
  box-shadow: none;
}

.status-btn.selected {
  background: var(--ui-action);
  color: var(--ui-text);
  border-color: var(--ui-action-border);
}

/* 결과/비교 영역이 다른 페이지와 따로 놀지 않게 정리 */
.scripture-compare {
  padding: 14px;
}

.spoken {
  color: var(--ui-text);
  background: var(--ui-surface-soft);
}

/* 입력 중인 연습 카드도 다른 카드와 같은 굵기/테두리 체계를 따른다. */
.practice-line-card.active {
  border-color: var(--ui-border-strong);
}

.practice-line-input,
.practice-line-card.confirmed .practice-line-input {
  border-top: 1px dashed var(--ui-border-strong);
  color: var(--ui-text-muted);
}

/* 2026-05-25: 공통 UI 시스템 재정리
   페이지별 예외보다 역할별 스타일을 우선 적용한다. */
:root {
  --ds-bg: #fafafa;
  --ds-surface: #ffffff;
  --ds-surface-soft: #fbfbfb;
  --ds-border: #e5e7eb;
  --ds-border-strong: #d6d9de;
  --ds-text: #242424;
  --ds-muted: #6b7280;
  --ds-action: #f1f3f5;
  --ds-action-border: #dce1e6;
  --ds-radius-panel: 20px;
  --ds-radius-card: 17px;
  --ds-radius-control: 14px;
  --ds-shadow-panel: 0 10px 28px rgba(17, 24, 39, 0.055);
  --ds-title-size: clamp(21px, 5.3vw, 25px);
  --ds-section-size: 16px;
  --ds-desc-size: 14px;
  --ds-reference-size: 14px;
  --ds-scripture-size: clamp(17px, 4.5vw, 19px);
  --ds-button-size: 15px;
}

html,
body {
  background: var(--ds-bg);
  color: var(--ds-text);
}

/* PageTitle */
h1,
h2,
.panel h2,
.practice-head h2,
.finish-card h2,
#helpDialogTitle {
  color: var(--ds-text);
  font-size: var(--ds-title-size);
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.035em;
}

/* SectionTitle / CardTitle / FieldLabel */
h3,
.result-block h3,
.reference-recall-head span:first-child,
.field-label,
.menu-title,
.passage-title,
.solo-keyword-hint-title,
.status-btn strong {
  color: var(--ds-text);
  font-size: var(--ds-section-size);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

/* DescriptionText / EmptyMessage */
.help,
.sub,
.muted,
.menu-desc,
.passage-meta,
.empty-note,
.footer-note,
.reference-recall-guide,
.stat-label,
.help-list,
.solo-guide,
.compare-label,
.status-btn span {
  color: var(--ds-muted);
  font-size: var(--ds-desc-size);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.015em;
}

/* ReferenceText */
.reference,
.reference-text,
.home-current,
.verse-ref,
.step-pill,
.badge,
.chip,
.recitation-opening,
.reference-result-status.exact,
.reference-result-status.near,
.reference-result-status.review {
  color: var(--ds-muted);
  font-size: var(--ds-reference-size);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.home-current {
  display: block;
  margin: 8px 0 16px;
}

/* ScriptureText: 읽기/연습/비교 본문 공통 */
.verse-text,
.verse-read-text,
.scripture-line,
.result-content-text,
.full-visible-word,
.hint-char,
.manual-hint-char,
.revealed-word,
.manual-revealed-word {
  color: var(--ds-text);
  font-size: var(--ds-scripture-size);
  font-weight: 430;
  line-height: 1.78;
  letter-spacing: -0.025em;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.scripture-line,
.verse-read-text {
  margin: 0 0 13px;
}
.scripture-line:last-child,
.verse-read-text:last-child {
  margin-bottom: 0;
}

/* Card / ListCard */
.hero-card,
.panel,
.finish-card,
.help-dialog {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  box-shadow: var(--ds-shadow-panel);
}

.menu-card,
.passage-card,
.course-card,
.verse-card,
.verse-list.read-mode .verse-read-card,
.result-block,
.stat-card,
.status-btn,
.reference-recall,
.solo-keyword-hint-card,
.keyword-chip,
.chip {
  background: var(--ds-surface-soft);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  box-shadow: none;
}

.hero-card,
.panel,
.finish-card,
.help-dialog,
.menu-card,
.passage-card,
.course-card,
.verse-card,
.verse-list.read-mode .verse-read-card,
.result-block,
.stat-card,
.status-btn,
.reference-recall,
.solo-keyword-hint-card {
  padding: 16px;
}

.passage-card.current,
.verse-card.confirmed,
.verse-card.near,
.practice-line-card.active,
.status-btn.selected {
  background: var(--ds-surface-soft);
  border-color: var(--ds-border-strong);
  box-shadow: none;
}

/* Result 내부 본문은 부모 카드 안에서 또 다른 박스를 만들지 않는다. */
.spoken,
.scripture-compare {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ds-text);
}

.spoken {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}

.spoken.result-empty-text {
  color: var(--ds-muted);
  font-size: var(--ds-desc-size);
  font-weight: 500;
  line-height: 1.55;
}

/* Button */
.btn {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: var(--ds-radius-control);
  font-size: var(--ds-button-size);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ds-text);
  background: var(--ds-action);
  border: 1px solid var(--ds-action-border);
  box-shadow: none;
}

.btn-primary,
.btn-soft {
  color: var(--ds-text);
  background: var(--ds-action);
  border-color: var(--ds-action-border);
}

.btn-outline,
.btn-light,
.btn-quiet {
  color: var(--ds-muted);
  background: var(--ds-surface-soft);
  border-color: var(--ds-border);
}

.passage-actions .btn,
.list-add-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 650;
  border-radius: 13px;
}

.ghost-link,
.language-toggle {
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
}

/* InputBox */
textarea,
.text-input,
.large-input,
.reference-recall-input,
#reciteInput {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  color: var(--ds-text);
  box-shadow: none;
  font-size: 15px;
  line-height: 1.55;
}

textarea:focus,
.text-input:focus,
.large-input:focus,
.reference-recall-input:focus,
#reciteInput:focus {
  border-color: var(--ds-border-strong);
  box-shadow: none;
  outline: none;
}

.practice-line-input,
.practice-line-card.confirmed .practice-line-input {
  border: 0;
  border-top: 1px dashed var(--ds-border-strong);
  border-radius: 0;
  color: var(--ds-muted);
  background: transparent;
}

/* 작은 상태 요소 */
.step-pill,
.badge,
.chip,
.keyword-chip,
.finish-icon,
.help-close-btn,
.help-icon-btn {
  background: var(--ds-surface-soft);
  color: var(--ds-muted);
  border: 1px solid var(--ds-border);
  box-shadow: none;
}

.verse-list.read-mode .verse-ref,
.scripture-verse-label {
  display: none;
}

button:focus,
button:focus-visible,
.btn:focus,
.btn:focus-visible,
.menu-card:focus,
.menu-card:focus-visible,
.course-card:focus,
.course-card:focus-visible,
.status-btn:focus,
.status-btn:focus-visible,
.help-icon-btn:focus,
.help-icon-btn:focus-visible,
.help-close-btn:focus,
.help-close-btn:focus-visible {
  outline: none;
  box-shadow: none;
}


/* 2026-05-25 20:01: 역할별 스타일 최종 보정 */
.home-language-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-language-row .language-toggle {
  order: 1;
}
.home-language-row .help-icon-btn {
  order: 2;
}

.discipleship-section {
  margin-top: 14px;
}

/* 성경구절 표시는 모든 위치에서 같은 ReferenceText로 고정 */
.reference,
.reference-text,
.home-current,
.verse-ref,
.recitation-opening,
.passage-card .passage-title.reference-text {
  color: var(--ds-muted);
  font-size: var(--ds-reference-size);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

/* 말씀과 비교하기: 제목만 작게, 내용은 같은 본문 체계 */
.result-block h3 {
  color: var(--ds-muted);
  font-size: var(--ds-desc-size);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.result-content-text,
.spoken.result-empty-text,
.scripture-line {
  font-size: var(--ds-scripture-size);
  font-weight: 430;
  line-height: 1.78;
  letter-spacing: -0.025em;
}
.spoken.result-empty-text {
  color: var(--ds-muted);
}


/* 2026-05-25 20:17: 제자훈련 추가/비교 화면 스타일 보정 */
.add-discipleship-actions {
  margin-top: 12px;
}
.add-discipleship-actions .join-btn {
  width: auto;
  margin-top: 0;
}

/* 새 말씀/새 제자훈련 추가 버튼은 다른 목록 버튼과 같은 보통 굵기로 둔다. */
.list-add-btn {
  font-weight: 500;
}

/* 제자훈련 과정명은 목록 안에서 과하게 볼드 처리하지 않는다. */
.course-card .course-title-text {
  color: var(--ds-text);
  font-weight: 500;
}

/* 말씀과 비교하기: 섹션 제목은 연습 화면의 성경말씀 제목과 같은 계층으로 맞춘다. */
.result-block h3 {
  color: var(--ds-text);
  font-size: var(--ds-section-size);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

/* 비교 화면의 성경구절은 전체 말씀 읽기 화면의 성경구절 표시와 같은 크기감을 사용한다. */
#resultOpening {
  color: var(--ds-muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

/* 입력이 없을 때도 비교 화면 안에서 본문 영역과 크기감이 따로 놀지 않게 한다. */
.spoken.result-empty-text {
  font-size: var(--ds-scripture-size);
  font-weight: 430;
  line-height: 1.78;
  letter-spacing: -0.025em;
}


/* 2026-05-25 20:26: 비교 화면 단순화 / 목록 카드 상태 테두리 통일 */
.passage-card.current {
  border-color: var(--ds-border);
}

#resultScreen .result-block {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 16px;
}

#resultScreen .result-block h3 {
  color: var(--ds-text);
  font-size: var(--ds-section-size);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

#resultScreen #resultOpening {
  color: var(--ds-muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin: 0;
}

#resultScreen .scripture-compare {
  background: var(--ds-surface-soft);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  box-shadow: none;
  padding: 16px;
}

#resultScreen .scripture-line {
  color: var(--ds-text);
  font-size: var(--ds-scripture-size);
  font-weight: 430;
  line-height: 1.78;
  letter-spacing: -0.025em;
  margin: 0 0 13px;
}
#resultScreen .scripture-line:last-child { margin-bottom: 0; }


/* 2026-05-25 20:42: 말씀과 비교하기 화면을 전체 말씀 읽기와 같은 본문 형식으로 맞춘다. */
#resultScreen .result-read-list {
  margin-top: 18px;
}

#resultScreen .result-read-list .verse-read-card {
  margin: 0;
}

#resultScreen .result-action-block {
  margin-top: 16px;
}

/* 2026-05-25 20:50: 비교 화면도 읽기 화면처럼 제목 → 성경구절 → 본문 순서와 여백을 유지한다. */
#resultScreen .result-panel-reference {
  display: inline-flex;
  margin-top: 10px;
  color: var(--ds-muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

#resultScreen .result-read-list {
  margin-top: 14px;
}



/* 2026-05-31 14:45 KST - Play Store 준비: 기기 저장 안내와 개인정보 처리방침 링크 */
.footer-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: -0.015em;
  margin: 2px 2px 0;
}

.footer-privacy-link {
  display: inline-flex;
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: -6px auto 0;
}

.privacy-page {
  justify-content: flex-start;
  min-height: auto;
  padding-top: 16px;
}

.privacy-panel h1 {
  font-size: clamp(24px, 6vw, 30px);
}

.privacy-panel h2 {
  font-size: 18px;
  margin-top: 22px;
}

.privacy-panel p,
.privacy-panel li {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.02em;
}

.privacy-panel ul {
  padding-left: 20px;
}

.privacy-date {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}


/* 2026-07-11: 모든 하위 화면의 시작 위치를 조금 내려 통일한다. */
.screen:not(#homeScreen) {
  padding-top: 8px;
}

/* 현재 단계 완료 안내: 버튼이 아닌 비클릭 오버레이로 잠깐 표시한다. */
.practice-complete-note {
  position: fixed;
  left: 50%;
  top: 35%;
  z-index: 31;
  width: fit-content;
  max-width: min(86vw, 500px);
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 251, 240, 0.94);
  color: #5f5145;
  box-shadow: 0 6px 22px rgba(64, 53, 40, 0.10);
  font-size: clamp(20px, 5.4vw, 27px);
  font-weight: 820;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -0.025em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  text-shadow: none;
}

.practice-complete-note.show {
  animation: practice-complete-pop 1.55s ease-out both;
}

.practice-complete-note[hidden] {
  display: none;
}

@keyframes practice-complete-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  28%, 74% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -54%) scale(0.98); }
}

/* 2026-07-12: 비교 결과 안내는 버튼처럼 보이지 않는 일반 문장으로 표시한다. */
.result-practice-feedback {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  letter-spacing: -0.02em;
}

.result-practice-feedback[hidden] {
  display: none;
}

.result-practice-feedback.encouragement {
  color: var(--ok);
  font-weight: 750;
}

.result-practice-feedback.complete {
  color: var(--ok);
  font-size: 20px;
  font-weight: 850;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 30;
}

.celebration-piece {
  position: absolute;
  top: -18px;
  left: var(--piece-left);
  width: 7px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  background: #e8a838;
}

.celebration-piece:nth-child(4n + 2) { background: #6f9d72; }
.celebration-piece:nth-child(4n + 3) { background: #d97868; }
.celebration-piece:nth-child(4n) { background: #758fc7; }

.celebration-layer.show .celebration-piece {
  animation: celebration-fall var(--piece-duration) ease-out var(--piece-delay) both;
}

@keyframes celebration-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -12px, 0) rotate(0deg);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--piece-drift), 78vh, 0) rotate(var(--piece-rotate));
  }
}

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


/* V14-2 암송카드 */
.list-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.btn-card-entry {
  background: #fffdf9;
  border-color: #ddd6ca;
  color: #5b5146;
}

.memory-card-screen {
  min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 44px);
}

.memory-card-screen.active {
  display: flex;
  flex-direction: column;
  animation: rise 180ms ease-out;
}

.memory-card-topbar {
  width: min(100%, 500px);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

.memory-card-back {
  color: #746b61;
}

.memory-card-count {
  color: #90877c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.memory-card-layout {
  width: min(100%, 500px);
  min-height: 0;
  flex: 1;
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto auto;
  gap: 10px;
}

.memory-card-viewport {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 8px;
  outline: none;
}

.memory-card-slide {
  position: absolute;
  inset: 0;
  will-change: transform;
  padding: 2px 1px 4px;
}

.memory-card-slide-prev { transform: translate3d(-100%, 0, 0); }
.memory-card-slide-current { transform: translate3d(0, 0, 0); }
.memory-card-slide-next { transform: translate3d(100%, 0, 0); }

.memory-card-paper {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(42px, 8vh, 74px) clamp(28px, 8vw, 54px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border: 1px solid #e5dfd6;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(75, 65, 52, 0.075);
  color: #2f2a25;
  font-family: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  text-align: center;
  scrollbar-width: none;
}

.memory-card-paper::-webkit-scrollbar { display: none; }

.memory-card-reference {
  margin: 0;
  color: #6f665c;
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.memory-card-rule {
  width: 28px;
  height: 1px;
  margin: clamp(18px, 3.8vh, 30px) 0;
  background: #cfc5b9;
}

.memory-card-body {
  width: 100%;
  max-width: 390px;
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.045em;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.92;
}

.memory-card-text-short .memory-card-body { font-size: clamp(25px, 6.8vw, 35px); }
.memory-card-text-medium .memory-card-body { font-size: clamp(22px, 5.9vw, 31px); }
.memory-card-text-long .memory-card-body { font-size: clamp(19px, 5vw, 27px); line-height: 1.82; }
.memory-card-text-xlong .memory-card-body { font-size: clamp(16px, 4.2vw, 22px); line-height: 1.72; }

.memory-card-ending {
  width: 68px;
  margin-top: clamp(24px, 5vh, 42px);
  display: grid;
  grid-template-columns: 1fr 8px 1fr;
  align-items: center;
  gap: 7px;
  opacity: 0.72;
}

.memory-card-ending span {
  height: 1px;
  background: #cfc5b9;
}

.memory-card-ending i {
  width: 5px;
  height: 5px;
  margin: auto;
  border: 1px solid #aa9c8c;
  border-radius: 50% 0 50% 0;
  transform: rotate(45deg);
}


.memory-card-nav {
  position: absolute;
  z-index: 9;
  top: 50%;
  width: 34px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(100, 89, 77, 0.62);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 3px 12px rgba(75, 65, 52, 0.06);
  transform: translateY(-50%);
  backdrop-filter: blur(3px);
}

.memory-card-nav[hidden] { display: none; }
.memory-card-nav-prev { left: 7px; }
.memory-card-nav-next { right: 7px; }
.memory-card-nav:active { background: rgba(248, 245, 240, 0.92); }

.memory-card-paper.memory-card-fit-tight {
  padding-top: 24px;
  padding-bottom: 24px;
}

.memory-card-paper.memory-card-fit-tight .memory-card-reference { font-size: 14px; }
.memory-card-paper.memory-card-fit-tight .memory-card-translation { font-size: 11px; }
.memory-card-paper.memory-card-fit-tight .memory-card-rule { margin-top: 12px; margin-bottom: 12px; }
.memory-card-paper.memory-card-fit-tight .memory-card-ending { margin-top: 14px; }

.memory-card-swipe-hint {
  min-height: 20px;
  margin: 0;
  color: #8d8378;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: opacity 180ms ease;
}

.memory-card-swipe-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.memory-card-viewport::before,
.memory-card-viewport::after {
  content: "";
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-top: 2px solid rgba(160, 150, 139, 0.9);
  border-right: 2px solid rgba(160, 150, 139, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.memory-card-viewport::before {
  left: 12px;
  transform: rotate(-135deg);
}

.memory-card-viewport::after {
  right: 12px;
  transform: rotate(45deg);
}

.memory-card-viewport.is-swipable::before,
.memory-card-viewport.is-swipable::after {
  opacity: 0.72;
}

.card-home-practice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.memory-card-practice-btn {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid #d9d1c6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #5f554a;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
  box-shadow: 0 7px 18px rgba(75, 65, 52, 0.045);
}

.memory-card-practice-btn:active {
  transform: translateY(1px);
  background: #fbf9f5;
}

.memory-card-solo-btn {
  background: #f8f5f0;
  border-color: #e1d9cf;
  color: #665c51;
}

@media (max-width: 520px) {
  .list-head {
    align-items: stretch;
  }

  .list-head-actions {
    width: 100%;
    justify-content: stretch;
  }

  .list-head-actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-height: 720px) {
  .memory-card-layout {
    grid-template-rows: minmax(360px, 1fr) auto auto;
  }

  .memory-card-viewport {
    min-height: 360px;
  }

  .memory-card-paper {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .memory-card-rule {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .memory-card-ending {
    margin-top: 20px;
  }
}

/* V14-2 카드 중심 홈 재구성 */
.legacy-home-screen { display: none !important; }

.card-home-screen {
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 44px);
}

.card-home-topbar {
  position: relative;
  z-index: 12;
  width: min(100%, 500px);
  min-height: 46px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.set-selector-wrap,
.card-home-tools {
  position: relative;
}

.set-selector-btn {
  max-width: min(74vw, 360px);
  min-height: 42px;
  padding: 8px 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: #4f473f;
  font-size: clamp(17px, 4.7vw, 21px);
  font-weight: 720;
  letter-spacing: -0.035em;
  text-align: left;
}

.set-selector-btn span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-selector-chevron {
  color: #a0968b;
  font-size: 15px;
  transform: translateY(-1px);
}

.more-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  color: #73695f;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.more-menu-btn:active,
.set-selector-btn:active {
  background: #f4f1ec;
}

.home-popover {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 230px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #e5ded4;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 16px 42px rgba(68, 58, 46, 0.14);
}

.home-popover[hidden] { display: none; }
.set-popover { left: 0; }
.more-popover { right: 0; min-width: 190px; }

.home-popover button,
.home-popover a {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 10px;
  background: transparent;
  color: #4f473f;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-align: left;
  text-decoration: none;
}

.home-popover button:hover,
.home-popover button:active,
.home-popover a:hover,
.home-popover a:active,
.home-popover button.is-current {
  background: #f7f4ef;
}

.home-popover small {
  color: #a0968b;
  font-size: 12px;
  font-weight: 650;
}

.card-home-layout {
  width: min(100%, 500px);
  height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 118px);
  min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 118px);
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  gap: 7px;
}

.card-home-layout .memory-card-viewport {
  min-height: 0;
}

.card-home-layout .memory-card-paper {
  justify-content: flex-start;
  padding-top: clamp(24px, 4.6vh, 40px);
  padding-bottom: clamp(20px, 4vh, 34px);
  overflow: hidden;
}

.memory-card-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border: 1px solid #e5dfd6;
  border-radius: 8px;
  background: #fff;
  color: #6f665c;
  text-align: center;
  box-shadow: 0 12px 32px rgba(75, 65, 52, 0.06);
}

.memory-card-empty[hidden] { display: none; }
.memory-card-empty p {
  margin: 0;
  font-family: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  font-size: 20px;
  font-weight: 600;
}
.memory-card-empty span {
  margin-top: 9px;
  color: #9a9289;
  font-size: 13px;
}

.card-home-meta {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-list-link {
  padding: 5px 2px;
  background: transparent;
  color: #7b7167;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card-list-link:disabled { opacity: 0.4; cursor: default; }

.card-home-meta .memory-card-count {
  padding-right: 2px;
}

.memory-card-practice-btn:disabled,
.memory-card-solo-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.card-list-panel {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.card-overview-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.card-overview-item {
  position: relative;
  width: 100%;
  min-height: 92px;
  padding: 17px 44px 17px 17px;
  display: grid;
  gap: 6px;
  border: 1px solid #e7e1d8;
  border-radius: 15px;
  background: #fff;
  text-align: left;
  box-shadow: 0 5px 16px rgba(75, 65, 52, 0.035);
}

.card-overview-reference {
  color: #6d6359;
  font-family: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  font-size: 14px;
  font-weight: 600;
}

.card-overview-body {
  display: -webkit-box;
  overflow: hidden;
  color: #39332d;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-overview-chevron {
  position: absolute;
  right: 17px;
  top: 50%;
  color: #b1a79c;
  font-size: 24px;
  transform: translateY(-50%);
}

.set-select-input {
  width: 100%;
  min-height: 48px;
  padding-right: 38px;
  appearance: auto;
  background: #fff;
}

#setManagementScreen .panel { max-width: 620px; margin-left: auto; margin-right: auto; }
.set-management-list { display: grid; gap: 22px; margin-top: 22px; }
.set-management-group { display: grid; gap: 9px; }
.set-management-group h3 { color: #71675d; font-size: 14px; }
.set-management-row {
  min-height: 52px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e7e1d8;
  border-radius: 13px;
  background: #fff;
}
.set-management-row span { font-size: 15px; font-weight: 700; }
.set-management-row small { color: #a0968b; font-size: 12px; }
.set-management-row button {
  padding: 7px 10px;
  border-radius: 9px;
  background: #f8eeee;
  color: #8a4d4d;
  font-size: 13px;
  font-weight: 700;
}

@media (max-height: 720px) {
  .card-home-layout {
    height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 108px);
    min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 108px);
  }
  .card-home-layout .memory-card-paper { padding-top: 20px; padding-bottom: 18px; }
}

@media (max-width: 360px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .home-popover { min-width: 210px; }
  .memory-card-body { letter-spacing: -0.055em; }
}

@media (max-height: 720px) {
  .card-home-layout .memory-card-paper {
    justify-content: flex-start;
    padding-top: 18px;
    padding-bottom: 16px;
  }
}


/* V14-2 Netlify 검증 보완: 번역본, 목록 삭제, 비교 화면 */
@media (max-width: 520px) {
  .app {
    padding-top: calc(env(safe-area-inset-top) + 10px);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .card-home-screen {
    min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 26px);
  }

  .card-home-topbar {
    min-height: 42px;
    margin-bottom: 4px;
  }

  .card-home-layout {
    min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 78px);
    grid-template-rows: minmax(330px, 1fr) auto auto auto;
    gap: 7px;
  }

  .card-home-layout .memory-card-viewport { min-height: 330px; }
  .card-home-layout .memory-card-paper {
    padding-left: clamp(22px, 7vw, 32px);
    padding-right: clamp(22px, 7vw, 32px);
  }

  .memory-card-text-long .memory-card-body {
    font-size: clamp(17px, 4.6vw, 22px);
    line-height: 1.68;
  }

  .memory-card-text-xlong .memory-card-body {
    font-size: clamp(15px, 4.1vw, 19px);
    line-height: 1.62;
  }
}

.memory-card-translation {
  margin: 5px 0 0;
  color: #a0968b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-overview-row {
  position: relative;
}

.card-overview-row .card-overview-item {
  padding-right: 58px;
}

.card-overview-delete {
  position: absolute;
  right: 12px;
  bottom: 11px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 9px;
  background: #f8eeee;
  color: #8a4d4d;
  font-size: 12px;
  font-weight: 700;
}

.card-overview-row.has-delete .card-overview-chevron {
  top: 30px;
  transform: none;
}

.result-compare-sections {
  display: grid;
  gap: 8px;
}

#resultScreen .result-input-block,
#resultScreen .result-scripture-block {
  padding: 17px 0;
  border-top: 1px solid #ebe5dc;
}

#resultScreen .result-input-block {
  margin-top: 18px;
}

#resultScreen .spoken {
  min-height: 62px;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

#resultScreen .result-empty-text {
  color: var(--ds-muted);
}


/* 2026-08-03 09:29 KST - 최종 비교 화면 원문을 말씀카드와 같은 serif 카드로 표시 */
#resultScreen .result-panel-reference {
  display: none;
}

#resultScreen .result-read-list {
  margin-top: 14px;
}

#resultScreen .result-read-list .memory-card-paper {
  width: 100%;
  min-height: clamp(320px, 45vh, 420px);
  height: auto;
  justify-content: center;
  padding: clamp(38px, 6.5vh, 58px) clamp(24px, 6.6vw, 42px);
}

#resultScreen .result-read-list .memory-card-body {
  max-width: 390px;
}

#resultScreen .result-read-list .memory-card-ending {
  margin-top: clamp(22px, 4vh, 34px);
}

@media (max-height: 720px) {
  #resultScreen .result-read-list .memory-card-paper {
    min-height: 300px;
    justify-content: flex-start;
    padding-top: 30px;
    padding-bottom: 30px;
  }
}
