* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   GENERAL STYLES
   ============================================ */

:root {
  color-scheme: light;
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #2c3e50;
  --success-color: #2ecc71;
  --error-color: #e74c3c;
  --light-bg: #f5f5f5;
  --text-color: #333;
  --text-light: #666;
  --border-color: #ddd;
  --app-font-scale: 1rem;
}

html,
body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-color);
  min-height: 100vh;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   FOR LANDING PAGE
   ============================================ */
.landing-page {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 2rem;
  text-align: center;
  transition: opacity 0.4s ease;
}
.landing-page.dismissed {
  opacity: 0;
  pointer-events: none;
}
.landing-page p {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 1.5rem;
  max-width: 280px;
  line-height: 1.4;
}
.landing-page button {
  padding: 1rem 1.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: #2c3e50;
  color: #fff;
  cursor: pointer;
}
.landing-page h1 {
  font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;   /* Gives the all-caps breathing room */
  color: #3a3a3a;           /* Soft black is cleaner than pure black */
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.container {
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  background: white;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER WITH HAMBURGER MENU
   ============================================ */

header {
  background: white;
  color: #1a1a1a; 
  padding: 1.25rem 1rem;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;   /* Gives the all-caps breathing room */
  color: #1a1a1a;           /* Soft black is cleaner than pure black */
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.header-with-menu {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 1rem 1.5rem;
}
.header-with-menu h1 {
   flex: 1;
   margin: 0;
   font-size: 1.5rem;
   text-align: center;
}
/* ============================================
  HAMBURGER BUTTON
  ============================================ */
.hamburger-btn {
  /* explicit square touch target (WCAG friendly) */
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 48px;
  height: 48px;
  display: block;
  margin: 1rem auto;      /* keeps your button centered on the page */
  background: transparent;
  /* border: 2px solid #1a1a1a; */
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
  /* geometry tokens */
  --line-width: 24px;
  --line-height: 3px;
  --offset: 9px;          /* = (visual gap + line-height) / 2. 
                             9px gives a ~6px gap between lines */
}
/* 
  display: flex;
   --line-width: 24px;
  --line-height: 3px;
  --line-gap: 6px;
  Distance from center of top line to center of middle line:
  --translate-offset: calc(var(--line-height) + var(--line-gap));
   margin: 1rem auto;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   width: 48px;
   height: 48px;
   background-color: rgb(10, 34, 216);
   border: none;
   cursor: pointer;
   padding: 0.5rem; [ensures a good mobile tap target]
   gap: var(--line-gap);
   transition: all 0.3s ease;
} */ 
.hamburger-btn:hover {
   opacity: 0.8;
}
.hamburger-btn span {
   position: absolute;
  /* center every span dead in the middle of the 48×48 button */
  left: 50%;
  top: 50%;
  width: var(--line-width);
  height: var(--line-height);
  margin-left: calc(var(--line-width) / -2);  /* -12px */
  margin-top: calc(var(--line-height) / -2);   /* -1.5px */
  background: #1a1a1a;
  border-radius: 2px;
   transition: all 0.3s ease;
   
}

/* Resting state – spread lines vertically */
.hamburger-btn span:nth-child(1) { transform: translateY(calc(var(--offset) * -1)); }
.hamburger-btn span:nth-child(2) { transform: translateY(0); }
.hamburger-btn span:nth-child(3) { transform: translateY(var(--offset)); }
/* Active state – collapse to center and rotate */
.hamburger-btn.active span:nth-child(1) { transform: translateY(0) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(0) rotate(-45deg); }

/* Hamburger animation - transform to X when menu is open 
.hamburger-btn.active span:nth-child(1) {
   transform: rotate(45deg) translate(5px, 7px);
}
.hamburger-btn.active span:nth-child(2) {
   opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
   transform: rotate(-45deg) translate(5px, -7px);
} */


/* ============================================
  EXPANDABLE MENU BAR
  ============================================ */
.menu-bar {
   display: none;
   flex-direction: column;
   gap: 0;
   background-color: var(--bg-secondary);
   border-radius: 2px;
   overflow: hidden;
   margin-bottom: 1.5rem;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
   animation: slideDown 0.3s ease;
}
.menu-bar.open {
   display: flex;
}
@keyframes slideDown {
   from {
       opacity: 0;
       max-height: 0;
       transform: translateY(-10px);
   }
   to {
       opacity: 1;
       max-height: 500px;
       transform: translateY(0);
   }
}
.menu-btn {
   padding: 1rem 1.5rem;
   border: none;
   background-color: transparent;
   color: #1a1a1a;
   font-size: 1rem;
   font-weight: 500;
   cursor: pointer;
   transition: all 0.2s ease;
   text-align: left;
   border-left: 4px solid transparent;
}
.menu-btn:hover {
   background-color: var(--hover-bg, rgba(102, 126, 234, 0.1));
   color: var(--primary-color);
}
.menu-btn.active {
   background-color: rgba(191, 191, 191, 0.2);
   color: #1a1a1a;
   border-left-color: #1a1a1a;
   font-weight: 600;
}

.menu-btn1 {
   padding: 1rem 1.5rem;
   border: none;
   background-color: transparent;
   color: #1a1a1a;
   font-size: 1rem;
   font-weight: 500;
   cursor: pointer;
   transition: all 0.2s ease;
   text-align: left;
   border-left: 4px solid transparent;
}

#fs-auth-btn.fs-signed-in {
  color: #cc8787; /* colour change to indicate sign-out action */
}

.menu-auth-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;  
}

.auth-status-label {
  font-size: 0.75rem;
  color: #555;
  margin-top: 0.2rem;
  white-space: nowrap;
  /* display: block; ...or remove entirely, spans are inline by default */
}
/* Utility class for hiding */
.auth-status-label.is-hidden {
  display: none;
}


/* ============================================
  SECTION STYLES
  ============================================ */
.section {
   display: none;
   animation: fadeIn 0.3s ease-in;
}
.section.active {
   display: block;
}
@keyframes fadeIn {
   from {
       opacity: 0;
       transform: translateY(10px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}
.content-section {
   background-color: var(--bg-secondary);
   padding: 2rem;
   border-radius: 12px;
   font-size: var(--app-font-scale);
   margin: 1.5rem 0;
}
.content-section h2 {
   margin-top: 0;
   color: var(--primary-color);
   font-size: calc(var(--app-font-scale) * 1.8);
   margin-bottom: 1.5rem;
}
.content-section p {
   line-height: 1.8;
   color: var(--text-light);
   margin-bottom: 1rem;
}
.content-section ul,
.content-section ol {
   margin: 1rem 0;
   padding-left: 2rem;
   color: var(--text-light);
   line-height: 1.8;
}
.content-section li {
   margin-bottom: 0.5rem;
}

.content-section a {
    color: #121212;            /* Darker color for content readability */
    text-decoration: none;
}

/* 2. Unvisited Link State */
.content-section a:link {
    color: #121212;
}

/* 3. Visited Link State */
.content-section a:visited {
    color: #121212;
}

/* 4. Focus State (Accessibility) */
.content-section a:focus {
    outline: 3px dashed #0088cc;
    outline-offset: 4px;
}

/* 5. Hover State */
.content-section a:hover {
    color: #121212;            /* Changes to blue on hover */
}

/* 6. Active State */
.content-section a:active {
    color: #121212;
}
/* ============================================
  RESPONSIVE DESIGN
  ============================================ */
@media (max-width: 768px) {
   .header-with-menu {
       padding: 1rem;
   }
   .header-with-menu h1 {
       font-size: 1.3rem;
   }
   .hamburger-btn {
       width: 35px;
       height: 35px;
   }
   .hamburger-btn span {
       width: 20px;
       height: 2.5px;
   }
   .menu-btn {
       padding: 0.85rem 1.25rem;
       font-size: 0.95rem;
   }
   .content-section {
       padding: 1.5rem;
   }
   .content-section h2 {
       font-size: calc(var(--app-font-scale) * 1.5);
   }
}
@media (max-width: 480px) {
   .header-with-menu h1 {
       font-size: 1.1rem;
   }
   .hamburger-btn {
       width: 32px;
       height: 32px;
       gap: 4px;
   }
   .hamburger-btn span {
       width: 18px;
       height: 2px;
   }
   .content-section {
       padding: 1rem;
       margin: 1rem 0;
   }
   .content-section h2 {
       font-size: calc(var(--app-font-scale) * 1.3);
   }
}


/* ============================================
   DATE SECTION
   ============================================ */

.date-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--light-bg);
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
}

.date-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.current-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-align: center;
  flex: 1;
  word-break: break-word;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
   /* Prevent iOS/Android text selection / magnifier on long-press */
  user-select: none;
  -webkit-user-select: none;
  /* Optional: tone down the grey iOS flash, or style your own */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Immediate touch-down feedback */
.current-date:active {
  opacity: 0.7;        /* or a background-color change */
}
/* "Calendar is open" state */
.current-date.active {
  color: #007bff;      /* your accent color */
}
.nav-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:active:not(:disabled) {
  transform: scale(0.95);
  background: var(--primary-dark);
}

.nav-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-toggle {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.2s ease;
  font-weight: 600;
  -webkit-user-select: none;
  user-select: none;
  min-height: 44px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-toggle:active {
  transform: scale(0.98);
}

.calendar-toggle.active {
  background: var(--error-color);
}

/* ============================================
   CALENDAR CONTAINER
   ============================================ */

.calendar-container {
  display: none;
  background: white;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
  flex-shrink: 0;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-container.open {
  display: flex;
  flex-direction: column;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.calendar-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--secondary-color);
  text-align: center;
  flex: 1;
  font-weight: 600;
}

.calendar-nav {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav:active {
  transform: scale(0.95);
  background: var(--primary-dark);
}

/* ============================================
   CALENDAR GRID
   ============================================ */

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  background: var(--light-bg);
  padding: 0.5rem;
  border-radius: 6px;
}

.calendar-weekdays div {
  padding: 0.4rem 0;
  font-weight: 700;
  text-align: center;
  color: var(--secondary-color);
  font-size: 0.75rem;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

/* ============================================
   CALENDAR DAY STYLES
   ============================================ */
.calendar-day {
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.calendar-day.empty {
    cursor: default;
    background-color: transparent;
    border: none;
}
.calendar-day.no-devotion {
    color: #999;
    background-color: transparent;
    cursor: not-allowed;
}
.calendar-day.has-devotion {
    color: var(--text-light);
    background-color: var(--bg-secondary);
}

/* SELECTED - BORDER */
.calendar-day.selected {
    /* background-color: #ff9800; */
    /* color: white; */
    font-weight: 600;
    box-shadow: 0 0 0 2px var(--secondary-color);
}

/* TODAY - BLUE HIGHLIGHT */
.calendar-day.today {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
}
/* COMPLETED - GREEN  */
.calendar-day.completed {
    background-color: #2f974a;
    color: white;
    font-weight: 600;
}

.calendar-day.completed::after {
    content: '';
    font-weight: bold;
    margin-left: 2px;
}



/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .finished-btn {
        min-width: 180px;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    .calendar-day {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    .finished-btn {
        min-width: 100%;
        padding: 0.875rem 1rem;
    }
    .calendar-day {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.error-message {
  background: #fef5f5;
  border-left: 4px solid var(--error-color);
  color: var(--error-color);
  padding: 0.75rem 1rem;
  margin: 0.75rem 1rem 0;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  animation: slideDown 0.3s ease;
  flex-shrink: 0;
}

/* ============================================
   MAIN CONTENT (SCROLLABLE)
   ============================================ */

main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1rem;
  padding-bottom: 1.5rem;
}

main h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  word-break: break-word;
  font-size: calc(var(--app-font-scale) * 1.05);
  font-weight: 600;
}

/* === Devotional Text-Size Controls === */
.font-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0 0.25rem;
}
.font-controls .font-btn {
    cursor: pointer;
    font-weight: bold;
    padding: 0.3rem 0.7rem;
    border: 1px solid #ccc;
    background: #fff;
    color: var(--secondary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1;
}
.font-controls .font-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.font-controls .font-size-value {
    min-width: 3.5ch;
    text-align: center;
    font-size: 1rem;
    color: #555;
    font-variant-numeric: tabular-nums;
}

main.devotional-content {
    font-size: var(--app-font-scale);
}

.bookmark-row {
  display: flex;
  justify-content: flex-end;   /* pushes the button to the right */
}

.bookmark-btn {
  display: inline-flex;        /* icon and text side by side */
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  color: #777777;
  font-size: 0.95rem;
}
.bookmark-btn:hover,
.bookmark-btn[aria-pressed="true"] { color: #333; }
.bookmark-btn[aria-pressed="true"] .ribbon { fill: currentColor; }
.bookmark-btn:focus-visible { outline: 2px solid #333; outline-offset: 2px; }


/* ============================================
   PASSAGE SECTION
   ============================================ */

.passage-section {
  background: var(--light-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--primary-color);
}

.passage-section h3 {
  color: var(--primary-color);
  font-size: calc(var(--app-font-scale) * 1);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.passage-section p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: calc(var(--app-font-scale) * 1);
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================
   ARTICLE
   ============================================ */
#title:empty {
  display: none;
}

article {
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  font-size: calc(var(--app-font-scale) * 1);
  white-space: pre-wrap;
}

article p {
  margin-bottom: 0.8rem;
  word-break: break-word;
}

article strong {
  color: var(--secondary-color);
  font-weight: 700;
}

article p:first-child {
  margin-top: 0;
}

/* ============================================
   QUESTIONS SECTION
   ============================================ */

.questions-section {
  background: #f0f8ff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 2px solid var(--primary-color);
}

.questions-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: calc(var(--app-font-scale) * 1.1);
  font-weight: 700;
}

.question {
  margin-bottom: 1.25rem;
}

.question:last-child {
  margin-bottom: 0;
}

.question label {
  display: block;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: calc(var(--app-font-scale) * 1);
  word-break: break-word;
}

.question-input {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: calc(var(--app-font-scale) * 1);
  color: var(--text-color);
  resize: vertical;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  background: white;
}

.question-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.question-input::placeholder {
  color: #bbb;
}

/* ============================================
   PRAYER SECTION
   ============================================ */
.prayer-section {
  background: var(--light-bg);
  border-left: 4px solid #764ba2;        /* purple accent from page header */
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.5rem;
}
.prayer-section h3 {
  color: var(--secondary-color);
  font-size: calc(var(--app-font-scale) * 1.1);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.prayer-text {
  font-style: italic;
  color: #555;
  line-height: 1.7;
  font-size: calc(var(--app-font-scale) * 1);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
/* ============================================
   PRAYER POINTS BOX (topic + points together)
   ============================================ */
.pray-box {
  background: #f5f8ff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 2px solid var(--primary-color);
}
.pray-box h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: calc(var(--app-font-scale) * 1.1);
  font-weight: 700;
  word-break: break-word;
}
.pray-box ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-light);
  line-height: 1.8;
}
.pray-box li {
  margin-bottom: 0.5rem;
}
.pray-box p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: calc(var(--app-font-scale) * 1);
  word-break: break-word;
}

.pray-box .pray-text {
  line-height: 1.8;
  white-space: pre-line;
}

/* ============================================
   RESPONSIVE TWEAKS FOR PRAYER BLOCKS
   ============================================ */
@media (max-width: 480px) {
  .prayer-section,
  .pray-box {
    padding: 0.875rem;
  }
}

/* ============================================
   BUTTON GROUPS
   ============================================ */

.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button-group .nav-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  min-height: 48px;
}

/* ============================================
   SAVE TO CLOUD BUTTON
   ============================================ */

.save-cloud-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #667eea;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.save-cloud-btn:hover {
  background: #667eea;
}
.save-cloud-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
/* Floating toast */
.cloud-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #2c3e50;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}
.cloud-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cloud-toast.error {
  background: #c62828;
}
/* ============================================
   FINISHED DEVOTIONAL BUTTON
   ============================================ */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.finished-btn {
    padding: 0.875rem 2rem;
    font-size: calc(var(--app-font-scale) * 1);
    font-weight: 600;
    color: white;
    background: #5164b7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 200px;
}
.finished-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.finished-btn:active {
    transform: translateY(0);
}
.finished-btn.completed {
    background: #2f974a;
    box-shadow: 0 4px 15px rgba(52, 168, 83, 0.3);
}
.finished-btn.completed:hover {
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.4);
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   SCROLLBAR STYLING (WebKit browsers)
   ============================================ */

main::-webkit-scrollbar {
  width: 6px;
}

main::-webkit-scrollbar-track {
  background: var(--light-bg);
}

main::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

main::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.calendar-container::-webkit-scrollbar {
  width: 6px;
}

.calendar-container::-webkit-scrollbar-track {
  background: var(--light-bg);
}

.calendar-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

/* ============================================
   SAFE AREA INSETS (Notch/Dynamic Island)
   ============================================ */

@supports (padding: max(0px)) {
  header {
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  main {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  .date-section,
  .calendar-container {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  body {
    background: white;
  }

  .date-section,
  header,
  .button-group,
  .calendar-toggle,
  .nav-btn {
    display: none;
  }

  .container {
    box-shadow: none;
    max-width: 100%;
  }

  main {
    padding: 0;
  }
}

/* ============================================
   REDUCED MOTION (Accessibility)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   DARK MODE SUPPORT - removed for now, but can be re-enabled if needed


@media (prefers-color-scheme: dark) {
  html,
  body {
    background: #1a1a1a;
  }

  .container {
    background: #242424;
    color: #e0e0e0;
  }

  :root {
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --secondary-color: #e0e0e0;
    --light-bg: #323232;
    --border-color: #404040;
  }

  header {
    background: linear-gradient(135deg, #5568d3 0%, #6a3fa0 100%);
  }

  .date-section {
    background: #323232;
    border-bottom-color: #404040;
  }

  .date-display {
    background: #2a2a2a;
  }

  .current-date {
    color: #e0e0e0;
  }

  .calendar-container {
    background: #242424;
    border-color: #3498db;
  }

  .calendar-header h2 {
    color: #e0e0e0;
  }

  .calendar-weekdays {
    background: #323232;
    color: #e0e0e0;
  }

  .calendar-day {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
  }

  .calendar-day.has-devotion {
    background: #323232;
    border-color: #3498db;
  }

  .calendar-day.no-devotion {
    background: #1f1f1f;
    color: #555;
  }

  article {
    color: #b0b0b0;
  }

  .passage-section {
    background: #323232;
    border-left-color: #3498db;
  }

  .passage-section h3 {
    color: #3498db;
  }

  .passage-section p {
    color: #b0b0b0;
  }

  .questions-section {
    background: #1a2332;
    border-color: #3498db;
  }

  .questions-section h3 {
    color: #3498db;
  }

  .question label {
    color: #e0e0e0;
  }

  .question-input {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
  }

  .question-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  }

  main::-webkit-scrollbar-track {
    background: #323232;
  }

  main::-webkit-scrollbar-thumb {
    background: #3498db;
  }

  .error-message {
    background: #332122;
    border-left-color: #e74c3c;
    color: #ff6b6b;
  }
}
   ============================================ */