/* ==========================================================================
   Pray.ee — Отче наш (The Lord's Prayer in All Languages)
   Design System: Reverent, Super-fast, Pure CSS, Mobile-First Responsive
   ========================================================================== */

:root {
  --font-serif: "Charter", "Bitstream Charter", "Sitka Text", "Cambria", "Georgia", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 1.15rem;
  --line-height-base: 1.85;

  /* Theme: Dark (Default - Contemplative & Holy) */
  --bg-primary: #0a0d14;
  --bg-secondary: #121722;
  --bg-card: #182030;
  --bg-card-hover: #1f293d;
  --bg-pill: #1f2838;
  --bg-pill-active: #d4af37;
  
  --text-primary: #f0f3f8;
  --text-secondary: #9aa8bd;
  --text-muted: #627289;
  --text-gold: #e5c058;
  --text-pill-active: #0a0d14;

  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --accent-blue: #3b82f6;
  --border-color: #263347;
  --border-highlight: #d4af37;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

[data-theme="light"] {
  --bg-primary: #fbf9f5;
  --bg-secondary: #f2ede4;
  --bg-card: #ffffff;
  --bg-card-hover: #faf7f0;
  --bg-pill: #eae3d5;
  --bg-pill-active: #8b6b1b;

  --text-primary: #1f242e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-gold: #9e7a20;
  --text-pill-active: #ffffff;

  --accent-gold: #8b6b1b;
  --accent-gold-glow: rgba(139, 107, 27, 0.15);
  --accent-blue: #2563eb;
  --border-color: #ded6c8;
  --border-highlight: #8b6b1b;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
}

[data-theme="sepia"] {
  --bg-primary: #f4ecd8;
  --bg-secondary: #e8ddc2;
  --bg-card: #faf4e6;
  --bg-card-hover: #f1e7cf;
  --bg-pill: #decfae;
  --bg-pill-active: #78531b;

  --text-primary: #2d2417;
  --text-secondary: #5a4b37;
  --text-muted: #857257;
  --text-gold: #845b18;
  --text-pill-active: #fdfbf7;

  --accent-gold: #78531b;
  --accent-gold-glow: rgba(120, 83, 27, 0.18);
  --accent-blue: #2c5282;
  --border-color: #d1be9a;
  --border-highlight: #78531b;

  --shadow-sm: 0 2px 6px rgba(45, 36, 23, 0.06);
  --shadow-md: 0 8px 20px rgba(45, 36, 23, 0.1);
  --shadow-lg: 0 16px 36px rgba(45, 36, 23, 0.14);
}

/* Base Reset & Smoothness */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* App Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(10, 13, 20, 0.9);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.25s ease;
  padding-top: env(safe-area-inset-top, 0px);
}

[data-theme="light"] .site-header {
  background-color: rgba(251, 249, 245, 0.92);
}

[data-theme="sepia"] .site-header {
  background-color: rgba(244, 236, 216, 0.92);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e2838, #101622);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-gold);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  background-color: var(--accent-gold-glow);
  color: var(--text-gold);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-gold);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

/* Controls & Buttons */
.btn-control {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-control:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-control svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-lang-trigger {
  font-weight: 700;
  color: var(--text-gold);
  border-color: var(--accent-gold);
}

/* Quick Language Chips */
.quick-chips-wrapper {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quick-chips-wrapper::-webkit-scrollbar {
  display: none;
}

.quick-chips {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.chip {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.chip:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.chip.active {
  background: var(--bg-pill-active);
  color: var(--text-pill-active);
  border-color: var(--accent-gold);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.chip-all {
  background: transparent;
  border-style: dashed;
  color: var(--text-gold);
  font-weight: 600;
}

/* Main Container */
.main-container {
  max-width: 900px;
  width: 100%;
  margin: 1.25rem auto 2.5rem auto;
  padding: 0 1rem;
  flex: 1;
}

/* Search Box */
.search-container {
  margin-bottom: 1.25rem;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.85rem 2.8rem 0.85rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.search-clear {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  display: none;
  line-height: 1;
}

.search-clear.visible {
  display: block;
}

/* Prayer Card (The Holy Centerpiece) */
.prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.prayer-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.85;
}

.prayer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
  gap: 0.45rem;
}

.prayer-tags {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tag-badge {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  color: var(--text-gold);
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.tag-region {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.prayer-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 0.25rem;
}

.prayer-scripture {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Prayer Body Text */
.prayer-body-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.25rem 0 1.75rem 0;
}

.prayer-text {
  font-family: var(--font-serif);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  text-align: center;
  white-space: pre-line;
  max-width: 680px;
  letter-spacing: 0.015em;
  transition: font-size 0.2s ease;
  word-break: break-word;
}

/* Transliteration card */
.translit-container {
  margin-top: 1.75rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  max-width: 680px;
  width: 100%;
}

.translit-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.translit-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-style: italic;
  white-space: pre-line;
}

/* Interactive 40-Prayer Counter */
.prayer-counter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.75rem 0 1rem 0;
  padding: 1.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  user-select: none;
}

.counter-ring-container {
  position: relative;
  width: 124px;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.counter-ring-container:active {
  transform: scale(0.94);
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 6;
}

.ring-progress {
  fill: none;
  stroke: var(--accent-gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 314.159; /* 2 * PI * 50 */
  stroke-dashoffset: 314.159;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px var(--accent-gold-glow));
}

.counter-center-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.counter-current {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-gold);
  line-height: 1;
  transition: transform 0.15s ease;
}

.counter-goal {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

.counter-instructions {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.counter-btn-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.counter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.counter-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-gold);
}

.counter-btn-sub {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.counter-btn-add {
  padding: 0.65rem 1.6rem;
  background: var(--accent-gold);
  color: #0a0d14;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px var(--accent-gold-glow);
  border-color: var(--accent-gold);
}

.counter-btn-add:hover {
  transform: translateY(-2px);
  color: #000000;
  background: #e6c35c;
}

.counter-btn-add:active {
  transform: scale(0.96);
}

.counter-completed-banner {
  margin-top: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: 0 4px 16px var(--accent-gold-glow);
  animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 10px var(--accent-gold-glow); }
  50% { box-shadow: 0 0 24px var(--accent-gold-glow); }
}

.completed-icon {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.completed-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-gold);
}

/* Prayer Actions Bar */
.prayer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.action-btn {
  background: var(--bg-pill);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  user-select: none;
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  color: var(--text-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-gold-glow);
}

.action-btn.active {
  background: var(--accent-gold);
  color: #0a0d14;
  border-color: var(--accent-gold);
  font-weight: 600;
}

.action-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* Spiritual Explanation */
.spiritual-section {
  margin-top: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-gold);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

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

.petition-card {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
}

.petition-title {
  color: var(--text-primary);
  font-size: 0.92rem;
  display: block;
}

.petition-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* App Promo Card */
.app-promo-card {
  margin-top: 2.5rem;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 10px 30px var(--accent-gold-glow);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.app-promo-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 16px var(--accent-gold-glow);
  object-fit: cover;
  flex-shrink: 0;
}

.app-promo-content {
  flex: 1;
  min-width: 240px;
}

.app-promo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.app-promo-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.app-promo-features {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-gold);
  margin-bottom: 1rem;
}

.app-promo-features span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.app-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #000000;
  color: #ffffff;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid #333333;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.app-promo-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.app-promo-badge svg {
  width: 22px;
  height: 22px;
}

/* Sticky Mobile Bottom Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(10, 13, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom, 0px)) 0.5rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .mobile-bottom-bar {
  background: rgba(251, 249, 245, 0.95);
}

[data-theme="sepia"] .mobile-bottom-bar {
  background: rgba(244, 236, 216, 0.95);
}

@media (max-width: 767px) {
  .mobile-bottom-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}

.m-bar-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  min-height: 48px;
  transition: color 0.15s ease;
}

.m-bar-btn:active, .m-bar-btn:hover {
  color: var(--text-gold);
}

.m-bar-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.m-bar-btn-primary {
  color: var(--accent-gold);
  font-weight: 700;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-dialog {
  transform: scale(1);
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal-dialog {
    max-height: 90vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-close svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

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

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.55rem;
}

.lang-grid-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
  transition: all 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.lang-grid-item:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.lang-grid-item.active {
  border-color: var(--accent-gold);
  background: var(--bg-pill-active);
  color: var(--text-pill-active);
}

.lang-grid-item.active .lang-item-sub {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .lang-grid-item.active .lang-item-sub {
  color: #1a1a1a;
}

.lang-item-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.lang-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--accent-gold);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 2.25rem 1.25rem;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  /* Hide horizontal slider and search box on mobile phones */
  .quick-chips-wrapper {
    display: none !important;
  }
  .search-container {
    display: none !important;
  }

  .site-header .header-inner {
    padding: 0.5rem 0.85rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .brand-icon svg {
    width: 18px;
    height: 18px;
  }

  .brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-container {
    margin-top: 0.65rem;
    padding: 0 0.75rem;
  }

  .prayer-card {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
  }

  .prayer-title {
    font-size: 1.45rem;
  }

  .prayer-actions {
    display: none; /* Handled comfortably by sticky .mobile-bottom-bar */
  }

  .app-promo-card {
    padding: 1.25rem;
    flex-direction: column;
    text-align: center;
  }

  .app-promo-features {
    justify-content: center;
  }
}
