/* Legacy browsers use vh; modern browsers retain their viewport sizing. */
:root { --viewport-svh: 1vh; --viewport-dvh: 1vh; }
@supports (height: 1svh) { :root { --viewport-svh: 1svh; } }
@supports (height: 1dvh) { :root { --viewport-dvh: 1dvh; } }

:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #5e6a63;
  --line: #d9dfd9;
  --paper: #fbfaf5;
  --soft: #eef3ef;
  --gold: #c69b45;
  --deep-gold: #9b7130;
  --green: #2f6d55;
  --deep-green: #153d32;
  --night: #071220;
  --dawn: #f6d78b;
  --ivory: #fffaf0;
  --clay: #8f4f34;
  --ember: #d66f33;
}

html {
  background: #07171a;
  margin: 0;
  padding: 0;
}

body.has-user {
  color-scheme: dark;
  background: #07171a;
}

* {
  box-sizing: border-box;
}

.content-inventory {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid #ccd8d2;
  border-bottom: 1px solid #ccd8d2;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px 24px;
}

.inventory-grid dt { font-weight: 700; }
.inventory-grid dd { margin: 4px 0 0; }

.content-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-block: 20px;
}

.content-filters label {
  display: grid;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
}

.content-filters input,
.content-filters select {
  width: 100%;
  min-height: 44px;
}

.content-pager {
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.record-card small {
  display: block;
}

.verse-source a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body {
  margin: 0;
  min-height: 100%;
}

button,
a,
input,
select,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(216, 182, 104, 0.2);
}

:where(button, a, input, select, summary):focus-visible {
  outline: 3px solid #f0c96f;
  outline-offset: 3px;
}

input:focus-visible,
select:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 109, 85, 0.16);
}

button:disabled {
  cursor: wait;
}


a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.has-user .app-shell {
  display: block;
  padding: 0;
}

.sanctuary-shell {
  background:
    radial-gradient(circle at 50% -8%, rgba(246, 215, 139, 0.55), transparent 32%),
    linear-gradient(150deg, #fffaf0 0%, #eef5ef 56%, #dde8df 100%);
}

.sanctuary,
.admin-panel {
  width: min(100%, 560px);
}

.sanctuary {
  position: relative;
}

.has-user .sanctuary {
  width: 100%;
}

.has-user .brand-intro,
.has-user #auth-message:empty,
.has-user .utility-actions {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 9vw, 60px);
  line-height: 1;
  letter-spacing: 0;
}

.lead {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.message {
  min-height: 22px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.message[data-type="success"] {
  color: var(--green);
}

.message[data-type="error"] {
  color: #a13d2d;
}

.auth-panel {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.daily-panel {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  min-height: 560px;
  border: 1px solid rgba(198, 155, 69, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 20px),
    radial-gradient(circle at 50% 0%, rgba(255, 238, 184, 0.96), transparent 35%),
    linear-gradient(160deg, #fffdf6 0%, #f3f7f2 100%);
  box-shadow: 0 18px 44px rgba(28, 43, 35, 0.13);
  padding: 22px;
}

.has-user .daily-panel {
  display: block;
  min-height: calc(100 * var(--viewport-svh));
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(19, 61, 49, 0.92) 0%, rgba(28, 79, 57, 0.54) 24%, rgba(115, 75, 43, 0.3) 56%, rgba(4, 19, 22, 0.96) 100%),
    radial-gradient(circle at 50% 19%, rgba(255, 237, 176, 0.44), rgba(209, 151, 62, 0.14) 30%, transparent 50%),
    radial-gradient(circle at 17% 44%, rgba(188, 86, 45, 0.24), transparent 26%),
    radial-gradient(circle at 88% 54%, rgba(207, 153, 62, 0.2), transparent 24%),
    linear-gradient(135deg, #123d31 0%, #214634 34%, #8a5a35 58%, #07151b 100%);
  box-shadow: none;
  padding: max(10px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.sanctuary-light {
  position: absolute;
  inset: -100px 8% auto;
  height: 230px;
  background: radial-gradient(circle, rgba(255, 236, 177, 0.9), transparent 68%);
  pointer-events: none;
  transform: scale(1);
  animation: softPulse 5s ease-in-out infinite;
}

.has-user .sanctuary-light {
  top: calc(calc(17.6 * var(--viewport-svh)) - 44vmax);
  left: calc(50% - 44vmax);
  right: auto;
  width: 88vmax;
  height: 88vmax;
  opacity: 0.7;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 224, 0.82), rgba(255, 214, 128, 0.22) 27%, rgba(255, 214, 128, 0.08) 48%, transparent 76%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.66), transparent 13%);
  mix-blend-mode: screen;
  animation-duration: 6.6s;
}

.sacred-focus {
  display: none;
}

.has-user .sacred-focus {
  position: absolute;
  top: calc(17.6 * var(--viewport-svh));
  left: 50%;
  z-index: 1;
  display: grid;
  width: min(58vw, 220px);
  height: min(58vw, 220px);
  place-items: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.sacred-focus::before,
.sacred-focus::after,
.sacred-ray,
.sacred-ring {
  position: absolute;
  content: "";
  display: block;
}

.sacred-focus::before {
  width: 14px;
  height: min(39vw, 158px);
  border-radius: 999px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 251, 232, 0.9) 16%, rgba(255, 251, 232, 0.72) 72%, transparent 100%);
  filter: blur(1px);
  opacity: 0.72;
  box-shadow:
    0 0 18px rgba(255, 247, 214, 0.45),
    0 0 54px rgba(255, 212, 126, 0.2);
}

.sacred-focus::after {
  width: min(33vw, 126px);
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 251, 232, 0.74), transparent);
  filter: blur(1px);
  opacity: 0.54;
  transform: translateY(-12px);
}

.sacred-ray {
  width: 2px;
  height: calc(44 * var(--viewport-svh));
  background: linear-gradient(180deg, transparent, rgba(255, 242, 196, 0.62), transparent);
  transform: translateY(calc(8 * var(--viewport-svh)));
  opacity: 0.5;
  animation: rayBreathe 7s ease-in-out infinite;
}

.sacred-ring {
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 43%, rgba(255, 246, 214, 0.16) 0%, rgba(255, 223, 151, 0.07) 38%, transparent 70%);
  box-shadow:
    0 0 52px rgba(255, 218, 137, 0.24),
    inset 0 0 34px rgba(255, 238, 185, 0.12);
  filter: blur(2.5px);
}

.sacred-ring-a {
  width: min(46vw, 176px);
  height: min(46vw, 176px);
  animation: ringBreathe 6.8s ease-in-out infinite;
}

.sacred-ring-b {
  display: none;
  width: min(55vw, 208px);
  height: min(55vw, 208px);
  opacity: 0.2;
  animation: ringBreathe 6.8s ease-in-out 1.2s infinite;
}

.woven-thread {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background:
    linear-gradient(28deg, transparent 0 46%, rgba(198, 155, 69, 0.24) 46% 47%, transparent 47% 100%),
    linear-gradient(152deg, transparent 0 54%, rgba(143, 79, 52, 0.14) 54% 55%, transparent 55% 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 235, 172, 0.08), transparent 36%);
  background-size: 54px 54px, 62px 62px, 100% 100%;
}

.intro-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  --intro-cross-y: min(calc(61 * var(--viewport-svh)), 80vw);
  overflow: hidden;
  min-height: 560px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(5, 18, 24, 0.56) 0%, rgba(18, 51, 45, 0.12) 45%, rgba(151, 95, 42, 0.26) 100%),
    url("/assets/images/sanctuary-dawn.jpg") center top / cover no-repeat,
    linear-gradient(180deg, #0c2b2a 0%, #17382e 42%, #d4a24f 100%);
  color: #fff8e8;
  text-align: center;
  transition:
    opacity 800ms ease,
    visibility 800ms ease;
}

.intro-stage::before {
  position: absolute;
  inset: calc(-16 * var(--viewport-svh)) -24vw calc(-12 * var(--viewport-svh));
  z-index: 0;
  content: "";
  background:
    radial-gradient(circle at 50% calc(var(--intro-cross-y) + calc(16 * var(--viewport-svh))), rgba(255, 253, 235, 0.98) 0%, rgba(255, 244, 205, 0.78) 7%, rgba(255, 209, 116, 0.42) 18%, rgba(255, 181, 79, 0.15) 33%, transparent 54%),
    radial-gradient(circle at 50% calc(var(--intro-cross-y) + calc(16 * var(--viewport-svh))), rgba(255, 255, 255, 0.62), transparent 9%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: introHaloPulse 5.4s ease-in-out infinite;
}

.has-user .intro-stage {
  min-height: calc(100 * var(--viewport-svh));
}

.daily-panel.intro-complete .intro-stage {
  opacity: 0;
  visibility: hidden;
}

.daily-panel.intro-moving-home .intro-stage {
  background:
    linear-gradient(180deg, rgba(5, 18, 24, 0.42) 0%, rgba(18, 51, 45, 0.1) 48%, rgba(151, 95, 42, 0.2) 100%),
    url("/assets/images/sanctuary-dawn.jpg") center top / cover no-repeat,
    linear-gradient(180deg, #0c2b2a 0%, #17382e 42%, #d4a24f 100%);
}

.daily-content {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 650ms ease,
    transform 650ms ease;
}

.has-user .daily-content {
  width: min(100%, 520px);
  min-height: calc(calc(100 * var(--viewport-svh)) - max(18px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
  display: grid;
  grid-template-rows: calc(34 * var(--viewport-svh)) minmax(0, 1fr);
  margin: 0 auto;
}

.daily-panel.intro-complete .daily-content {
  opacity: 1;
  transform: translateY(0);
}

.daily-panel.intro-moving-home .daily-content {
  opacity: 0.28;
  transform: translateY(8px);
}

.intro-blessing {
  position: absolute;
  top: clamp(92px, calc(23 * var(--viewport-svh)), 210px);
  left: 50%;
  z-index: 1;
  width: min(94vw, 540px);
  max-width: 540px;
  margin: 0;
  color: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 5.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 24px rgba(255, 236, 177, 0.72);
  transform-origin: center center;
  transform: translateX(-50%);
  transition:
    opacity 850ms ease,
    transform 850ms cubic-bezier(0.2, 0.72, 0.2, 1),
    filter 850ms ease;
  animation: blessingFade 5.2s ease both;
}

.intro-blessing .welcome-line,
.intro-blessing .welcome-name {
  display: block;
}

.intro-blessing .welcome-line {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intro-blessing .welcome-name {
  margin-top: 6px;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-panel.intro-complete .intro-blessing {
  opacity: 0;
  filter: blur(1px);
  transform: translateX(-50%) translateY(calc(2 * var(--viewport-svh))) scale(0.78);
}

.daily-panel.intro-moving-home .intro-blessing {
  opacity: 0.92;
  filter: blur(0);
  transform: translateX(-50%) translateY(calc(2 * var(--viewport-svh))) scale(0.78);
}

.intro-start-button {
  position: absolute;
  left: 50%;
  top: min(calc(80 * var(--viewport-svh)), calc(calc(100 * var(--viewport-svh)) - 92px));
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(78vw, 360px);
  min-height: 52px;
  border: 1px solid rgba(255, 221, 139, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(224, 177, 75, 0.96), rgba(149, 99, 34, 0.94));
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 246, 214, 0.4);
  color: #fff8e8;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0 18px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  transition:
    opacity 520ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.intro-start-button:active {
  filter: brightness(1.08);
  transform: translateX(-50%) translateY(1px) scale(0.99);
}

.intro-start-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.daily-panel.intro-complete .intro-start-button,
.daily-panel.intro-moving-home .intro-start-button {
  opacity: 0;
  pointer-events: none;
}

.daily-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(198, 155, 69, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 238, 184, 0.52), transparent 42%),
    rgba(255, 250, 240, 0.88);
  padding: 18px;
  margin-top: 16px;
}

.has-user .daily-card {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  margin-top: 14px;
  padding: 0;
}

.sanctuary-header {
  position: relative;
  z-index: 2;
}

.has-user .sanctuary-header {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 16px;
  display: grid;
  justify-items: start;
  color: #fff8e8;
  margin: 0;
  text-align: left;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.48);
}

.has-user .sanctuary-header .eyebrow {
  color: rgba(255, 221, 139, 0.96);
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.has-user .sanctuary-header h2 {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(255, 241, 192, 0.2);
  border-radius: 999px;
  background: rgba(5, 17, 24, 0.34);
  color: rgba(255, 248, 232, 0.74);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0 9px;
}

.sanctuary-bottom-sheet {
  position: relative;
  z-index: 2;
}

.has-user .sanctuary-bottom-sheet {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: stretch;
  min-height: 0;
  border: 1px solid rgba(255, 221, 139, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(16, 40, 36, 0.82), rgba(6, 18, 23, 0.9)),
    radial-gradient(circle at 50% 0%, rgba(255, 205, 111, 0.18), transparent 52%);
  box-shadow:
    0 -18px 48px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 238, 184, 0.22);
  padding: 16px;
  backdrop-filter: blur(14px);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.has-user .sanctuary-bottom-sheet::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(112deg, transparent 0%, rgba(255, 232, 166, 0.14) 44%, transparent 56%),
    linear-gradient(180deg, rgba(255, 238, 184, 0.08), transparent 38%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-42%);
}

.has-user .daily-panel.step-changing .sanctuary-bottom-sheet {
  border-color: rgba(255, 221, 139, 0.42);
  box-shadow:
    0 -22px 56px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 238, 184, 0.3);
  transform: translateY(3px) scale(0.996);
}

.has-user .daily-panel.step-changing .sanctuary-bottom-sheet::before {
  opacity: 1;
  animation: holySweep 520ms ease both;
}

.daily-welcome {
  margin: 12px 0 0;
  color: var(--deep-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.45;
}

.has-user .daily-welcome {
  position: absolute;
  top: calc(calc(24 * var(--viewport-svh)) + 4px);
  left: 50%;
  z-index: 2;
  display: grid;
  width: min(92vw, 440px);
  max-width: 440px;
  margin: 0;
  color: rgba(255, 244, 207, 0.9);
  text-align: center;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.56),
    0 0 22px rgba(255, 218, 137, 0.18);
  opacity: 0;
  transform: translateX(-50%);
}

.has-user .daily-panel.intro-complete .daily-welcome {
  opacity: 1;
  animation: welcomeSettle 780ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.has-user .welcome-line {
  font-size: clamp(17px, 4.8vw, 23px);
  line-height: 1.18;
}

.has-user .welcome-name {
  display: block;
  overflow: hidden;
  max-width: 100%;
  margin-top: 5px;
  color: rgba(255, 250, 232, 0.96);
  font-size: clamp(18px, 5.2vw, 24px);
  font-weight: 700;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verse-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(198, 155, 69, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.has-user .verse-card::before {
  display: none;
}

.sanctuary-art-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(198, 155, 69, 0.26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 238, 184, 0.28), transparent 58%),
    linear-gradient(180deg, #071220 0%, #f2c46b 100%);
  margin-bottom: 16px;
  box-shadow: 0 14px 30px rgba(28, 43, 35, 0.16);
}

.sanctuary-art {
  width: 100%;
  height: min(calc(44 * var(--viewport-svh)), 430px);
  display: block;
  object-fit: contain;
}

.has-user .sanctuary-art-frame {
  display: none;
}

.daily-label {
  margin: 0 0 10px;
  color: var(--deep-gold);
  font-size: 13px;
  font-weight: 700;
}

.has-user .daily-label {
  color: rgba(255, 213, 126, 0.94);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.care-note {
  margin: 14px 0 2px;
  border-left: 3px solid rgba(198, 155, 69, 0.54);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.45;
  padding-left: 12px;
}

.has-user .care-note {
  margin: 13px 0 4px;
  border-left-color: rgba(255, 213, 126, 0.62);
  color: rgba(255, 243, 214, 0.78);
  font-size: clamp(15px, 4vw, 18px);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.has-user .daily-panel.is-guide-step .sanctuary-bottom-sheet {
  justify-content: space-between;
}

.has-user .daily-panel.is-guide-step .care-note {
  display: grid;
  flex: 1;
  align-items: center;
  min-height: calc(34 * var(--viewport-svh));
  margin: 18px 0;
  border-left: 0;
  color: rgba(255, 248, 232, 0.9);
  font-size: clamp(25px, 7.2vw, 36px);
  line-height: 1.22;
  text-align: center;
  padding: 0 4px;
  text-shadow:
    0 2px 22px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(255, 213, 126, 0.14);
}

.has-user .daily-panel:not(.is-guide-step) .care-note {
  display: none;
}

.daily-card blockquote {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.42;
}

.has-user .daily-card blockquote {
  color: #fff8e8;
  font-size: clamp(28px, 9vw, 42px);
  line-height: 1.16;
  text-shadow: 0 2px 22px rgba(255, 216, 136, 0.16);
}

.daily-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: 0;
}

.has-user .daily-card h3 {
  color: #fff8e8;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.12;
}

.has-user #daily-blessing-title {
  display: none;
}

.daily-card p {
  line-height: 1.6;
}

.has-user .daily-card p,
.has-user .daily-card .muted {
  color: rgba(255, 250, 240, 0.82);
}

.verse-source {
  max-width: 42rem;
  margin: 8px 0 0;
  color: rgba(94, 106, 99, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.has-user .verse-source {
  color: rgba(255, 250, 240, 0.56);
}

.has-user #daily-blessing-body,
.has-user #prayer-body {
  font-size: clamp(21px, 5.6vw, 27px);
  line-height: 1.42;
}

.has-user .daily-card.stage-reveal {
  animation: cardReveal 520ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.has-user .daily-panel.step-changing .daily-card:not(.is-hidden) {
  animation: cardDepart 180ms ease both;
}

#amen-button {
  margin-top: 18px;
}

#amen-button:disabled {
  cursor: default;
  opacity: 0.68;
}

.step-indicator {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.has-user .step-indicator {
  margin-top: 0;
}

.step-indicator button {
  flex: 1;
  min-height: 28px;
  border: 1px solid rgba(198, 155, 69, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 6px 8px;
}

.step-indicator button.is-active {
  background: var(--green);
  color: #fff;
}

.has-user .step-indicator button {
  position: relative;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255, 250, 240, 0.56);
  overflow: hidden;
  transition:
    color 220ms ease,
    transform 220ms ease;
}

.has-user .step-indicator button.is-active {
  background: transparent;
  color: #fff8e8;
  transform: translateY(-1px);
}

.has-user .step-indicator button::after {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 213, 126, 0.95);
  box-shadow: 0 0 16px rgba(255, 213, 126, 0.72);
  content: "";
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.has-user .step-indicator button.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.prayer-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.prayer-progress span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(198, 155, 69, 0.45);
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.has-user .prayer-progress span {
  border-color: rgba(255, 213, 126, 0.32);
  color: rgba(255, 250, 240, 0.68);
}

.prayer-progress span.is-active {
  background: var(--gold);
  color: #fff;
}

.has-user .prayer-progress span.is-active {
  background: rgba(198, 155, 69, 0.92);
  box-shadow: 0 0 22px rgba(198, 155, 69, 0.34);
}

.silence-note {
  border-left: 3px solid var(--gold);
  color: var(--deep-gold);
  font-weight: 700;
  padding-left: 10px;
}

.has-user .silence-note {
  border-left-color: rgba(255, 213, 126, 0.8);
  color: rgba(255, 232, 166, 0.92);
}

.has-user .daily-panel.is-silent .sanctuary-light,
.has-user .daily-panel.is-silent .sacred-focus {
  opacity: 0.72;
}

.sanctuary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.has-user .sanctuary-actions .button {
  width: 100%;
}

.has-user .sanctuary-actions .button.secondary,
.has-user .sanctuary-actions .button.primary {
  border: 1px solid rgba(255, 250, 232, 0.56);
  background: rgba(247, 241, 222, 0.94);
  box-shadow: 0 12px 34px rgba(2, 12, 14, 0.2);
  color: #173a32;
  text-shadow: none;
}

.has-user .daily-panel.is-guide-step .sanctuary-bottom-sheet {
  background: linear-gradient(180deg, transparent, rgba(4, 15, 18, 0.5) 36%, rgba(4, 15, 18, 0.9));
}

.has-user .daily-panel.is-guide-step .care-note {
  max-width: 18ch;
  margin-inline: auto;
  color: rgba(255, 252, 241, 0.92);
  font-size: clamp(24px, 6.8vw, 34px);
  font-weight: 400;
}

.has-user #amen-status {
  color: rgba(255, 250, 240, 0.58);
  font-size: 13px;
  margin: 12px 0 0;
}

.has-user .sanctuary-actions .button.secondary {
  border-color: rgba(255, 221, 139, 0.28);
  background: linear-gradient(180deg, #d4a23f, #9e6d27);
  color: #fff8e8;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.has-user .sanctuary-actions .button.secondary:active {
  filter: brightness(1.08);
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.has-user #user-panel,
.has-user #journey-panel,
.has-user #saved-panel,
.has-user #guest-panel {
  margin: 16px 18px;
}

.has-user #user-panel {
  margin-top: 22px;
}

.has-user #guest-panel {
  margin-top: 22px;
  border-color: rgba(198, 155, 69, 0.22);
}

.is-guest #bracelet-panel {
  margin: 16px 18px;
}

.has-user #journey-panel {
  margin-bottom: 16px;
}

.ar-experience {
  display: none;
}

.has-user .ar-experience {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px 16px;
  align-items: center;
  margin: 0;
  padding: 28px 22px;
  background:
    radial-gradient(circle at 12% 20%, rgba(223, 183, 92, 0.2), transparent 30%),
    linear-gradient(145deg, #102f2b, #081b1f);
  color: #fff8e8;
}

.ar-experience-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 221, 139, 0.52);
  border-radius: 50%;
  color: #f1cb75;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.ar-experience-copy {
  min-width: 0;
}

.ar-experience .eyebrow {
  margin-bottom: 5px;
  color: #e4bd63;
  font-size: 11px;
}

.ar-experience h2 {
  margin: 0;
  color: #fffaf0;
  font-size: 21px;
  line-height: 1.18;
}

.ar-experience-copy > p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 250, 236, 0.7);
  font-size: 14px;
  line-height: 1.5;
}

#activation-form[hidden] {
  display: none;
}

.ar-scan-guide {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0 0;
  text-align: center;
}

.ar-scan-guide img {
  display: block;
  width: min(100%, 200px);
  height: auto;
  aspect-ratio: 2.65;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 10px;
  border: 1px solid rgba(241, 203, 117, 0.28);
  border-radius: 6px;
  filter: saturate(0.78) brightness(0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.ar-scan-guide figcaption {
  display: grid;
  gap: 5px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.ar-scan-guide strong {
  color: #d0d8d1;
  font-size: 13px;
  font-weight: 600;
}

.ar-experience-link {
  display: flex;
  grid-column: 1 / -1;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 224, 151, 0.62);
  border-radius: 8px;
  background: linear-gradient(180deg, #d6a53f, #a47128);
  padding: 0 18px;
  color: #fffaf0;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, filter 160ms ease;
}

.ar-experience-link:active {
  filter: brightness(1.08);
  transform: scale(0.99);
}

.ar-experience-link:focus-visible,
.ar-viewing-guide > summary:focus-visible {
  outline: 3px solid #fff3c9;
  outline-offset: 3px;
}

.ar-experience-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: rgba(255, 250, 236, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.ar-viewing-guide {
  grid-column: 1 / -1;
  min-width: 0;
  border-top: 1px solid rgba(255, 224, 151, 0.22);
  color: #e1e6df;
  font-size: 14px;
  line-height: 1.6;
}

.ar-viewing-guide > summary {
  min-height: 44px;
  padding: 12px 0;
  color: #f1cb75;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.ar-viewing-guide-content {
  padding: 4px 0 0;
  overflow-wrap: break-word;
}

.ar-viewing-guide ol,
.ar-viewing-guide ul {
  margin: 0;
  padding-left: 22px;
}

.ar-viewing-guide li + li {
  margin-top: 12px;
}

.ar-viewing-guide strong {
  color: #fffaf0;
}

.ar-viewing-guide h3 {
  margin: 22px 0 10px;
  color: #fffaf0;
  font-size: 15px;
  line-height: 1.4;
}

.ar-viewing-guide .ar-return-note {
  margin: 20px 0 0;
  color: #d0d8d1;
}

.moment-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.moment-action {
  min-width: 82px;
  min-height: 40px;
  border: 1px solid rgba(255, 220, 139, 0.32);
  border-radius: 8px;
  background: rgba(255, 250, 236, 0.06);
  color: rgba(255, 250, 236, 0.86);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.moment-action[aria-pressed="true"] {
  border-color: rgba(255, 215, 121, 0.7);
  background: rgba(206, 154, 53, 0.24);
  color: #ffe3a1;
}

.moment-action:active {
  transform: scale(0.98);
}

.moment-action.is-syncing {
  cursor: progress;
  box-shadow: 0 0 0 3px rgba(255, 215, 121, 0.12);
  animation: save-confirm 760ms ease-in-out infinite alternate;
}

@keyframes save-confirm {
  to { box-shadow: 0 0 0 6px rgba(255, 215, 121, 0.04); }
}

.saved-panel {
  border-color: rgba(198, 155, 69, 0.22);
}

.saved-moments-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.saved-moment-item {
  border: 1px solid rgba(47, 109, 85, 0.14);
  border-radius: 8px;
  background: rgba(238, 243, 239, 0.72);
  padding: 14px;
}

.saved-moment-open {
  display: grid;
  width: 100%;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.saved-moment-type,
.saved-moment-open-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.saved-moment-preview {
  display: -webkit-box;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.saved-moment-open-label {
  justify-self: end;
  text-transform: none;
}

.saved-moment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.saved-moment-meta button {
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  padding: 6px 0;
}

.saved-empty {
  margin: 0;
  color: var(--muted);
}

.has-user #user-panel {
  border-color: rgba(198, 155, 69, 0.22);
}

.my-panel {
  scroll-margin-top: 16px;
}

.account-form {
  border-top: 1px solid rgba(217, 223, 217, 0.78);
  margin-top: 18px;
  padding-top: 16px;
}

.account-form input:disabled {
  background: #eef3ef;
  color: var(--muted);
}

.account-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.account-details summary::-webkit-details-marker {
  display: none;
}

.account-details summary .eyebrow {
  display: block;
  margin-bottom: 5px;
}

.account-details summary strong {
  display: block;
  font-size: 24px;
}

.summary-hint {
  border: 1px solid rgba(47, 109, 85, 0.18);
  border-radius: 999px;
  background: rgba(47, 109, 85, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.account-details[open] .summary-hint {
  background: var(--green);
  color: #fff;
}

.save-journey-dialog {
  width: min(calc(100% - 28px), 440px);
  margin: auto auto max(14px, env(safe-area-inset-bottom));
  border: 1px solid rgba(225, 191, 112, 0.36);
  border-radius: 8px;
  background: #f9f7ef;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 80px rgba(3, 14, 16, 0.42);
}

.save-journey-dialog::backdrop {
  background: rgba(3, 13, 16, 0.68);
  backdrop-filter: blur(5px);
}

.save-journey-content {
  padding: 26px 22px 22px;
}

.save-journey-content h2 {
  font-size: 28px;
  line-height: 1.12;
}

.save-journey-content > p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.save-journey-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.save-journey-actions .button {
  width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .save-journey-dialog[open] {
    animation: saveSheetIn 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

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

.share-dialog {
  width: min(calc(100% - 24px), 520px);
  max-height: calc(calc(100 * var(--viewport-dvh)) - 24px);
  border: 1px solid rgba(225, 191, 112, 0.34);
  border-radius: 8px;
  background: #f7f7f1;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 26px 90px rgba(3, 14, 16, 0.46);
  overscroll-behavior: contain;
}

.saved-detail-dialog {
  width: min(calc(100% - 24px), 560px);
  max-height: calc(calc(100 * var(--viewport-dvh)) - 24px);
  border: 1px solid rgba(225, 191, 112, 0.34);
  border-radius: 8px;
  background: #102c27;
  color: #fff8e8;
  padding: 0;
  box-shadow: 0 26px 90px rgba(3, 14, 16, 0.55);
  overscroll-behavior: contain;
}

.saved-detail-dialog::backdrop {
  background: rgba(3, 13, 16, 0.78);
  backdrop-filter: blur(5px);
}

.saved-detail-content {
  min-height: min(680px, calc(calc(100 * var(--viewport-dvh)) - 24px));
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: radial-gradient(circle at 50% 0, rgba(205, 163, 69, 0.2), transparent 42%);
}

.saved-detail-content .dialog-close,
.saved-detail-content .eyebrow {
  color: #efcf84;
}

.saved-detail-content h2 {
  color: #fff8e8;
}

#saved-detail-text {
  margin: auto 0 22px;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 6vw, 40px);
  line-height: 1.28;
}

.saved-detail-reference {
  margin: 0 0 12px;
  color: #efcf84;
  font-weight: 750;
}

.saved-detail-dialog .verse-source {
  color: rgba(255, 248, 232, 0.66);
}

.saved-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 520px) {
  .saved-detail-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100 * var(--viewport-dvh));
    height: calc(100 * var(--viewport-dvh));
    border: 0;
    border-radius: 0;
  }

  .saved-detail-content {
    min-height: calc(100 * var(--viewport-dvh));
    padding: 22px 20px max(22px, env(safe-area-inset-bottom));
  }

  .saved-detail-actions {
    grid-template-columns: 1fr;
  }
}

.share-dialog::backdrop {
  background: rgba(3, 13, 16, 0.72);
  backdrop-filter: blur(5px);
}

.share-dialog-content {
  padding: 20px;
}

.share-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.share-dialog-heading .eyebrow {
  margin-bottom: 6px;
}

.share-dialog-heading h2 {
  font-size: 24px;
}

.dialog-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  padding: 6px;
}

#share-canvas {
  display: block;
  width: min(100%, 330px);
  height: auto;
  margin: 18px auto 0;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 35, 28, 0.18);
}

.share-options {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 14px;
  margin-top: 18px;
}

.share-options label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.share-options select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.share-name-option {
  min-height: 42px;
  margin: 0;
}

.share-name-option span {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 14px !important;
}

.share-privacy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.share-actions .primary {
  grid-column: 1 / -1;
}

#share-status {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
}

@media (max-width: 420px) {
  .share-dialog-content {
    padding: 18px 16px;
  }

  #share-canvas {
    width: min(100%, 280px);
  }
}

@media (max-width: 420px) {
  .has-user .daily-panel {
    padding-inline: 14px;
  }

  .has-user .daily-card {
    padding: 0;
  }

  .has-user .daily-content {
    grid-template-rows: calc(35 * var(--viewport-svh)) minmax(0, 1fr);
  }

  .has-user .sacred-focus {
    top: calc(17.8 * var(--viewport-svh));
  }

  .has-user .daily-welcome {
    top: calc(calc(25 * var(--viewport-svh)) + 2px);
  }

  .sanctuary-art {
    height: min(calc(40 * var(--viewport-svh)), 360px);
  }

  .daily-card blockquote {
    font-size: 23px;
  }
}

.music-toggle,
.narration-toggle {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 16px;
  z-index: 3;
  width: 34px;
  height: 30px;
  border: 1px solid rgba(255, 221, 139, 0.24);
  border-radius: 999px;
  background: rgba(5, 17, 24, 0.36);
  color: rgba(255, 248, 232, 0.9);
  cursor: pointer;
  font: inherit;
  padding: 0;
  backdrop-filter: blur(10px);
}

.music-toggle::after,
.narration-toggle::after {
  position: absolute;
  left: 8px;
  top: 14px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: rotate(-42deg) scaleX(0.72);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.narration-toggle {
  right: 58px;
}

.audio-icon {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: block;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.music-toggle.is-muted {
  color: rgba(255, 221, 139, 0.66);
}

.music-toggle.is-muted::after,
.narration-toggle.is-muted::after {
  opacity: 1;
  transform: rotate(-42deg) scaleX(1);
}

.music-toggle.is-playing {
  border-color: rgba(255, 221, 139, 0.46);
  box-shadow: 0 0 18px rgba(255, 213, 126, 0.16);
}

.narration-toggle.is-muted {
  color: rgba(255, 221, 139, 0.66);
}


@keyframes crossRise {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.84);
  }
  38% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }
}

@keyframes blessingFade {
  0%,
  10% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  28%,
  88% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0.92;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes introHaloPulse {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes welcomeSettle {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px) scale(1.04);
    filter: blur(0.6px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes ringBreathe {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.92);
  }
  48% {
    opacity: 0.72;
    transform: scale(1.08);
  }
}

@keyframes rayBreathe {
  0%,
  100% {
    opacity: 0.32;
    transform: translateY(calc(8 * var(--viewport-svh))) scaleY(0.92);
  }
  50% {
    opacity: 0.68;
    transform: translateY(calc(8 * var(--viewport-svh))) scaleY(1.08);
  }
}

@keyframes holySweep {
  0% {
    transform: translateX(-58%);
  }
  100% {
    transform: translateX(62%);
  }
}

@keyframes cardDepart {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
}

.tab.is-active {
  background: var(--green);
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-form .check-row {
  grid-template-columns: 18px 1fr;
  align-items: start;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.auth-form .check-row input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
}

.auth-form .check-row a,
.form-note a,
.legal-links a,
.legal-page a {
  color: var(--green);
  font-weight: 800;
}

.form-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#register-form .registration-field .form-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

#register-form .registration-field-error {
  margin: 7px 0 0;
  color: #a52424;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

#register-form .registration-field-error[hidden] {
  display: none;
}

#register-form input[aria-invalid="true"] {
  border-color: #a52424;
  box-shadow: 0 0 0 1px #a52424;
}

.auth-form .muted[data-type="success"] {
  color: var(--green);
  font-weight: 700;
}

.auth-form .muted[data-type="error"] {
  color: #a13d2d;
  font-weight: 700;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.auth-form input,
.auth-form select {
  min-height: 42px;
}

.auth-form textarea {
  min-height: 92px;
  resize: vertical;
}

.is-hidden {
  display: none !important;
}

.admin-page {
  background: #f6f7f4;
}

.admin-panel {
  width: min(100%, 920px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
}

.admin-actions {
  align-items: center;
  margin-top: 24px;
}

.content-section {
  margin-top: 28px;
}

.compact-form {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.notice {
  margin-top: 14px;
  border: 1px solid #ead8ab;
  border-radius: 8px;
  background: #fff8e8;
  color: #6d5423;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px;
}

.record-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.record-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 10px 0;
}

.record-card small {
  color: var(--muted);
}

.record-card .actions {
  margin-top: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
  padding: 0 8px;
}

.risk {
  color: #a13d2d !important;
  font-weight: 700;
}

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

.admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

.admin-item strong {
  display: block;
  margin-bottom: 4px;
}

.admin-item span {
  color: var(--muted);
}

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

.mini-list-title {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.mini-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
}

.mini-list-item span {
  color: var(--muted);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
  padding: 0 14px 20px;
}

.legal-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 221, 139, 0.22), transparent 34%),
    var(--paper);
}

.legal-page .app-shell {
  width: min(100%, 840px);
}

.legal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(28, 43, 35, 0.08);
  padding: clamp(22px, 5vw, 42px);
}

.legal-panel h1 {
  margin-bottom: 10px;
}

.legal-panel h2 {
  margin-top: 26px;
}

.legal-panel p,
.legal-panel li {
  color: var(--muted);
  line-height: 1.65;
}

.legal-panel ul,
.legal-panel ol {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.legal-panel .actions {
  margin-top: 28px;
}

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

.stat-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  min-height: 86px;
  padding: 14px;
}

.stat-tile strong {
  display: block;
  color: var(--green);
  font-size: 26px;
  line-height: 1;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 8px;
}

/* 2026 US sanctuary redesign: quiet sacred companion */
.has-user .daily-panel {
  --sanctuary-accent: #d8b668;
  --sanctuary-sky: #173e37;
  --sanctuary-horizon: #566d4f;
  --sanctuary-depth: #07171a;
  min-height: calc(100 * var(--viewport-dvh));
  background:
    linear-gradient(180deg, rgba(5, 18, 21, 0.32), rgba(7, 23, 26, 0.04) 34%, rgba(7, 23, 26, 0.78) 78%, rgba(4, 15, 18, 0.98)),
    radial-gradient(circle at 50% 18%, rgba(242, 231, 190, 0.28), transparent 31%),
    linear-gradient(155deg, var(--sanctuary-sky), var(--sanctuary-horizon) 52%, var(--sanctuary-depth));
  transition: background 900ms ease;
  color-scheme: dark;
}

.has-user .daily-panel[data-step="blessing"],
.has-user .daily-panel[data-step="blessing-guide"] {
  --sanctuary-accent: #e1b766;
  --sanctuary-sky: #27483c;
  --sanctuary-horizon: #766342;
  --sanctuary-depth: #111c1c;
}

.has-user .daily-panel[data-step="prayer"],
.has-user .daily-panel[data-step="prayer-guide"] {
  --sanctuary-accent: #b5c8ba;
  --sanctuary-sky: #153a3c;
  --sanctuary-horizon: #30484a;
  --sanctuary-depth: #061317;
}

/* Reserve only one viewport before the hidden reading becomes visible. */
.has-user .daily-panel:not(.intro-complete):not(.intro-moving-home) {
  height: calc(100 * var(--viewport-svh));
  min-height: 0;
}
.has-user .daily-panel:not(.intro-complete):not(.intro-moving-home) .daily-content {
  position: absolute;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
}
.has-user .intro-stage {
  height: calc(100 * var(--viewport-svh));
  min-height: 0;
  bottom: auto;
}
.moment-action.is-confirmed { animation: savedConfirm 420ms ease-out; }
.moment-action[aria-pressed="true"]::before {
  content: "";
  width: 10px;
  height: 6px;
  margin-right: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
@keyframes savedConfirm {
  0% { transform: scale(.95); }
  55% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .moment-action.is-confirmed { animation: none; }
}
@media (max-height: 500px) {
  .has-user .intro-stage .intro-blessing { top: 72px; font-size: 20px; }
  .has-user .intro-stage .intro-start-button { bottom: 18px; min-height: 44px; }
}

.intro-brand {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 250, 232, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.48);
}

.intro-brand-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 237, 190, 0.68);
  border-radius: 50%;
}

.intro-brand-mark::before,
.intro-brand-mark::after {
  position: absolute;
  left: 50%;
  top: 50%;
  content: "";
  background: rgba(255, 245, 214, 0.86);
  transform: translate(-50%, -50%);
}

.intro-brand-mark::before { width: 1px; height: 10px; }
.intro-brand-mark::after { width: 7px; height: 1px; top: 43%; }

.has-user .intro-stage {
  background:
    linear-gradient(180deg, rgba(4, 16, 20, 0.52), rgba(18, 51, 45, 0.08) 44%, rgba(50, 42, 29, 0.36)),
    url("/assets/images/sanctuary-dawn.jpg") center top / cover no-repeat,
    #17382e;
}

.intro-stage::before {
  opacity: 0.72;
  animation-duration: 7.2s;
}

.intro-blessing {
  top: clamp(108px, calc(21 * var(--viewport-svh)), 190px);
  color: rgba(255, 252, 239, 0.96);
  font-size: clamp(20px, 5.6vw, 29px);
  font-weight: 500;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.56);
}

.intro-blessing .welcome-name {
  margin-top: 10px;
  color: #fffdf4;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78em;
  font-weight: 750;
}

.intro-start-button {
  top: auto;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 22px));
  min-height: 56px;
  border-color: rgba(255, 241, 205, 0.62);
  background: rgba(247, 241, 222, 0.94);
  box-shadow: 0 18px 50px rgba(2, 12, 14, 0.3);
  color: #173a32;
  text-shadow: none;
}

.has-user .daily-content {
  width: min(100%, 600px);
  grid-template-rows: calc(33 * var(--viewport-svh)) minmax(0, 1fr);
  min-height: calc(calc(100 * var(--viewport-dvh)) - max(10px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
}

.has-user .sanctuary-header {
  top: max(18px, env(safe-area-inset-top));
  left: 20px;
  grid-template-columns: 18px auto;
  align-items: start;
  column-gap: 9px;
}

.sanctuary-brand-copy {
  display: grid;
  justify-items: start;
  min-width: 0;
}

.sanctuary-brand-mark {
  display: block;
  flex: 0 0 18px;
  margin-top: 0;
}

.has-user .sanctuary-header .eyebrow {
  color: rgba(255, 248, 229, 0.82);
  margin-bottom: 3px;
  font-size: 11px;
}

.has-user .sanctuary-header h2 {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 248, 232, 0.72);
  font-size: 12px;
  padding: 0;
}

.has-user .sacred-focus {
  top: calc(16 * var(--viewport-svh));
}

.has-user .sanctuary-light {
  top: calc(calc(16 * var(--viewport-svh)) - 44vmax);
  opacity: 0.56;
  animation-duration: 8s;
}

.has-user .daily-welcome {
  top: calc(calc(23 * var(--viewport-svh)) + 2px);
  color: rgba(255, 250, 232, 0.82);
}

.has-user .welcome-line {
  font-size: clamp(16px, 4.4vw, 21px);
}

.has-user .welcome-name {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(15px, 4.2vw, 19px);
  font-weight: 750;
}

.has-user .sanctuary-bottom-sheet {
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 24, 24, 0.06), rgba(5, 18, 21, 0.66) 24%, rgba(4, 15, 18, 0.92));
  box-shadow: none;
  padding: 18px 8px 8px;
  backdrop-filter: none;
}

.has-user .sanctuary-bottom-sheet::before {
  display: none;
}

.has-user .step-indicator {
  position: relative;
  gap: 0;
  width: min(100%, 360px);
  margin: 0 auto 10px;
}

.has-user .step-indicator::before {
  position: absolute;
  left: 16.66%;
  right: 16.66%;
  bottom: 0;
  height: 1px;
  content: "";
  background: rgba(255, 247, 225, 0.16);
}

.has-user .step-indicator button {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 248, 232, 0.68);
  font-size: 13px;
}

.has-user .step-indicator button::after {
  width: 0;
  height: 1px;
  border-radius: 0;
  background: var(--sanctuary-accent);
  transition: width 280ms ease;
}

.has-user .step-indicator button.is-active {
  color: rgba(255, 252, 241, 0.96);
}

.has-user .step-indicator button.is-active::after {
  width: 42%;
}

.has-user .daily-card {
  padding: 10px 14px 0;
}

.has-user .daily-label {
  margin-bottom: 18px;
  color: var(--sanctuary-accent);
  font-size: 11px;
  text-transform: uppercase;
}

.has-user .daily-card blockquote {
  max-width: 18ch;
  color: #fffdf4;
  font-size: clamp(27px, 7.7vw, 41px);
  line-height: 1.2;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.has-user #daily-blessing-body,
.has-user #prayer-body {
  max-width: 34ch;
  color: rgba(255, 252, 241, 0.9);
  font-size: clamp(20px, 5.3vw, 27px);
  line-height: 1.5;
}

.has-user .sanctuary-actions .button {
  min-height: 52px;
  border-radius: 8px;
  background: rgba(247, 241, 222, 0.94);
  color: #173a32;
}

.has-user .moment-action {
  border-color: rgba(255, 248, 232, 0.24);
  background: transparent;
  color: rgba(255, 250, 238, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  .has-user .daily-panel,
  .intro-stage::before,
  .has-user .sanctuary-light {
    animation: none !important;
    transition: none !important;
  }

  .has-user .daily-panel *,
  .has-user .daily-panel *::before,
  .has-user .daily-panel *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

h1,
h2,
h3,
.intro-blessing,
.care-note {
  text-wrap: balance;
}

.has-user .my-panel .button.secondary {
  color: var(--green);
  background: #f4f8f5;
  border-color: #c7d8cd;
}

.my-panel .auth-form input {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
