:root {
  color-scheme: light;
  --brand: #033425;
  --brand-deep: #02291e;
  --brand-action: #0b5b43;
  --brand-soft: #e8f1ed;
  --ink: #163027;
  --muted: #526f65;
  --surface: #ffffff;
  --canvas: #f7f5ef;
  --line: #d7e3de;
  --line-strong: #b9ccc4;
  --warning: #7a5a00;
  --warning-soft: #fff9e7;
  --danger: #a43b36;
  --shadow: 0 22px 70px rgba(3, 52, 37, 0.11);
  --soft-shadow: 0 12px 35px rgba(3, 52, 37, 0.07);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(11, 91, 67, 0.08), transparent 28rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--canvas) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[data-view]:focus-visible,
.flow-step h2:focus-visible,
.onboarding-step h1:focus-visible,
.onboarding-step h2:focus-visible {
  outline: 3px solid rgba(11, 91, 67, 0.35);
  outline-offset: 3px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  border-radius: 10px;
  background: white;
  color: var(--brand);
  font-weight: 750;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-frame {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(185, 204, 196, 0.7);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--brand);
}

.brand-button {
  width: 188px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.brand-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.local-pill,
.status-chip,
.confidence,
.mode-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.04em;
}

.local-pill {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
}

.local-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8ce5bc;
  box-shadow: 0 0 0 4px rgba(140, 229, 188, 0.12);
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.icon-button svg {
  width: 22px;
}

main {
  padding: 28px 28px 112px;
}

.view {
  display: none;
  animation: view-in 180ms ease-out;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 470px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 20px;
  padding: 46px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 255, 255, 0.1), transparent 25%),
    linear-gradient(145deg, var(--brand) 0%, #064a38 100%);
  color: white;
}

.hero-card::before {
  position: absolute;
  top: -170px;
  right: -140px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-action);
  font-size: 0.74rem;
  font-weight: 830;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-card .eyebrow {
  color: #abd5c6;
}

.hero-card h1,
.page-head h1,
.onboarding-step h1,
.onboarding-step h2,
.flow-step h2,
.locked-panel h2 {
  text-wrap: balance;
}

.hero-card h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-lead {
  max-width: 600px;
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.65;
}

.next-prayer {
  display: flex;
  max-width: 520px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.next-prayer > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field-label,
.next-prayer span,
.prayer-time span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
}

.next-prayer strong {
  font-size: 1.35rem;
}

.prayer-time {
  text-align: right;
}

.prayer-time strong {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.primary-button,
.secondary-button,
.light-button,
.danger-button,
.stop-button {
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 15px;
  font-weight: 780;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.light-button:hover,
.danger-button:hover,
.stop-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  border: 1px solid var(--brand-action);
  background: var(--brand-action);
  color: white;
  box-shadow: 0 10px 24px rgba(11, 91, 67, 0.17);
}

.hero-button {
  display: inline-flex;
  min-width: 220px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  border-color: white;
  background: white;
  color: var(--brand);
  box-shadow: none;
}

.button-symbol {
  font-size: 1.35rem;
}

.source-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.77rem;
}

.source-note svg {
  width: 16px;
}

.privacy-orbit {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  align-self: center;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}

.orbit-one {
  width: 300px;
  height: 300px;
}

.orbit-two {
  width: 220px;
  height: 220px;
}

.privacy-core {
  position: relative;
  z-index: 1;
  display: flex;
  width: 162px;
  height: 162px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 45px rgba(255, 255, 255, 0.04);
}

.privacy-core svg {
  width: 35px;
  margin-bottom: 5px;
}

.privacy-core span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.principle-card {
  position: relative;
  display: flex;
  min-height: 470px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #fff 0%, #f3f7f5 100%);
}

.principle-number {
  position: absolute;
  top: 24px;
  right: 28px;
  color: rgba(3, 52, 37, 0.12);
  font-size: 4.8rem;
  font-weight: 820;
  letter-spacing: -0.08em;
}

.principle-card h2 {
  max-width: 330px;
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 2.6vw, 2.45rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.principle-card > p:not(.eyebrow, .quiet-quote) {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.principle-line {
  height: 1px;
  margin: 24px 0;
  background: var(--line);
}

.quiet-quote {
  margin: 0;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 730;
  line-height: 1.55;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 50px 4px 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.status-chip {
  border: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--brand-action);
}

.status-chip.warning {
  border-color: #eadca6;
  background: var(--warning-soft);
  color: var(--warning);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  display: grid;
  min-height: 150px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  text-align: left;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.feature-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.feature-card strong {
  font-size: 1.05rem;
}

.feature-card small {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.feature-icon,
.settings-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-action);
}

.feature-icon svg,
.settings-icon svg {
  width: 24px;
}

.card-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand-action);
  font-size: 1.15rem;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.trust-strip > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-action);
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: max(26px, calc((100vw - 1120px) / 2));
  bottom: 28px;
  left: max(26px, calc((100vw - 1120px) / 2));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(185, 204, 196, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 15px 45px rgba(3, 52, 37, 0.13);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  cursor: pointer;
}

.nav-item svg {
  width: 20px;
}

.nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.page-head {
  max-width: 760px;
  margin: 6px 0 34px;
}

.page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1;
}

.page-head > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.back-button,
.flow-back,
.text-button,
.danger-link,
.onboarding-skip {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-action);
  font-weight: 760;
  cursor: pointer;
}

.back-button {
  margin-bottom: 28px;
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid #eadca6;
  border-radius: 18px;
  background: var(--warning-soft);
}

.demo-banner > span {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--warning);
  color: white;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.demo-banner p,
.empty-note p,
.privacy-proof p,
.completion-mark + .eyebrow + h2 + p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.report-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--soft-shadow);
}

.report-card > header,
.report-flow-head,
.passage-card,
.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.report-card h2,
.settings-card h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.confidence {
  white-space: nowrap;
}

.confidence.certain {
  background: var(--brand-soft);
  color: var(--brand-action);
}

.confidence.probable {
  background: var(--warning-soft);
  color: var(--warning);
}

.confidence.insufficient {
  background: #f3f3f0;
  color: #5f6864;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.report-summary > div {
  display: flex;
  min-height: 96px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 16px;
  border-radius: 15px;
  background: var(--canvas);
}

.report-summary strong {
  font-size: 1.25rem;
}

.report-summary span {
  color: var(--muted);
  font-size: 0.75rem;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--brand);
}

.empty-note {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 18px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

.empty-note svg {
  width: 24px;
  flex: 0 0 auto;
  color: var(--muted);
}

.locked-panel {
  padding: clamp(30px, 7vw, 68px);
  border-radius: var(--radius-xl);
  background: var(--brand);
  color: white;
  text-align: center;
}

.lock-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.lock-mark svg {
  width: 30px;
}

.locked-panel .eyebrow {
  color: #abd5c6;
}

.locked-panel h2 {
  max-width: 700px;
  margin: 0 auto 16px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 650;
  letter-spacing: -0.05em;
}

.locked-panel > p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.library-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
}

.library-card > span {
  color: var(--line-strong);
  font-size: 2rem;
  font-weight: 800;
}

.library-card h3 {
  margin: 30px 0 7px;
}

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

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.settings-card,
.source-registry {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--soft-shadow);
}

.settings-card-head {
  justify-content: flex-start;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  line-height: 1.45;
}

.check-list li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-action);
  content: "✓";
  font-size: 0.68rem;
  font-weight: 900;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-button {
  border: 1px solid rgba(164, 59, 54, 0.24);
  background: #fff5f4;
  color: var(--danger);
}

.inline-status {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--brand-action);
  font-size: 0.82rem;
}

.prototype-notice {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid #eadcae;
  border-radius: 14px;
  background: var(--warning-soft);
  color: #66521d;
  font-size: 0.82rem;
  line-height: 1.5;
}

.choice-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.choice-list label,
.mini-choice-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.choice-list input,
.mini-choice-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-action);
}

.choice-list label > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.choice-list label:has(input:disabled),
.mini-choice-list label:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.choice-list small {
  color: var(--muted);
}

.source-registry {
  margin-top: 18px;
}

.registry-heading {
  margin-top: 0;
}

.registry-intro {
  margin: -4px 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.source-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.source-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: 1fr 1.15fr 0.9fr;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.source-row:first-child {
  border-top: 0;
}

.source-row > span:first-child {
  color: var(--muted);
}

.source-header {
  min-height: 46px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.registry-state {
  justify-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning) !important;
  font-size: 0.72rem;
  font-weight: 760;
}

.registry-state.blocked {
  background: #fff1f0;
  color: var(--danger) !important;
}

dialog {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(2, 24, 17, 0.72);
  backdrop-filter: blur(10px);
}

.flow-dialog {
  width: min(680px, calc(100% - 28px));
}

.dialog-shell {
  max-height: min(880px, calc(100vh - 28px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(2, 24, 17, 0.35);
  overscroll-behavior: contain;
}

.dialog-topline {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.step-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.dialog-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--canvas);
  color: var(--brand);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.flow-step {
  display: none;
  padding: 32px;
}

.flow-step.is-active {
  display: block;
  animation: view-in 180ms ease-out;
}

.flow-step h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.dialog-intro,
.flow-step > p:not(.eyebrow, .timer, .listening-note, .report-disclaimer) {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.prayer-options {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.prayer-options button {
  display: grid;
  min-height: 70px;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.prayer-options button:hover {
  border-color: var(--brand-action);
  background: var(--brand-soft);
}

.prayer-options strong {
  font-size: 1.02rem;
}

.prayer-options span {
  color: var(--muted);
  font-size: 0.82rem;
}

.prayer-options b {
  color: var(--brand-action);
  font-size: 1.2rem;
}

.flow-back {
  display: block;
  margin-bottom: 22px;
}

.mode-badge {
  margin-bottom: 16px;
  background: var(--brand-soft);
  color: var(--brand-action);
}

.mode-badge.demo {
  background: var(--warning-soft);
  color: var(--warning);
}

.privacy-proof {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--canvas);
}

.privacy-proof.compact {
  margin: 18px 0;
}

.jumua-khutba-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: -8px 0 20px;
  padding: 16px 17px;
  border: 1px solid #d8c887;
  border-radius: 16px;
  background: var(--warning-soft);
  color: #514213;
  cursor: pointer;
}

.jumua-khutba-confirmation[hidden] {
  display: none;
}

.jumua-khutba-confirmation input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--warning);
}

.jumua-khutba-confirmation span {
  display: grid;
  gap: 4px;
}

.jumua-khutba-confirmation small {
  color: #675626;
  line-height: 1.45;
}

.proof-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-action);
  color: white;
  font-weight: 900;
}

.proof-icon.muted {
  background: var(--brand-soft);
  color: var(--brand-action);
}

.proof-icon svg {
  width: 20px;
}

.full-width {
  width: 100%;
}

.text-button {
  width: 100%;
  margin-top: 8px;
}

.listening-live {
  min-height: 610px;
  background: var(--brand-deep);
  color: white;
  text-align: center;
}

.listening-live .eyebrow {
  color: #abd5c6;
}

.listening-visual {
  position: relative;
  display: grid;
  width: 210px;
  height: 210px;
  margin: 22px auto 28px;
  place-items: center;
}

.still-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.still-ring::after {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.mic-off-icon {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.mic-off-icon svg {
  width: 34px;
}

.timer {
  margin: 14px 0;
  font-size: 2.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  letter-spacing: 0.03em;
}

.listening-note {
  max-width: 430px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
}

.stop-button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: white;
  color: var(--brand-deep);
}

.completion-mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 6px 0 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-action);
  color: white;
  font-size: 1.7rem;
  font-weight: 900;
}

.report-flow-head {
  align-items: flex-start;
}

.report-disclaimer {
  margin: 18px 0 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.82rem;
  line-height: 1.5;
}

.passage-list {
  display: grid;
  gap: 10px;
}

.passage-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.passage-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
}

.passage-order {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 0.76rem;
  font-weight: 840;
}

.passage-card .eyebrow {
  margin-bottom: 3px;
  font-size: 0.6rem;
}

.passage-card h3 {
  margin: 0;
  font-size: 1rem;
}

.passage-card.uncertain {
  background: #f7f7f4;
}

.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.danger-link {
  color: var(--danger);
}

.onboarding-dialog {
  width: min(580px, calc(100% - 28px));
}

.onboarding-shell {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  border-radius: 30px;
  background: white;
  box-shadow: 0 30px 100px rgba(2, 24, 17, 0.35);
}

.onboarding-step {
  display: none;
  padding: clamp(28px, 6vw, 48px);
}

.onboarding-step.is-active {
  display: block;
  animation: view-in 180ms ease-out;
}

.onboarding-step:first-child {
  padding-top: 0;
  overflow: hidden;
  border-radius: 30px;
  background: var(--brand);
  color: white;
}

.onboarding-brand {
  margin: 0 clamp(-48px, -6vw, -28px) 38px;
  padding: 22px 42px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.onboarding-brand img {
  display: block;
  width: min(260px, 72%);
  margin: auto;
}

.welcome-kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: #abd5c6;
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.onboarding-step h1,
.onboarding-step h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.onboarding-step > p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.65;
}

.onboarding-step:first-child > p {
  color: rgba(255, 255, 255, 0.72);
}

.onboarding-points {
  display: grid;
  gap: 2px;
  margin: 28px 0;
}

.onboarding-points > div {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.onboarding-points > div:first-child {
  border-top: 0;
}

.onboarding-points > div > span {
  color: #abd5c6;
  font-size: 0.72rem;
  font-weight: 820;
}

.onboarding-points p {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
}

.onboarding-points strong {
  color: white;
  font-size: 0.95rem;
}

.light-button {
  border: 1px solid white;
  background: white;
  color: var(--brand);
}

.onboarding-skip {
  width: 100%;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 34px;
}

.onboarding-progress span {
  height: 4px;
  border-radius: 99px;
  background: var(--line);
}

.onboarding-progress .is-current,
.onboarding-progress .is-current ~ span:first-of-type {
  background: var(--brand-action);
}

.promise-list {
  display: grid;
  gap: 12px;
  margin: 26px 0 30px;
}

.promise-list > div {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--canvas);
}

.promise-list > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fff1f0;
  color: var(--danger);
  font-weight: 900;
}

.promise-list p {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.promise-list strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field > span,
.mini-choice-list legend {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 780;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: white;
  color: var(--ink);
}

.mini-choice-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0 26px;
  padding: 0;
  border: 0;
}

.mini-choice-list legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.mini-choice-list label {
  justify-content: center;
  padding: 12px 8px;
  font-size: 0.73rem;
  font-weight: 690;
}

.final-step {
  text-align: center;
}

.final-step .completion-mark {
  margin-right: auto;
  margin-left: auto;
}

.toast {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  max-width: min(380px, calc(100% - 36px));
  padding: 14px 18px;
  transform: translateY(140%);
  border-radius: 14px;
  background: var(--brand);
  color: white;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 900px) {
  .app-frame {
    width: min(100% - 18px, 720px);
    margin: 9px auto;
    border-radius: 24px;
  }

  .home-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .privacy-orbit {
    position: absolute;
    right: -95px;
    bottom: -95px;
    width: 300px;
    opacity: 0.42;
  }

  .hero-copy {
    max-width: 80%;
  }

  .principle-card {
    min-height: 330px;
  }

  .bottom-nav {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-xl: 24px;
    --radius-lg: 19px;
  }

  body {
    background: var(--canvas);
  }

  .app-frame {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    min-height: 72px;
    padding: 10px 16px;
  }

  .brand-button {
    width: 142px;
    height: 47px;
  }

  .local-pill {
    display: none;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  main {
    padding: 16px 14px 106px;
  }

  .hero-card {
    min-height: 560px;
    padding: 28px 22px;
  }

  .hero-copy {
    max-width: 100%;
    align-self: flex-start;
  }

  .hero-card h1 {
    max-width: 330px;
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  .hero-lead {
    max-width: 360px;
    font-size: 0.96rem;
  }

  .next-prayer {
    padding: 14px;
  }

  .privacy-orbit {
    right: -85px;
    bottom: -100px;
    opacity: 0.5;
  }

  .hero-button {
    width: 100%;
  }

  .principle-card {
    min-height: 360px;
    padding: 26px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 38px;
  }

  .action-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 124px;
    padding: 20px;
  }

  .feature-icon {
    width: 46px;
    height: 46px;
  }

  .card-arrow {
    display: none;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 1px;
    padding: 5px;
    border-radius: 18px;
  }

  .nav-item {
    min-height: 60px;
    flex-direction: column;
    gap: 4px;
    font-size: 0.61rem;
  }

  .nav-item svg {
    width: 19px;
  }

  .page-head {
    margin-top: 10px;
  }

  .page-head h1 {
    font-size: 2.75rem;
  }

  .report-summary {
    grid-template-columns: 1fr;
  }

  .report-summary > div {
    min-height: 74px;
  }

  .source-registry,
  .settings-card,
  .report-card {
    padding: 20px;
  }

  .source-table {
    border: 0;
  }

  .source-header {
    display: none;
  }

  .source-row {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .registry-state {
    margin-top: 5px;
  }

  .flow-step {
    padding: 24px 20px 28px;
  }

  .dialog-topline {
    padding-left: 20px;
  }

  .prayer-options button {
    grid-template-columns: 80px 1fr auto;
    gap: 8px;
  }

  .report-flow-head,
  .passage-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .passage-card > div:first-child {
    width: 100%;
  }

  .mini-choice-list {
    grid-template-columns: 1fr;
  }

  .onboarding-dialog {
    width: calc(100% - 18px);
  }

  .onboarding-shell {
    border-radius: 24px;
  }

  .onboarding-step:first-child {
    border-radius: 24px;
  }

  .onboarding-brand {
    margin-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tableau de bord produit — enrichissement dossier Faheem */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[data-view]:focus-visible,
.flow-step h2:focus-visible,
.onboarding-step h1:focus-visible,
.onboarding-step h2:focus-visible {
  outline-color: var(--brand-action);
}

.topbar-context {
  display: flex;
  margin-left: auto;
  flex-direction: column;
  color: white;
  text-align: right;
}

.topbar-context span {
  font-size: 0.82rem;
  font-weight: 760;
}

.topbar-context small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.66rem;
}

.daily-context {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 22px;
}

.daily-context h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  font-weight: 630;
  letter-spacing: -0.055em;
  line-height: 1;
}

.context-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.context-badges span {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 0.72rem;
}

.daily-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(350px, 0.72fr);
  gap: 18px;
}

.next-card,
.today-card,
.service-card,
.journey-grid article,
.recent-report-card,
.learning-card,
.schedule-panel,
.mosque-detail-card,
.special-prayer-stack article,
.history-summary,
.report-list-card,
.library-status,
.learning-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--soft-shadow);
}

.next-card {
  position: relative;
  min-height: 354px;
  overflow: hidden;
  padding: 38px;
  background:
    radial-gradient(circle at 84% 26%, rgba(255, 255, 255, 0.14), transparent 13rem),
    linear-gradient(145deg, var(--brand) 0%, #07533f 100%);
  color: white;
}

.next-card::after {
  position: absolute;
  right: -80px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.next-card-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.next-card-kicker,
.next-main,
.hero-actions,
.compact-card-head,
.service-card,
.recent-report-card,
.report-main,
.history-tools,
.date-switcher,
.schedule-list button {
  display: flex;
  align-items: center;
}

.next-card-kicker,
.next-main,
.compact-card-head,
.history-tools {
  justify-content: space-between;
  gap: 18px;
}

.next-card-kicker > span:first-child {
  color: #b9dfd0;
  font-size: 0.73rem;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.privacy-mini {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.68rem;
  font-weight: 720;
}

.next-main {
  margin: 30px 0 26px;
}

.next-main h2 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.7rem);
  font-weight: 580;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.next-main p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.66);
}

.next-main time {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  letter-spacing: -0.05em;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions .light-button,
.ghost-light-button {
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 15px;
  font-weight: 780;
  cursor: pointer;
}

.hero-actions .light-button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.ghost-light-button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.source-note-light {
  color: rgba(255, 255, 255, 0.56);
}

.calm-mark {
  position: absolute;
  z-index: 1;
  right: 38px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.09);
  text-align: center;
}

.calm-mark span {
  font-size: 6rem;
  font-weight: 500;
}

.calm-mark small {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.today-card {
  padding: 24px;
}

.compact-card-head h2,
.service-copy h2,
.journey-grid h3,
.recent-section h2,
.schedule-panel h2,
.mosque-detail-card h2,
.special-prayer-stack h3,
.learning-grid h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.compact-card-head .text-button {
  width: auto;
  margin: 0;
  font-size: 0.75rem;
}

.prayer-strip {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.prayer-strip button {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: 1fr 64px 76px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.prayer-strip button:hover,
.prayer-strip .is-next button {
  border-color: var(--line);
  background: var(--brand-soft);
}

.prayer-strip span {
  display: flex;
  flex-direction: column;
}

.prayer-strip small,
.prayer-strip em {
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
}

.prayer-strip time {
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.prayer-strip em {
  justify-self: end;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--canvas);
  font-weight: 720;
}

.home-service-grid,
.recent-grid,
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.service-card {
  position: relative;
  min-height: 158px;
  gap: 17px;
  padding: 24px;
}

.service-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 1.35rem;
  font-weight: 780;
}

.service-copy {
  min-width: 0;
}

.service-copy p:not(.eyebrow) {
  margin: 9px 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.service-copy > small {
  color: #789087;
  font-size: 0.67rem;
}

.round-arrow {
  display: grid;
  width: 40px;
  height: 40px;
  margin-left: auto;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--brand-action);
  cursor: pointer;
}

.journey-section {
  margin-top: 46px;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.journey-grid article {
  position: relative;
  min-height: 215px;
  overflow: hidden;
  padding: 24px;
}

.journey-grid article > span {
  position: absolute;
  right: 16px;
  top: 10px;
  color: var(--brand-soft);
  font-size: 4.6rem;
  font-weight: 800;
}

.journey-grid h3 {
  position: relative;
  font-size: 1.45rem;
}

.journey-grid article > p:last-child {
  position: relative;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.recent-section {
  margin-top: 44px;
}

.recent-report-card,
.learning-card {
  width: 100%;
  min-height: 150px;
  padding: 24px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.recent-report-card {
  justify-content: space-between;
  gap: 18px;
}

.recent-report-card > span:nth-child(2),
.learning-card {
  display: flex;
  flex-direction: column;
}

.recent-date {
  min-width: 62px;
  color: var(--muted);
  font-size: 0.73rem;
}

.recent-date b {
  color: var(--ink);
  font-size: 1rem;
}

.recent-report-card small,
.learning-card > span {
  color: var(--brand-action);
  font-size: 0.65rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.recent-report-card strong,
.learning-card strong {
  margin-top: 7px;
  font-size: 1.05rem;
}

.recent-report-card em,
.learning-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.learning-card {
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--brand);
  color: white;
}

.learning-card small {
  color: rgba(255, 255, 255, 0.62);
}

.principle-card-compact {
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 28px;
}

.principle-card-compact .principle-number {
  position: static;
  font-size: 3.8rem;
}

.principle-card-compact h2 {
  margin: 0;
  font-size: 1.65rem;
}

.principle-card-compact p:last-child {
  margin: 8px 0 0;
  font-size: 0.8rem;
}

.bottom-nav {
  grid-template-columns: repeat(5, 1fr);
}

.nav-item {
  flex-direction: column;
  gap: 3px;
}

.nav-item > span {
  font-size: 1.08rem;
  font-weight: 760;
}

.nav-item small {
  font-size: 0.68rem;
  font-weight: 730;
}

.schedule-head {
  margin-bottom: 18px;
}

.date-switcher {
  width: fit-content;
  gap: 14px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.date-switcher button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: var(--canvas);
  cursor: pointer;
}

.date-switcher strong {
  min-width: 150px;
  text-align: center;
}

.schedule-panel,
.mosque-detail-card {
  padding: 28px;
}

.schedule-panel .section-heading {
  margin-top: 0;
}

.schedule-list {
  display: grid;
  gap: 8px;
}

.schedule-list button {
  width: 100%;
  min-height: 76px;
  grid-template-columns: 48px 1fr 100px 100px;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.schedule-list button:hover,
.schedule-list button.is-next {
  border-color: var(--brand-action);
  background: var(--brand-soft);
}

.prayer-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 820;
}

.schedule-list button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.schedule-list small,
.schedule-list em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
}

.schedule-list time {
  font-size: 1.18rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.schedule-list em {
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--canvas);
  font-weight: 720;
}

.mosque-address,
.update-line {
  color: var(--muted);
}

.iqama-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 22px 0;
}

.iqama-grid div {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 13px;
  background: var(--canvas);
}

.iqama-grid small {
  color: var(--muted);
  font-size: 0.65rem;
}

.update-line {
  font-size: 0.7rem;
}

.special-prayer-stack {
  display: grid;
  gap: 14px;
}

.special-prayer-stack article {
  position: relative;
  min-height: 160px;
  padding: 24px;
}

.special-prayer-stack article > span,
.special-prayer-stack em {
  color: var(--brand-action);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 790;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.special-prayer-stack h3 {
  margin-top: 9px;
  font-size: 1.35rem;
}

.special-prayer-stack p {
  max-width: 440px;
  margin: 9px 0 18px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
}

.history-summary div {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
}

.history-summary div:first-child {
  border-left: 0;
}

.history-summary strong {
  font-size: 1.5rem;
}

.history-summary span {
  color: var(--muted);
  font-size: 0.72rem;
}

.history-tools {
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-field {
  flex: 1 1 280px;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chips button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 730;
  cursor: pointer;
}

.filter-chips button.is-active {
  border-color: var(--brand-action);
  background: var(--brand-soft);
  color: var(--brand);
}

.report-timeline {
  display: grid;
  gap: 10px;
}

.report-timeline > h2 {
  margin: 20px 0 2px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-list-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.report-main {
  min-width: 0;
  flex: 1;
  gap: 18px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.report-time {
  min-width: 54px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 740;
}

.report-main > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.report-main small,
.report-main em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
}

.favorite-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 13px;
  background: var(--canvas);
  color: #9aa7a2;
  font-size: 1.1rem;
  cursor: pointer;
}

.favorite-button.is-favorite {
  color: #a77400;
}

.empty-search {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.library-status {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
}

.library-status > span {
  color: var(--brand-action);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.library-status div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.library-status b {
  font-size: 0.78rem;
}

.library-status em {
  color: var(--warning);
  font-size: 0.68rem;
  font-style: normal;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.learning-grid article {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  padding: 24px;
}

.learning-number {
  position: absolute;
  right: 12px;
  top: 4px;
  color: var(--brand-soft);
  font-size: 5.2rem;
  font-weight: 820;
}

.learning-grid h2,
.learning-grid article > p:not(.eyebrow) {
  position: relative;
}

.learning-grid h2 {
  max-width: 240px;
  font-size: 1.45rem;
}

.learning-grid article > p:not(.eyebrow) {
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.learning-grid article > button {
  position: absolute;
  bottom: 20px;
  left: 24px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--brand-action);
  font-size: 0.72rem;
  font-weight: 760;
  cursor: pointer;
}

.learning-lock-card {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: var(--brand) !important;
  color: white;
}

.learning-lock-card > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.learning-lock-card .eyebrow,
.learning-lock-card p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.64) !important;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.settings-card-wide,
.settings-save {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.time-fields {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.time-fields legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 780;
}

.time-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
}

.time-fields input {
  width: 100%;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
}

.settings-save {
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.source-table {
  display: table;
  width: 100%;
  overflow: visible;
  border: 0;
  border-collapse: collapse;
  border-radius: 0;
}

.source-table th,
.source-table td {
  padding: 15px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.source-table thead th {
  border-top: 0;
  background: var(--canvas);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-table tbody th {
  font-size: 0.82rem;
}

.source-table td:first-child {
  color: var(--muted);
}

.registry-state.approved {
  background: var(--brand-soft);
  color: var(--brand-action) !important;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.light-text {
  color: rgba(255, 255, 255, 0.72);
}

.countdown-ring {
  display: flex;
  width: 190px;
  height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  margin: 10px auto 28px;
  border: 8px solid var(--brand-soft);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
}

.countdown-ring strong {
  color: var(--brand);
  font-size: 4rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.08em;
}

.countdown-ring span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.processing-mark {
  margin: 40px 0 28px;
  color: var(--brand-action);
  font-size: 3rem;
  letter-spacing: 0.3em;
}

.report-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.report-meta div {
  display: flex;
  min-height: 68px;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 13px;
  background: var(--canvas);
}

.report-meta small {
  color: var(--muted);
  font-size: 0.65rem;
}

.confidence.reference {
  background: #edf3f8;
  color: #365b75;
}

.alternative-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.alternative-choices button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--muted);
  font-size: 0.65rem;
  cursor: pointer;
}

.alternative-choices button.is-selected {
  border-color: var(--brand-action);
  background: var(--brand-soft);
  color: var(--brand);
}

.locked-content-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.locked-content-row div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
}

.locked-content-row span {
  color: var(--muted);
  font-size: 0.68rem;
}

.report-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.learning-dialog {
  width: min(560px, calc(100% - 28px));
}

.learning-dialog-shell {
  position: relative;
  padding: 34px;
  border-radius: 26px;
  background: white;
  box-shadow: 0 30px 100px rgba(2, 24, 17, 0.35);
}

.learning-dialog-shell > .dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
}

.learning-dialog-shell h2 {
  max-width: 430px;
  margin: 0 0 14px;
  font-size: 2.3rem;
  letter-spacing: -0.05em;
}

.learning-dialog-shell > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.source-gate {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--canvas);
}

.source-gate > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 0.68rem;
  font-weight: 800;
}

.source-gate b,
.source-gate em {
  font-size: 0.72rem;
}

.source-gate em {
  color: var(--warning);
  font-style: normal;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.onboarding-inline-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0 22px;
}

.onboarding-inline-options button {
  min-height: 44px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--brand-action);
  font-size: 0.72rem;
  font-weight: 730;
  cursor: pointer;
}

.onboarding-choices {
  margin-bottom: 22px;
}

@media (max-width: 900px) {
  .daily-dashboard,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .daily-dashboard .next-card {
    min-height: 330px;
  }

  .learning-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .library-status {
    grid-template-columns: 1fr;
  }

  .settings-form {
    grid-template-columns: 1fr;
  }

  .settings-card-wide,
  .settings-save {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .topbar-context {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .daily-context {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
  }

  .daily-context h1 {
    font-size: 2.45rem;
  }

  .context-badges {
    justify-content: flex-start;
  }

  .context-badges span:last-child {
    display: none;
  }

  .next-card {
    min-height: 290px !important;
    padding: 24px;
  }

  .next-main {
    margin: 22px 0;
  }

  .next-main h2 {
    font-size: 3.5rem;
  }

  .next-main time {
    font-size: 2.25rem;
  }

  .calm-mark {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .source-note-light {
    margin-top: 12px;
  }

  .today-card {
    padding: 18px;
  }

  .home-service-grid,
  .recent-grid,
  .journey-grid,
  .learning-grid,
  .form-grid,
  .time-fields,
  .locked-content-row {
    grid-template-columns: 1fr;
  }

  .journey-grid article {
    min-height: 170px;
  }

  .service-card {
    padding: 19px;
  }

  .principle-card-compact {
    align-items: flex-start;
    flex-direction: column;
  }

  .principle-card-compact .principle-number {
    font-size: 3rem;
  }

  .bottom-nav {
    padding-bottom: max(5px, env(safe-area-inset-bottom));
  }

  .nav-item {
    min-width: 0;
    padding: 7px 2px;
  }

  .nav-item > span {
    font-size: 0.96rem;
  }

  .nav-item small {
    overflow: hidden;
    max-width: 100%;
    font-size: 0.54rem;
    text-overflow: ellipsis;
  }

  .schedule-panel,
  .mosque-detail-card {
    padding: 18px;
  }

  .schedule-list button {
    grid-template-columns: 40px 1fr 62px;
    gap: 9px;
    padding: 10px;
  }

  .schedule-list em {
    display: none;
  }

  .iqama-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .history-summary {
    grid-template-columns: 1fr;
  }

  .history-summary div {
    min-height: 72px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .history-summary div:first-child {
    border-top: 0;
  }

  .report-main {
    display: grid;
    grid-template-columns: 52px 1fr;
  }

  .report-main .confidence {
    grid-column: 2;
    justify-self: start;
  }

  .report-list-card {
    align-items: flex-start;
  }

  .favorite-button {
    margin-top: 10px;
  }

  .library-status {
    padding: 18px;
  }

  .learning-grid article {
    min-height: 230px;
  }

  .time-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-wrap {
    border: 0;
  }

  .source-table,
  .source-table tbody,
  .source-table tr,
  .source-table th,
  .source-table td {
    display: block;
    width: 100%;
  }

  .source-table thead {
    display: none;
  }

  .source-table tr {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
  }

  .source-table th,
  .source-table td {
    padding: 4px 0;
    border: 0;
  }

  .dialog-actions,
  .report-meta,
  .onboarding-inline-options {
    grid-template-columns: 1fr;
  }

  .report-actions > * {
    width: 100%;
  }

  .learning-dialog-shell {
    padding: 28px 22px;
  }

  .source-gate {
    grid-template-columns: 30px 1fr;
  }

  .source-gate em {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .flow-step,
  .onboarding-step {
    animation: none !important;
  }
}

/* Mode manuel local : mêmes surfaces, couleurs et rythmes que l’interface Faheem. */
.special-prayer-time {
  display: block;
  width: fit-content;
  margin: 8px 0 2px;
  color: var(--brand);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}

.jumua-setting {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  margin-top: 20px;
}

.jumua-setting .prototype-notice {
  margin-bottom: 0;
}

/* MVP d’écoute — conçu d’abord pour les petits écrans. */
.listening-control-panel {
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(11, 91, 67, 0.1), transparent 18rem),
    white;
  box-shadow: var(--soft-shadow);
}

.listening-control-head,
.listening-subhead {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
}

.listening-control-head h2 {
  margin: 0;
  font-size: clamp(1.65rem, 8vw, 2.45rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.listening-intro {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.listening-status-badge,
.mode-badge.status-ready,
.mode-badge.status-listening,
.mode-badge.status-analyzing {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #eef2f0;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.listening-status-badge > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(82, 111, 101, 0.1);
}

.listening-status-badge[data-listening-state="ready"],
.mode-badge.status-ready {
  border-color: #a9d1c2;
  background: var(--brand-soft);
  color: var(--brand-action);
}

.listening-status-badge[data-listening-state="listening"],
.mode-badge.status-listening {
  border-color: #e5b5b1;
  background: #fff1ef;
  color: var(--danger);
}

.listening-status-badge[data-listening-state="analyzing"],
.mode-badge.status-analyzing {
  border-color: #d7c88d;
  background: var(--warning-soft);
  color: var(--warning);
}

.listening-primary-actions,
.mic-test-actions {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.listening-primary-actions button,
.mic-test-actions button {
  width: 100%;
  min-height: 50px;
}

.listening-status-text {
  margin: 14px 0 0;
  padding: 13px 15px;
  border-left: 3px solid var(--brand-action);
  border-radius: 0 12px 12px 0;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.84rem;
  line-height: 1.55;
}

.listening-state-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--canvas);
}

.listening-state-rail > span {
  position: relative;
  display: grid;
  min-height: 78px;
  align-content: center;
  grid-template-columns: 12px 1fr;
  gap: 2px 9px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted);
}

.listening-state-rail i {
  width: 10px;
  height: 10px;
  grid-row: 1 / span 2;
  margin-top: 4px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.listening-state-rail b {
  color: var(--ink);
  font-size: 0.8rem;
}

.listening-state-rail small {
  font-size: 0.66rem;
}

.listening-state-rail > .is-current {
  border-color: #b7d6ca;
  background: white;
  box-shadow: 0 7px 18px rgba(3, 52, 37, 0.06);
}

.listening-state-rail > .is-current i {
  border-color: var(--brand-action);
  background: var(--brand-action);
  box-shadow: 0 0 0 4px rgba(11, 91, 67, 0.1);
}

.listening-windows {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.listening-subhead h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  letter-spacing: -0.025em;
}

.listening-subhead > span,
.result-count {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 0.65rem;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.listening-window-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.listening-window-grid article {
  display: grid;
  min-height: 82px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.listening-window-grid article > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 0.69rem;
  font-weight: 850;
}

.listening-window-grid div {
  display: grid;
  gap: 4px;
}

.listening-window-grid small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
}

.listening-window-grid strong {
  color: var(--brand);
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

.listening-window-grid em {
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  white-space: nowrap;
}

.listening-window-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.listening-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

.mic-test-card,
.recognition-results-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--canvas);
}

.mic-test-card > p:not(.inline-status),
.recognition-results-panel > p:not(.recognition-uncertainty-warning, .recognition-results-empty) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

#test-capture-timer {
  color: var(--brand-action);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.compact-field {
  margin-top: 16px;
}

.test-level {
  height: 9px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce6e2;
}

.test-level span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5fc69c, var(--brand-action));
  transition: width 100ms linear;
}

.recognition-results-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.recognition-result-card,
.recognition-results-list > li {
  display: grid;
  min-height: 72px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.result-rank {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 0.7rem;
  font-weight: 850;
}

.recognition-result-card div,
.recognition-results-list > li > div {
  min-width: 0;
}

.recognition-result-card strong,
.recognition-results-list > li strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recognition-result-card small,
.recognition-results-list > li small {
  color: var(--muted);
  font-size: 0.68rem;
}

.result-score {
  min-width: 52px;
  padding: 7px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-action);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-align: center;
}

.result-score[data-score-level="low"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.recognition-results-empty {
  margin: 16px 0 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.recognition-uncertainty-warning {
  margin: 14px 0 0;
  padding: 14px 15px;
  border: 1px solid #dfc663;
  border-radius: 14px;
  background: var(--warning-soft);
  color: #604a07;
  font-size: 0.76rem;
  line-height: 1.55;
}

.recognition-uncertainty-warning strong {
  color: var(--warning);
}

.recognition-caution {
  margin: 18px 0 0;
  padding: 15px 16px;
  border-radius: 14px;
  background: #f2f1eb;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.recognition-caution strong {
  color: var(--ink);
}

.jumua-prayer-option {
  border-color: #d8c887 !important;
  background: var(--warning-soft) !important;
}

.jumua-prayer-option strong,
.jumua-prayer-option b {
  color: var(--warning);
}

.jumua-prayer-option span {
  color: #675626;
  line-height: 1.45;
}

.listening-live .listening-visual {
  margin-bottom: 20px;
}

.listening-visual.is-live .still-ring {
  border-color: rgba(140, 229, 188, 0.5);
  animation: listening-pulse 1.8s ease-out infinite;
}

.listening-visual.is-live .still-ring::after {
  border-color: rgba(140, 229, 188, 0.28);
}

.mic-live-icon {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.mic-live-icon span {
  position: relative;
  width: 22px;
  height: 34px;
  border: 3px solid white;
  border-radius: 13px;
}

.mic-live-icon span::before {
  position: absolute;
  right: -9px;
  bottom: -10px;
  left: -9px;
  height: 18px;
  border-right: 3px solid white;
  border-bottom: 3px solid white;
  border-left: 3px solid white;
  border-radius: 0 0 18px 18px;
  content: "";
}

.mic-live-icon span::after {
  position: absolute;
  bottom: -16px;
  left: 7px;
  width: 3px;
  height: 8px;
  background: white;
  content: "";
}

.stop-immediate {
  border-color: #ffd0cb;
  color: var(--danger);
}

.analyzing-flow {
  min-height: 420px;
  text-align: center;
}

.analyzing-flow .mode-badge {
  margin-inline: auto;
}

.analyzing-flow .processing-mark {
  margin: 58px auto 26px;
}

#report-passage-list:empty::before {
  display: block;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
  content: "Aucune correspondance disponible.";
}

@keyframes listening-pulse {
  0% { opacity: 0.35; transform: scale(0.86); }
  65% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@media (min-width: 700px) {
  .listening-control-panel {
    padding: 30px;
  }

  .listening-control-head,
  .listening-subhead {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
  }

  .listening-primary-actions,
  .mic-test-actions {
    align-items: center;
    flex-direction: row;
  }

  .listening-primary-actions button,
  .mic-test-actions button {
    width: auto;
  }

  #enable-scheduled-listening {
    flex: 1;
  }

  .listening-state-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .listening-window-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listening-window-grid article {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .listening-window-grid em {
    grid-column: 2;
  }

  .listening-tool-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }

  .mic-test-card,
  .recognition-results-panel {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .listening-state-rail {
    grid-template-columns: 1fr;
  }

  .listening-state-rail > span {
    min-height: 64px;
  }

  .recognition-result-card,
  .recognition-results-list > li {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .result-score {
    grid-column: 2;
    justify-self: start;
  }

  .jumua-prayer-option {
    grid-template-columns: 1fr auto !important;
  }

  .jumua-prayer-option span {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listening-visual.is-live .still-ring {
    animation: none;
  }

  .test-level span {
    transition: none;
  }
}
