:root{
  --bg:#000;
  --fg:#fff;
  --muted: rgba(255,255,255,0.72);
  --muted2: rgba(255,255,255,0.46);

  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.12);

  --radius: 20px;
  --orp: #ff3b30;

  --maxw: 720px;
}

*{ box-sizing:border-box; }
html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,body{
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* Global focus indicator for keyboard and switch-control users */
button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible{
  outline: 2px solid rgba(255,255,255,0.85);
  outline-offset: 2px;
  border-radius: 4px;
}
.wordStage.lightReader button:focus-visible,
.wordStage.lightReader [role="button"]:focus-visible{
  outline-color: rgba(0,0,0,0.75);
}
a{ color:var(--fg); text-decoration:none; }
button, input, select{ font:inherit; }
button{ -webkit-tap-highlight-color: transparent; }

.app{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: calc(28px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) calc(18px + env(safe-area-inset-left, 0px));
}

.screen{
  width: min(var(--maxw), 100%);
}
.screenTop{
  align-self: flex-start;
  padding-top: 20px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border: 1px solid var(--card2);
  border-radius: var(--radius);
  padding: 20px;
}

.brand{
  font-size: 13px;
  color: var(--muted2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h1{
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 10px;
}

.p{
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.small{ font-size: 13px; color: var(--muted2); }
.spacer{ height: 16px; }
.spacerLg{ height: 22px; }

.primary{
  width:100%;
  border:0;
  border-radius: 999px;
  padding: 15px 18px;
  background: #fff;
  color: #000;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor:pointer;
}

.secondary{
  width:100%;
  border: 1px solid var(--card2);
  border-radius: 999px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  color: #fff;
  cursor:pointer;
}

.btnRow{
  display:flex;
  gap: 10px;
}
.btnSmall{
  flex:1;
  border: 1px solid var(--card2);
  border-radius: 999px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  text-align:center;
  font-weight: 600;
}

.ghost{
  border:0;
  background: transparent;
  color: var(--muted);
  padding: 12px 0;
  cursor:pointer;
}

/* Main Menu Hierarchy Styles */
.resumeAction{
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  min-height: 44px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
}

.textLink{
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 0;
  min-height: 44px;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  width: 100%;
  text-decoration: none;
  display: block;
}
.textLink:hover{
  color: var(--fg);
}

.sectionLabel{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted2);
  font-weight: 600;
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.modeCard{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border: 1px solid var(--card2);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s ease;
}
.modeCard:hover{
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
  border-color: rgba(255,255,255,0.18);
}

.modeCardIcon{
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.9;
}

.modeCardContent{
  flex: 1;
}

.modeCardTitle{
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.modeCardDesc{
  font-size: 13px;
  color: var(--muted2);
  line-height: 1.5;
}

.row{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.kbdHint{
  margin-top: 10px;
  color: var(--muted2);
  font-size: 13px;
}

/* Logo on main menu */
.logoWrap{
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content:center;
  margin-bottom: 10px;
}
.logoIcon{
  width: 78px;
  height: 78px;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.5);
}

/* Activity Rings */
.activityRingsContainer{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
}
.activityRingsContainer .logoIcon{
  position: relative;
  z-index: 1;
}
.activityRings{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ringBg{
  fill: none;
  stroke: rgba(255,255,255,0.10);
  stroke-width: 5;
}
.ringFg{
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke: rgba(255,255,255,0.15);
  transition: stroke-dashoffset 0.8s ease, stroke 0.6s ease;
}
.ringFg.closed{
  stroke: rgba(255,220,160,0.35);
  filter: drop-shadow(0 0 4px rgba(255,220,160,0.15));
}
.ringsHint{
  font-size: 11px;
  color: var(--muted2);
  text-align: center;
  margin-top: 2px;
  letter-spacing: 0.03em;
}

/* Onboarding slides */
.onboarding{
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
}
.onboardingIcon{
  width: 56px;
  height: 56px;
  color: var(--fg);
  opacity: 0.7;
  margin: 0 auto 24px;
  display: block;
}
.onboardingTitle{
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.onboardingBody{
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 300px;
}
.onboardingDots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.onboardingDot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted2);
  transition: background 0.3s ease, transform 0.3s ease;
}
.onboardingDot.active{
  background: var(--fg);
  transform: scale(1.2);
}
.onboardingRings{
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 24px;
}
.onboardingRings svg{
  opacity: 0.7;
}

/* Picker UI */
.search{
  width: 100%;
  border-radius: 999px;
  padding: 14px 14px;
  border: 1px solid var(--card2);
  background: rgba(0,0,0,0.25);
  color: #fff;
  outline: none;
}
.search::placeholder{ color: rgba(255,255,255,0.55); }

.list{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.listItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--card2);
  background: rgba(255,255,255,0.04);
  cursor:pointer;
}
.listItem:active{ transform: scale(0.995); }

/* When listItem / chip / modeCard is rendered as a <button> for accessibility,
   strip the default UA button styling so they look identical to the div versions. */
button.listItem,
button.chip,
button.modeCard{
  font: inherit;
  color: inherit;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
button.listItem{ text-align: left; }
button.chip{ text-align: center; }
button.modeCard{ text-align: left; }

.grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 520px){ .grid{ grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 420px){ .grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.chip{
  border: 1px solid var(--card2);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-radius: 14px;
  padding: 13px 0;
  min-height: 44px;
  text-align:center;
  cursor:pointer;
  user-select:none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chip.active{ background: rgba(255,255,255,0.10); }

/* Reader stage */
.wordStage{
  position: fixed;
  inset: 0;
  background: #000;
  display:flex;
  align-items:center;
  justify-content:center;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease;
}

/* Light reader theme (reader + prayer stage only) */
.wordStage.lightReader{
  background: #f5f2ed;
  color: #1a1a1a;
}
.wordStage.lightReader .word{ color: #1a1a1a; }
.wordStage.lightReader .word .orp{ color: #cc2d25; }
.wordStage.lightReader .focusLineTop,
.wordStage.lightReader .focusLineBottom{
  border-left-color: rgba(0,0,0,0.10);
  filter: none;
}
.wordStage.lightReader .tickLeft,
.wordStage.lightReader .tickRight{
  border-top-color: rgba(0,0,0,0.10);
}
/* Breathing orb \u2014 used during prayer mode breathing phases */
.breathOrb{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 1.2s ease, transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}
.breathOrbRing{
  fill: none;
  stroke: rgba(255,255,255,0.35);
  stroke-width: 1.5;
}
.wordStage.lightReader .breathOrbRing{
  stroke: rgba(0,0,0,0.30);
}
.wordStage[data-mode="breathing"] .breathOrb{
  opacity: 1;
}
.breathLabel{
  position: fixed;
  top: calc(50% + 140px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
  font-size: 18px;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.wordStage.lightReader .breathLabel{
  color: rgba(0,0,0,0.55);
}
.wordStage[data-mode="breathing"] .breathLabel{
  opacity: 1;
}

/* Hide reading focus guides during breathing */
.wordStage[data-mode="breathing"] .focusLineTop,
.wordStage[data-mode="breathing"] .focusLineBottom,
.wordStage[data-mode="breathing"] .tickLeft,
.wordStage[data-mode="breathing"] .tickRight{
  opacity: 0;
  transition: opacity 0.6s ease;
}

.wordStage.lightReader .readerBottom .pill{
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.60);
}

/* Light reader theme applied to the reflection flow.
   Matches the palette used for reader + prayer so switching between
   modes is visually consistent. */
.reflectionStage.lightReader{
  background: #f5f2ed;
  color: #1a1a1a;
}
.reflectionStage.lightReader .reflectionText,
.reflectionStage.lightReader .reflectionPrompt,
.reflectionStage.lightReader .reflectionBlessing,
.reflectionStage.lightReader .prayerLine{
  color: #1a1a1a;
}
.reflectionStage.lightReader .reflectionSubtext{
  color: rgba(0,0,0,0.60);
}
.reflectionStage.lightReader .reflectionRef,
.reflectionStage.lightReader .reflectionOptional,
.reflectionStage.lightReader .reflectionNudge,
.reflectionStage.lightReader .reflectionSaved,
.reflectionStage.lightReader .verseRef{
  color: rgba(0,0,0,0.55);
}
.reflectionStage.lightReader .verseText{
  color: rgba(0,0,0,0.70);
}
.reflectionStage.lightReader .reflectionCard{
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
  border-color: rgba(0,0,0,0.10);
}
.reflectionStage.lightReader .reflectionInput{
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #1a1a1a;
}
.reflectionStage.lightReader .reflectionInput::placeholder{
  color: rgba(0,0,0,0.45);
}
.reflectionStage.lightReader .reflectionInput:focus{
  border-color: rgba(0,0,0,0.30);
  background: rgba(0,0,0,0.06);
}
.reflectionStage.lightReader .reflectionExit{
  color: rgba(0,0,0,0.55);
  background: rgba(0,0,0,0.06);
}
.reflectionStage.lightReader .reflectionExit:hover{
  color: #1a1a1a;
  background: rgba(0,0,0,0.10);
}
.reflectionStage.lightReader .primary{
  background: #1a1a1a;
  color: #f5f2ed;
}
.reflectionStage.lightReader .secondary{
  background: rgba(0,0,0,0.03);
  color: #1a1a1a;
  border-color: rgba(0,0,0,0.12);
}
.reflectionStage.lightReader .breathOrbRing{
  stroke: rgba(0,0,0,0.30);
}
.reflectionStage.lightReader .breathLabelInline{
  color: rgba(0,0,0,0.55);
}
.reflectionStage.lightReader .addGratitudeBtn{
  color: rgba(0,0,0,0.55);
}
.reflectionStage.lightReader .addGratitudeBtn:hover{
  color: #1a1a1a;
}
.reflectionStage.lightReader .reflectionSkip{
  color: rgba(0,0,0,0.55);
}
.reflectionStage.lightReader .reflectionSkip:hover{
  color: #1a1a1a;
}

/* Focus box */
.wordStage::before{
  content:"";
  position:absolute;
  width: min(760px, 92vw);
  height: 190px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
  border-radius: 18px;
}

/* Horizontal guide line */
.wordStage::after{
  content:"";
  position:absolute;
  width: min(760px, 92vw);
  border-top: 1px solid rgba(255,255,255,0.10);
  opacity: 0.9;
}

/* Center focus line split (stops short of ORP) */
.focusLineTop,
.focusLineBottom{
  position:absolute;
  left: 50%;
  transform: translateX(-0.5px);
  width: 0;
  border-left: 1px solid rgba(255,255,255,0.16);
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.08));
  pointer-events:none;
}
.focusLineTop{
  top: calc(50% - 140px);
  height: 86px;
}
.focusLineBottom{
  top: calc(50% + 54px);
  height: 86px;
}

/* Optional subtle vertical ticks */
.tickLeft, .tickRight{
  position:absolute;
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.10);
  top: 50%;
  transform: translateY(-50%);
}
.tickLeft{ left: calc(50% - min(380px, 46vw)); }
.tickRight{ left: calc(50% + min(380px, 46vw)); }

/* ORP layout */
/* Hide focus guides when user disables them */
.wordStage.hideFocus .focusLineTop,
.wordStage.hideFocus .focusLineBottom,
.wordStage.hideFocus .tickLeft,
.wordStage.hideFocus .tickRight{
  display: none;
}

/* Settings section header + chevron */
.settingsSectionHeader{
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 12px 0;
  min-height: 44px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease;
}
.settingsSectionHeader:hover{
  background: rgba(255,255,255,0.02);
}
.settingsSectionLabel{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.settingsChev{
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  line-height: 1;
  transition: transform 0.25s ease;
  display: inline-block;
  padding: 0 4px;
}

.wordStage.sizeSmall .word{ font-size: clamp(36px, 5vw, 56px); }
.wordStage.sizeSmall .word.word--long{ font-size: clamp(26px, 3.8vw, 42px); }
.wordStage.sizeSmall .word.word--verylong{ font-size: clamp(20px, 3vw, 34px); }

.wordStage.sizeLarge .word{ font-size: clamp(56px, 9vw, 96px); }
.wordStage.sizeLarge .word.word--long{ font-size: clamp(40px, 6vw, 72px); }
.wordStage.sizeLarge .word.word--verylong{ font-size: clamp(30px, 5vw, 56px); }
.word{
  position: relative;
  width: min(760px, 92vw);
  min-height: 1.5em;
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: visible;
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}
.word .orp{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--orp);
  white-space: nowrap;
}
.word .left{
  position: absolute;
  right: 50%;
  padding-right: 0.42ch;
  white-space: nowrap;
  text-align: right;
  max-width: 40vw;
  overflow: hidden;
  overflow: visible;
}
.word .right{
  position: absolute;
  left: 50%;
  padding-left: 0.42ch;
  white-space: nowrap;
  text-align: left;
  max-width: 40vw;
  overflow: hidden;
  overflow: visible;
}

/* Smaller font for long words to prevent overflow on mobile */
.word.word--long{
  font-size: clamp(32px, 5vw, 60px);
}
.word.word--verylong{
  font-size: clamp(24px, 4vw, 48px);
}

/* Bottom verse pill */
.readerBottom{
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom, 18px));
  display:flex;
  flex-direction: column;
  align-items: center;
  pointer-events:none;
}
.readerBottom .pill{
  pointer-events:none;
  backdrop-filter: blur(10px);
}
.readerProgress{
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,0.14);
  border-radius: 1px;
  margin-top: 8px;
  overflow: hidden;
}
.readerProgressFill{
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.40);
  border-radius: 1px;
  transition: width 0.4s ease;
}
.wordStage.lightReader .readerProgress{
  background: rgba(0,0,0,0.06);
}
.wordStage.lightReader .readerProgressFill{
  background: rgba(0,0,0,0.20);
}

/* Pause overlay */
.pauseOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.66);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
}
.pauseCard{
  width: min(540px, 92vw);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  padding: 18px;
}
.pauseTitle{
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 0 0 10px;
}

.toast{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  display:flex;
  justify-content:center;
  pointer-events:none;
}
.toast .pill{
  pointer-events:none;
}

.offlineBanner{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,59,48,0.15);
  border-bottom: 1px solid rgba(255,59,48,0.3);
  backdrop-filter: blur(10px);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 10px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  z-index: 9999;
}

/* Search specific styles */
.btnSmall.active {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

.scopeCount {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 2px;
}

mark {
  background: rgba(255,214,10,0.3);
  color: inherit;
  padding: 2px 3px;
  border-radius: 3px;
}

.searchResult {
  cursor: pointer;
  transition: background 0.15s ease;
}

.searchResult:hover {
  background: rgba(255,255,255,0.04);
}

.sectionLabel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted2);
  margin-top: 16px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.sectionLabel:first-child {
  margin-top: 0;
}

/* Custom checkbox styling for cache option */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

input[type="checkbox"]:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
}

input[type="checkbox"]:checked {
  background: rgba(76, 175, 80, 0.3);
  border-color: rgba(76, 175, 80, 0.8);
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 14px;
  color: rgba(76, 175, 80, 1);
}

/* Toggle Switch Styling (for Prayer Audio setting) */
.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: rgba(255,255,255,0.4);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border-radius: 50%;
}

.toggle input[type="checkbox"]:checked + .toggle-slider {
  background-color: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.50);
}

.toggle input[type="checkbox"]:checked + .toggle-slider:before {
  transform: translateX(24px);
  background-color: #fff;
}

.toggle:hover .toggle-slider {
  background-color: rgba(255,255,255,0.12);
}

.toggle input[type="checkbox"]:checked:hover + .toggle-slider {
  background-color: rgba(255, 255, 255, 0.40);
}

/* --------------------
   Daily Reflection Mode
   -------------------- */

.reflectionStage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* safe area handled by inner padding below */
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(28px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) calc(18px + env(safe-area-inset-left, 0px));
}

.reflectionInputStage {
  justify-content: flex-start;
  padding-top: calc(60px + env(safe-area-inset-top, 0px));
  padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 24px));
  overflow-y: auto;
}

.reflectionCenter {
  text-align: center;
  max-width: 400px;
}

.reflectionText {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  animation: fadeInUp 0.8s ease;
}

.reflectionSubtext {
  font-size: 22px;
  color: var(--muted);
  margin-bottom: 16px;
  animation: fadeInUp 1s ease;
}

.reflectionRef {
  font-size: 14px;
  color: var(--muted2);
  font-style: italic;
  animation: fadeInUp 1.2s ease;
}

.breathCueReflection {
  font-size: 18px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 1s ease;
  margin-top: 40px;
}

.reflectionSkip {
  position: absolute;
  bottom: max(40px, calc(env(safe-area-inset-bottom, 0px) + 20px));
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  padding: 12px 18px;
  min-height: 44px;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  transition: opacity 0.5s ease, color 0.2s ease;
}

.reflectionSkip:hover {
  color: var(--fg);
}

.reflectionExit {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 0;
  padding: 0;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 100;
}

.reflectionExit:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.1);
}

.reflectionCard {
  width: min(var(--maxw), 100%);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border: 1px solid var(--card2);
  border-radius: var(--radius);
  padding: 24px;
}

.reflectionPrompt {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px 0;
}
.reflectionPromptSoft{
  color: var(--muted);
}
.reflectionStage.lightReader .reflectionPromptSoft{
  color: rgba(0,0,0,0.60);
}

.reflectionInput {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card2);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg);
  font-size: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.reflectionInput:focus {
  outline: none;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}

.reflectionInput::placeholder {
  color: rgba(255,255,255,0.55);
}

.reflectionInputLarge {
  min-height: 60px;
}

.addGratitudeBtn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 12px 0;
  min-height: 44px;
  transition: color 0.2s ease;
}

.addGratitudeBtn:hover {
  color: var(--fg);
}

.reflectionNudge {
  font-size: 14px;
  color: var(--muted2);
  font-style: italic;
  margin-top: 8px;
  transition: opacity 0.5s ease;
}

.reflectionOptional {
  font-size: 13px;
  color: var(--muted2);
  margin-top: 4px;
}

.releasePrayer {
  text-align: center;
}

.prayerLine {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 1s ease;
}

.reflectionBlessing {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  max-width: 320px;
  animation: fadeInUp 0.8s ease;
}

.reflectionSaved {
  font-size: 14px;
  color: var(--muted2);
  margin-top: 16px;
  animation: fadeInUp 1s ease;
}

.restButtons {
  margin-top: 40px;
  width: min(300px, 100%);
  transition: opacity 0.5s ease;
}

.verseDisplay {
  text-align: center;
  max-width: 400px;
  animation: fadeInUp 0.6s ease;
}

.verseText {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

.verseRef {
  font-size: 14px;
  color: var(--muted2);
}

/* Memory / Review Styles */
.memoryGroup {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--card2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.memoryGroupHighlight {
  border-color: rgba(255,255,255,0.2);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

.memoryGroupHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.memoryGroupTitle {
  font-size: 15px;
  font-weight: 600;
}

.memoryGroupCount {
  font-size: 12px;
  color: var(--muted2);
}

.memoryGroupContent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memoryPill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}

.memoryPillMore {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted2);
}

/* Random modal */
.randomModalCard {
  background: linear-gradient(180deg, rgba(30,30,30,0.98), rgba(20,20,20,0.98));
  border: 1px solid var(--card2);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 340px;
  text-align: center;
}

.randomModalText {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.randomModalDate {
  font-size: 13px;
  color: var(--muted2);
}

/* Legacy styles (for compatibility) */
.memorySection {
  margin-bottom: 20px;
}

.memorySectionTitle {
  font-size: 14px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.memoryCard {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border: 1px solid var(--card2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
  position: relative;
}

.memoryCardHighlight {
  border-color: rgba(255,255,255,0.2);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
}

.memoryGratitude {
  font-size: 16px;
  margin-bottom: 4px;
}

.memoryDate {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 8px;
}

/* Weekly Review */
.weeklySection {
  margin-bottom: 24px;
}

.weeklySectionTitle {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}

.weeklyPills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weeklyPill {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--card2);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
}

.weeklyList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weeklyItem {
  font-size: 15px;
  color: var(--muted);
  padding-left: 12px;
  border-left: 2px solid var(--card2);
}

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

/* Inline breath orb variant used in reflection arrival stage.
   Shares the visual language with prayer mode but sits in normal flow. */
.breathOrbInline{
  position: relative;
  display: block;
  margin: 24px auto 12px;
  width: 200px;
  height: 200px;
  transform: scale(0.6);
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.breathLabelInline{
  display: block;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  opacity: 0;
  transition: opacity 0.8s ease;
  margin-top: 8px;
}

/* Tablet+ polish — give iPads a bit more room without stretching
   text-heavy blocks (inner max-widths still clamp line length). */
@media (min-width: 768px){
  :root{
    --maxw: 820px;
  }
  .breathOrb{
    width: 260px;
    height: 260px;
  }
  .breathOrb svg,
  .breathOrbInline svg{
    width: 100%;
    height: 100%;
    display: block;
  }
  .breathLabel{
    top: calc(50% + 170px);
    font-size: 20px;
  }
  .breathOrbInline{
    width: 240px;
    height: 240px;
  }
  .breathLabelInline{
    font-size: 20px;
    margin-top: 12px;
  }
  .logoIcon{
    width: 92px;
    height: 92px;
    border-radius: 26px;
  }
  .activityRingsContainer{
    width: 156px;
    height: 156px;
  }
  .ringBg,
  .ringFg{
    stroke-width: 6;
  }
}

@media (min-width: 1024px){
  :root{
    --maxw: 840px;
  }
  .breathOrb{
    width: 300px;
    height: 300px;
  }
  .breathLabel{
    top: calc(50% + 190px);
  }
  .breathOrbInline{
    width: 260px;
    height: 260px;
  }
}

/* Respect users who prefer reduced motion.
   Keeps essential transitions short but suppresses decorative animation
   (breathing orb scale, fade-ins, ring transitions). */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .breathOrb,
  .breathOrbInline{
    transform: scale(1) !important;
  }
  .breathOrb{
    transform: translate(-50%, -50%) scale(1) !important;
  }
}

/* Settings section divider */
.sectionDivider {
  height: 1px;
  background: var(--card2);
  margin: 8px 0;
}

/* Gentle reminder banner */
.gentleReminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease;
}

.gentleReminder:hover {
  background: rgba(255,255,255,0.08);
}

.reminderDismiss {
  background: none;
  border: none;
  color: var(--muted2);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.reminderDismiss:hover {
  color: var(--fg);
}
