/* Styles principaux de RYVANGEL. Les ajustements visuels finaux restent dans ../ryvangel-theme-premium.css. */

:root {
  color-scheme: dark;
  --bg: #071426;
  --surface: rgba(10, 29, 52, .88);
  --surface-2: #13385c;
  --surface-3: #0a223d;
  --text: #f5fbff;
  --muted: #aec4d7;
  --accent: #82d8ff;
  --accent-strong: #619ff6;
  --accent-ink: #061a30;
  --danger: #ff8fa3;
  --border: rgba(179, 224, 255, .17);
  --shadow: 0 26px 80px rgba(0, 0, 0, .45);
  --radius: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 90px; }
body {
  min-height: 100vh;
  margin: 0;
  padding: clamp(12px, 3vw, 28px);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(3, 20, 39, .42), rgba(4, 17, 34, .74)),
    url("assets/celestial-sky-v1.png") center top / cover fixed no-repeat,
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #b7e9ff;
  outline-offset: 2px;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--accent-ink);
  background: #d8f3ff;
  font-weight: 800;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.app {
  width: min(100%, 760px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  isolation: isolate;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 26px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(18, 48, 78, .98), rgba(6, 22, 40, .98));
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(188, 231, 255, .42);
  border-radius: 13px 13px 13px 5px;
  color: var(--accent-ink);
  background: linear-gradient(145deg, #c8efff, #72b4ff);
  box-shadow: 0 8px 24px rgba(78, 158, 239, .3);
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 700;
}
.app-title { margin: 0; font-family: Georgia, serif; font-size: clamp(18px, 3.5vw, 23px); line-height: 1.15; }
.app-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(6, 22, 40, .6);
  font-size: 11px;
}
.header-home {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--accent);
  background: rgba(8, 29, 51, .7);
  cursor: pointer;
  font-size: 23px;
}
.header-home[hidden] { display: none; }
.app[data-screen]:not([data-screen="home"]) .mode-pill { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.mobile-version { display: none; color: var(--muted); font-size: 10px; }
.network-banner {
  margin: 0;
  padding: 8px 16px;
  color: #fff0bd;
  background: #513d0b;
  font-size: 12px;
  text-align: center;
}
.install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(130, 216, 255, .3);
  border-radius: 14px;
  background: rgba(73, 147, 224, .13);
}
.install-card p { margin: 0; color: var(--muted); font-size: 12px; }
.install-card strong { display: block; color: var(--text); font-size: 13px; }
.install-card .btn { flex: 0 0 auto; }
.content { padding: clamp(16px, 4vw, 26px); }
.daily-card {
  position: relative;
  overflow: hidden;
  padding: clamp(17px, 4vw, 24px);
  border: 1px solid rgba(130, 216, 255, .36);
  border-radius: var(--radius);
  background:
    linear-gradient(130deg, rgba(48, 130, 202, .34), rgba(9, 32, 56, .94) 64%),
    var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.daily-card::after {
  position: absolute;
  right: -22px;
  bottom: -50px;
  color: rgba(173, 227, 255, .1);
  content: "✦";
  font-family: Georgia, serif;
  font-size: 150px;
  line-height: 1;
  pointer-events: none;
}
.home-assistant { margin-bottom: 14px; padding: clamp(16px, 4vw, 21px); border: 1px solid rgba(130, 216, 255, .3); border-radius: var(--radius); background: linear-gradient(145deg, rgba(25, 77, 122, .72), rgba(8, 29, 51, .96)); }
.home-assistant-head { display: flex; align-items: center; gap: 11px; }
.home-assistant-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(130, 216, 255, .38); border-radius: 50%; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-strong)); font-family: Georgia, serif; font-size: 19px; font-weight: 800; }
.home-assistant-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.home-assistant-copy { min-width: 0; flex: 1; }
.home-assistant-title { margin: 0; font-family: Georgia, serif; font-size: 18px; }
.home-assistant-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.home-ai-messages { display: grid; gap: 8px; max-height: 310px; margin-top: 14px; overflow-y: auto; }
.home-ai-message { max-width: 88%; margin: 0; padding: 10px 12px; border-radius: 5px 14px 14px; color: var(--text); background: rgba(6, 22, 40, .62); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.home-ai-message.is-user { justify-self: end; border-radius: 14px 5px 14px 14px; background: rgba(59, 135, 207, .42); }
.home-ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.home-ai-suggestion { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(7, 25, 45, .5); cursor: pointer; font-size: 11px; }
.home-ai-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 12px; }
.home-ai-form textarea { min-height: 44px; max-height: 110px; resize: vertical; }
.home-ai-form .btn { align-self: stretch; }
.home-ai-mic { display: grid; min-width: 46px; min-height: 44px; place-items: center; border: 1px solid rgba(122, 205, 255, .34); border-radius: 12px; color: #bdeaff; background: radial-gradient(circle at 32% 20%, rgba(142, 222, 255, .42), transparent 44%), linear-gradient(145deg, rgba(27, 92, 145, .9), rgba(6, 24, 43, .94)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -4px 8px rgba(0, 0, 0, .28), 0 6px 13px rgba(0, 0, 0, .22); cursor: pointer; }
.home-ai-mic.is-listening { border-color: #ff7c87; color: #fff; background: radial-gradient(circle at 32% 20%, rgba(255, 145, 157, .5), transparent 46%), linear-gradient(145deg, rgba(196, 50, 67, .96), rgba(93, 16, 31, .96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 4px rgba(255, 92, 108, .13); animation: mic-pulse 1.25s ease-in-out infinite; }
@keyframes mic-pulse { 50% { transform: scale(1.05); } }
.home-ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-ai-foot .status { flex: 1; }
.home-avatar-create, .home-ai-listen, .home-ai-clear, .lesson-ai-listen { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(7, 25, 45, .45); cursor: pointer; font-size: 11px; white-space: nowrap; }
.home-ai-clear { border-color: transparent; background: transparent; }
.home-avatar-create:disabled, .home-ai-listen:disabled, .lesson-ai-listen:disabled { cursor: wait; opacity: .6; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.verse-text { max-width: 620px; margin: 0; font-family: Georgia, serif; font-size: clamp(17px, 3.2vw, 22px); line-height: 1.55; }
.verse-theme { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.tabs-wrap { position: relative; margin: 18px 0 12px; }
.tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}
.tab {
  display: inline-flex;
  min-width: max-content;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-3);
  cursor: pointer;
  font-size: 13px;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.tab:hover { color: var(--text); transform: translateY(-1px); }
.tab[aria-selected="true"] {
  border-color: transparent;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 7px 20px rgba(77, 153, 232, .24);
  font-weight: 750;
}
.section { padding-top: 5px; }
.section[hidden] { display: none; }
.section-title { margin: 0; font-family: Georgia, serif; font-size: 20px; }
.section-desc { margin: 5px 0 14px; color: var(--muted); font-size: 13px; }
.card-grid { display: grid; gap: 10px; }
.card-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(20, 57, 91, .94), rgba(8, 29, 51, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: rgba(130, 216, 255, .32); transform: translateY(-1px); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-heading { display: flex; min-width: 0; align-items: center; gap: 10px; }
.card-title { margin: 0; font-size: 14px; font-weight: 750; }
.card-tag, .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(6, 22, 40, .58);
  font-size: 10px;
  white-space: nowrap;
}
.badge { margin-bottom: 10px; font-size: 11px; }
.card-text { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.btn-row { display: flex; gap: 7px; margin-top: 13px; }
.btn {
  display: inline-flex;
  min-height: 38px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: filter .18s ease, transform .18s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.5); opacity: .58; transform: none; }
.btn-primary { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
.btn-outline { border-color: var(--border); color: var(--muted); background: rgba(7, 25, 45, .45); }
.btn-outline.is-done { border-color: rgba(130, 216, 255, .54); color: var(--accent); }
.complete-toggle {
  display: inline-grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(7, 25, 45, .5);
  cursor: pointer;
  font-size: 15px;
}
.complete-toggle.is-done {
  border-color: rgba(130, 216, 255, .52);
  color: var(--accent);
  background: rgba(73, 147, 224, .16);
}
.prayer-toggle { display: none; }
.progress { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.bar { height: 7px; overflow: hidden; margin-bottom: 12px; border-radius: 999px; background: #071a30; }
.bar-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), #a8e5ff); transition: width .3s ease; }
.question { margin: 0 0 11px; font-size: 14px; font-weight: 700; }
.answers { display: grid; gap: 7px; }
.answer-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(6, 22, 40, .52);
  cursor: pointer;
  font-size: 12px;
}
.answer-option:has(input:checked) { border-color: rgba(130, 216, 255, .66); background: rgba(73, 147, 224, .14); }
.answer-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-strong); }
.feedback { min-height: 20px; margin: 9px 0 0; font-size: 12px; }
.feedback.ok { color: var(--accent); }
.feedback.ko { color: var(--danger); }
.quiz-rewards {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(130, 216, 255, .26);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(47, 122, 193, .24), rgba(9, 31, 55, .8));
}
.reward-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reward-title { margin: 0; font-family: Georgia, serif; font-size: 16px; }
.reward-crowns { color: #cceeff; font-size: 12px; font-weight: 800; }
.quiz-level { display: inline-flex; margin-top: 8px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--accent); font-size: 10px; font-weight: 800; }
.reward-stars { display: flex; gap: 8px; margin: 13px 0 10px; }
.reward-star {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: rgba(220, 242, 255, .2);
  font-size: 29px;
  line-height: 1;
  filter: drop-shadow(0 0 0 transparent);
  transition: color .25s ease, filter .25s ease, transform .25s ease;
}
.reward-star.is-earned { color: #cceeff; filter: drop-shadow(0 0 8px rgba(119, 198, 255, .45)); transform: translateY(-1px); }
.reward-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reward-hint { margin: 0; color: var(--muted); font-size: 11px; }
.reward-rings { display: flex; align-items: center; gap: 5px; }
.reward-ring { width: 15px; height: 15px; border: 2px solid rgba(220, 242, 255, .22); border-radius: 50%; }
.reward-ring.is-earned { border-color: #cceeff; box-shadow: 0 0 8px rgba(119, 198, 255, .32); }
.quiz-rewards.is-celebrating { animation: reward-pulse .55s ease; }
@keyframes reward-pulse { 50% { border-color: rgba(157, 220, 255, .74); transform: translateY(-2px); } }
.field { display: grid; gap: 6px; margin-top: 11px; color: var(--muted); font-size: 11px; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: #0a2038;
  padding: 10px;
  resize: vertical;
}
.community-layout { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 12px; align-items: start; }
.community-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.community-page-head .section-desc { margin-bottom: 10px; }
.community-shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 4px 0 14px; }
.community-shortcut {
  display: inline-flex;
  min-width: 0;
  min-height: 60px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 3px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(9, 31, 55, .62);
  cursor: pointer;
  font-size: 9px;
}
.community-shortcut-icon { color: var(--text); font-size: 18px; line-height: 1; }
.community-shortcut[aria-pressed="true"] { border-color: rgba(130, 216, 255, .42); color: var(--accent); background: rgba(73, 147, 224, .16); }
.community-directory[hidden], .community-chat-view[hidden] { display: none; }
.chat-focus-header { display: none; }
.chat-focus-back {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: rgba(7, 25, 45, .62);
  cursor: pointer;
  font-size: 21px;
}
.chat-focus-copy { min-width: 0; flex: 1; }
.chat-focus-title { overflow: hidden; margin: 0; font-size: 14px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.chat-focus-status { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
body.has-chat-focus { overflow: hidden; }
body.has-chat-focus .app {
  overflow: visible;
  isolation: auto;
  backdrop-filter: none;
}
#panel-community.is-chat-focus {
  display: flex;
  position: fixed;
  z-index: 100;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(5, 23, 43, .88), rgba(5, 20, 39, .96)),
    url("assets/celestial-sky-v1.png") center top / cover no-repeat,
    var(--bg);
}
#panel-community.is-chat-focus .community-page-head,
#panel-community.is-chat-focus .community-shortcuts,
#panel-community.is-chat-focus #chat-prayer-context { display: none; }
#panel-community.is-chat-focus .community-chat-view { display: flex; height: auto; min-height: 0; flex: 1; flex-direction: column; }
#panel-community.is-chat-focus .chat-focus-header { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 2px 2px 9px; }
#panel-community.is-chat-focus .community-layout { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 8px; }
#panel-community.is-chat-focus .chat-feed-card { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 10px; overflow: hidden; }
#panel-community.is-chat-focus .feed-header { display: none; }
#panel-community.is-chat-focus .testimony-feed { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 2px 10px; overscroll-behavior: contain; }
#panel-community.is-chat-focus #testimony-form { position: static; bottom: auto; flex: 0 0 auto; padding: 10px; }
#panel-community.is-chat-focus #testimony-form .card-header,
#panel-community.is-chat-focus:not(.needs-identity) #testimony-form .field:first-of-type,
#panel-community.is-chat-focus #testimony-clear { display: none; }
#panel-community.is-chat-focus #testimony-form .field { margin: 0; font-size: 0; }
#panel-community.is-chat-focus #testimony-content { min-height: 46px; max-height: 110px; resize: none; }
#panel-community.is-chat-focus #testimony-form .btn-row { margin-top: 7px; }
#panel-community.is-chat-focus:not(.needs-identity) #testimony-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
#panel-community.is-chat-focus:not(.needs-identity) #testimony-form .btn-row { margin: 0; }
.directory-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.directory-title { margin: 0; font-family: Georgia, serif; font-size: 19px; }
.directory-list { display: grid; gap: 9px; }
.space-card { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 15px; background: rgba(10, 34, 60, .78); }
.space-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: var(--accent-ink); background: linear-gradient(145deg, #c8efff, #72b4ff); font-size: 18px; font-weight: 850; }
.space-copy { min-width: 0; flex: 1; }
.space-title { margin: 0; font-size: 13px; font-weight: 800; }
.space-meta { overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.space-action { flex: 0 0 auto; padding: 7px 9px; border: 0; border-radius: 10px; color: var(--accent); background: rgba(73, 147, 224, .15); cursor: pointer; font-size: 10px; font-weight: 800; }
.community-safety { margin: 12px 0 0; padding: 11px 12px; border-left: 3px solid var(--accent); color: var(--muted); background: rgba(73, 147, 224, .1); font-size: 10px; }
.connection-state { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.connection-state[data-state="online"] { color: var(--accent); }
.connection-state[data-state="error"] { color: var(--danger); }
.feed-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.feed-header .btn { min-height: 32px; flex: 0 0 auto; padding: 5px 10px; }
.testimony-feed { display: flex; min-height: 180px; flex-direction: column; gap: 8px; }
.testimony {
  width: fit-content;
  max-width: 86%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px 15px 15px 15px;
  background: rgba(7, 25, 45, .58);
}
.testimony.is-own { align-self: flex-end; border-color: rgba(130, 216, 255, .26); border-radius: 15px 5px 15px 15px; background: rgba(38, 102, 164, .42); }
.testimony-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.testimony-author { color: var(--accent); font-size: 12px; font-weight: 750; }
.testimony time { color: var(--muted); font-size: 10px; }
.testimony p { margin: 0; color: var(--text); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { padding: 20px 12px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); text-align: center; font-size: 12px; }
.status { min-height: 18px; margin: 8px 0 0; color: var(--accent); font-size: 11px; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 11px clamp(16px, 4vw, 26px); border-top: 1px solid var(--border); color: var(--muted); background: rgba(5, 19, 35, .52); font-size: 10px; }
.dialog {
  width: min(calc(100% - 28px), 560px);
  padding: 0;
  border: 1px solid rgba(130, 216, 255, .36);
  border-radius: 18px;
  color: var(--text);
  background: #0d2947;
  box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(2, 10, 20, .82); backdrop-filter: blur(4px); }
.dialog-body { padding: 22px; }
.dialog h2 { margin: 0; font-family: Georgia, serif; }
.dialog p { color: var(--muted); font-size: 13px; white-space: pre-line; }
.dialog blockquote { margin: 15px 0; padding: 12px 14px; border-left: 3px solid var(--accent); color: var(--text); background: rgba(73, 147, 224, .12); font-family: Georgia, serif; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.dialog-actions .btn { flex: 0 0 auto; min-width: 110px; }
.lesson-ai { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.lesson-ai-panel { margin-top: 14px; }
.lesson-ai-note { margin: 8px 0 0; font-size: 11px !important; }
.lesson-ai-result { margin-top: 14px; padding: 14px; border: 1px solid rgba(130, 216, 255, .24); border-radius: 14px; background: rgba(7, 25, 45, .5); }
.lesson-ai-result h3 { margin: 0 0 8px; color: var(--accent); font-size: 14px; }
.lesson-ai-result h4 { margin: 12px 0 4px; font-size: 12px; }
.lesson-ai-result p { margin: 0; color: var(--text); white-space: pre-wrap; }

.tab-icon { display: none; font-size: 19px; line-height: 1; }
.tabs-wrap { display: block; }
.home-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 22px; }
.home-destination {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(10, 34, 60, .64);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.home-destination span:first-child { color: var(--accent); font-size: 17px; }

@media (max-width: 620px) {
  html { background: var(--bg); }
  body {
    padding: 0;
    background:
      linear-gradient(180deg, rgba(3, 20, 39, .38), rgba(4, 17, 34, .7)),
      url("assets/celestial-sky-v1.png") center top / cover scroll no-repeat,
      var(--bg);
  }
  .app {
    width: 100%;
    backdrop-filter: none;
    min-height: 100dvh;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: rgba(7, 24, 45, .74);
    box-shadow: none;
  }
  .app-header {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 72px;
    padding: max(13px, env(safe-area-inset-top)) 18px 13px;
    background: rgba(7, 25, 45, .92);
    backdrop-filter: blur(18px) saturate(1.2);
  }
  .logo { width: 40px; height: 40px; font-size: 21px; }
  .app-title { font-size: 19px; letter-spacing: .02em; }
  .app-subtitle { font-size: 11px; }
  .mode-pill { display: none; }
  .mobile-version { display: inline; }
  .content {
    min-height: calc(100dvh - 72px);
    padding: 16px 16px calc(88px + env(safe-area-inset-bottom));
  }
  .daily-card {
    padding: 17px 16px;
    border-radius: 22px;
  }
  .daily-card::after { right: -14px; bottom: -37px; font-size: 112px; }
  .verse-text { font-size: clamp(17px, 4.8vw, 20px); line-height: 1.48; }
  .verse-theme { line-height: 1.5; }
  .tabs-wrap {
    display: block;
    position: fixed;
    z-index: 80;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    margin: 0;
    padding: 5px;
    border: 1px solid rgba(179, 224, 255, .18);
    border-radius: 20px;
    background: rgba(5, 20, 39, .94);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .45);
    backdrop-filter: blur(20px) saturate(1.2);
  }
  .tabs { gap: 2px; overflow: visible; padding: 0; }
  .tab {
    min-width: 0;
    min-height: 54px;
    flex: 1 1 25%;
    flex-direction: column;
    gap: 4px;
    padding: 7px 3px 6px;
    border-color: transparent;
    border-radius: 15px;
    background: transparent;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
  }
  .tab-icon { display: block; }
  .tab[aria-selected="true"] {
    border-color: rgba(130, 216, 255, .22);
    color: var(--text);
    background: rgba(73, 147, 224, .16);
    box-shadow: none;
  }
  .tab[aria-selected="true"] .tab-icon { color: var(--accent); }
  .section { min-height: calc(100dvh - 112px); padding-top: 4px; }
  #panel-prayers .daily-card { margin-bottom: 22px; }
  .section-title { font-size: 23px; }
  .section-desc { margin-bottom: 17px; font-size: 13px; }
  .card-grid, .testimony-feed { gap: 10px; }
  .card-grid.two-columns, .community-layout { grid-template-columns: 1fr; }
  .community-shortcuts { gap: 5px; margin-inline: -3px; }
  .community-shortcut { min-height: 58px; border-radius: 12px; font-size: 8px; }
  .community-shortcut-icon { font-size: 17px; }
  .chat-feed-card { order: 1; }
  #testimony-form { order: 2; position: sticky; bottom: 10px; z-index: 5; background: rgba(10, 34, 60, .97); backdrop-filter: blur(16px); }
  .card { padding: 15px; border-color: rgba(179, 224, 255, .12); border-radius: 16px; box-shadow: none; }
  .card-title { font-size: 15px; }
  .card-text {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  #prayer-list:not(.is-expanded) .prayer-card:nth-child(n + 3) { display: none; }
  .prayer-toggle {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    border: 0;
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
  }
  .btn { min-height: 46px; border-radius: 13px; font-size: 13px; }
  .answer-option { min-height: 48px; padding: 11px 12px; font-size: 13px; }
  .answer-option input { width: 19px; height: 19px; }
  .quiz-rewards { padding: 15px; }
  .reward-star { width: 31px; height: 31px; font-size: 27px; }
  .reward-stars { justify-content: space-between; gap: 3px; }
  .field input, .field textarea { min-height: 48px; padding: 12px; font-size: 16px; }
  .feed-header .btn { min-height: 42px; }
  .app-footer { display: none; }
  .install-card { align-items: stretch; flex-direction: column; }
  .install-card .btn { width: 100%; }
  .dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .dialog-body { min-height: 100%; padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
  body.has-chat-focus { overflow: hidden; }
  #panel-community.is-chat-focus {
    display: flex;
    position: fixed;
    z-index: 100;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(5, 23, 43, .88), rgba(5, 20, 39, .96)),
      url("assets/celestial-sky-v1.png") center top / cover no-repeat,
      var(--bg);
  }
  #panel-community.is-chat-focus .community-page-head,
  #panel-community.is-chat-focus .community-shortcuts,
  #panel-community.is-chat-focus #chat-prayer-context { display: none; }
  #panel-community.is-chat-focus .community-chat-view { display: flex; height: auto; min-height: 0; flex: 1; flex-direction: column; }
  #panel-community.is-chat-focus .chat-focus-header { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 2px 2px 9px; }
  #panel-community.is-chat-focus .community-layout { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 8px; }
  #panel-community.is-chat-focus .chat-feed-card { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 10px; overflow: hidden; }
  #panel-community.is-chat-focus .feed-header { display: none; }
  #panel-community.is-chat-focus .testimony-feed { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 2px 10px; overscroll-behavior: contain; }
  #panel-community.is-chat-focus #testimony-form { position: static; bottom: auto; flex: 0 0 auto; padding: 10px; }
  #panel-community.is-chat-focus #testimony-form .card-header,
  #panel-community.is-chat-focus:not(.needs-identity) #testimony-form .field:first-of-type,
  #panel-community.is-chat-focus #testimony-clear { display: none; }
  #panel-community.is-chat-focus #testimony-form .field { margin: 0; font-size: 0; }
  #panel-community.is-chat-focus #testimony-content { min-height: 46px; max-height: 110px; resize: none; }
  #panel-community.is-chat-focus #testimony-form .btn-row { margin-top: 7px; }
  #panel-community.is-chat-focus:not(.needs-identity) #testimony-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }
  #panel-community.is-chat-focus:not(.needs-identity) #testimony-form .btn-row { margin: 0; }
  body.has-chat-focus .tabs-wrap { display: none; }
}
@media (max-width: 390px) {
  .app-subtitle { display: none; }
  .content { padding-inline: 13px; }
  .daily-card { padding: 18px 16px; }
  .btn-row { flex-direction: column; }
  .tab { font-size: 9px; }
}
@media (hover: none) {
  .tab:hover, .card:hover, .btn:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media (prefers-contrast: more) {
  :root { --muted: #d8e8f4; --border: rgba(225, 244, 255, .55); }
  .card, .daily-card, .tab, .btn, .field input, .field textarea { border-width: 2px; }
}
.card-heading, .card-title, .testimony-head { overflow-wrap: anywhere; }
.card-header, .testimony-head { flex-wrap: wrap; }
.complete-toggle, .space-action, .chat-focus-back { min-width: 44px; min-height: 44px; }
#testimony-status { grid-column: 1 / -1; }
#panel-community.is-chat-focus .community-layout { align-items: stretch; }
body.has-chat-focus .app-header, body.has-chat-focus .tabs-wrap { visibility: hidden; }
.answers { border: 0; padding: 0; margin: 0; min-width: 0; }
#panel-community.is-chat-focus .connection-state { display: flex; }
#panel-community.is-chat-focus #testimony-status { display: block; font-size: 12px; }
#panel-community.is-chat-focus #testimony-form .field { font-size: 12px; }
@media (max-width: 620px) {
  #panel-community.is-chat-focus { height: var(--chat-height, 100dvh); top: var(--chat-top, 0px); }
  .community-shortcut { font-size: 10px; }
  .tabs-wrap { padding-bottom: 5px; }
  .home-ai-form { grid-template-columns: 1fr; }
  .home-ai-form .btn { min-height: 44px; }
  .home-ai-message { max-width: 94%; }
}
@media (forced-colors: active) {
  .dot, .bar-fill { forced-color-adjust: none; background: Highlight; }
  .tab[aria-selected="true"] { color: HighlightText; background: Highlight; }
}

/* Adaptation de la maquette mobile : parcours quotidien, calme et immédiat. */
body {
  padding: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(58, 144, 220, .2), transparent 30rem),
    radial-gradient(circle at 90% 100%, rgba(91, 96, 255, .12), transparent 28rem),
    #06182a;
}
.app { width: min(100%, 520px); min-height: calc(100dvh - 40px); border-radius: 28px; background: linear-gradient(180deg, rgba(8, 34, 58, .96), rgba(4, 20, 35, .98)); backdrop-filter: none; }
.app-header { padding: 20px 20px 14px; border-bottom: 0; background: transparent; }
.logo { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.app-title { font-size: 18px; letter-spacing: .05em; }
.app-subtitle { font-size: 11px; }
.mode-pill { display: none; }
.content { padding: 6px 20px 112px; }
.profile-entry { align-items: flex-start; margin: 0 0 18px; padding: 0; border: 0; background: transparent; }
.home-welcome { min-width: 0; }
.home-welcome .eyebrow { margin-bottom: 8px; }
.home-welcome h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(27px, 7vw, 34px); line-height: 1.08; }
#profile-summary { margin: 7px 0 0; color: var(--accent); font-size: 13px; }
.profile-entry .home-question { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.profile-avatar-button { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; overflow: hidden; padding: 0; border: 1px solid rgba(161, 211, 255, .28); border-radius: 50%; color: #143958; background: linear-gradient(135deg, #d7f3ff, #7ebaf0); cursor: pointer; font-size: 18px; font-weight: 900; }
.profile-avatar-button img { width: 100%; height: 100%; object-fit: cover; }
#profile-save-reminder { width: 100%; margin-bottom: 14px; }
.home-daily-card { margin: 0 0 14px; padding: 20px; border-radius: 20px; box-shadow: 0 18px 45px rgba(0, 0, 0, .24); }
.daily-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.daily-card-meta .eyebrow { margin: 0; }
.daily-card-meta span { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.home-daily-card .verse-text { margin-top: 15px; font-size: 20px; font-weight: 700; line-height: 1.38; }
.daily-prayer-start { width: 100%; min-height: 50px; margin-top: 18px; font-size: 14px; }
.home-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.home-quick-action { display: flex; min-height: 52px; align-items: center; justify-content: center; gap: 8px; padding: 11px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: rgba(8, 31, 52, .72); cursor: pointer; font-size: 14px; }
.home-quick-action span { color: var(--accent); font-size: 18px; }
.home-journey { margin-bottom: 18px; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(15, 54, 86, .94), rgba(9, 36, 59, .91)); }
.home-journey > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
#home-journey-count { color: #76e3c1; font-size: 13px; font-weight: 800; }
.home-journey-steps { display: flex; gap: 7px; margin-top: 15px; }
.home-journey-steps span { width: 100%; height: 7px; border-radius: 99px; background: rgba(177, 216, 247, .17); }
.home-journey-steps span.is-done { background: linear-gradient(90deg, #6ce2c3, #65beff); }
.home-assistant { margin-bottom: 24px; padding: 20px; border-radius: 20px; box-shadow: 0 18px 45px rgba(0, 0, 0, .2); }
.home-assistant-title { font-size: 19px; }
.home-assistant-subtitle { font-size: 13px; line-height: 1.45; }
.home-ai-message { font-size: 15px; line-height: 1.5; }
.home-ai-suggestion { padding: 9px 12px; font-size: 13px; }
.home-avatar-create, .home-ai-listen, .home-ai-clear, .lesson-ai-listen { min-height: 36px; font-size: 12px; }
.home-menu { gap: 10px; margin-bottom: 26px; }
.home-destination { min-height: 56px; font-size: 13px; }
.section-title { font-size: 22px; }
.section-desc, .card-text { font-size: 14px; line-height: 1.5; }
.card { border-radius: 17px; }
.card-title { font-size: 16px; }
.field { font-size: 14px; }
.tabs-wrap { position: fixed; z-index: 80; left: 50%; right: auto; bottom: 20px; width: min(calc(100% - 40px), 520px); margin: 0; padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-radius: 0 0 28px 28px; background: rgba(4, 20, 35, .95); box-shadow: 0 14px 38px rgba(0, 0, 0, .38); backdrop-filter: blur(18px); transform: translateX(-50%); }
.app[data-screen="home"] .tabs-wrap { display: none; }
.app[data-screen="home"] .content { padding-bottom: 20px; }
.tabs { gap: 2px; overflow: visible; padding: 0; }
.tab { min-width: 0; min-height: 54px; flex: 1 1 25%; flex-direction: column; gap: 4px; padding: 7px 3px 6px; border-color: transparent; border-radius: 15px; background: transparent; font-size: 11px; line-height: 1; }
.tab-icon { display: block; }
.tab[aria-selected="true"] { border-color: rgba(130, 216, 255, .22); color: var(--text); background: rgba(73, 147, 224, .16); box-shadow: none; }
.tab[aria-selected="true"] .tab-icon { color: var(--accent); }
.app-footer { display: none; }

@media (max-width: 620px) {
  body { padding: 0; }
  .app { min-height: 100dvh; border-radius: 0; }
  .app-header { position: static; min-height: 68px; padding: max(18px, env(safe-area-inset-top)) 20px 10px; background: transparent; backdrop-filter: none; }
  .content { padding: 6px 20px calc(104px + env(safe-area-inset-bottom)); }
  .tabs-wrap { bottom: 0; width: 100%; padding-inline: 14px; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 22px 22px 0 0; }
  .home-ai-form { grid-template-columns: minmax(0, 1fr) auto; }
  .home-ai-form #home-ai-send { grid-column: 1 / -1; }
  .home-assistant-head { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
  .home-avatar-create { grid-column: 2; justify-self: start; margin: 0; }
  .home-ai-foot { flex-wrap: wrap; }
  .home-ai-foot .status { flex-basis: 100%; }
}

@media (max-width: 380px) {
  .content { padding-inline: 16px; }
  .home-daily-card { padding: 20px; }
  .home-daily-card .verse-text { font-size: 20px; }
  .home-quick-actions { gap: 8px; }
  .home-quick-action { font-size: 13px; }
  .home-journey > div:first-child { align-items: flex-start; flex-direction: column; gap: 4px; }
}
.app[data-screen]:not([data-screen="home"]) .profile-entry { display: none; }
.home-module-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; padding: 13px; border: 1px solid rgba(84, 173, 255, .18); border-radius: 18px; background: linear-gradient(145deg, rgba(4, 21, 45, .84), rgba(3, 33, 76, .7)); }
.home-module-button { display: grid; min-width: 0; min-height: 66px; place-items: center; gap: 5px; padding: 8px 4px; border: 1px solid rgba(116, 205, 255, .38); border-radius: 15px; color: #d9eafa; background: radial-gradient(circle at 50% 20%, rgba(97, 184, 255, .34), transparent 55%), linear-gradient(155deg, rgba(14, 63, 105, .94), rgba(3, 28, 65, .96)); box-shadow: inset 0 0 14px rgba(73, 165, 255, .12), 0 5px 14px rgba(0, 0, 0, .2); cursor: pointer; font-size: 12px; font-weight: 850; }
.home-module-button > span { color: #eaf8ff; font-size: 23px; line-height: 1; filter: drop-shadow(0 0 7px rgba(114, 210, 255, .78)); }
.home-module-button:hover, .home-module-button:focus-visible { border-color: #74d4ff; filter: brightness(1.1); }
.home-module-button[aria-pressed="true"] { border-color: #81dcff; color: #fff; background: radial-gradient(circle at 50% 20%, rgba(126, 211, 255, .5), transparent 58%), linear-gradient(145deg, rgba(28, 103, 164, .97), rgba(7, 44, 94, .98)); box-shadow: inset 0 0 18px rgba(107, 210, 255, .24), 0 0 15px rgba(69, 174, 255, .28); }
.home-companion { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; margin-bottom: 18px; padding: 17px; border: 1px solid rgba(130, 216, 255, .24); border-radius: 18px; background: linear-gradient(145deg, rgba(21, 68, 106, .74), rgba(8, 29, 51, .92)); box-shadow: 0 14px 35px rgba(0, 0, 0, .18); }
.home-companion-orb { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: #e8f8ff; background: radial-gradient(circle at 35% 30%, #edf9ff 0 10%, #83c9fb 25%, #245b91 63%, #102b50); box-shadow: 0 0 18px rgba(115, 200, 255, .28); }
.home-companion-copy { min-width: 0; }
.home-companion-presence { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-companion h2 { margin: 0; font-family: Georgia, serif; font-size: 18px; }
.home-companion-presence > span { display: inline-flex; align-items: center; gap: 5px; color: #76e3c1; font-size: 11px; font-weight: 800; white-space: nowrap; }
.home-companion-presence i { width: 7px; height: 7px; border-radius: 50%; background: #76e3c1; box-shadow: 0 0 9px rgba(118, 227, 193, .75); }
.home-companion p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.home-companion-thread { display: flex; grid-column: 1 / -1; min-height: 108px; max-height: min(220px, 27dvh); flex-direction: column; gap: 8px; overflow-y: auto; padding: 12px; border: 1px solid rgba(139, 211, 255, .18); border-radius: 14px; background: rgba(3, 17, 30, .56); scroll-behavior: smooth; }
.home-companion-bubble { max-width: 88%; margin: 0; padding: 9px 11px; border-radius: 13px 13px 13px 4px; color: #dcecf7; background: rgba(49, 96, 133, .45); font-size: 14px; line-height: 1.45; }
.home-companion-bubble.is-user { align-self: flex-end; border-radius: 13px 13px 4px 13px; color: #08283a; background: linear-gradient(135deg, #a7e5ff, #73baf3); }
.home-companion-form { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 44px 44px auto; gap: 7px; }
.home-companion-form input { min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(139, 211, 255, .34); border-radius: 13px; outline: none; color: var(--text); background: rgba(4, 20, 35, .72); font-size: 16px; }
.home-companion-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(100, 201, 255, .12); }
.home-companion-mic, .home-companion-speaker, .home-companion-send, .home-companion-cancel { display: grid; min-width: 44px; min-height: 44px; place-items: center; padding: 0; border: 1px solid rgba(122, 205, 255, .34); border-radius: 13px; color: #bdeaff; background: radial-gradient(circle at 32% 20%, rgba(142, 222, 255, .42), transparent 44%), linear-gradient(145deg, rgba(27, 92, 145, .9), rgba(6, 24, 43, .94)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -4px 8px rgba(0, 0, 0, .28), 0 6px 13px rgba(0, 0, 0, .22); cursor: pointer; }
.home-icon-svg { width: 21px; height: 21px; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.home-icon-body { fill: currentColor; }
.home-icon-shine { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1.2; stroke-linecap: round; }
.home-icon-line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.home-icon-wave { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transition: opacity .18s ease; }
.home-icon-mute { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; opacity: 0; transition: opacity .18s ease; }
.home-companion-speaker.is-muted { color: #ffc9cf; background: radial-gradient(circle at 32% 20%, rgba(255, 170, 180, .36), transparent 46%), linear-gradient(145deg, rgba(129, 33, 47, .86), rgba(30, 9, 17, .94)); border-color: rgba(255, 135, 145, .5); }
.home-companion-speaker.is-muted .home-icon-wave { opacity: 0; }
.home-companion-speaker.is-muted .home-icon-mute { opacity: 1; }
.home-companion-send { min-width: 76px; padding-inline: 13px; border: 0; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-strong)); font-size: 13px; font-weight: 900; }
.home-companion-cancel { min-width: 76px; padding-inline: 10px; color: #ffd4d8; border-color: rgba(255, 135, 145, .45); background: rgba(116, 27, 38, .7); font-size: 13px; font-weight: 800; }
.home-companion-mic.is-listening { border-color: #ff7c87; color: #fff; background: radial-gradient(circle at 32% 20%, rgba(255, 145, 157, .5), transparent 46%), linear-gradient(145deg, rgba(196, 50, 67, .96), rgba(93, 16, 31, .96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 4px rgba(255, 92, 108, .13); animation: mic-pulse 1.25s ease-in-out infinite; }
.home-companion-mic:disabled, .home-companion-send:disabled { cursor: wait; opacity: .55; }
#home-companion-message.is-thinking::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 7px; vertical-align: -2px; border: 2px solid rgba(137, 214, 255, .28); border-top-color: var(--accent); border-radius: 50%; animation: assistant-spin .8s linear infinite; }
@keyframes assistant-spin { to { transform: rotate(360deg); } }
.home-companion-open { grid-column: 1 / -1; justify-self: center; padding: 3px 6px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.home-next-step { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; margin: 0 0 18px; padding: 17px; border: 1px solid rgba(118, 227, 193, .22); border-radius: 18px; background: linear-gradient(145deg, rgba(18, 66, 78, .68), rgba(8, 34, 55, .92)); }
.home-next-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #102f39; background: linear-gradient(135deg, #a5f0d9, #63cbae); font-size: 18px; }
.home-next-copy { min-width: 0; }
.home-next-copy > span { color: #76e3c1; font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.home-next-copy h3 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 18px; }
.home-next-copy p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.home-next-action { grid-column: 1 / -1; width: 100%; min-height: 44px; border: 0; border-radius: 13px; color: #08283a; background: linear-gradient(135deg, #9de8d2, #72cbb2); cursor: pointer; font-size: 13px; font-weight: 900; }
.guided-drawer { margin-top: 14px; }
.guided-drawer > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 12px 15px; border: 1px solid var(--border); border-radius: 14px; color: var(--accent); background: rgba(8, 31, 52, .72); cursor: pointer; font-size: 14px; font-weight: 850; list-style: none; }
.guided-drawer > summary::-webkit-details-marker { display: none; }
.guided-drawer > summary::after { content: "+"; font-size: 20px; font-weight: 400; }
.guided-drawer[open] > summary::after { content: "−"; }
.guided-drawer .section-title { margin-top: 20px; }
.free-prayer-dialog { width: min(calc(100% - 28px), 520px); max-height: min(780px, calc(100dvh - 28px)); overflow: hidden; border-radius: 25px; }
.free-prayer-shell { display: flex; max-height: inherit; flex-direction: column; padding: 18px; }
.free-prayer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; color: var(--muted); font-size: 13px; }
.free-prayer-dialog .home-assistant { margin: 0; overflow-y: auto; border: 0; background: transparent; box-shadow: none; }
.free-prayer-dialog .home-ai-messages { max-height: min(310px, 34dvh); }
.home-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.path-quiz-card, .profile-action { display: grid; width: 100%; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 14px; padding: 15px; border: 1px solid var(--border); border-radius: 17px; color: var(--text); background: rgba(10, 38, 62, .72); cursor: pointer; text-align: left; }
.path-quiz-card > span:first-child, .profile-action > span:first-child { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--accent); background: rgba(96, 188, 255, .12); font-size: 19px; }
.path-quiz-card strong, .profile-action strong { display: block; font-size: 15px; }
.path-quiz-card small, .profile-action small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.path-quiz-card > span:last-child, .profile-action > span:last-child { color: var(--muted); font-size: 20px; }
.path-back { margin-bottom: 18px; }
.back-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: rgba(11, 43, 70, .72); cursor: pointer; font-size: 14px; }
.profile-panel-card { display: flex; align-items: center; gap: 15px; margin-top: 18px; padding: 19px; border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(145deg, rgba(15, 54, 86, .94), rgba(9, 36, 59, .91)); }
.profile-panel-avatar { display: grid; width: 66px; height: 66px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; color: #143958; background: linear-gradient(135deg, #d7f3ff, #7ebaf0); font-size: 25px; font-weight: 900; }
.profile-panel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-panel-card h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; }
.profile-panel-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 14px 0 20px; }
.profile-stats div { padding: 14px 7px; text-align: center; border: 1px solid var(--border); border-radius: 15px; background: rgba(10, 38, 62, .7); }
.profile-stats strong { display: block; color: #a2e0ff; font-size: 22px; }
.profile-stats span { color: var(--muted); font-size: 12px; }
.profile-actions { display: grid; gap: 10px; }
.profile-action { margin-top: 0; }
.profile-privacy { margin: 16px 0 0; padding: 12px; border-left: 3px solid var(--accent); color: var(--muted); background: rgba(73, 147, 224, .1); font-size: 13px; line-height: 1.5; }
.prayer-flow-dialog { width: min(calc(100% - 28px), 520px); height: min(760px, calc(100dvh - 28px)); max-height: none; overflow: hidden; border-radius: 25px; }
.prayer-flow-shell { display: flex; height: 100%; flex-direction: column; padding: 20px; background: radial-gradient(circle at 50% 42%, rgba(67, 139, 205, .2), transparent 18rem); }
.prayer-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--accent); font-size: 13px; font-weight: 800; }
.prayer-flow-content { display: grid; flex: 1; place-content: center; text-align: center; }
.prayer-flow-content .eyebrow { text-align: center; }
.prayer-flow-content h2 { max-width: 360px; margin: 0 auto 18px; font-size: 34px; }
.prayer-flow-content > p:not(.eyebrow):not(.status) { max-width: 360px; margin: 0 auto; color: #d3e6f4; font-family: Georgia, serif; font-size: 20px; line-height: 1.65; white-space: pre-line; }
.prayer-flow-listen { justify-self: center; min-height: 42px; margin-top: 22px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 999px; color: var(--accent); background: rgba(9, 31, 55, .7); cursor: pointer; font-size: 13px; }
.prayer-flow-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) {
  .home-module-nav { position: sticky; z-index: 8; top: 0; padding: 5px 0 8px; background: linear-gradient(180deg, #071d31 75%, transparent); }
  .home-module-button { min-height: 62px; font-size: 11px; }
  .home-companion { margin-bottom: 0; }
  .home-companion-thread { min-height: 108px; max-height: 27dvh; }
  .free-prayer-dialog { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .free-prayer-shell { height: 100%; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
  .free-prayer-dialog .home-assistant { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 12px 6px 4px; }
  .free-prayer-dialog .home-ai-messages { min-height: 150px; max-height: none; flex: 1; }
  .profile-stats span { font-size: 11px; }
  .prayer-flow-dialog { width: 100%; height: 100dvh; border-radius: 0; }
  .prayer-flow-shell { padding: max(16px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); }
}
.app[data-screen="quiz"] .tabs-wrap { display: none; }
.quiz-feedback-dialog { width: min(calc(100% - 32px), 480px); max-height: min(58dvh, 430px); margin: auto; overflow: hidden; border: 1px solid rgba(121, 207, 255, .48); border-radius: 22px; color: var(--text); background: linear-gradient(155deg, #0d3556, #061b31); box-shadow: 0 26px 80px rgba(0, 0, 0, .62), 0 0 32px rgba(63, 163, 236, .16); }
.quiz-feedback-dialog::backdrop { background: rgba(1, 9, 18, .76); backdrop-filter: blur(6px); }
.quiz-feedback-shell { display: grid; gap: 13px; padding: 24px; text-align: center; }
.quiz-feedback-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto; border: 1px solid rgba(255, 139, 149, .46); border-radius: 50%; color: #ffd4d8; background: rgba(120, 28, 41, .52); font-size: 24px; }
.quiz-feedback-dialog.is-reset .quiz-feedback-icon { border-color: rgba(117, 207, 255, .5); color: #dff7ff; background: rgba(42, 105, 156, .5); }
.quiz-feedback-shell h3 { margin: 0; font-family: Georgia, serif; font-size: 25px; }
.quiz-correct-answer { margin: 0; padding: 12px; border: 1px solid rgba(112, 205, 255, .28); border-radius: 13px; color: #dff5ff; background: rgba(43, 111, 161, .18); font-size: 16px; font-weight: 850; }
.quiz-feedback-explanation { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.quiz-feedback-dialog .btn { width: 100%; }
.answer-option.is-correct { border-color: #7ce0bd; background: rgba(58, 166, 130, .2); }
.answer-option.is-wrong { border-color: #ff8290; background: rgba(166, 48, 63, .2); }
.quiz-flying-star { position: fixed; z-index: 1000; width: 34px; height: 34px; pointer-events: none; color: #fff0a8; font-size: 32px; line-height: 1; filter: drop-shadow(0 0 10px #69c9ff) drop-shadow(0 0 18px #fff); transition: transform .72s cubic-bezier(.2, .82, .25, 1), opacity .72s ease; will-change: transform, opacity; }
.reward-star.is-arriving { animation: star-arrival .55s ease; }
@keyframes star-arrival { 45% { color: #fff5ba; filter: drop-shadow(0 0 15px #79d6ff); transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .quiz-flying-star { transition-duration: .01ms; } .reward-star.is-arriving { animation: none; } }
@media (max-width: 620px) {
  .quiz-feedback-dialog { width: calc(100% - 24px); height: auto; max-height: 68dvh; border: 1px solid rgba(121, 207, 255, .48); border-radius: 22px; }
  .quiz-feedback-shell { min-height: 0; padding: 22px 18px; }
}
