:root {
  color-scheme: dark;
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
  --primary-color: #2563eb;
  --primary-hover: #1e3a8a;
  --success-color: #059669;
  --success-hover: #047857;
  --warning-color: #64748b;
  --danger-color: #dc2626;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --border-color: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.title-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  z-index: 1;
}

.main-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  width: 100%;
}

.title-header-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.user-date-box {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 툴팁 스타일 */
[data-tooltip] {
  position: relative;
  cursor: help;
}

/* tooltip-toggle-btn은 항상 툴팁 표시 */
.tooltip-toggle-btn[data-tooltip]:hover::before,
.tooltip-toggle-btn[data-tooltip]:hover::after {
  display: block;
}

/* 일반 버튼은 show-tooltips 클래스가 있을 때만 툴팁 표시 */
body.show-tooltips [data-tooltip]:not(.tooltip-toggle-btn):hover::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 999999;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  min-width: max-content;
  max-width: 300px;
  text-align: center;
  word-break: keep-all;
  line-height: 1.4;
}

body.show-tooltips [data-tooltip]:not(.tooltip-toggle-btn):hover::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.25rem;
  border: 5px solid transparent;
  border-top-color: #475569;
  z-index: 999998;
  pointer-events: none;
}

/* 상단 버튼들의 툴팁은 아래로 표시 */
body.show-tooltips .top-bar [data-tooltip]:not(.tooltip-toggle-btn):hover::before {
  bottom: auto;
  top: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

body.show-tooltips .top-bar [data-tooltip]:not(.tooltip-toggle-btn):hover::after {
  bottom: auto;
  top: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0;
  border-top-color: transparent;
  border-bottom-color: #475569;
}

/* tooltip-toggle-btn 툴팁 (항상 표시, 아래로) */
.tooltip-toggle-btn {
  position: relative;
  z-index: 99999;
  isolation: isolate;
}

.tooltip-toggle-btn[data-tooltip]:hover::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: auto;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  margin-bottom: 0;
  padding: 0.5rem 0.75rem;
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 999999;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  min-width: max-content;
  max-width: 300px;
  text-align: center;
  word-break: keep-all;
  line-height: 1.4;
}

.tooltip-toggle-btn[data-tooltip]:hover::after {
  content: "";
  position: absolute;
  bottom: auto;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.25rem;
  margin-bottom: 0;
  border: 5px solid transparent;
  border-bottom-color: #475569;
  border-top-color: transparent;
  z-index: 999998;
  pointer-events: none;
}

/* 툴팁 토글 버튼 스타일 */
.tooltip-toggle-btn {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.625rem 1rem !important;
  min-height: 44px;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tooltip-toggle-btn:hover {
  background: #334155 !important;
  border-color: #64748b !important;
}

.tooltip-toggle-btn.active {
  background: #059669 !important;
  border-color: #10b981 !important;
  color: #ffffff;
}

/* 섹션 접기/펼치기 스타일 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  flex: 1;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.section-toggle-btn {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  padding: 0 !important;
  border-radius: 0.375rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.section-toggle-btn:hover {
  background: var(--border-color) !important;
  border-color: #475569 !important;
}

.section-toggle-btn .toggle-icon {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.9rem;
}

.section-toggle-btn.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.section-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 5000px;
  opacity: 1;
}

.section-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.list-panel .section-header {
  margin-bottom: 0.75rem;
}

.list-panel .section-content {
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.list-panel .section-content.collapsed {
  margin-top: 0;
  margin-bottom: 0;
}

.extra-controls-section {
  margin-top: 1rem;
}

.extra-controls-section .section-header {
  margin-bottom: 0.75rem;
}

.calendar-panel .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calendar-panel .calendar-header {
  flex: 1;
  margin: 0;
}

.memo-panel .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.memo-panel .memo-panel-header {
  flex: 1;
  margin: 0;
}

.user-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.user-box select {
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: inherit;
}

.user-add-btn {
  background: var(--success-color) !important;
  border-color: var(--success-color) !important;
  font-size: 0.85rem !important;
  padding: 0.5rem 0.75rem !important;
  margin-top: 0.5rem;
  min-height: 36px;
}

.user-add-btn:hover {
  background: var(--success-hover) !important;
}

.date-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.mypage-btn {
  background: #7c3aed !important;
  border-color: #8b5cf6 !important;
}

.mypage-btn:hover {
  background: #6d28d9 !important;
}

.continuous-toggle {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

.continuous-toggle.active {
  background: var(--success-color) !important;
  border-color: var(--success-color) !important;
  color: white !important;
}

.date-box input {
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: inherit;
}

.controls {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

select,
button {
  border-radius: 0.5rem;
  border: 1px solid transparent;
  padding: 0.625rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.625rem 0.75rem;
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.content-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.draggable-section {
  position: relative;
  cursor: move;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.draggable-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.draggable-section.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: scale(1.02);
  z-index: 1000;
}

.draggable-section.drag-over {
  border-color: var(--primary-color) !important;
  border-style: solid !important;
}

.section-drag-handle {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.draggable-section:hover .section-drag-handle {
  opacity: 0.7;
}

.section-drag-handle:hover {
  opacity: 1 !important;
  background: var(--border-color);
}

.section-drag-handle:active {
  cursor: grabbing;
}

.section-drag-handle::before {
  content: "⋮⋮";
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1;
  letter-spacing: -2px;
}

  .status-panel,
  .list-panel,
  .memo-panel {
    background: #111827;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.5);
  }

  @media (max-width: 768px) {
    .status-panel,
    .list-panel,
    .memo-panel {
      padding: 0.875rem;
      border-radius: 0.5rem;
    }
  }

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

#playBtn {
  width: 100%;
  background: var(--success-color);
  font-size: 1rem;
  min-height: 48px;
  font-weight: 600;
}

#playBtn:hover {
  background: var(--success-hover);
}

.player-controls-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  width: 100%;
}

.player-controls-row button {
  font-size: 0.9rem;
  padding: 0.75rem 0.5rem;
  min-height: 44px;
  font-weight: 600;
}

#pauseBtn,
#stopBtn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

#pauseBtn:hover,
#stopBtn:hover {
  background: var(--border-color);
  border-color: #475569;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
  min-height: 24px;
}

#nowPlaying {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#queueInfo {
  font-weight: 600;
  color: var(--primary-color);
  flex-shrink: 0;
}

.status-panel p.error {
  color: #f87171;
}

.progress-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.progress-bar span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: center;
}

.progress-bar input[type="range"] {
  flex: 1;
  height: 8px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.progress-bar input[type="range"]:hover {
  accent-color: var(--primary-hover);
}

.extra-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.extra-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.extra-controls input[type="range"] {
  width: 100%;
  height: 6px;
  accent-color: #64748b !important;
  cursor: pointer;
}

.extra-controls span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b !important;
  text-align: center;
}

#speedLabel,
#volumeLabel {
  color: #64748b !important;
}

  .list-panel h2 {
    font-size: 1.2rem;
    margin: 0 0 0.75rem 0;
    color: #e2e8f0;
    line-height: 1.4;
  }

  .list-panel h2 .reading-subtitle {
    font-size: 0.75em;
    color: #94a3b8;
    font-weight: normal;
    display: block;
    margin-top: 0.25rem;
  }

.list-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reading-item button {
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.875rem 1rem;
  min-height: 52px;
  font-size: 0.95rem;
  justify-content: flex-start;
}

.reading-item button:hover {
  background: #0f172a;
  border-color: var(--primary-color);
  transform: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.reading-item button.current {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}

.reading-item button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.reading-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: move;
  transition: opacity 0.2s ease;
}

.reading-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.reading-item.drag-over {
  border-top: 2px solid #38bdf8;
  margin-top: -2px;
  padding-top: 0.5rem;
}

.reading-item button.reading-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.reading-item button .reading-text {
  flex: 1;
}

.reading-item button .reading-check {
  color: var(--success-color);
  font-weight: bold;
  font-size: 1.2rem;
  margin-left: auto;
  display: none;
  flex-shrink: 0;
}

.reading-item button.read .reading-check {
  display: inline-flex;
}

.reading-item button.read {
  opacity: 0.85;
  background: rgba(5, 150, 105, 0.1);
}

.memo-btn {
  padding: 0.4rem 0.6rem !important;
  font-size: 1rem !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  min-width: auto !important;
  flex-shrink: 0;
}

.memo-btn:hover {
  background: #334155 !important;
}

.memo-btn.has-memo {
  background: #64748b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

.memo-btn.has-memo:hover {
  background: #475569 !important;
}

.memo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.memo-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.memo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.memo-modal-header h3 {
  margin: 0;
  color: #e2e8f0;
}

.memo-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.memo-close-btn:hover {
  color: #e2e8f0 !important;
}

.memo-modal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.memo-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.memo-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.memo-panel-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.memo-list-toggle-btn {
  background: #475569 !important;
  border-color: #64748b !important;
  font-size: 0.85rem !important;
  padding: 0.4rem 0.8rem !important;
}

.memo-list-toggle-btn:hover {
  background: #64748b !important;
}

.memo-add-btn {
  background: var(--success-color) !important;
  border-color: var(--success-color) !important;
  font-size: 0.9rem !important;
  padding: 0.5rem 0.875rem !important;
  min-height: 40px;
  font-weight: 600;
}

.memo-add-btn:hover {
  background: var(--success-hover) !important;
}

.memo-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.memo-empty {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  font-style: italic;
}

.memo-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.memo-item:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.memo-item-content {
  flex: 1;
}

.memo-item-content .memo-text {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
}

.memo-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.memo-time {
  font-size: 0.8rem;
}

.memo-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.memo-edit-btn,
.memo-delete-btn {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.85rem !important;
  background: transparent !important;
  border: 1px solid var(--border-color) !important;
  min-width: auto !important;
  min-height: 36px;
}

.memo-edit-btn:hover {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.memo-delete-btn:hover {
  background: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
}

.memo-date-info {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #0f172a;
  border-radius: 0.5rem;
  color: #cbd5f5;
  font-weight: 500;
}

.memo-modal-body textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 120px;
}

.memo-modal-body textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.memo-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: flex-end;
}

.memo-save-btn {
  background: #2563eb !important;
}

.memo-save-btn:hover {
  background: #1e3a8a !important;
}

.memo-delete-btn {
  background: #dc2626 !important;
}

.memo-delete-btn:hover {
  background: #991b1b !important;
}

.memo-update-btn {
  background: #059669 !important;
}

.memo-update-btn:hover {
  background: #047857 !important;
}

.memo-cancel-btn {
  background: #64748b !important;
}

.memo-cancel-btn:hover {
  background: #475569 !important;
}

.calendar-panel {
  background: var(--bg-panel);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-header h2 {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-nav-btn {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  padding: 0.5rem 1rem !important;
  font-size: 1.2rem !important;
  min-width: 3rem !important;
}

.calendar-nav-btn:hover {
  background: #334155 !important;
  border-color: #475569 !important;
}

.calendar-grid {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  margin-top: 1rem;
  overflow-x: visible;
  padding-bottom: 0.5rem;
}

.calendar-day {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
}

.calendar-day:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.calendar-day.selected {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.15);
  font-weight: 600;
}

.calendar-day.today {
  border-color: var(--warning-color);
  background: rgba(100, 116, 139, 0.15);
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.calendar-day-number {
  font-size: 1.2rem;
}

.calendar-day-name {
  font-size: 0.85rem;
  color: #94a3b8;
}

.calendar-readings {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-reading-btn {
  width: 100%;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.25rem;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.calendar-reading-btn:hover {
  background: #2563eb;
  border-color: #3b82f6;
}

.calendar-reading-btn.has-memo {
  border-color: #64748b;
}

.calendar-memo-icon {
  margin-left: 0.25rem;
  font-size: 0.9rem;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  .app {
    padding: 0.75rem;
    gap: 1rem;
  }

  .title-header {
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    border-bottom-width: 1px;
    gap: 0.5rem;
  }

  .main-title {
    font-size: 1.1rem;
    margin: 0;
  }

  .bible-text-toggle-btn {
    font-size: 0.85rem !important;
    padding: 0.5rem 0.9rem !important;
    min-height: 36px !important;
  }

  .tooltip-toggle-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem !important;
    min-height: 36px;
  }

  .top-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .user-date-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .user-box,
  .date-box {
    width: 100%;
  }

  .user-box select,
  .date-box input {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.6rem 0.5rem;
  }

  .user-add-btn {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }

  .controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
  }

  .controls button,
  .controls select {
    min-height: 44px;
    padding: 0.7rem 0.6rem;
    font-size: 0.9rem;
    width: 100%;
    font-weight: 500;
  }

  .tooltip-toggle-btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem !important;
    min-height: 44px;
  }

  .mypage-btn {
    grid-column: span 2;
  }

  .player-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  #playBtn {
    width: 100%;
    min-height: 48px;
    font-size: 1.05rem;
    font-weight: 600;
  }

  .player-controls-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 100%;
  }

  .player-controls-row button {
    min-height: 44px;
    font-size: 0.9rem;
    padding: 0.7rem 0.5rem;
    font-weight: 600;
  }

  .progress-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .progress-bar {
    width: 100%;
    gap: 0.5rem;
  }

  .progress-bar input[type="range"] {
    height: 6px;
  }

  .progress-bar span {
    font-size: 0.8rem;
    min-width: 40px;
  }

  .extra-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
  }

  .extra-controls label {
    font-size: 0.85rem;
  }

  .extra-controls input[type="range"] {
    width: 100%;
  }

  .extra-controls span {
    font-size: 0.8rem;
  }

  .reading-list {
    gap: 0.5rem;
  }

  .reading-item button {
    padding: 1rem 0.875rem;
    font-size: 0.95rem;
    min-height: 56px;
    font-weight: 500;
  }

  .calendar-grid {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .calendar-day {
    flex: 0 0 auto;
    min-width: 110px;
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }

  .calendar-day-number {
    font-size: 0.85rem;
  }

  .calendar-day-name {
    font-size: 0.7rem;
  }

  .calendar-readings {
    font-size: 0.65rem;
    margin-top: 0.4rem;
    gap: 0.2rem;
  }

  .calendar-reading-btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.7rem !important;
  }
  
  .memo-panel {
    padding: 0.875rem;
  }

  .memo-panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .memo-panel-header h2 {
    font-size: 1rem;
    margin: 0;
  }
  
  .memo-panel-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .memo-add-btn {
    min-height: 36px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .memo-item {
    padding: 0.75rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .memo-item-actions {
    flex-direction: column;
    gap: 0.25rem;
  }

  .memo-item-actions button {
    min-height: 32px;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  /* 모달 최적화 */
  .user-modal-content,
  .memo-modal-content,
  .mypage-modal-content,
  .password-modal-content,
  .download-modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 90vh;
    margin: 5vh auto;
    padding: 1.25rem;
  }

  .modal-header h2,
  .modal-header h3 {
    font-size: 1.25rem;
  }

  .modal-close-btn {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }

  .modal-footer button {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  /* 마이페이지 최적화 */
  .mypage-stats {
    margin-bottom: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .stat-item {
    padding: 1rem 0.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .mypage-data-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .data-control-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .data-control-group input {
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
  }

  .upload-btn,
  .download-btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    width: 100%;
  }

  .history-date-group {
    margin-bottom: 1.5rem;
  }

  .history-reading-item {
    padding: 0.875rem;
    font-size: 0.85rem;
  }

  /* 툴팁 비활성화 (모바일에서는 터치로 작동하지 않음) */
  body.show-tooltips [data-tooltip]:not(.tooltip-toggle-btn):hover::before,
  body.show-tooltips [data-tooltip]:not(.tooltip-toggle-btn):hover::after {
    display: none;
  }

  /* 날짜 표시 */
  #dateLabel {
    font-size: 1.1rem;
  }

  /* 읽기 제목 */
  #todayReadingsTitle {
    font-size: 1.1rem;
  }

  .reading-subtitle {
    font-size: 0.5em;
  }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
  .app {
    padding: 0.75rem;
  }

  .main-title {
    font-size: 1.1rem;
  }

  .controls button,
  .controls select {
    min-width: 100%;
    font-size: 0.9rem;
  }

  .calendar-day {
    min-width: 100px;
    padding: 0.625rem 0.375rem;
  }

  .reading-item button {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .user-modal-content,
  .memo-modal-content,
  .mypage-modal-content,
  .password-modal-content,
  .download-modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }
}

/* 계속듣기 옵션 모달 */
.continuous-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.continuous-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.continuous-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.continuous-modal-header h3 {
  margin: 0;
  color: #e2e8f0;
}

.continuous-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.continuous-close-btn:hover {
  color: #e2e8f0 !important;
}

.continuous-modal-body {
  padding: 1.5rem;
}

.continuous-option-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.continuous-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.continuous-option:hover {
  background: #1e293b;
  border-color: #475569;
}

.continuous-option input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  accent-color: #2563eb;
}

.continuous-option span {
  flex: 1;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.continuous-range-options {
  margin-top: 1rem;
  padding: 1rem;
  background: #0f172a;
  border-radius: 0.5rem;
  border: 1px solid #334155;
}

.continuous-range-options label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.continuous-range-options label:first-child {
  margin-top: 0;
}

.continuous-range-options input[type="date"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.continuous-range-options input[type="date"]:focus {
  outline: none;
  border-color: #2563eb;
}

.continuous-quick-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.continuous-quick-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: #334155 !important;
  border: 1px solid #475569 !important;
  color: #e2e8f0 !important;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.continuous-quick-btn:hover {
  background: #475569 !important;
  border-color: #64748b !important;
}

.continuous-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: flex-end;
}

.continuous-confirm-btn {
  background: #2563eb !important;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.continuous-confirm-btn:hover {
  background: #1e3a8a !important;
}

.continuous-cancel-btn {
  background: #64748b !important;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.continuous-cancel-btn:hover {
  background: #475569 !important;
}

/* 사용자 모달 */
.user-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.user-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.user-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.user-modal-header h3 {
  margin: 0;
  color: #e2e8f0;
}

.user-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.user-close-btn:hover {
  color: #e2e8f0 !important;
}

.user-modal-body {
  padding: 1.5rem;
}

.user-modal-body input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.95rem;
}

.user-modal-body input:focus {
  outline: none;
  border-color: #2563eb;
}

.user-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: flex-end;
}

.user-save-btn {
  background: #2563eb !important;
}

.user-save-btn:hover {
  background: #1e3a8a !important;
}

.user-cancel-btn {
  background: #64748b !important;
}

.user-cancel-btn:hover {
  background: #475569 !important;
}

/* 마이페이지 모달 */
.mypage-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.mypage-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mypage-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.mypage-modal-header h2 {
  margin: 0;
  color: #e2e8f0;
}

.mypage-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.mypage-close-btn:hover {
  color: #e2e8f0 !important;
}

.mypage-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.mypage-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: center;
}

.mypage-upload-btn,
.mypage-download-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mypage-upload-btn {
  background: #2563eb !important;
  color: #ffffff;
}

.mypage-upload-btn:hover {
  background: #1e3a8a !important;
}

.mypage-download-btn {
  background: #059669 !important;
  color: #ffffff;
}

.mypage-download-btn:hover {
  background: #047857 !important;
}

/* 비밀번호 모달 */
.password-modal,
.download-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.password-modal-content,
.download-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.password-modal-header,
.download-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.password-modal-header h3,
.download-modal-header h3 {
  margin: 0;
  color: #e2e8f0;
}

.password-close-btn,
.download-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.password-close-btn:hover,
.download-close-btn:hover {
  color: #e2e8f0 !important;
}

.password-modal-body,
.download-modal-body {
  padding: 1.5rem;
}

.password-modal-body label,
.download-modal-body label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.password-modal-body input,
.download-modal-body input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.password-modal-body input:focus,
.download-modal-body input:focus {
  outline: none;
  border-color: #2563eb;
}

.password-error,
.download-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.password-modal-footer,
.download-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: flex-end;
}

.password-confirm-btn,
.download-confirm-btn {
  background: #2563eb !important;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.password-confirm-btn:hover,
.download-confirm-btn:hover {
  background: #1e3a8a !important;
}

.password-cancel-btn,
.download-cancel-btn {
  background: #64748b !important;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.password-cancel-btn:hover,
.download-cancel-btn:hover {
  background: #475569 !important;
}

.mypage-stats {
  margin-bottom: 2rem;
}

.mypage-stats h3 {
  margin: 0 0 1rem 0;
  color: #e2e8f0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-item {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #94a3b8;
}

.mypage-history h3 {
  margin: 0 0 1rem 0;
  color: #e2e8f0;
}

.history-empty {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  font-style: italic;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.history-date-group {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 1rem;
}

.history-date-header {
  font-weight: bold;
  color: #38bdf8;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #334155;
}

.history-access-info {
  background: #1e293b;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #10b981;
}

.history-readings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-reading-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #1e293b;
  border-radius: 0.25rem;
}

.history-reading-order {
  background: #2563eb;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: bold;
  min-width: 3rem;
  text-align: center;
  flex-shrink: 0;
}

.history-reading-content {
  flex: 1;
}

.history-reading-text {
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.history-reading-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.history-reading-time {
  color: #10b981;
}

.history-reading-ref {
  color: #64748b;
}

/* 백업 섹션 (하단 고정, 접힘 가능) */
.backup-section {
  position: fixed;
  bottom: 0;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.backup-section-header {
  margin-bottom: 0.5rem;
}

.backup-toggle-btn {
  background: #64748b !important;
  border: 1px solid #475569 !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 1rem 1rem 0 0 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  min-height: 36px;
}

.backup-toggle-btn:hover {
  background: #475569 !important;
  border-color: #334155 !important;
}

.backup-toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.backup-section-content {
  background: #1e293b;
  border: 1px solid #475569;
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.75rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
}

.backup-btn {
  background: #2563eb !important;
  border: 1px solid #3b82f6 !important;
  color: #ffffff !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  width: 100%;
}

.backup-btn:hover {
  background: #1e3a8a !important;
  border-color: #1e40af !important;
}

/* 백업 비밀번호 모달 */
.backup-password-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.backup-password-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.backup-password-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.backup-password-modal-header h3 {
  margin: 0;
  color: #e2e8f0;
}

.backup-password-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.backup-password-close-btn:hover {
  color: #e2e8f0 !important;
}

.backup-password-modal-body {
  padding: 1.5rem;
}

.backup-password-modal-body label {
  display: block;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.backup-password-modal-body input {
  width: 100%;
  padding: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.backup-password-modal-body input:focus {
  outline: none;
  border-color: #3b82f6;
}

.backup-password-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.backup-password-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: flex-end;
}

.backup-password-confirm-btn {
  background: #2563eb !important;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 0.5rem !important;
  border: 1px solid transparent !important;
  cursor: pointer;
  font-weight: 600;
}

.backup-password-confirm-btn:hover {
  background: #1e3a8a !important;
}

.backup-password-cancel-btn {
  background: #64748b !important;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 0.5rem !important;
  border: 1px solid transparent !important;
  cursor: pointer;
}

.backup-password-cancel-btn:hover {
  background: #475569 !important;
}

/* 백업 모달 */
.backup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.backup-modal-content {
  background: #1e293b;
  border-radius: 1rem;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.backup-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.backup-modal-header h3 {
  margin: 0;
  color: #e2e8f0;
}

.backup-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.backup-close-btn:hover {
  color: #e2e8f0 !important;
}

.backup-modal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.backup-loading,
.backup-empty,
.backup-error {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

.backup-error {
  color: #f87171;
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.backup-item {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.backup-item:hover {
  border-color: #475569;
  background: #1e293b;
}

.backup-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.backup-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
}

.backup-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.backup-checkbox-label:hover .backup-checkbox {
  transform: scale(1.1);
}

.backup-item-date {
  color: #e2e8f0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.backup-item-date .backup-info-label {
  color: #64748b;
  font-size: 0.85rem;
}

.backup-item-date strong {
  color: #38bdf8;
  font-size: 1rem;
}

.backup-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.backup-restore-btn {
  background: #2563eb !important;
  border: 1px solid #3b82f6 !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.backup-restore-btn:hover {
  background: #1e3a8a !important;
  border-color: #1e40af !important;
}

.backup-delete-item-btn {
  background: #dc2626 !important;
  border: 1px solid #991b1b !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.backup-delete-item-btn:hover {
  background: #b91c1c !important;
  border-color: #7f1d1d !important;
}

.backup-item-body {
  color: #94a3b8;
}

.backup-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.backup-info-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.backup-info-label {
  color: #64748b;
  min-width: 80px;
}

.backup-info-value {
  color: #cbd5e1;
  flex: 1;
}

.backup-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #334155;
  justify-content: space-between;
  align-items: center;
}

.backup-delete-btn {
  background: #dc2626 !important;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 0.5rem !important;
  border: 1px solid transparent !important;
  cursor: pointer;
  font-weight: 600 !important;
}

.backup-delete-btn:hover {
  background: #b91c1c !important;
}

.backup-refresh-btn {
  background: #475569 !important;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 0.5rem !important;
  border: 1px solid transparent !important;
  cursor: pointer;
}

.backup-refresh-btn:hover {
  background: #334155 !important;
}

.backup-cancel-btn {
  background: #64748b !important;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 0.5rem !important;
  border: 1px solid transparent !important;
  cursor: pointer;
}

.backup-cancel-btn:hover {
  background: #475569 !important;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  .backup-section {
    right: 0.5rem;
  }

  .backup-toggle-btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  .backup-btn {
    padding: 0.625rem 1rem !important;
    font-size: 0.85rem !important;
  }

  .backup-modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 95vh;
  }

  .backup-password-modal-content {
    width: 95%;
    max-width: 95%;
  }

  .backup-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .backup-item-actions {
    width: 100%;
    flex-direction: column;
  }

  .backup-restore-btn,
  .backup-delete-item-btn {
    width: 100%;
  }
}

/* 성경 전체 읽기 패널 */
.bible-read-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
}

.bible-read-panel .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.bible-read-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bible-read-description {
  margin: 0;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.bible-book-selector {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bible-book-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bible-group-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.bible-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.bible-book-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bible-book-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.bible-book-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .bible-books-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.4rem;
  }

  .bible-book-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* 성경 장 선택 모달 */
.bible-chapter-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  /* 도전모드(.bible-challenge-mode)와 동일 z-index(10000)면 모달이 뒤로 깔릴 수 있어 더 높게 설정 */
  z-index: 10003;
  align-items: center;
  justify-content: center;
}

.bible-chapter-modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.bible-chapter-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.bible-chapter-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.bible-chapter-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.bible-chapter-close-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.bible-chapter-modal-body {
  padding: 1.5rem;
}

.bible-chapter-book-name {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.bible-chapter-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.bible-chapter-card {
  padding: 0.75rem 0.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 일부 모바일/브라우저에서 버튼 텍스트가 테마 영향으로 안 보이는 케이스 방지 */
.bible-chapter-modal .bible-chapter-card {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: currentColor;
  font-weight: 700;
}

.bible-chapter-card:hover {
  background: var(--bg-panel);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.bible-chapter-card.selected {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.bible-chapter-card.range-start {
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

.bible-chapter-card.range-end {
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

.bible-chapter-card.range-middle {
  border-radius: 0;
}

.bible-chapter-info {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: 0.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.bible-chapter-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  justify-content: flex-end;
}

.bible-chapter-confirm-btn,
.bible-chapter-cancel-btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bible-chapter-confirm-btn {
  background: var(--primary-color);
  color: white;
}

.bible-chapter-confirm-btn:hover {
  background: var(--primary-hover);
}

.bible-chapter-cancel-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.bible-chapter-cancel-btn:hover {
  background: var(--bg-panel);
}

@media (max-width: 768px) {
  .bible-chapter-modal-content {
    width: 95%;
    max-width: 95%;
  }

  .bible-chapter-cards {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.4rem;
    max-height: 300px;
  }

  .bible-chapter-card {
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
    min-height: 36px;
  }

  .bible-chapter-modal-footer {
    flex-direction: column;
  }

  .bible-chapter-confirm-btn,
  .bible-chapter-cancel-btn {
    width: 100%;
  }
}

/* 성경본문 토글 섹션 */
.bible-text-toggle-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
}

.bible-text-toggle-btn {
  padding: 0.6rem 1.2rem !important;
  font-size: 0.95rem !important;
  background: var(--success-color) !important;
  border: 2px solid var(--success-color) !important;
  color: white !important;
  font-weight: 600 !important;
  min-height: 40px !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.bible-text-toggle-btn:hover {
  background: var(--success-hover) !important;
  border-color: var(--success-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.4);
}

.bible-text-toggle-btn:active {
  transform: translateY(0);
}

.bible-text-click-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 100px;
}

/* 성경본문 표시 배너 (보라색) */
.bible-text-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  display: none; /* 기본적으로 숨김 */
}

.bible-text-banner.show {
  display: block;
}

.bible-content-panel {
  display: none; /* 기본적으로 숨김 */
}

.bible-content-panel.show {
  display: flex;
}

.bible-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.bible-text-banner h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  flex: 1;
}

.bible-text-close-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  color: white !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  line-height: 1 !important;
}

.bible-text-close-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: scale(1.1);
}

.bible-text-close-btn:active {
  transform: scale(0.95);
}

.bible-controls-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.bible-version-selector {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}

.apply-version-btn {
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  color: white !important;
  font-weight: 600 !important;
  min-height: 36px !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.apply-version-btn:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.apply-version-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

@media (max-width: 768px) {
  .bible-version-selector {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .apply-version-btn {
    width: 100%;
    margin-top: 0.25rem;
  }
}

.bible-version-selector label {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bible-version-selector select {
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.85rem;
  min-width: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bible-version-selector select:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.bible-version-selector select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
}

.bible-version-selector select option {
  background: #1e293b;
  color: #e2e8f0;
}

.bible-font-controls,
.bible-height-controls,
.bible-scroll-delay-controls {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}

@media (max-width: 768px) {
  .bible-font-controls,
  .bible-height-controls,
  .bible-scroll-delay-controls {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .bible-font-controls > *,
  .bible-height-controls > *,
  .bible-scroll-delay-controls > * {
    width: 100%;
  }
}

.bible-font-controls label,
.bible-height-controls label,
.bible-scroll-delay-controls label {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bible-font-controls input[type="range"],
.bible-height-controls input[type="range"],
.bible-scroll-delay-controls input[type="range"] {
  flex: 1;
  min-width: 100px;
  max-width: 200px;
  height: 6px;
  accent-color: white;
  cursor: pointer;
}

.bible-font-controls span,
.bible-height-controls span,
.bible-scroll-delay-controls span {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
}

.font-size-btn {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.85rem !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  min-height: 32px !important;
  transition: all 0.2s ease;
}

.font-size-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* 성경본문 콘텐츠 패널 */
.bible-content-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  min-height: 200px;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bible-content-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-panel);
  position: relative;
}

#bibleContent {
  padding: 0.5rem;
}

.bible-content-scroll::-webkit-scrollbar {
  width: 8px;
}

.bible-content-scroll::-webkit-scrollbar-track {
  background: var(--bg-panel);
  border-radius: 4px;
}

.bible-content-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.bible-content-scroll::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

#bibleContent {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-primary);
  transition: font-size 0.2s ease;
  width: 100%;
  min-height: 100px;
  text-align: justify;
  text-justify: inter-word;
}

/* 모달 본문 스타일 (showBibleText에서 사용) */
.bible-text-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: justify;
  text-justify: inter-word;
}

.bible-text-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  font-size: 1.2em;
  font-weight: 700;
}

.bible-text-content p {
  margin: 0;
  line-height: 1.9;
}

#bibleContent:empty::before {
  content: "날짜를 선택하면 오늘의 본문이 표시됩니다.";
  color: var(--text-secondary);
  font-style: italic;
}

.bible-header-fixed {
  position: sticky;
  top: 0;
  z-index: 100;
  /* 스크롤 시 뒤의 텍스트가 보이지 않도록 완전히 불투명한 배경 */
  background: var(--bg-secondary) !important;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  /* 그림자 효과로 레이어 구분 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  /* 모든 자식 요소의 간격도 불투명하게 */
  overflow: hidden;
}

.bible-verses-container {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  /* 헤더와 완전히 분리 */
  position: relative;
  z-index: 1;
  /* 연속된 텍스트 흐름을 위한 스타일 - 가독성 최대화 */
  line-height: 2.0;
  text-align: justify;
  text-justify: inter-word;
  word-spacing: 0.05em;
  letter-spacing: 0.01em;
}

.bible-header {
  text-align: center;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-panel);
  border-radius: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  /* 헤더 배경을 완전히 불투명하게 */
  opacity: 1;
  /* 뒤의 텍스트가 보이지 않도록 */
  position: relative;
  z-index: 1;
}

.bible-header strong {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.bible-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bible-auto-scroll-btn {
  padding: 0.4rem 0.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
}

.bible-auto-scroll-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary-color);
}

.bible-auto-scroll-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.apply-version-btn-header {
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.25rem;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 600;
  display: none; /* 기본적으로 숨김 (접혔을 때만 표시) */
}

.apply-version-btn-header:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bible-banner-toggle-btn {
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.bible-banner-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.bible-banner-toggle-btn .toggle-icon {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.bible-banner-toggle-btn.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.bible-controls-row {
  transition: all 0.3s ease;
  overflow: hidden;
}

.bible-controls-row.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.bible-verse {
  display: inline;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  transition: none;
  /* 절 간 경계 없이 자연스러운 흐름 */
  white-space: normal;
}

.bible-verse:hover {
  background: transparent;
  border: none;
  transform: none;
}

.bible-verse-header {
  margin-bottom: 0;
}

.bible-verse-number {
  display: inline;
  font-weight: 700;
  color: var(--primary-color);
  /* 절 번호 폰트 크기 증가 - 가독성 향상 */
  font-size: 1.25em;
  margin-right: 0.35em;
  vertical-align: baseline;
  /* 절 번호가 더 눈에 띄도록 */
  letter-spacing: 0.02em;
}

.bible-verse-content {
  display: inline;
  width: auto;
  line-height: 2.0;
  /* 본문이 절 번호 바로 뒤에 자연스럽게 이어지도록 */
  vertical-align: baseline;
}

.bible-verse-korean {
  display: inline;
  line-height: 2.0;
  color: var(--text-primary);
  /* 한국어 본문 가독성 향상 */
  word-break: keep-all;
  word-wrap: break-word;
}

.bible-verse-english {
  display: inline;
  line-height: 2.0;
  color: var(--text-primary);
  /* 영어 본문 가독성 향상 */
  word-break: normal;
}

.bible-verse-parallel {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 2.0;
  opacity: 0.85;
  /* 대역본도 인라인으로 표시하여 자연스러운 흐름 유지 */
  margin-left: 0.5em;
}

/* 오늘의 본문 책갈피 스타일 */
.bible-bookmarks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.75rem;
  background: var(--bg-panel);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  /* 불투명 배경으로 뒤의 텍스트가 보이지 않도록 */
  opacity: 1;
  /* 뒤의 텍스트가 보이지 않도록 */
  position: relative;
  z-index: 1;
}

.bible-bookmark-btn {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.85rem !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 0.375rem !important;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: auto !important;
  font-weight: 500;
}

.bible-bookmark-btn:hover {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-1px);
}

.bible-bookmark-btn.active {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  font-weight: 600;
}

.bible-loading {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.bible-loading::before {
  content: "⏳ ";
  display: inline-block;
  margin-right: 0.5rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.bible-error {
  text-align: center;
  padding: 2rem;
  color: var(--danger-color);
  background: rgba(220, 38, 38, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.bible-error strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.bible-error small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .bible-text-banner {
    padding: 0.875rem 1rem;
  }

  .bible-banner-header {
    margin-bottom: 1rem;
  }

  .bible-text-banner h2 {
    font-size: 1.1rem;
    margin: 0;
  }

  .bible-text-close-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 1rem !important;
  }

  .bible-controls-row {
    gap: 0.5rem;
  }

  .bible-version-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .bible-version-selector select {
    width: 100%;
  }

  .bible-font-controls,
  .bible-height-controls,
  .bible-scroll-delay-controls {
    flex-direction: column;
  }
}

/* ==================== 도전!성경1독! 모드 스타일 ==================== */

.bible-challenge-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bible-challenge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.bible-challenge-mode {
  display: none;
  flex-direction: column;
  height: 100vh;
  background: var(--bg-panel);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.bible-challenge-mode.light-mode {
  /* 라이트모드에서 CSS 변수를 함께 덮어써야(버튼/모달 텍스트 포함) 대비가 유지됨 */
  color-scheme: light;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --bg-panel: #ffffff;
  --bg-card: #f1f5f9;
  --border-color: #cbd5e1;
  background: var(--bg-panel);
  color: var(--text-primary);
}

/* 상단 헤더 */
.challenge-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.challenge-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  min-height: 60px;
}

.challenge-menu-btn,
.challenge-features-btn,
.challenge-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.challenge-header-left {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.challenge-home-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.challenge-home-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.challenge-menu-btn:hover,
.challenge-features-btn:hover,
.challenge-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.challenge-book-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.challenge-header-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* 좌측 메뉴 */
.challenge-side-menu {
  position: fixed;
  left: -300px;
  top: 0;
  bottom: 0;
  width: 300px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  z-index: 200;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.challenge-side-menu.open {
  left: 0;
}

.challenge-side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.challenge-side-menu-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.challenge-side-menu-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-side-menu-content {
  padding: 1rem;
}

.challenge-book-selector,
.challenge-chapter-selector,
.challenge-verse-selector {
  margin-bottom: 1.5rem;
}

.challenge-book-selector label,
.challenge-chapter-selector label,
.challenge-verse-selector label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.challenge-book-selector select,
.challenge-chapter-selector select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: var(--bg-panel);
  color: var(--text-primary);
}

.challenge-verse-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.challenge-verse-selector input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: var(--bg-panel);
  color: var(--text-primary);
}

.challenge-load-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

.challenge-chapter-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.challenge-load-btn:hover {
  background: var(--primary-hover);
}

/* 기능 메뉴 */
.challenge-features-menu {
  position: fixed;
  left: -300px;
  top: 0;
  bottom: 0;
  width: 300px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  z-index: 200;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.challenge-features-menu.open {
  left: 0;
}

.challenge-features-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.challenge-features-menu-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.challenge-features-menu-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-features-menu-content {
  padding: 1rem;
}

.challenge-feature-item {
  margin-bottom: 2rem;
}

.challenge-feature-item h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.challenge-feature-item select,
.challenge-feature-item input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: var(--bg-panel);
  color: var(--text-primary);
}

/* 저장목록 모달 */
.challenge-bookmarks-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.challenge-bookmarks-modal-content {
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.challenge-bookmarks-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.challenge-bookmarks-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.challenge-bookmarks-modal-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
}

.challenge-bookmarks-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.challenge-bookmarks-modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-verse-lines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.challenge-verse-text.parallel {
  opacity: 0.75;
}
.challenge-audio-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-audio-btn {
  padding: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 500;
}

.challenge-audio-btn:hover {
  background: var(--primary-hover);
}

.challenge-search-btn {
  width: 100%;
  padding: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  margin-top: 0.5rem;
  font-weight: 500;
}

.challenge-search-btn:hover {
  background: var(--primary-hover);
}

.challenge-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.challenge-settings label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.challenge-settings input[type="range"] {
  width: 100%;
}

/* 본문 영역 */
.challenge-header-bookmarks {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-panel);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 80px;
  overflow-y: auto;
}

.challenge-header-bookmarks:empty {
  display: none;
}

.challenge-bookmark-tab {
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.challenge-bookmark-tab:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.challenge-bookmark-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.challenge-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  margin-top: 60px; /* 기본 헤더 높이 */
}

.challenge-content.has-bookmarks {
  margin-top: 140px; /* 헤더 + 책갈피 높이 */
}

.challenge-bible-text {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 16px;
  margin-top: 0;
  padding-top: 0;
}

/* 하단 네비게이션의 읽기표 관련 영역 숨기기 (FN 키로 좌측에만 표시) */
.challenge-bottom-nav .challenge-nav-item[data-feature="readingPlan"] {
  display: none;
}

.challenge-verse {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.challenge-verse-number {
  font-weight: 700;
  color: var(--primary-color);
  min-width: 3.25rem;
  text-align: right;
  flex-shrink: 0;
}

.challenge-verse-text {
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 2px 4px;
  border-radius: 2px;
  flex: 1;
  word-break: keep-all;
}

.challenge-verse-text:hover {
  background-color: rgba(37, 99, 235, 0.1);
}

/* 하이라이트 색상 */
.highlight-red {
  background-color: rgba(239, 68, 68, 0.3) !important;
}

.highlight-green {
  background-color: rgba(132, 204, 22, 0.3) !important;
}

.highlight-purple {
  background-color: rgba(168, 85, 247, 0.3) !important;
}

.highlight-blue {
  background-color: rgba(59, 130, 246, 0.3) !important;
}

.highlight-yellow {
  background-color: rgba(234, 179, 8, 0.3) !important;
}

.search-highlight {
  background-color: rgba(234, 179, 8, 0.5) !important;
}

/* 도전 검색 결과 */
.challenge-search-results {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.challenge-search-result {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
}

.challenge-search-result:hover {
  background: rgba(255, 255, 255, 0.10);
}

.challenge-search-result .ref {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.challenge-search-result .snippet {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* 저장목록 */
.challenge-bookmarks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-bookmark-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
}

.challenge-bookmark-item:hover {
  background: rgba(255, 255, 255, 0.10);
}

.challenge-bookmark-item .ref {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.challenge-bookmark-item .meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 하이라이트 패널 */
.challenge-highlight-panel {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  z-index: 300;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.challenge-highlight-colors {
  display: flex;
  gap: 0.5rem;
}

.challenge-highlight-color {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.challenge-highlight-color:hover {
  transform: scale(1.1);
}

/* 하단 네비게이션 */
.challenge-bottom-nav {
  display: none; /* 하단 네비게이션 바 숨김 */
  justify-content: space-around;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.challenge-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
  flex: 1;
}

.challenge-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.challenge-nav-icon {
  font-size: 1.5rem;
}

.challenge-nav-label {
  font-size: 0.75rem;
  font-weight: 500;
}

.challenge-loading,
.challenge-error {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  .challenge-side-menu,
  .challenge-features-menu {
    width: 100%;
    left: -100%;
  }
  
  .challenge-book-title {
    font-size: 0.9rem;
  }
  
  .challenge-nav-label {
    font-size: 0.7rem;
  }
  
  .challenge-nav-icon {
    font-size: 1.2rem;
  }
}

/* ==================== 읽기표 모달 스타일 ==================== */

.reading-plan-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.reading-plan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.reading-plan-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.reading-plan-modal-content {
  background: var(--bg-card);
  border-radius: 1rem;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.reading-plan-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.reading-plan-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.reading-plan-modal-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.reading-plan-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.reading-plan-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.reading-plan-status {
  margin-bottom: 2rem;
}

.reading-plan-progress {
  background: var(--bg-panel);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.reading-plan-progress-bar {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.reading-plan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
  border-radius: 12px;
}

.reading-plan-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.reading-plan-progress-text span:first-child {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.reading-plan-chart {
  margin-bottom: 2rem;
}

.reading-plan-section {
  margin-bottom: 2rem;
}

.reading-plan-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.reading-plan-quote {
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
  background: var(--bg-panel);
  border-radius: 0.5rem;
  border-left: 4px solid var(--primary-color);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
}

.reading-plan-books {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reading-plan-book {
  background: var(--bg-panel);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.reading-plan-book-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.reading-plan-book-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.reading-plan-book-progress {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.reading-plan-chapters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reading-plan-chapter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.reading-plan-chapter {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 32px;
  text-align: center;
}

.reading-plan-chapter:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.reading-plan-chapter.read {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  font-weight: 600;
}

.reading-plan-history {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.reading-plan-history h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}

.reading-plan-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.reading-plan-history-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

.reading-plan-history-item {
  background: var(--bg-panel);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.reading-plan-history-date {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.reading-plan-history-books {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.reading-plan-history-count {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.reading-plan-history-list-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.reading-plan-modal-footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  justify-content: flex-end;
}

.reading-plan-create-btn,
.reading-plan-reset-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reading-plan-create-btn {
  background: var(--primary-color);
  color: white;
}

.reading-plan-create-btn:hover {
  background: var(--primary-hover);
}

.reading-plan-reset-btn {
  background: var(--danger-color);
  color: white;
}

.reading-plan-reset-btn:hover {
  background: #b91c1c;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  .reading-plan-modal-content {
    max-height: 95vh;
  }
  
  .reading-plan-book-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .reading-plan-chapter {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    min-width: 28px;
  }
  
  .reading-plan-modal-footer {
    flex-direction: column;
  }
  
  .reading-plan-create-btn,
  .reading-plan-reset-btn {
    width: 100%;
  }
    align-items: stretch;
    gap: 0.5rem;
  }

  .bible-font-controls input[type="range"],
  .bible-height-controls input[type="range"],
  .bible-scroll-delay-controls input[type="range"] {
    width: 100%;
    max-width: 100%;
  }

  .bible-content-panel {
    padding: 0.75rem;
    min-height: 150px;
    max-height: 600px;
  }

  #bibleContent {
    font-size: 14px;
  }
}

