/* Confession · Velocity Church
   Clean linen luxury — cream canvas, soft glass, motion, restraint */

:root {
  --linen: #f6f3ed;
  --linen-deep: #efeae2;
  --paper: #fffcf7;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(40, 36, 30, 0.08);
  --glass-border-hover: rgba(40, 36, 30, 0.16);

  --ink: #1c1b19;
  --ink-soft: rgba(28, 27, 25, 0.62);
  --ink-faint: rgba(28, 27, 25, 0.42);
  --ink-dim: rgba(28, 27, 25, 0.28);

  /* Warm stone — quiet luxury, not gold-neon */
  --stone: #8a7f70;
  --stone-bright: #6f665a;
  --stone-dim: rgba(138, 127, 112, 0.14);
  --stone-glow: rgba(138, 127, 112, 0.22);

  --success: #4d7a5c;
  --danger: #b45a5a;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Outfit", system-ui, -apple-system, sans-serif;

  --max: 42rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 999px;
  --radius-lg: 1.25rem;

  /* Legacy aliases */
  --void: var(--linen);
  --void-elevated: var(--paper);
  --gold: var(--stone);
  --gold-bright: var(--stone-bright);
  --gold-dim: var(--stone-dim);
  --gold-glow: var(--stone-glow);
  --btn: var(--ink);
  --btn-hover: #000;
  --accent: var(--stone);
  --pill-text: var(--ink);
  --font-serif: var(--font-display);
  --font-sans: var(--font-ui);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ——— Ambient world (soft linen light) ——— */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(255, 252, 247, 0.95) 0%, transparent 55%),
    linear-gradient(180deg, #faf7f1 0%, var(--linen) 45%, var(--linen-deep) 100%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.7;
  animation: orbFloat 18s var(--ease) infinite alternate;
}

.ambient-orb-a {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232, 220, 200, 0.55) 0%, transparent 70%);
}

.ambient-orb-b {
  width: min(40vw, 380px);
  height: min(40vw, 380px);
  bottom: 5%;
  right: -8%;
  background: radial-gradient(circle, rgba(220, 228, 232, 0.4) 0%, transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.ambient-orb-c {
  width: min(35vw, 320px);
  height: min(35vw, 320px);
  bottom: 15%;
  left: -6%;
  background: radial-gradient(circle, rgba(236, 224, 208, 0.45) 0%, transparent 70%);
  animation-delay: -11s;
  animation-duration: 26s;
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: multiply;
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 75% at 50% 40%, transparent 35%, rgba(232, 224, 212, 0.45) 100%);
}

@keyframes orbFloat {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(2%, 3%) scale(1.08);
  }
}

.ambient-orb-a {
  animation-name: orbFloatA;
}

@keyframes orbFloatA {
  from {
    transform: translateX(-50%) translate(0, 0) scale(1);
  }
  to {
    transform: translateX(-50%) translate(0, 4%) scale(1.06);
  }
}

/* ——— App shell ——— */
#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Chrome header */
.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 28px 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(246, 243, 237, 0.92) 0%,
    rgba(246, 243, 237, 0.72) 70%,
    transparent 100%
  );
}

.chrome-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1rem;
}

.chrome-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chrome-mark {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.55;
}

.chrome-word {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Full-width progress — readable on mobile, quiet on desktop */
.chrome-progress {
  width: 100%;
  padding-bottom: 10px;
}

.chrome-progress-track {
  height: 3px;
  background: rgba(28, 27, 25, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(40, 36, 30, 0.04);
}

.chrome-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--ink);
  box-shadow: 0 0 10px rgba(28, 27, 25, 0.18);
  transition: width 0.5s var(--ease);
}

/* Stage */
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 140px;
  outline: none;
  min-height: 100dvh;
}

.stage:has(.screen-summary) {
  align-items: flex-start;
  padding-top: max(100px, 12vh);
  padding-bottom: 120px;
}

/* Screen enter */
.screen {
  width: 100%;
  max-width: var(--max);
  text-align: center;
  animation: screenIn 0.65s var(--ease) both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Stagger children */
.screen .eyebrow,
.screen .question,
.screen .hint,
.screen .subtitle,
.screen .lede,
.screen .verse,
.screen .chips,
.screen .choice-stack,
.screen .actions,
.screen .key-hint,
.screen .summary-toolbar,
.screen .summary-layout {
  animation: rise 0.7s var(--ease) both;
}

.screen .eyebrow {
  animation-delay: 0.04s;
}
.screen .question {
  animation-delay: 0.08s;
}
.screen .hint,
.screen .subtitle,
.screen .lede,
.screen .verse {
  animation-delay: 0.16s;
}
.screen .chips,
.screen .choice-stack {
  animation-delay: 0.24s;
}
.screen .actions,
.screen .key-hint,
.screen .summary-toolbar {
  animation-delay: 0.32s;
}
.screen .summary-layout {
  animation-delay: 0.28s;
}

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

/* Type */
.eyebrow {
  margin: 0 0 18px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--stone);
}

.question {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.2vw, 3.15rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.question.statement-title {
  font-style: italic;
  font-weight: 400;
}

.subtitle {
  margin: -4px 0 36px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hint {
  margin: 0 0 28px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.verse {
  display: inline-block;
  margin: 4px 0 36px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--stone-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 127, 112, 0.35);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.verse-plain {
  border: none;
  opacity: 0.75;
}



.lede {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Confession prayer screen */
.screen-confession .eyebrow {
  margin-bottom: 22px;
}

.confession-prayer-title {
  margin: 0 auto 40px;
  max-width: 28em;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
}

/* Chips — soft paper selection */
.chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 8px auto 36px;
  max-width: 34rem;
}

.chip {
  appearance: none;
  position: relative;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink-soft);
  border-radius: var(--radius);
  padding: 16px 14px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 54px;
  box-shadow: 0 1px 2px rgba(40, 36, 30, 0.04);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.chip:active:not(:disabled) {
  transform: scale(0.98);
  background: var(--glass-strong);
  border-color: rgba(28, 27, 25, 0.18);
}

.chip[aria-pressed="true"] {
  background: var(--paper);
  border-color: rgba(28, 27, 25, 0.28);
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgba(28, 27, 25, 0.06),
    0 8px 24px rgba(40, 36, 30, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.chip:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none;
}

/* Yes / No */
.choice-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 8px auto 0;
  max-width: 17rem;
}

.btn-choice {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px 28px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(40, 36, 30, 0.04);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    color 0.2s ease;
}

.btn-choice:active {
  transform: scale(0.97);
  background: #fff;
  border-color: rgba(28, 27, 25, 0.22);
  box-shadow: 0 4px 12px rgba(40, 36, 30, 0.08);
}

.btn-choice:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Primary actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.btn {
  appearance: none;
  position: relative;
  border: none;
  border-radius: var(--radius);
  padding: 16px 40px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    opacity 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--ink);
  color: #faf8f4;
  min-width: 7.5rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 28px rgba(40, 36, 30, 0.18);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
  background: #000;
}

.btn-primary:disabled {
  background: rgba(28, 27, 25, 0.14);
  color: rgba(28, 27, 25, 0.35);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--glass-border-hover);
  backdrop-filter: blur(12px);
}

.btn-secondary:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(28, 27, 25, 0.28);
  color: var(--ink);
}

/* Summary */
.screen-summary {
  max-width: min(1100px, 100%);
}

.summary-header {
  margin-bottom: 40px;
}

.summary-title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin-bottom: 14px;
}

.summary-lede {
  max-width: 26em;
  margin-inline: auto;
  margin-bottom: 28px;
}

.summary-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-pdf {
  letter-spacing: 0.14em;
}

.summary-pdf-status {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-faint);
}

.summary-pdf-status.is-success {
  color: var(--success);
}

.summary-pdf-status.is-error {
  color: var(--danger);
}

.summary-continue {
  margin-top: 16px;
}

.summary-layout {
  margin: 0 auto 36px;
  width: 100%;
}

.summary-layout--with-email {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
  text-align: left;
}

@media (min-width: 900px) {
  .summary-layout--with-email {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .summary-layout--with-email .sins-column {
    flex: 1 1 0;
    min-width: min(640px, 56vw);
    order: 1;
  }

  .summary-layout--with-email .email-panel {
    flex: 0 0 300px;
    order: 2;
    position: sticky;
    top: 100px;
  }
}

.sins-column {
  width: 100%;
  max-width: min(720px, 100%);
  margin-inline: auto;
}

.summary-layout--with-email .sins-column {
  max-width: none;
  margin-inline: 0;
}

/* Accordion — soft paper glass */
.sin-accordion {
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  background: rgba(255, 252, 247, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: left;
  box-shadow: 0 18px 48px rgba(40, 36, 30, 0.08);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--glass-border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 1.15rem 1.35rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.accordion-summary::-webkit-details-marker,
.accordion-summary::marker {
  display: none;
  content: "";
}

.accordion-summary:active {
  background: rgba(255, 255, 255, 0.7);
}

.accordion-summary-text {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.accordion-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.accordion-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

.accordion-count {
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--stone-dim);
  color: var(--stone-bright);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(138, 127, 112, 0.18);
}

.accordion-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease), border-color 0.2s ease;
  margin-top: -4px;
}

.accordion-item[open] .accordion-chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
  border-color: var(--ink-soft);
}

.accordion-item[open] .accordion-label {
  color: var(--ink);
}

.accordion-item[open] .accordion-summary {
  padding-bottom: 0.75rem;
}

.accordion-body {
  padding: 0.25rem 1.35rem 1.25rem;
  animation: accordionIn 0.35s var(--ease);
}

@keyframes accordionIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accordion-subtitle {
  margin: 0 0 1rem;
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.4;
  text-align: center;
}

.sin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.sin-list li {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.sin-list li:last-child {
  border-bottom: none;
}

.sin-list li::before {
  content: "·";
  color: var(--stone);
  margin-right: 0.75rem;
  font-weight: 600;
}

.empty-sins {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  background: var(--glass);
}

/* Email panel */
.email-panel {
  width: 100%;
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  background: rgba(255, 252, 247, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 48px rgba(40, 36, 30, 0.08);
  box-sizing: border-box;
}

.email-panel-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  text-align: center;
}

.email-panel-intro {
  margin: 0 0 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}

.email-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input {
  appearance: none;
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
  color: var(--ink-dim);
}

.field input:focus {
  outline: none;
  border-color: rgba(28, 27, 25, 0.28);
  box-shadow: 0 0 0 3px rgba(28, 27, 25, 0.06);
}

.email-hint {
  margin: 0 0 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-faint);
  text-align: center;
}

.email-error {
  margin: 0 0 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--danger);
  text-align: center;
}

.email-error.email-success {
  color: var(--success);
}

.email-actions {
  margin-top: 0.25rem;
  justify-content: center;
}

.email-actions .btn {
  min-width: 10rem;
}

/* Nav dock — floating soft glass */
.nav-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(40, 36, 30, 0.1);
}

.nav-btn {
  appearance: none;
  width: 46px;
  height: 44px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.nav-btn:active:not(:disabled) {
  background: rgba(28, 27, 25, 0.08);
  color: var(--ink);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn-primary {
  background: var(--ink);
  color: #faf8f4;
}

.nav-btn-primary:active:not(:disabled) {
  background: #000;
  color: #fff;
}

.nav-btn-primary:disabled {
  background: rgba(28, 27, 25, 0.12);
  color: rgba(28, 27, 25, 0.3);
  opacity: 1;
}

/* Footer */
.footer {
  position: fixed;
  left: 22px;
  bottom: 18px;
  max-width: min(280px, calc(100vw - 140px));
  z-index: 30;
  pointer-events: none;
}

#app:has(.screen-summary) .footer {
  opacity: 0.35;
}

.privacy-note,
.copyright {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.copyright {
  margin-top: 3px;
}

.key-hint {
  margin-top: 28px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: var(--glass-strong);
  font-size: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--ink-faint);
}

/* Thank you */
.screen[data-type="thankyou"] .question {
  font-style: italic;
}

.thankyou-privacy {
  margin: 28px auto 0;
  max-width: 22em;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  text-align: center;
}

/* Share flow steps */
.share-steps {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.share-step-label {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

.share-step-label-2 {
  margin-top: 0.75rem;
}

.share-steps .btn-pdf {
  width: 100%;
}

/* Prevent iOS zoom on focus; improve tap targets */
.field input {
  font-size: 16px;
  min-height: 48px;
}

.btn-choice,
.chip {
  min-height: 48px;
}

.nav-btn {
  min-width: 48px;
  min-height: 48px;
}

@media (max-width: 600px) {
  .chrome {
    padding: 12px 16px 0;
    padding-top: max(12px, env(safe-area-inset-top));
    gap: 10px;
  }

  .chrome-word {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chrome-progress {
    padding-bottom: 8px;
  }

  .chrome-progress-track {
    height: 4px;
    background: rgba(28, 27, 25, 0.14);
  }

  .chrome-progress-fill {
    box-shadow: 0 0 12px rgba(28, 27, 25, 0.22);
  }

  .chips {
    grid-template-columns: 1fr;
    max-width: 17rem;
  }

  .stage {
    padding: 88px 20px 140px;
    padding-bottom: max(140px, calc(100px + env(safe-area-inset-bottom)));
    align-items: flex-start;
    padding-top: max(96px, 14vh);
  }

  .stage:has(.screen-summary) {
    padding-bottom: max(160px, calc(120px + env(safe-area-inset-bottom)));
  }

  .footer {
    display: none;
  }

  .nav-dock {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .question {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .email-panel {
    padding: 1.25rem 1.1rem;
  }

  .summary-layout--with-email {
    gap: 22px;
  }

  .key-hint {
    display: none; /* keyboard shortcuts not useful on phones */
  }

  .confession-prayer-title {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  }
}

/*
  Hover only on devices that truly hover (mouse/trackpad).
  Touch browsers often "stick" :hover after a tap — that sticky look
  is an artifact of mobile, not intentional selected state.
*/
@media (hover: hover) and (pointer: fine) {
  .verse:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
    border-bottom-width: 1.5px;
    opacity: 1;
  }

  .chip:hover:not(:disabled) {
    border-color: rgba(28, 27, 25, 0.32);
    color: var(--ink);
    background: #fff;
    transform: translateY(-3px);
    box-shadow:
      0 0 0 1px rgba(28, 27, 25, 0.06),
      0 16px 36px rgba(40, 36, 30, 0.14);
  }

  .chip[aria-pressed="true"]:hover:not(:disabled) {
    border-color: rgba(28, 27, 25, 0.42);
    box-shadow:
      0 0 0 1px rgba(28, 27, 25, 0.1),
      0 14px 32px rgba(40, 36, 30, 0.12);
  }

  .btn-choice:hover {
    border-color: rgba(28, 27, 25, 0.38);
    background: #fff;
    color: var(--ink);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
      0 0 0 1px rgba(28, 27, 25, 0.06),
      0 18px 40px rgba(40, 36, 30, 0.14);
  }

  .btn-primary:hover:not(:disabled) {
    background: #000;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.2) inset,
      0 16px 40px rgba(40, 36, 30, 0.32),
      0 0 0 1px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
  }

  .btn-primary:hover:not(:disabled)::before {
    transform: translateX(120%);
  }

  .btn-secondary:hover:not(:disabled) {
    color: var(--ink);
    border-color: rgba(28, 27, 25, 0.4);
    background: #fff;
    box-shadow: 0 10px 28px rgba(40, 36, 30, 0.1);
    transform: translateY(-2px);
  }

  .accordion-summary:hover {
    background: rgba(255, 255, 255, 0.85);
  }

  .accordion-summary:hover .accordion-label {
    color: var(--ink);
  }

  .accordion-summary:hover .accordion-chevron {
    border-color: var(--ink-soft);
  }

  .nav-btn:hover:not(:disabled) {
    background: rgba(28, 27, 25, 0.1);
    color: var(--ink);
  }

  .nav-btn-primary:hover:not(:disabled) {
    background: #000;
    color: #fff;
    box-shadow: 0 6px 16px rgba(40, 36, 30, 0.2);
  }

  .field input:hover {
    border-color: rgba(28, 27, 25, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .screen .eyebrow,
  .screen .question,
  .screen .hint,
  .screen .subtitle,
  .screen .lede,
  .screen .verse,
  .screen .chips,
  .screen .choice-stack,
  .screen .actions,
  .screen .key-hint,
  .screen .summary-toolbar,
  .screen .summary-layout,
  .accordion-body,
  .ambient-orb {
    animation: none !important;
  }

  .chrome-progress-fill {
    transition: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .chip:hover:not(:disabled),
    .btn-choice:hover,
    .btn-primary:hover:not(:disabled),
    .btn-secondary:hover:not(:disabled) {
      transform: none;
    }
  }
}

@media print {
  .ambient,
  .chrome,
  .nav-dock,
  .footer,
  .key-hint,
  .actions,
  .summary-toolbar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .stage {
    padding: 0;
    min-height: auto;
  }

  .question,
  .sin-list li,
  .accordion-label {
    color: #111 !important;
  }
}
