/* Tier 1 Home-only Sabbath School styles. Full reader styles load after Home readiness. */
.sabbath-school-launch-card {
  position: relative;
  display: flex;
  min-height: clamp(280px, 64vw, 420px);
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-color: rgba(199, 161, 78, 0.22);
  background: linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(250, 238, 208, 0.94));
  box-shadow: 0 18px 34px rgba(117, 86, 24, 0.16);
}

.sabbath-school-launch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("home-sabbath-school.webp") 62% 44% / cover no-repeat;
  opacity: 1;
  transform: none;
  transition: none;
}

.sabbath-school-launch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      0deg,
      rgba(255, 250, 239, 0.94) 0%,
      rgba(255, 248, 232, 0.58) 14%,
      rgba(255, 247, 230, 0.14) 28%,
      rgba(255, 247, 230, 0) 40%
    );
}

.sabbath-school-launch-btn {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  min-height: clamp(168px, 36vw, 224px);
  padding: 14px 14px 0;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: inherit;
  touch-action: auto;
  overflow: hidden;
}

.sabbath-school-launch-top {
  display: block;
  width: 100%;
  min-width: 0;
}

.sabbath-school-launch-head {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sabbath-school-launch-title-wrap,
.sabbath-school-launch-copy {
  min-width: 0;
}

.sabbath-school-launch-copy {
  display: inline-grid;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 1px 10px 4px 0;
  margin: -2px 0 0;
  background: linear-gradient(
    90deg,
    rgba(255, 251, 241, 0.92) 0%,
    rgba(255, 249, 238, 0.74) 44%,
    rgba(255, 249, 238, 0.59) 64%,
    rgba(255, 249, 238, 0) 100%
  );
  border-radius: 0 12px 12px 0;
}

.sabbath-school-demo-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8d6b17;
}

.sabbath-school-demo-title {
  margin: 0;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 720;
  line-height: 1.02;
  color: #4b3310;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: normal;
  hyphens: manual;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34),
    0 8px 18px rgba(255, 244, 220, 0.42);
}

.sabbath-school-demo-title.is-compact-copy {
  font-size: 16px;
}

.sabbath-school-demo-help {
  margin: 0;
  max-width: 26ch;
  font-size: 0.79rem;
  line-height: 1.55;
  color: rgba(74, 51, 16, 0.92);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.sabbath-school-demo-badge,
.sabbath-school-launch-footer,
.sabbath-school-launch-cta,
.sabbath-school-launch-hero-icon {
  display: none;
}

.sabbath-school-launch-reflection {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0 12px 0;
}

#sabbathSchoolDemoReflectionHome {
  margin-top: auto;
  min-height: 60px;
  padding-top: 0;
  padding-bottom: 0;
}

#sabbathSchoolDemoReflectionHome .sabbath-school-reflection-summary {
  display: none;
}

.sabbath-school-reflection-strip {
  display: grid;
  grid-template-columns: repeat(var(--sabbath-school-reflection-day-count, 6), minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.sabbath-school-reflection-cell {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-width: 0;
}

.sabbath-school-reflection-cell.is-placeholder {
  justify-items: stretch;
}

.sabbath-school-reflection-cell-placeholder {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border: 1px solid rgba(180, 144, 39, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 5px;
  align-content: center;
}

.sabbath-school-reflection-cell-button,
.sabbath-school-reflection-cell-indicator {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border: 1px solid rgba(180, 144, 39, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #59411a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.sabbath-school-reflection-cell-button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.sabbath-school-reflection-cell-button:focus-visible {
  outline: 2px solid rgba(180, 132, 20, 0.28);
  outline-offset: 2px;
}

.sabbath-school-reflection-cell-token,
.sabbath-school-reflection-cell-date {
  display: block;
  text-align: center;
  white-space: nowrap;
}

.sabbath-school-reflection-cell-token {
  font-size: 0.68rem;
  font-weight: 700;
  color: #8b6a28;
}

.sabbath-school-reflection-cell-date {
  font-size: 0.78rem;
  font-weight: 760;
  color: #59411a;
}

.sabbath-school-demo-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sabbath-school-demo-chip {
  border: 1px solid rgba(183, 146, 38, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  padding: 8px 11px;
  font: inherit;
  font-size: 0.78rem;
  color: #6d5830;
  cursor: pointer;
}

.sabbath-school-demo-chip:focus-visible {
  outline: 2px solid rgba(180, 132, 20, 0.26);
  outline-offset: 2px;
}

.sabbath-school-demo-chip.is-active {
  border-color: rgba(180, 132, 20, 0.5);
  background: linear-gradient(135deg, rgba(255, 238, 172, 0.9), rgba(255, 220, 117, 0.85));
  color: #50390b;
  box-shadow: 0 8px 16px rgba(180, 132, 20, 0.18);
}

.sabbath-school-launch-open-btn {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  z-index: 3;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: clamp(168px, 36vw, 224px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  cursor: pointer;
}

body.native-app .sabbath-school-launch-open-btn {
  pointer-events: none;
  cursor: default;
}

.sabbath-school-launch-open-btn.is-stealth {
  position: fixed;
  top: 50vh;
  left: 2px;
  z-index: 200;
  width: 2px;
  min-width: 2px;
  max-width: 2px;
  height: 2px;
  min-height: 2px;
  padding: 0;
  border: 0;
  margin: 0;
  opacity: 0;
}

.sabbath-school-daily-question-home-wrap {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0;
  position: relative;
  z-index: 2;
}

.sabbath-school-daily-question-beacon {
  position: absolute;
  top: 18%;
  left: 76.8%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  overflow: visible;
}

.sabbath-school-daily-question-beacon:focus-visible {
  outline: 2px solid rgba(183, 140, 42, 0.36);
  outline-offset: 4px;
}

.sabbath-school-daily-question-beacon-core,
.sabbath-school-daily-question-beacon-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
}

.sabbath-school-daily-question-beacon-core {
  z-index: 2;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 249, 232, 0.9);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(224, 195, 116, 0.24),
    0 0 22px rgba(255, 239, 191, 0.34);
}

.sabbath-school-daily-question-beacon-ring {
  width: 26px;
  height: 26px;
  border: 2.8px solid rgba(255, 248, 228, 0.92);
  box-shadow:
    0 0 16px rgba(244, 214, 137, 0.24),
    inset 0 0 8px rgba(255, 248, 228, 0.24);
  opacity: 0;
  animation: sabbath-school-daily-question-beacon-wave 4.2s cubic-bezier(0.17, 0.67, 0.32, 1) infinite;
}

.sabbath-school-daily-question-beacon-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sabbath-school-daily-question-beacon-ring.is-second {
  animation-delay: 0.38s;
}

.sabbath-school-daily-question-beacon-ring.is-third {
  animation-delay: 0.76s;
}

.sabbath-school-daily-question-beacon-ring.is-fourth {
  animation-delay: 1.14s;
}

@keyframes sabbath-school-daily-question-beacon-wave {
  0%,
  20% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.36);
  }

  21% {
    opacity: 0.92;
  }

  36% {
    opacity: 0.58;
  }

  58%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.85);
  }
}

@media (max-width: 640px) {
  .sabbath-school-launch-btn {
    min-height: 124px;
    padding: 12px;
  }

  .sabbath-school-reflection-strip {
    gap: 5px;
  }

  .sabbath-school-reflection-cell-button,
  .sabbath-school-reflection-cell-indicator {
    min-height: 44px;
    padding: 5px 3px;
  }

  .sabbath-school-daily-question-beacon {
    top: 15.1%;
    left: 72.2%;
    width: 88px;
    height: 88px;
  }

  .sabbath-school-daily-question-home-wrap {
    padding: 0 12px 8px;
  }
}

@media (max-width: 430px) {
  .sabbath-school-launch-btn {
    min-height: 118px;
    gap: 8px;
  }

  .sabbath-school-launch-copy {
    padding-right: 28px;
    margin-right: -28px;
  }

  .sabbath-school-daily-question-beacon {
    width: 82px;
    height: 82px;
  }
}

html body.native-app .sabbath-school-launch-card {
  display: flex;
  height: clamp(300px, 72vw, 380px);
  min-height: clamp(300px, 72vw, 380px);
  flex-direction: column;
  justify-content: flex-start;
  background: linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(250, 238, 208, 0.94));
  box-shadow: 0 18px 34px rgba(117, 86, 24, 0.16);
}

html body.native-app .sabbath-school-launch-card::before {
  background: url("home-sabbath-school.webp") 62% 44% / cover no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 1;
  transform: none;
  transition: none;
}

html body.native-app .sabbath-school-launch-btn {
  display: grid;
  align-content: start;
  min-height: clamp(168px, 36vw, 224px);
  grid-template-columns: none;
  align-items: initial;
  gap: 10px;
  padding: 14px 14px 0;
  background: transparent;
  isolation: auto;
  touch-action: auto;
}

html body.native-app .sabbath-school-launch-btn::before,
html body.native-app .sabbath-school-launch-btn::after {
  content: none;
}

@media (max-width: 640px) {
  html body.native-app .sabbath-school-launch-btn {
    min-height: 124px;
    padding: 12px;
  }
}

@media (max-width: 430px) {
  html body.native-app .sabbath-school-launch-btn {
    min-height: 118px;
    gap: 8px;
  }
}

/* Keep the boot-visible Home shell identical to the later reflection stylesheet. */
@media (max-width: 768px) {
  #sabbathSchoolDemoCard,
  html body.native-app #sabbathSchoolDemoCard {
    height: clamp(300px, 72vw, 380px);
    min-height: clamp(300px, 72vw, 380px);
  }

  #sabbathSchoolLaunchHero,
  html body.native-app #sabbathSchoolLaunchHero {
    min-height: clamp(150px, 34vw, 192px);
    padding: 12px 12px 0;
  }

  #openSabbathSchoolReaderBtn.sabbath-school-launch-open-btn {
    height: clamp(150px, 34vw, 192px);
  }

  #sabbathSchoolLaunchHero .sabbath-school-launch-copy {
    max-width: calc(100% - 24px);
  }

  #sabbathSchoolLaunchHero .sabbath-school-demo-title {
    font-size: clamp(18px, 4.6vw, 21px);
  }

  .sabbath-school-reflection-strip {
    gap: 6px;
  }

  .sabbath-school-reflection-cell-button,
  .sabbath-school-reflection-cell-indicator {
    min-height: 42px;
    padding-inline: 2px;
  }
}

@media (max-width: 640px) {
  #sabbathSchoolDailyQuestionReminderHome {
    padding-bottom: 0;
  }

  #sabbathSchoolDemoReflectionHome {
    padding-inline: 12px;
    padding-bottom: 0;
  }

  .sabbath-school-reflection-strip {
    gap: 4px;
  }

  .sabbath-school-reflection-cell-button,
  .sabbath-school-reflection-cell-indicator {
    min-height: 48px;
    padding: 6px 2px 5px;
    border-radius: 16px;
  }

  .sabbath-school-reflection-cell-date {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .sabbath-school-reflection-cell-token {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 430px) {
  #sabbathSchoolLaunchHero,
  html body.native-app #sabbathSchoolLaunchHero {
    min-height: 136px;
    padding: 10px 12px 0;
  }

  #openSabbathSchoolReaderBtn.sabbath-school-launch-open-btn {
    height: 136px;
  }

  #sabbathSchoolLaunchHero .sabbath-school-launch-copy {
    max-width: calc(100% - 24px);
  }

  #sabbathSchoolLaunchHero .sabbath-school-demo-title {
    font-size: clamp(17px, 4.5vw, 20px);
  }
}

/* Keep the first Home frame geometry owned by the Home shell even after deferred reader styles load. */
#sabbathSchoolDemoCard .sabbath-school-launch-btn {
  min-height: clamp(168px, 36vw, 224px);
  padding: 14px 14px 0;
  gap: 10px;
  overflow: hidden;
}

#sabbathSchoolDemoCard .sabbath-school-launch-copy {
  display: inline-grid;
  width: max-content;
  max-width: calc(100% - 24px);
  min-width: 0;
  padding: 1px 10px 4px 0;
  margin: -2px 0 0;
  border-radius: 0 12px 12px 0;
}

#sabbathSchoolDemoCard .sabbath-school-demo-eyebrow {
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#sabbathSchoolDemoCard #sabbathSchoolLaunchHero .sabbath-school-demo-title {
  display: block;
  max-width: 100%;
  font-size: clamp(18px, 4.6vw, 22px);
  line-height: 1.02;
  overflow: visible;
  overflow-wrap: normal;
  hyphens: manual;
  white-space: nowrap;
}

#sabbathSchoolDemoCard #sabbathSchoolLaunchHero .sabbath-school-demo-title.is-compact-copy {
  font-size: 16px;
}

#sabbathSchoolDemoCard #sabbathSchoolLaunchHero .sabbath-school-demo-help {
  max-width: 26ch;
  line-height: 1.55;
  overflow-wrap: anywhere;
  hyphens: auto;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome {
  margin-top: auto;
  min-height: 60px;
  padding-top: 0;
  padding-bottom: 0;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-summary {
  display: none;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-strip {
  display: grid;
  grid-template-columns: repeat(var(--sabbath-school-reflection-day-count, 6), minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-width: 0;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell.is-placeholder {
  justify-items: stretch;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-placeholder {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border-radius: 14px;
  display: grid;
  gap: 5px;
  align-content: center;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-button,
#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-indicator {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border-radius: 14px;
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
  text-align: center;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-token,
#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-date {
  display: block;
  text-align: center;
  white-space: nowrap;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-token {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

#sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-date {
  font-size: 0.78rem;
  font-weight: 760;
  line-height: normal;
  overflow-wrap: normal;
}

@media (max-width: 768px) {
  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-strip {
    gap: 6px;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-button,
  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-indicator {
    min-height: 42px;
    padding-inline: 2px;
  }
}

@media (max-width: 640px) {
  #sabbathSchoolDemoCard .sabbath-school-launch-btn {
    min-height: 124px;
    padding: 12px;
  }

  #sabbathSchoolDemoCard .sabbath-school-launch-copy {
    padding-right: 28px;
    margin-right: -28px;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDailyQuestionReminderHome {
    padding-bottom: 0;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome {
    padding-inline: 12px;
    padding-bottom: 0;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-strip {
    gap: 4px;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-button,
  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-indicator {
    min-height: 48px;
    padding: 6px 2px 5px;
    border-radius: 16px;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-date {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  #sabbathSchoolDemoCard #sabbathSchoolDemoReflectionHome .sabbath-school-reflection-cell-token {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 430px) {
  #sabbathSchoolDemoCard .sabbath-school-launch-btn {
    min-height: 118px;
    gap: 8px;
  }

  #sabbathSchoolDemoCard #sabbathSchoolLaunchHero .sabbath-school-demo-title {
    font-size: clamp(17px, 4.5vw, 20px);
  }
}
