@font-face {
  font-family: "Laiti Healing";
  src: url("/assets/laiti-regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  color-scheme: light;
  --paper: #f7eddf;
  --paper-deep: #efe0cd;
  --ink: #51457f;
  --ink-deep: #39305f;
  --muted: #766d7c;
  --muted-light: #918793;
  --lavender: #655cc9;
  --lavender-soft: #d9d5f4;
  --rose: #d69aa7;
  --rose-soft: #edd2d7;
  --gold: #cbaa78;
  --gold-soft: #e6cfaa;
  --line: rgba(91, 67, 99, 0.14);
  --glass: rgba(255, 255, 255, 0.58);
  --shadow: 0 28px 80px rgba(83, 60, 91, 0.12);
  --serif: "Laiti Healing", "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 7%, rgba(229, 199, 208, 0.44), transparent 28rem),
    radial-gradient(circle at 91% 19%, rgba(206, 190, 226, 0.45), transparent 32rem),
    linear-gradient(180deg, #fdfaf9 0%, #f8f3f5 43%, #fbf8f7 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

button,
select,
input {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
}

::selection {
  color: #fff;
  background: rgba(126, 91, 153, 0.8);
}

.page-shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

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

.ambient {
  position: fixed;
  z-index: -3;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
  pointer-events: none;
}

.ambient-one {
  top: -24rem;
  left: -17rem;
  background: #e5a8b7;
}

.ambient-two {
  top: 31rem;
  right: -24rem;
  background: #ac8ed0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

.site-header {
  position: relative;
  z-index: 20;
  padding: 26px 0;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.brand:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.brand-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(98, 86, 201, 0.16);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 8px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.32em;
}

.home-hint {
  margin: 7px 0 0 89px;
  color: rgba(85, 72, 91, 0.55);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 9px 2px 9px 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.13em;
  border-bottom: 1px solid rgba(91, 67, 99, 0.27);
  transition: color 180ms ease, border-color 180ms ease;
}

.header-link span {
  font-size: 16px;
  transition: transform 180ms ease;
}

.header-link:hover {
  color: var(--ink-deep);
  border-color: var(--ink-deep);
}

.header-link:hover span {
  transform: translateY(3px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 690px;
  place-content: center;
  padding: 96px 0 130px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  line-height: 1.4;
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(53px, 8.2vw, 92px);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.16;
  text-shadow: 0 16px 45px rgba(82, 57, 91, 0.08);
}

.hero h1::after {
  content: "";
  display: block;
  width: 74px;
  height: 1px;
  margin: 34px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-lead {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 29px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 2.1;
}

.hero-orbit {
  position: absolute;
  top: 47%;
  left: 50%;
  border: 1px solid rgba(148, 111, 173, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: min(62vw, 680px);
  aspect-ratio: 1;
  box-shadow: inset 0 0 110px rgba(255, 255, 255, 0.38), 0 0 100px rgba(214, 172, 203, 0.16);
  animation: breathe 8s ease-in-out infinite;
}

.orbit-two {
  width: min(46vw, 500px);
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(185, 140, 79, 0.16);
  animation: slowSpin 42s linear infinite;
}

.spark {
  position: absolute;
  color: rgba(184, 139, 80, 0.6);
  font-size: 18px;
  animation: twinkle 3.6s ease-in-out infinite;
}

.spark-one {
  top: 25%;
  left: 20%;
}

.spark-two {
  top: 34%;
  right: 20%;
  font-size: 25px;
  animation-delay: 1.2s;
}

.spark-three {
  right: 30%;
  bottom: 25%;
  font-size: 12px;
  animation-delay: 2s;
}

.scroll-cue {
  position: absolute;
  bottom: 54px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: rgba(82, 69, 88, 0.55);
  font-size: 10px;
  letter-spacing: 0.22em;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: rgba(99, 74, 105, 0.14);
}

.scroll-cue i::after {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 70%;
  content: "";
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: scrollLine 2.4s ease-in-out infinite;
}

.ritual {
  padding: 120px 0 170px;
}

.section-heading {
  max-width: 660px;
  margin: 0 auto 76px;
  text-align: center;
}

.section-heading h2,
.prayer-block h2,
.message-panel h2 {
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.section-heading > p:last-child {
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.ritual-list {
  position: relative;
  display: grid;
  gap: 28px;
  width: min(920px, 100%);
  margin: 0 auto;
}

.ritual-list::before {
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 50%;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(186, 143, 82, 0.35) 12%, rgba(148, 114, 169, 0.22) 88%, transparent);
}

.ritual-step {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  width: calc(50% + 348px);
  min-height: 220px;
  padding: 34px 38px 36px 34px;
  border: 1px solid rgba(106, 78, 112, 0.1);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.67), rgba(255, 255, 255, 0.31));
  box-shadow: 0 20px 64px rgba(72, 52, 77, 0.08);
  backdrop-filter: blur(12px);
}

.ritual-step:nth-child(odd) {
  justify-self: start;
  clip-path: inset(0 0 0 0 round 32px);
}

.ritual-step:nth-child(even) {
  justify-self: end;
}

.ritual-step:nth-child(odd)::after,
.ritual-step:nth-child(even)::after {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  content: "";
  border: 6px solid var(--paper);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--lavender));
  box-shadow: 0 0 0 1px rgba(148, 111, 173, 0.22), 0 0 30px rgba(148, 111, 173, 0.25);
  transform: translateY(-50%);
}

.ritual-step:nth-child(odd)::after {
  right: 337px;
}

.ritual-step:nth-child(even)::after {
  left: 337px;
}

.step-number {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--gold);
  line-height: 1;
}

.step-number span {
  margin-top: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  writing-mode: vertical-rl;
}

.step-number strong {
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.04em;
  opacity: 0.78;
}

.step-copy {
  position: relative;
  padding-top: 5px;
}

.step-symbol {
  position: absolute;
  top: -14px;
  right: -4px;
  color: rgba(147, 105, 165, 0.18);
  font-family: Georgia, serif;
  font-size: 62px;
  line-height: 1;
}

.step-copy h3 {
  position: relative;
  margin: 0;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.step-copy h3::after {
  display: block;
  width: 34px;
  height: 1px;
  margin: 17px 0;
  content: "";
  background: linear-gradient(90deg, var(--gold), transparent);
}

.step-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.035em;
}

.draw-section {
  padding: 10px 0 150px;
}

.draw-panel {
  position: relative;
  overflow: hidden;
  width: min(970px, 100%);
  margin: 0 auto;
  padding: 88px clamp(28px, 7vw, 92px) 82px;
  border: 1px solid rgba(116, 87, 120, 0.13);
  border-radius: 44px;
  background:
    radial-gradient(circle at 50% 0%, rgba(235, 214, 226, 0.66), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(250, 245, 248, 0.54));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.draw-panel::before,
.draw-panel::after {
  position: absolute;
  width: 22rem;
  height: 22rem;
  content: "";
  border: 1px solid rgba(167, 126, 175, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.draw-panel::before {
  top: -15rem;
  left: -6rem;
}

.draw-panel::after {
  right: -8rem;
  bottom: -17rem;
}

.panel-star {
  position: absolute;
  color: rgba(184, 139, 80, 0.45);
}

.star-left {
  top: 60px;
  left: 58px;
  font-size: 20px;
}

.star-right {
  right: 58px;
  bottom: 64px;
  font-size: 27px;
}

.prayer-block {
  position: relative;
  z-index: 1;
  text-align: center;
}

.prayer-block blockquote {
  max-width: 670px;
  margin: 36px auto 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 2.15;
}

.prayer-block blockquote p {
  margin: 0;
}

.prayer-block blockquote p:first-child {
  margin-bottom: 10px;
}

.draw-divider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 54px auto 48px;
  color: var(--gold);
  font-size: 11px;
}

.draw-divider::before,
.draw-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(157, 120, 97, 0.2));
}

.draw-divider::after {
  background: linear-gradient(90deg, rgba(157, 120, 97, 0.2), transparent);
}

.birthday-form {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.form-hint {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: center;
}

.birthday-form fieldset {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  padding: 0;
  margin: 0;
  border: 0;
}

.birthday-form label {
  display: grid;
  gap: 8px;
}

.birthday-form label > span {
  padding-left: 4px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.birthday-form select {
  width: 100%;
  min-height: 58px;
  padding: 0 45px 0 19px;
  color: var(--ink);
  border: 1px solid rgba(99, 74, 105, 0.16);
  border-radius: 16px;
  outline: 0;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.72);
  background-image:
    linear-gradient(45deg, transparent 50%, #9a829e 50%),
    linear-gradient(135deg, #9a829e 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 26px,
    calc(100% - 16px) 26px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  box-shadow: 0 8px 28px rgba(66, 49, 72, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.birthday-form select:hover {
  border-color: rgba(131, 94, 139, 0.3);
  background-color: rgba(255, 255, 255, 0.9);
}

.birthday-form select:focus-visible {
  border-color: rgba(142, 100, 154, 0.58);
  box-shadow: 0 0 0 4px rgba(147, 112, 169, 0.11);
}

.birthday-form select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.form-error {
  min-height: 25px;
  margin: 10px 0 4px;
  color: #aa5d68;
  font-size: 13px;
  text-align: center;
}

.has-error select:invalid {
  border-color: rgba(173, 91, 104, 0.5);
}

.draw-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(410px, 100%);
  min-height: 66px;
  gap: 16px;
  margin: 18px auto 0;
  overflow: hidden;
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(105deg, #8d6ba4 0%, #a56d91 54%, #c78d82 100%);
  box-shadow: 0 16px 38px rgba(118, 78, 122, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 600;
  letter-spacing: 0.13em;
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.draw-button::before {
  position: absolute;
  top: -80%;
  left: -24%;
  width: 28%;
  height: 260%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(20deg);
  transition: left 650ms ease;
}

.draw-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 21px 42px rgba(118, 78, 122, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.draw-button:hover:not(:disabled)::before {
  left: 112%;
}

.draw-button:active:not(:disabled) {
  transform: translateY(-1px);
}

.draw-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.social-links a:focus-visible,
.header-link:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(148, 104, 159, 0.32);
  outline-offset: 4px;
}

.draw-button:disabled {
  cursor: wait;
  opacity: 0.8;
}

.button-spark,
.button-arrow {
  font-size: 14px;
}

.button-arrow {
  transition: transform 180ms ease;
}

.draw-button:hover .button-arrow {
  transform: translateX(4px);
}

.draw-button.is-loading .button-spark {
  animation: spin 1.4s linear infinite;
}

.card-result {
  display: grid;
  justify-items: center;
  width: min(970px, 100%);
  margin: 0 auto;
  padding-top: 118px;
  scroll-margin-top: 32px;
}

.card-stage {
  position: relative;
  display: grid;
  width: min(100%, 430px);
  min-height: 590px;
  place-items: center;
  perspective: 1600px;
}

.stage-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 490px;
  max-width: 120vw;
  aspect-ratio: 1;
  border: 1px solid rgba(153, 113, 168, 0.11);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 209, 224, 0.56) 0, rgba(215, 202, 235, 0.2) 35%, transparent 68%);
  box-shadow: inset 0 0 90px rgba(255, 255, 255, 0.45);
  animation: breathe 7s ease-in-out infinite;
}

.stage-halo::before,
.stage-halo::after {
  position: absolute;
  content: "✦";
  color: rgba(187, 143, 78, 0.56);
}

.stage-halo::before {
  top: 15%;
  left: 8%;
  font-size: 17px;
}

.stage-halo::after {
  right: 10%;
  bottom: 16%;
  font-size: 23px;
}

.oracle-card {
  --card-start: #7867bc;
  --card-end: #32275f;
  position: relative;
  z-index: 2;
  width: 318px;
  max-width: calc(100vw - 62px);
  aspect-ratio: 0.635;
  filter: drop-shadow(0 28px 36px rgba(52, 36, 61, 0.23));
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(0.2, 0.72, 0.2, 1);
}

.oracle-card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(222, 195, 139, 0.74);
  border-radius: 24px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-back {
  padding: 11px;
  color: #efe6cb;
  background:
    radial-gradient(circle at 50% 37%, rgba(173, 137, 211, 0.42), transparent 24%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.11) 0 1px, transparent 1.8px),
    radial-gradient(circle at 80% 35%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.8px),
    radial-gradient(circle at 36% 75%, rgba(255, 255, 255, 0.11) 0 1px, transparent 1.8px),
    linear-gradient(150deg, #36284e, #1d1938 58%, #3c2851);
  background-size: auto, 31px 31px, 41px 41px, 37px 37px, auto;
}

.card-back::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, transparent 0 35%, rgba(255, 255, 255, 0.08) 44%, transparent 53% 100%);
  transform: translateX(-120%);
  animation: cardShine 7s ease-in-out infinite 2s;
}

.ornate-frame,
.front-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px solid rgba(224, 196, 136, 0.58);
  border-radius: 17px;
}

.ornate-frame::before,
.ornate-frame::after,
.front-frame::before,
.front-frame::after {
  position: absolute;
  inset: 8px;
  content: "";
  border: 1px solid rgba(228, 199, 141, 0.25);
  border-radius: 13px;
}

.ornate-frame::after,
.front-frame::after {
  inset: 15px;
  border-style: dotted;
  border-color: rgba(228, 199, 141, 0.22);
}

.card-corner {
  position: absolute;
  z-index: 2;
  color: rgba(230, 202, 147, 0.72);
  font-size: 31px;
  line-height: 1;
}

.corner-tl {
  top: 15px;
  left: 17px;
}

.corner-tr {
  top: 15px;
  right: 17px;
}

.corner-bl {
  bottom: 15px;
  left: 17px;
}

.corner-br {
  right: 17px;
  bottom: 15px;
}

.back-copy {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  width: 100%;
  color: #e8d9b8;
  text-align: center;
}

.back-copy > p:first-child {
  margin: 0 0 24px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.39em;
}

.back-orb {
  position: relative;
  display: grid;
  width: 116px;
  aspect-ratio: 1;
  margin-bottom: 26px;
  place-items: center;
  border: 1px solid rgba(230, 202, 147, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 44px rgba(176, 139, 210, 0.3), inset 0 0 32px rgba(255, 255, 255, 0.06);
}

.back-orb::before,
.back-orb::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(230, 202, 147, 0.27);
  border-radius: 50%;
}

.back-orb::before {
  inset: 9px;
}

.back-orb::after {
  width: 138px;
  height: 58px;
  transform: rotate(-24deg);
}

.back-orb span {
  font-size: 38px;
  filter: drop-shadow(0 0 10px rgba(236, 218, 177, 0.45));
}

.back-copy h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.back-script {
  margin: 18px 0 0;
  font-family: Georgia, serif;
  font-size: 27px;
  font-style: italic;
  letter-spacing: 0.12em;
}

.back-oracle {
  margin: -1px 0 0;
  font-size: 9px;
  letter-spacing: 0.56em;
  text-transform: uppercase;
}

.back-star {
  margin-top: 29px;
  font-size: 12px;
}

.constellation {
  position: absolute;
  z-index: 1;
  width: 75px;
  height: 75px;
  opacity: 0.38;
  background:
    radial-gradient(circle at 12% 20%, #f1ddae 0 1px, transparent 2px),
    radial-gradient(circle at 70% 12%, #f1ddae 0 1px, transparent 2px),
    radial-gradient(circle at 87% 72%, #f1ddae 0 1px, transparent 2px),
    linear-gradient(36deg, transparent 47%, rgba(241, 221, 174, 0.46) 49% 50%, transparent 52%);
}

.constellation-a {
  top: 63px;
  left: 36px;
  transform: rotate(9deg);
}

.constellation-b {
  right: 30px;
  bottom: 51px;
  transform: rotate(190deg);
}

.card-front {
  padding: 11px;
  color: #fff9ec;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.28), transparent 23%),
    radial-gradient(circle at 18% 17%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1.8px),
    radial-gradient(circle at 82% 38%, rgba(255, 255, 255, 0.17) 0 1px, transparent 1.8px),
    linear-gradient(160deg, var(--card-start), var(--card-end));
  background-size: auto, 35px 35px, 42px 42px, auto;
  transform: rotateY(180deg);
}

.front-frame {
  align-content: center;
  justify-items: center;
  padding: 36px 31px;
  color: #fff8e7;
  text-align: center;
}

.front-frame > * {
  position: relative;
  z-index: 2;
}

.front-kicker {
  position: absolute;
  top: 34px;
  margin: 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.36em;
  opacity: 0.78;
}

.angel-symbol {
  display: grid;
  width: 94px;
  aspect-ratio: 1;
  margin: 8px 0 20px;
  place-items: center;
  border: 1px solid rgba(255, 242, 204, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 0 9px rgba(255, 255, 255, 0.04), 0 0 38px rgba(255, 248, 224, 0.2);
  font-size: 34px;
}

.angel-name {
  margin: 0 0 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.front-frame h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.35;
}

.front-rule {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 11px;
  margin: 25px 0 20px;
  font-size: 9px;
}

.front-rule::before,
.front-rule::after {
  flex: 1;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 244, 215, 0.48));
}

.front-rule::after {
  background: linear-gradient(90deg, rgba(255, 244, 215, 0.48), transparent);
}

.card-affirmation {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.card-number {
  position: absolute;
  bottom: 31px;
  margin: 0;
  font-size: 8px;
  letter-spacing: 0.38em;
  opacity: 0.72;
}

.message-panel {
  width: min(760px, 100%);
  margin: 90px auto 0;
  padding: 62px clamp(26px, 6vw, 66px);
  border: 1px solid rgba(105, 77, 111, 0.11);
  border-radius: 36px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 24px 70px rgba(70, 50, 76, 0.08);
  text-align: center;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
  backdrop-filter: blur(14px);
}

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

.message-date {
  margin: 0 0 12px;
  color: var(--muted-light);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.message-panel h2 {
  font-size: clamp(28px, 5vw, 42px);
}

.result-message {
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 2.05;
  text-align: left;
}

.guidance-box {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 15px;
  margin-top: 32px;
  padding: 23px 25px;
  border: 1px solid rgba(181, 137, 76, 0.15);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(242, 229, 212, 0.49), rgba(236, 225, 242, 0.46));
  text-align: left;
}

.guidance-box > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(181, 137, 76, 0.26);
  border-radius: 50%;
  font-size: 11px;
}

.guidance-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.guidance-label {
  margin-bottom: 5px !important;
  color: var(--ink) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.result-affirmation {
  margin: 28px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 34px;
}

.secondary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(105deg, #8d6ba4, #b07992);
  box-shadow: 0 10px 25px rgba(106, 72, 114, 0.17);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 29px rgba(106, 72, 114, 0.23);
}

.text-button {
  padding: 10px 0;
  color: var(--muted);
  border-bottom: 1px solid rgba(87, 69, 93, 0.3);
  cursor: pointer;
  background: transparent;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.text-button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.screenshot-note {
  margin: 47px 0 0;
  color: var(--muted-light);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-align: center;
}

.screenshot-note::before,
.screenshot-note::after {
  color: rgba(184, 139, 80, 0.56);
  content: "✧";
  margin: 0 10px;
}

.site-footer {
  padding: 68px 0 28px;
  border-top: 1px solid rgba(100, 76, 107, 0.1);
  background: rgba(255, 255, 255, 0.32);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
}

.footer-brand > div {
  display: grid;
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.footer-brand small {
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-contact > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15em;
}

.footer-contact strong {
  color: var(--ink);
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 9px;
}

.social-links a {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(92, 68, 99, 0.13);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-links a:hover {
  border-color: rgba(126, 91, 137, 0.3);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.social-links img {
  width: 17px;
  height: 17px;
  opacity: 0.67;
}

.copyright {
  margin: 48px 0 0;
  color: rgba(93, 80, 98, 0.5);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  padding: 12px 18px;
  color: #fff;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  background: rgba(57, 44, 64, 0.91);
  box-shadow: 0 12px 36px rgba(51, 36, 58, 0.22);
  font-size: 13px;
  letter-spacing: 0.05em;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
}

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.ritual-step:nth-child(2) {
  transition-delay: 70ms;
}

.ritual-step:nth-child(3) {
  transition-delay: 140ms;
}

.ritual-step:nth-child(4) {
  transition-delay: 210ms;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.58;
    transform: translate(-50%, -50%) scale(0.98);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.035);
  }
}

@keyframes slowSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.82) rotate(0deg);
  }
  50% {
    opacity: 0.84;
    transform: scale(1.14) rotate(12deg);
  }
}

@keyframes scrollLine {
  0% {
    top: -100%;
  }
  75%,
  100% {
    top: 130%;
  }
}

@keyframes cardShine {
  0%,
  55% {
    transform: translateX(-120%);
  }
  75%,
  100% {
    transform: translateX(140%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .ritual-list::before {
    left: 25px;
  }

  .ritual-step {
    grid-template-columns: 105px minmax(0, 1fr);
    width: calc(100% - 53px);
    margin-left: 53px;
  }

  .ritual-step:nth-child(odd),
  .ritual-step:nth-child(even) {
    justify-self: stretch;
  }

  .ritual-step:nth-child(odd)::after,
  .ritual-step:nth-child(even)::after {
    right: auto;
    left: -38px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 30px, 1160px);
  }

  .site-header {
    padding-top: 19px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    margin-top: 6px;
    font-size: 8px;
  }

  .home-hint {
    margin-left: 58px;
    font-size: 9px;
  }

  .header-link {
    display: none;
  }

  .hero {
    min-height: 630px;
    padding: 80px 0 120px;
  }

  .hero h1 {
    font-size: clamp(45px, 14vw, 64px);
    letter-spacing: 0.06em;
  }

  .hero-lead {
    font-size: 15px;
    letter-spacing: 0.06em;
    line-height: 2;
  }

  .desktop-break {
    display: none;
  }

  .orbit-one {
    width: 92vw;
  }

  .orbit-two {
    width: 72vw;
  }

  .spark-one {
    left: 7%;
  }

  .spark-two {
    right: 7%;
  }

  .ritual {
    padding: 90px 0 120px;
  }

  .section-heading {
    margin-bottom: 50px;
  }

  .section-heading > p:last-child {
    font-size: 14px;
    line-height: 1.9;
  }

  .ritual-list {
    gap: 20px;
  }

  .ritual-list::before {
    left: 15px;
  }

  .ritual-step {
    grid-template-columns: 1fr;
    width: calc(100% - 31px);
    min-height: 0;
    margin-left: 31px;
    padding: 30px 25px 31px;
    border-radius: 26px;
  }

  .ritual-step:nth-child(odd)::after,
  .ritual-step:nth-child(even)::after {
    left: -26px;
    width: 17px;
    height: 17px;
    border-width: 5px;
  }

  .step-number {
    margin-bottom: 17px;
  }

  .step-number span {
    margin-top: 8px;
    writing-mode: horizontal-tb;
  }

  .step-number strong {
    font-size: 34px;
  }

  .step-copy h3 {
    font-size: 23px;
  }

  .step-symbol {
    top: -45px;
    font-size: 49px;
  }

  .draw-section {
    padding-bottom: 105px;
  }

  .draw-panel {
    padding: 64px 20px 58px;
    border-radius: 31px;
  }

  .star-left {
    top: 31px;
    left: 28px;
  }

  .star-right {
    right: 28px;
    bottom: 34px;
  }

  .prayer-block blockquote {
    font-size: 15px;
    letter-spacing: 0.05em;
    line-height: 2.05;
  }

  .draw-divider {
    margin: 42px 0 38px;
  }

  .form-hint {
    padding-inline: 10px;
    font-size: 13px;
    line-height: 1.8;
  }

  .birthday-form fieldset {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .birthday-form label {
    gap: 5px;
  }

  .birthday-form select {
    min-height: 55px;
  }

  .draw-button {
    min-height: 61px;
    margin-top: 14px;
    font-size: 14px;
  }

  .card-result {
    padding-top: 91px;
  }

  .card-stage {
    min-height: 520px;
  }

  .oracle-card {
    width: min(286px, calc(100vw - 62px));
  }

  .stage-halo {
    width: 390px;
  }

  .front-frame {
    padding-inline: 25px;
  }

  .front-frame h3 {
    font-size: 27px;
  }

  .card-affirmation {
    font-size: 12px;
  }

  .message-panel {
    margin-top: 66px;
    padding: 46px 23px;
    border-radius: 28px;
  }

  .result-message {
    font-size: 15px;
    line-height: 2;
  }

  .guidance-box {
    grid-template-columns: 32px 1fr;
    padding: 20px 17px;
  }

  .guidance-box > span {
    width: 30px;
    height: 30px;
  }

  .result-affirmation {
    font-size: 16px;
  }

  .result-actions {
    flex-direction: column;
    gap: 10px;
  }

  .secondary-button {
    width: 100%;
  }

  .screenshot-note {
    max-width: 290px;
    line-height: 1.8;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-contact {
    width: 100%;
    justify-content: space-between;
  }

  .footer-brand small {
    max-width: 230px;
    line-height: 1.7;
  }

  .toast {
    right: 15px;
    bottom: 15px;
    left: 15px;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .page-shell {
    width: calc(100% - 24px);
  }

  .hero h1 {
    font-size: 43px;
  }

  .draw-panel {
    padding-inline: 16px;
  }

  .oracle-card {
    width: 272px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* Background music control */
.music-toggle {
  position: fixed;
  z-index: 1000;
  right: 22px;
  top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(101, 91, 202, 0.28);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.9);
  color: #6257c7;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(83, 68, 150, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.music-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(83, 68, 150, 0.2);
}

.music-toggle:focus-visible {
  outline: 2px solid #655bca;
  outline-offset: 3px;
}

.music-toggle.is-playing {
  background: rgba(101, 91, 202, 0.94);
  color: #fffaf4;
}

.music-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(203, 170, 112, 0.18);
  font-size: 16px;
}

.music-toggle.is-playing .music-icon {
  animation: musicPulse 1.8s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (max-width: 700px) {
  .music-toggle {
    top: 14px;
    right: 14px;
    min-height: 40px;
    padding: 8px 10px;
  }

  .music-label {
    display: none;
  }
}


/* First-touch music prompt for mobile and LINE in-app browser */
.music-prompt {
  position: fixed;
  z-index: 999;
  left: 50%;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid rgba(101, 91, 202, 0.24);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.94);
  color: #5f55bd;
  font-size: 14px;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 36px rgba(83, 68, 150, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 1;
  transition: opacity 240ms ease, transform 240ms ease;
}

.music-prompt.is-hidden {
  opacity: 0;
  transform: translate(-50%, 10px);
  visibility: hidden;
}

.music-prompt-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(203, 170, 112, 0.2);
  font-size: 16px;
  animation: musicPromptPulse 1.8s ease-in-out infinite;
}

@keyframes musicPromptPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (max-width: 700px) {
  .music-prompt {
    bottom: 18px;
    width: max-content;
    justify-content: center;
    padding: 11px 15px;
    font-size: 13px;
  }
}

/* iOS / LINE WebView card flip compatibility
   WebKit can occasionally render the reverse side of 3D-transformed text.
   Use a 2D flip-and-swap fallback so card copy always stays readable. */
@supports (-webkit-touch-callout: none) {
  .oracle-card {
    filter: none;
    box-shadow: 0 28px 36px rgba(52, 36, 61, 0.23);
    border-radius: 24px;
  }

  .card-inner {
    -webkit-transform-style: flat;
    transform-style: flat;
    -webkit-transform: none;
    transform: none;
    transition: none;
  }

  .card-face {
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
    -webkit-transform: none;
    transform: none;
    transition: opacity 0.18s ease;
  }

  .card-back {
    z-index: 2;
    opacity: 1;
  }

  .card-front {
    z-index: 1;
    opacity: 0;
  }

  .oracle-card.is-flipped .card-inner {
    -webkit-transform: none;
    transform: none;
    animation: iosCardFlip 0.72s cubic-bezier(0.2, 0.72, 0.2, 1);
  }

  .oracle-card.is-flipped .card-back {
    z-index: 1;
    opacity: 0;
  }

  .oracle-card.is-flipped .card-front {
    z-index: 2;
    opacity: 1;
  }
}

@keyframes iosCardFlip {
  0% { transform: scaleX(1); }
  48% { transform: scaleX(0.04); }
  52% { transform: scaleX(0.04); }
  100% { transform: scaleX(1); }
}
