:root {
  --ink: #1e1b18;
  --muted: #69605a;
  --paper: #fff8ee;
  --paper-strong: #fffdf8;
  --mist: #eef6f6;
  --sky: #9ec8d7;
  --jade: #7bb7a8;
  --lotus: #f2b5b4;
  --gold: #d7aa5b;
  --deep-gold: #9b6b29;
  --night: #272331;
  --violet: #a68de0;
  --radius: 18px;
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@property --edge-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff8ee;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), transparent 24rem),
    radial-gradient(circle at 12% 12%, rgba(242, 181, 180, 0.22), transparent 18rem),
    linear-gradient(145deg, #fffaf2 0%, #f7efe4 55%, #eef7f7 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(215, 170, 91, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 170, 91, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 70%);
  content: "";
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 246, 215, 0.96), transparent 16rem),
    linear-gradient(180deg, #fff8ea 0%, #e9f3f0 56%, #f9ead7 100%);
  opacity: 0;
  transition: opacity 180ms ease;
}

body.is-page-leaving .page-transition {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  width: min(1160px, calc(100% - 28px));
  min-height: 4.4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  backdrop-filter: blur(16px);
}

.site-nav {
  display: inline-flex;
  align-items: center;
}

.site-nav {
  gap: 0.3rem;
  border: 1px solid rgba(155, 107, 41, 0.14);
  border-radius: 999px;
  padding: 0.25rem;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 12px 32px rgba(155, 107, 41, 0.08);
}

.site-nav a {
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  background: rgba(215, 170, 91, 0.18);
  color: var(--ink);
}

main {
  position: relative;
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--deep-gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
}

.home-page {
  min-height: 100vh;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

.home-topbar {
  position: sticky;
  z-index: 34;
  top: 0;
  display: grid;
  width: min(1120px, calc(100% - 24px));
  min-height: 4.25rem;
  grid-template-columns: 2.6rem 1fr 2.6rem;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
}

.home-icon-button {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgba(155, 107, 41, 0.15);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.68);
  color: #4a3a24;
  box-shadow: 0 14px 32px rgba(105, 96, 90, 0.1);
  backdrop-filter: blur(14px);
}

button.home-icon-button {
  padding: 0;
}

.home-icon-button svg {
  width: 1.18rem;
  height: 1.18rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.activity-sigil {
  position: relative;
  display: inline-grid;
  width: min(13rem, 58vw);
  min-height: 2.45rem;
  place-items: center;
  justify-self: center;
  color: #5a4428;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-sigil strong {
  position: relative;
  z-index: 1;
  padding: 0.25rem 0.8rem;
  border: 1px solid rgba(215, 170, 91, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.38);
}

.activity-sigil-ring,
.activity-sigil-dot {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.activity-sigil-ring {
  inset: 0.52rem 0.1rem;
  border: 1px solid rgba(215, 170, 91, 0.3);
  animation: sigilBreathe 4.8s ease-in-out infinite;
}

.activity-sigil-dot {
  width: 0.38rem;
  height: 0.38rem;
  background: #d7aa5b;
  box-shadow: 0 0 16px rgba(215, 170, 91, 0.72);
  offset-path: ellipse(48% 30% at 50% 50%);
  animation: sigilOrbit 6.5s linear infinite;
}

.home-shell {
  display: grid;
  width: min(1120px, calc(100% - 24px));
  min-height: calc(100vh - 9.5rem);
  align-items: center;
  padding: clamp(0.4rem, 2.5vw, 1.6rem) 0 1.6rem;
}

.home-pack-board {
  display: grid;
  grid-template-columns: minmax(18rem, 1.28fr) repeat(2, minmax(13rem, 0.86fr));
  gap: clamp(0.8rem, 2vw, 1.15rem);
  align-items: stretch;
}

.home-pack-card {
  position: relative;
  display: grid;
  min-height: 29rem;
  overflow: hidden;
  align-content: end;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 8px;
  padding: 1rem;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.45), rgba(255, 248, 238, 0.86)),
    radial-gradient(circle at 50% 0%, rgba(247, 208, 135, 0.38), transparent 62%);
  box-shadow: 0 20px 52px rgba(105, 96, 90, 0.13);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-pack-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(155, 107, 41, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 107, 41, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 70%);
  content: "";
}

.home-pack-card:hover,
.home-pack-card:focus-visible {
  border-color: rgba(155, 107, 41, 0.3);
  box-shadow: 0 24px 62px rgba(105, 96, 90, 0.18);
  transform: translateY(-0.22rem);
}

.home-pack-card-active {
  min-height: clamp(31rem, 64vh, 39rem);
  padding: clamp(0.7rem, 2vw, 1.15rem);
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.82), transparent 26rem),
    linear-gradient(180deg, rgba(239, 249, 247, 0.72), rgba(255, 247, 232, 0.9));
}

.pack-status {
  position: absolute;
  z-index: 3;
  top: 0.85rem;
  left: 0.85rem;
  display: inline-flex;
  min-height: 1.8rem;
  align-items: center;
  border: 1px solid rgba(155, 107, 41, 0.14);
  border-radius: 999px;
  padding: 0 0.68rem;
  background: rgba(255, 253, 248, 0.72);
  color: #735226;
  font-size: 0.68rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.pack-frame {
  position: absolute;
  inset: 2.1rem 0.8rem 7.3rem;
  display: grid;
  place-items: center;
}

.pack-frame img {
  width: min(100%, 22rem);
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 34px rgba(62, 67, 64, 0.18));
  animation: homePackFloat 5.4s ease-in-out infinite;
}

.pack-frame-small {
  inset: 2.45rem 0.65rem 5.15rem;
}

.pack-frame-small img {
  width: auto;
  height: 100%;
  max-width: 100%;
  filter: drop-shadow(0 18px 28px rgba(38, 61, 45, 0.16));
  animation-duration: 6.2s;
}

.pack-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.18rem;
  width: calc(100% + 0.2rem);
  margin: 0 -0.1rem -0.1rem;
  padding: 1.65rem 0.1rem 0.1rem;
  background: linear-gradient(to top, rgba(255, 248, 238, 0.88), rgba(255, 248, 238, 0));
}

.pack-copy small,
.pack-copy em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.pack-copy strong {
  color: #2b241d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3.45rem);
  line-height: 0.95;
}

.home-pack-card-next,
.home-pack-card-soon {
  min-height: clamp(21rem, 48vh, 31rem);
}

.home-pack-card-next .pack-copy strong,
.home-pack-card-soon .pack-copy strong {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}

.pack-symbol {
  position: absolute;
  inset: 3.5rem 1rem 7.4rem;
  display: grid;
  place-items: center;
}

.pack-symbol svg {
  width: min(12rem, 72%);
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.pack-symbol-guan {
  color: rgba(139, 47, 38, 0.74);
}

.pack-symbol-mist {
  color: rgba(70, 121, 114, 0.68);
}

.pack-enter {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(46, 121, 112, 0.12);
  color: #2e7970;
}

.pack-enter svg {
  width: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

@keyframes sigilBreathe {
  0%,
  100% { opacity: 0.48; transform: scaleX(0.96); }
  50% { opacity: 0.9; transform: scaleX(1.02); }
}

@keyframes sigilOrbit {
  to { offset-distance: 100%; }
}

@keyframes homePackFloat {
  0%,
  100% { transform: translateY(0) rotate(-0.8deg); }
  50% { transform: translateY(-0.55rem) rotate(0.7deg); }
}

.home-hero {
  display: grid;
  min-height: calc(100vh - 4.4rem);
  grid-template-rows: auto 1fr;
  gap: 1.8rem;
  padding: 1.2rem 0 2rem;
  align-items: center;
}

.hero-copy h1,
.page-hero h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.7rem, 17vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.page-hero p,
.library-intro,
.about-copy p,
.home-manifesto p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero-actions,
.share-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}

.primary-action,
.quiet-link,
.ghost-button,
.draw-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.primary-action,
.draw-button {
  border: 0;
  padding: 0 1.15rem;
  background: linear-gradient(135deg, #2e7970, #74aa9d);
  color: white;
  box-shadow: 0 16px 34px rgba(74, 128, 118, 0.25);
}

.quiet-link,
.ghost-button {
  border: 1px solid rgba(155, 107, 41, 0.22);
  padding: 0 1rem;
  background: rgba(255, 253, 248, 0.65);
  color: var(--ink);
}

.pack-hero {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.pack-hero img {
  width: min(25rem, 86vw);
  border-radius: 24px;
  filter: drop-shadow(0 30px 44px rgba(76, 94, 102, 0.22));
}

.pack-glow {
  position: absolute;
  z-index: -1;
  width: min(23rem, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 220, 145, 0.6), transparent 62%);
  animation: breathe 3.6s ease-in-out infinite;
}

.rarity-strip,
.home-manifesto,
.page-hero,
.oracle-layout,
.story-library,
.about-grid {
  padding: clamp(2rem, 7vw, 4.8rem) 0;
}

.rarity-strip {
  border-top: 1px solid rgba(155, 107, 41, 0.16);
}

.rarity-strip h2,
.section-heading h2,
.about-copy h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 5.4rem);
  line-height: 0.92;
}

.rarity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.rarity-grid article,
.reading-panel,
.question-panel,
.about-card,
.gallery-card {
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.7);
  box-shadow: 0 18px 50px rgba(155, 107, 41, 0.08);
}

.rarity-grid article {
  padding: 1rem;
}

.rarity-dot {
  display: block;
  width: 1rem;
  height: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
}

.rarity-n { background: #514a51; }
.rarity-r { background: #7893a5; }
.rarity-sr { background: var(--violet); box-shadow: 0 0 20px rgba(166, 141, 224, 0.6); }
.rarity-ssr { background: linear-gradient(135deg, #9bd5e7, #e8b3e8, #f7d27c); box-shadow: 0 0 24px rgba(185, 172, 235, 0.72); }
.rarity-ur { background: #f0c45f; box-shadow: 0 0 28px rgba(240, 196, 95, 0.8); }

.rarity-grid strong {
  display: block;
  font-size: 1.1rem;
}

.rarity-grid p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.home-manifesto {
  border-top: 1px solid rgba(155, 107, 41, 0.16);
}

.home-manifesto p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 4.8rem);
  line-height: 1;
}

.page-hero {
  display: grid;
  gap: 1rem;
}

.oracle-layout {
  display: grid;
  gap: 1.2rem;
}

.oracle-stage {
  position: relative;
  display: grid;
  min-height: min(38rem, 78vh);
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.92), transparent 19rem),
    linear-gradient(180deg, rgba(182, 218, 226, 0.78), rgba(255, 248, 238, 0.9));
  box-shadow: 0 24px 70px rgba(76, 94, 102, 0.16);
}

.oracle-stage::after {
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(215, 170, 91, 0.24);
  border-radius: 22px;
  content: "";
}

.pack-button {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(22rem, 78vw);
  border: 0;
  padding: 0;
  background: transparent;
  place-items: center;
}

.pack-button img {
  border-radius: 22px;
  filter: drop-shadow(0 26px 34px rgba(76, 94, 102, 0.22));
  transition: transform 360ms ease, filter 360ms ease;
}

.pack-button:hover img,
.pack-button.is-opening img {
  transform: scale(1.04) translateY(-0.35rem);
  filter: drop-shadow(0 28px 45px rgba(215, 170, 91, 0.34));
}

.pack-button.is-opening::before {
  position: absolute;
  inset: 12% 14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 238, 174, 0.85), transparent 68%);
  content: "";
  animation: flare 850ms ease-out;
}

.result-card {
  position: relative;
  z-index: 3;
  display: none;
  width: min(20rem, 72vw);
  aspect-ratio: 957 / 1643;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 28px 72px rgba(40, 38, 48, 0.24);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
  user-select: none;
}

.result-card.is-visible {
  display: block;
  animation: riseCard 780ms cubic-bezier(0.2, 0.9, 0.18, 1) both;
}

.result-card *,
.result-card::before,
.result-card::after {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.result-card:focus {
  outline: none;
}

.result-card img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

.result-card::after {
  position: absolute;
  inset: -0.7rem;
  z-index: -1;
  border-radius: 24px;
  opacity: 0;
  content: "";
}

.question-panel,
.reading-panel {
  padding: 1rem;
}

.question-panel {
  display: grid;
  gap: 0.8rem;
}

.question-panel label {
  color: var(--deep-gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  border: 1px solid rgba(155, 107, 41, 0.18);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  outline: none;
}

textarea:focus {
  border-color: var(--jade);
  box-shadow: 0 0 0 4px rgba(123, 183, 168, 0.16);
}

.reading-panel {
  display: grid;
  gap: 1rem;
}

.reading-panel[hidden] {
  display: none;
}

.reading-panel h2 {
  margin: 0;
  font-size: clamp(2.3rem, 9vw, 4.8rem);
  line-height: 0.95;
}

.reading-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.reading-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.reading-meta div {
  border: 1px solid rgba(155, 107, 41, 0.12);
  border-radius: 14px;
  padding: 0.8rem;
  background: rgba(255, 248, 238, 0.58);
}

.reading-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reading-meta strong {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.2;
}

.gentle-whisper {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  line-height: 1.2;
}

.story-pill,
.variant-badge {
  width: fit-content;
  border: 1px solid rgba(155, 107, 41, 0.2);
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  background: rgba(255, 248, 238, 0.7);
  color: var(--deep-gold);
  font-size: 0.75rem;
  font-weight: 900;
}

.story-feature {
  padding: 0 0 clamp(1.2rem, 4vw, 2rem);
}

.latest-story-card,
.story-pack-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.7);
  box-shadow: 0 18px 50px rgba(155, 107, 41, 0.08);
}

.latest-story-card {
  display: grid;
  grid-template-columns: minmax(7rem, 0.72fr) 1fr;
  gap: 1rem;
  padding: 0.9rem;
}

.latest-story-card .story-pill {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
}

.latest-story-art,
.story-pack-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 238, 174, 0.22), transparent 31%),
    linear-gradient(145deg, #edf5ef, #fff7e8 58%, #f0e3cd);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.latest-story-art {
  min-height: 15rem;
}

.latest-story-art img {
  width: min(92%, 13.4rem);
  max-height: 18.8rem;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(80, 67, 52, 0.14));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.latest-story-copy {
  display: grid;
  align-content: center;
  gap: 0.7rem;
}

.latest-story-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.2rem);
  line-height: 0.95;
}

.latest-story-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.story-open-link,
.story-back-link {
  width: fit-content;
  border: 1px solid rgba(155, 107, 41, 0.18);
  border-radius: 999px;
  padding: 0.58rem 0.82rem;
  background: rgba(255, 248, 238, 0.78);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.story-pack-index {
  padding: clamp(1.2rem, 5vw, 3rem) 0;
}

.story-pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.story-pack-card {
  display: grid;
  min-height: 18rem;
  align-content: end;
  padding: 0.72rem;
  color: inherit;
  text-decoration: none;
}

.story-pack-card.is-disabled {
  cursor: default;
}

.story-pack-card.is-disabled .story-pack-art,
.story-pack-card.is-disabled .story-pack-copy {
  opacity: 0.76;
}

.story-pack-art {
  position: absolute;
  inset: 2.1rem 0.5rem 5.2rem;
}

.story-pack-art img {
  width: 85%;
  height: auto;
  max-width: 85%;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(38, 61, 45, 0.16));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.story-pack-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.18rem;
}

.story-pack-copy small,
.story-pack-copy em {
  width: fit-content;
  color: #4e453b;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  -webkit-text-stroke: 0.35px rgba(255, 255, 255, 0.9);
  text-shadow:
    0 0 2px rgba(255, 255, 255, 1),
    0 0 6px rgba(255, 255, 255, 0.92),
    0 1px 4px rgba(36, 27, 21, 0.18);
}

.story-pack-copy strong {
  width: fit-content;
  color: #211812;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 7vw, 2.2rem);
  line-height: 0.95;
  -webkit-text-stroke: 0.9px rgba(255, 255, 255, 0.96);
  paint-order: stroke fill;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 1),
    0 0 8px rgba(255, 255, 255, 0.94),
    0 2px 7px rgba(36, 27, 21, 0.24);
}

.story-back-link {
  display: inline-flex;
  margin: 0 0 1rem;
}

.story-back-link[hidden],
.card-gallery[hidden] {
  display: none !important;
}

.ghost-button.is-copied {
  border-color: var(--jade);
  background: rgba(123, 183, 168, 0.16);
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.section-heading span {
  width: fit-content;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.card-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.8rem, 1fr));
  gap: 0.85rem;
}

.gallery-card {
  overflow: hidden;
  position: relative;
  color: inherit;
  text-decoration: none;
}

.gallery-card-art {
  position: relative;
  display: grid;
  aspect-ratio: 957 / 1643;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 238, 174, 0.22), transparent 31%),
    linear-gradient(145deg, #293141, #384d5d 54%, #f0e3cd);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.gallery-card-art::after {
  position: absolute;
  inset: 0.6rem;
  border: 1px solid rgba(255, 248, 238, 0.34);
  border-radius: 12px;
  content: "";
}

.gallery-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.locked-card-mark {
  color: rgba(255, 253, 248, 0.44);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.8rem;
  font-weight: 700;
}

.draw-count-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.88);
  color: #6a431b;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.55rem;
  text-align: center;
  box-shadow: 0 8px 18px rgba(31, 34, 44, 0.14);
  backdrop-filter: blur(8px);
}

.gallery-card-copy {
  display: grid;
  gap: 0.24rem;
  padding: 0.7rem;
}

.gallery-card-copy span,
.gallery-card-copy em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.gallery-card-copy strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.about-grid {
  display: grid;
  gap: 1rem;
}

.about-portrait {
  display: grid;
  place-items: center;
}

.about-portrait img {
  width: min(24rem, 84vw);
  border-radius: 28px;
  filter: drop-shadow(0 24px 40px rgba(76, 94, 102, 0.18));
}

.about-card {
  padding: 1.1rem;
}

.about-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
}

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

@keyframes breathe {
  0%,
  100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes flare {
  from { transform: scale(0.4); opacity: 0; }
  55% { opacity: 1; }
  to { transform: scale(1.35); opacity: 0; }
}

@keyframes riseCard {
  from {
    transform: translateY(4rem) scale(0.72) rotate(-4deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@media (min-width: 820px) {
  .home-hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 1.05fr);
    grid-template-rows: 1fr;
    gap: 3rem;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: clamp(5.2rem, 9vw, 8rem);
  }

  .pack-hero img {
    width: min(29rem, 42vw);
  }

  .oracle-layout {
    grid-template-columns: minmax(20rem, 0.86fr) minmax(25rem, 1.14fr);
    align-items: start;
  }

  .oracle-stage {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .about-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
  }

  .section-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (max-width: 560px) {
  .site-header {
    width: min(100% - 20px, 1160px);
  }

  .site-nav a {
    padding: 0.48rem 0.58rem;
  }

  main {
    width: min(100% - 20px, 1160px);
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 3.55rem;
  }

  .reading-meta {
    grid-template-columns: 1fr;
  }

  .card-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* First-season ritual experience: mobile-first pack opening */
.ritual-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 27%, rgba(255, 246, 215, 0.96), transparent 15rem),
    radial-gradient(circle at 16% 42%, rgba(240, 181, 176, 0.2), transparent 16rem),
    radial-gradient(circle at 82% 38%, rgba(126, 178, 184, 0.22), transparent 16rem),
    linear-gradient(180deg, #fff8ea 0%, #e9f3f0 45%, #f9ead7 100%);
}

.ritual-page::before {
  background:
    radial-gradient(ellipse at 50% 78%, rgba(116, 151, 142, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(24, 35, 45, 0.18)),
    radial-gradient(circle at 18% 18%, rgba(215, 170, 91, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 22%, rgba(242, 181, 180, 0.16) 0 1px, transparent 2px);
  background-size: auto, auto, 130px 130px, 170px 170px;
  mask-image: none;
}

.ritual-page::after {
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 38vh;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(88, 128, 122, 0.16), transparent 32%),
    radial-gradient(ellipse at 80% 100%, rgba(198, 154, 91, 0.16), transparent 30%),
    linear-gradient(180deg, transparent, rgba(105, 96, 90, 0.18));
  content: "";
}

.ritual-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100% - 22px, 1080px);
  min-height: 3.7rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  transform: translateX(-50%);
}

.ritual-header .site-nav {
  color: #2a241f;
}

.ritual-header .site-nav {
  border-color: rgba(155, 107, 41, 0.16);
  background: rgba(255, 253, 248, 0.58);
}

.ritual-header .site-nav a {
  color: rgba(42, 36, 31, 0.72);
}

.ritual-shell {
  width: min(100%, 1180px);
  min-height: 100svh;
}

.ritual-stage {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 4.8rem 1rem 8.4rem;
  isolation: isolate;
}

.ritual-stage::before {
  position: absolute;
  inset: auto auto 6vh 50%;
  z-index: -2;
  width: min(34rem, 118vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 239, 186, 0.62), rgba(123, 183, 168, 0.2) 35%, transparent 67%);
  transform: translateX(-50%);
  content: "";
}

.ritual-stage::after {
  position: absolute;
  inset: 18% 0 auto;
  z-index: -3;
  height: 48vh;
  background:
    linear-gradient(90deg, transparent, rgba(255, 253, 248, 0.22), transparent),
    radial-gradient(ellipse at 50% 50%, rgba(255, 253, 248, 0.3), transparent 65%);
  content: "";
}

.is-drawing .ritual-stage::after {
  animation: stageFlash 1280ms ease-out both;
}

.ritual-copy {
  position: absolute;
  z-index: 2;
  top: 5.1rem;
  left: 50%;
  width: min(92vw, 25rem);
  text-align: center;
  transform: translateX(-50%);
}

.ritual-copy h1 {
  display: none;
  margin: 0;
  color: #362820;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.98rem, 3.5vw, 1.25rem);
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 12px 32px rgba(255, 255, 255, 0.4);
}

.ritual-copy .eyebrow {
  color: var(--deep-gold);
}

.ritual-stage .pack-button {
  width: min(68vw, 20rem);
  margin-top: 0;
  animation: floatPack 4s ease-in-out infinite;
}

.ritual-stage .pack-button::before {
  display: none;
  content: none;
}

.ritual-stage .pack-button img {
  width: 100%;
  border-radius: 0;
  filter: none;
}

.ritual-page .pack-button img,
.ritual-page .pack-button:hover img,
.ritual-page .pack-button.is-opening img,
.is-drawing .ritual-stage .pack-button img {
  filter: none !important;
}

.pack-button span {
  position: absolute;
  bottom: -2.6rem;
  left: 50%;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 999px;
  padding: 0.52rem 0.8rem;
  background: rgba(255, 253, 248, 0.66);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.pack-button.is-opening {
  animation: openPack 780ms ease-in-out both;
}

.pack-button.is-opening::before,
.pack-button.is-opening::after {
  position: absolute;
  inset: 10% 0;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.pack-button.is-opening::before {
  background: radial-gradient(circle, rgba(255, 241, 184, 0.95), transparent 68%);
  animation: flashBurst 780ms ease-out both;
}

.pack-button.is-opening::after {
  opacity: 0;
  animation: rarityHalo 780ms ease-out both;
}

.pack-button.is-opening.rarity-n::after {
  background: transparent;
}

.pack-button.is-opening.rarity-n::before {
  background: transparent;
  animation: none;
}

.pack-button.is-opening.rarity-r::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 68%);
}

.pack-button.is-opening.rarity-r::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
}

.pack-button.is-opening.rarity-sr::before {
  background: radial-gradient(circle, rgba(185, 145, 255, 0.52), transparent 68%);
}

.pack-button.is-opening.rarity-ssr::before {
  background: conic-gradient(from 80deg, rgba(139, 223, 239, 0.44), rgba(255, 172, 215, 0.44), rgba(255, 226, 112, 0.52), rgba(139, 223, 239, 0.44));
}

.pack-button.is-opening.rarity-ur::before {
  background: radial-gradient(circle, rgba(255, 226, 112, 0.8), rgba(255, 248, 197, 0.44) 34%, transparent 70%);
}

.pack-button.is-opening.rarity-sr::after {
  background: radial-gradient(circle, rgba(174, 139, 242, 0.7), transparent 68%);
}

.pack-button.is-opening.rarity-ssr::after {
  background: conic-gradient(from 80deg, rgba(139, 223, 239, 0.72), rgba(255, 172, 215, 0.72), rgba(255, 226, 112, 0.76), rgba(139, 223, 239, 0.72));
}

.pack-button.is-opening.rarity-ur::after {
  background: radial-gradient(circle, rgba(255, 216, 88, 0.9), rgba(255, 248, 197, 0.52) 34%, transparent 70%);
}

.pack-button.is-drawn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.76) translateY(2rem);
  transition: opacity 280ms ease, transform 280ms ease;
}

.ritual-stage .result-card {
  position: absolute;
  top: calc(50% - 2.4rem);
  left: 50%;
  width: min(58vw, 17.2rem);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.ritual-stage .result-card.is-visible {
  display: block;
  animation: ritualRiseCard 860ms cubic-bezier(0.18, 0.9, 0.2, 1.08) both;
}

.stage-aspect-chooser {
  position: absolute;
  z-index: 6;
  top: auto;
  bottom: 5.25rem;
  left: 50%;
  display: grid;
  width: min(82vw, 18rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.34rem;
  transform: translateX(-50%);
}

.stage-aspect-chooser[hidden] {
  display: none;
}

.question-dock {
  position: fixed;
  z-index: 25;
  right: 50%;
  bottom: 4.9rem;
  left: auto;
  display: flex;
  justify-content: center;
  padding: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%);
}

.question-dock label {
  grid-column: 1 / -1;
  color: var(--deep-gold);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.question-dock textarea {
  min-height: 2.9rem;
  max-height: 6.5rem;
  border-color: rgba(155, 107, 41, 0.14);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.question-dock textarea::placeholder {
  color: rgba(105, 96, 90, 0.56);
}

.question-dock .draw-button {
  min-width: 10.5rem;
  min-height: 3.05rem;
  padding-inline: 1.25rem;
  white-space: nowrap;
}

.has-card .question-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 220ms ease, transform 220ms ease;
}

.is-drawing .question-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(1rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.reading-sheet {
  width: min(100% - 20px, 560px);
  margin: -4.5rem auto 6.8rem;
  scroll-margin-top: 5.4rem;
  border: 1px solid rgba(155, 107, 41, 0.18);
  border-radius: 24px;
  padding: 1.15rem;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 22px 60px rgba(31, 34, 44, 0.2);
}

.reading-sheet[hidden] {
  display: none;
}

.reading-sheet h2 {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 4rem);
  line-height: 0.96;
}

.reading-sheet p {
  color: var(--muted);
  line-height: 1.7;
}

.reading-sheet strong {
  color: #5b421f;
  font-weight: 900;
}

.reading-sheet .share-row {
  justify-content: flex-end;
  gap: 0.36rem;
  margin-top: 0.95rem;
}

.share-action {
  display: inline-grid;
  min-width: 4.4rem;
  min-height: 2.05rem;
  place-items: center;
  border: 1px solid rgba(155, 107, 41, 0.18);
  border-radius: 999px;
  padding: 0 0.88rem;
  background: rgba(255, 253, 248, 0.82);
  color: #5b421f;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(105, 96, 90, 0.08);
}

.share-action:hover,
.share-action:focus-visible {
  border-color: rgba(155, 107, 41, 0.32);
  background: rgba(255, 248, 238, 0.96);
  color: #2a241f;
  transform: translateY(-1px);
}

.aspect-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.aspect-button {
  display: grid;
  min-width: 0;
  min-height: 2.55rem;
  place-items: center;
  gap: 0.05rem;
  border: 1px solid rgba(155, 107, 41, 0.12);
  border-radius: 14px;
  padding: 0.2rem 0.12rem 0.18rem;
  background: rgba(255, 253, 248, 0.58);
  color: #76582f;
  box-shadow: 0 10px 26px rgba(105, 96, 90, 0.08);
  font-weight: 900;
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.aspect-icon {
  display: block;
  width: 1.42rem;
  height: 1.42rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
}

.aspect-icon *,
.aspect-icon circle,
.aspect-icon rect {
  fill: none !important;
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.aspect-icon path {
  fill: none !important;
}

.aspect-button small {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aspect-button:hover,
.aspect-button:focus-visible {
  transform: translateY(-0.08rem);
}

.aspect-button.is-active {
  border-color: rgba(155, 107, 41, 0.28);
  background: rgba(255, 248, 238, 0.82);
  color: #5b421f;
  box-shadow:
    0 12px 30px rgba(155, 107, 41, 0.14),
    inset 0 0 0 1px rgba(255, 253, 248, 0.56);
}

.mobile-tabbar {
  position: fixed;
  z-index: 35;
  right: 1rem;
  bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
  left: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
  --tab-index: 0;
  --tab-count: 4;
  --tab-gap: 0.2rem;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 18px;
  padding: 0.28rem;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 18px 46px rgba(105, 96, 90, 0.18);
  backdrop-filter: blur(18px);
}

.mobile-tabbar::before {
  position: absolute;
  top: 0.28rem;
  bottom: 0.28rem;
  left: 0.28rem;
  z-index: 0;
  width: calc((100% - 0.56rem - (var(--tab-gap) * (var(--tab-count) - 1))) / var(--tab-count));
  border-radius: 14px;
  background: rgba(215, 170, 91, 0.2);
  box-shadow:
    0 10px 24px rgba(155, 107, 41, 0.1),
    inset 0 0 0 1px rgba(255, 253, 248, 0.44);
  content: "";
  transform: translateX(calc(var(--tab-index) * (100% + var(--tab-gap))));
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.has-card .mobile-tabbar {
  --tab-index: 1;
}

.mobile-tabbar a {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 2.05rem;
  place-items: center;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  transition: color 180ms ease;
}

.mobile-tabbar a[aria-current="page"],
.has-card .mobile-tabbar a[data-tab="draw"],
.mobile-tabbar a:hover,
.mobile-tabbar a:focus-visible {
  color: var(--ink);
}

@keyframes floatPack {
  0%,
  100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-0.7rem) rotate(1deg); }
}

@keyframes touchCue {
  0%,
  100% {
    opacity: 0.72;
    transform: translateX(50%) translateY(0) scale(1);
  }
  45% {
    opacity: 1;
    transform: translateX(50%) translateY(-0.28rem) scale(1.04);
  }
}

@keyframes openPack {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  42% { transform: translateY(-0.45rem) scale(1.04); opacity: 1; }
  100% { transform: translateY(0.8rem) scale(0.9); opacity: 0; }
}

@keyframes flashBurst {
  0% { transform: scale(0.2); opacity: 0; }
  26% { opacity: 1; }
  58% { transform: scale(1.45); opacity: 0.72; }
  100% { transform: scale(2.05); opacity: 0; }
}

@keyframes rarityHalo {
  0% { transform: scale(0.25) rotate(0deg); opacity: 0; }
  38% { opacity: 1; }
  100% { transform: scale(2) rotate(85deg); opacity: 0; }
}

@keyframes stageFlash {
  0% { opacity: 0.05; }
  34% { opacity: 0.9; }
  70% { opacity: 0.72; }
  100% { opacity: 0.24; }
}

@keyframes ritualRiseCard {
  0% {
    transform: translate(-50%, -46%) translateZ(0) scale(0.96);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) translateZ(0) scale(1);
    opacity: 1;
  }
}

/* Ritual reveal: soft pack flash, steady card reveal, layered edge aura */
.ritual-stage .result-card {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  overflow: visible;
  transform: translate(-50%, -50%) translateZ(0);
  will-change: opacity;
}

.card-rotor {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  filter: drop-shadow(0 16px 18px rgba(40, 38, 48, 0.14));
  will-change: opacity;
}

.card-rotor::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 248, 214, 0.86), rgba(255, 248, 214, 0.28) 38%, transparent 70%);
  opacity: 0;
  content: "";
}

.result-card.is-revealing .card-rotor::before {
  animation: revealWash 740ms ease-out both;
}

.card-rotor::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  content: "";
}

.ritual-stage .result-card.is-visible {
  animation: ritualRiseCard 360ms ease-out both;
}

.ritual-stage .result-card .card-rotor {
  transform-origin: center center;
  transform: translateZ(0);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform, opacity;
}

.card-front-face {
  background-color: #fff;
  opacity: 0;
  transform: scale(1);
  transform-origin: center center;
  z-index: 1;
  transition: opacity 660ms ease;
}

.card-back-face {
  background-color: #f7ead0;
  background-image: url("assets/cards/system/card-bottom.webp");
  opacity: 1;
  transform: scale(1);
  transform-origin: center center;
  z-index: 3;
  transition: opacity 660ms ease;
  box-shadow:
    inset 0 0 0 1px rgba(155, 107, 41, 0.16),
    inset 0 0 24px rgba(155, 107, 41, 0.08);
}

.result-card.is-revealing .card-back-face {
  opacity: 0;
}

.result-card.is-revealing .card-front-face {
  opacity: 1;
  transform: scale(1);
}

.edge-flow {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 10px currentColor);
}

.edge-flow-top,
.edge-flow-bottom {
  left: 0;
  width: 54%;
  height: 4px;
  background: linear-gradient(90deg, transparent, currentColor 48%, transparent);
}

.edge-flow-left,
.edge-flow-right {
  top: 0;
  width: 4px;
  height: 44%;
  background: linear-gradient(180deg, transparent, currentColor 48%, transparent);
}

.edge-flow-top { top: 1px; }
.edge-flow-right { right: 1px; }
.edge-flow-bottom { right: 0; bottom: 1px; }
.edge-flow-left { bottom: 0; left: 1px; }

.result-card[data-ready="true"] .edge-flow {
  mix-blend-mode: screen;
}

.result-card[data-ready="true"]::after {
  inset: 0;
  z-index: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  filter: none;
  pointer-events: none;
  animation: auraBreathe 6.8s ease-in-out infinite;
}

.result-card[data-ready="true"].rarity-n::after {
  opacity: 0;
  animation: none;
}

.result-card[data-ready="true"].rarity-r::after {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 7px 3px rgba(255, 255, 255, 0.42),
    0 0 20px 8px rgba(255, 255, 255, 0.2),
    0 0 46px 18px rgba(255, 255, 255, 0.08);
  animation-duration: 7.2s;
}

.result-card[data-ready="true"].rarity-r .card-rotor::after {
  opacity: 1;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.58),
    inset 0 0 8px rgba(255, 255, 255, 0.26);
}

.result-card[data-ready="true"].rarity-r .edge-flow {
  opacity: 1;
  color: rgba(255, 255, 255, 0.82);
  animation: edgeFlow 5.8s linear infinite;
}

.result-card[data-ready="true"].rarity-sr::after {
  box-shadow:
    0 0 0 2px rgba(185, 145, 255, 0.88),
    0 0 8px 3px rgba(185, 145, 255, 0.58),
    0 0 23px 9px rgba(185, 145, 255, 0.28),
    0 0 58px 21px rgba(185, 145, 255, 0.1);
  animation-duration: 6.8s;
}

.result-card[data-ready="true"].rarity-sr .card-rotor::after {
  opacity: 1;
  box-shadow:
    inset 0 0 0 2px rgba(185, 145, 255, 0.82),
    inset 0 0 9px rgba(185, 145, 255, 0.38);
}

.result-card[data-ready="true"].rarity-sr .edge-flow {
  opacity: 1;
  color: rgba(185, 145, 255, 0.98);
  animation: edgeFlow 4.8s linear infinite;
}

.result-card[data-ready="true"].rarity-ssr::after {
  box-shadow:
    0 0 0 2px rgba(255, 190, 230, 0.86),
    0 0 8px 3px rgba(139, 223, 239, 0.56),
    0 0 24px 9px rgba(255, 226, 112, 0.3),
    0 0 62px 22px rgba(255, 172, 215, 0.12);
  animation: auraBreathe 6.4s ease-in-out infinite, auraHue 12s linear infinite;
}

.result-card[data-ready="true"].rarity-ssr .card-rotor::after {
  opacity: 1;
  box-shadow:
    inset 0 0 0 2px rgba(255, 190, 230, 0.78),
    inset 0 0 9px rgba(139, 223, 239, 0.34);
}

.result-card[data-ready="true"].rarity-ssr .edge-flow {
  opacity: 1;
  color: rgba(255, 190, 230, 1);
  animation: edgeFlow 4.4s linear infinite, edgeHue 2.8s linear infinite;
}

.result-card[data-ready="true"].rarity-ur::after {
  box-shadow:
    0 0 0 2px rgba(255, 226, 112, 0.96),
    0 0 9px 4px rgba(255, 226, 112, 0.7),
    0 0 28px 11px rgba(255, 196, 70, 0.36),
    0 0 72px 26px rgba(215, 170, 91, 0.14);
  animation-duration: 6s;
}

.result-card[data-ready="true"].rarity-ur .card-rotor::after {
  opacity: 1;
  box-shadow:
    inset 0 0 0 2px rgba(255, 226, 112, 0.92),
    inset 0 0 11px rgba(255, 226, 112, 0.42);
}

.result-card[data-ready="true"].rarity-ur .edge-flow {
  opacity: 1;
  color: rgba(255, 226, 112, 1);
  animation: edgeFlow 3.8s linear infinite, edgePulse 1.8s ease-in-out infinite;
}

.card-back-face::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 37%, rgba(255, 255, 255, 0.3) 47%, transparent 58%),
    radial-gradient(circle at 50% 85%, rgba(215, 170, 91, 0.2), transparent 34%);
  mix-blend-mode: screen;
  opacity: 0.34;
  content: "";
  animation: cardBackSheen 6s ease-in-out infinite;
}

.card-back-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.is-drawing .ritual-stage::before {
  animation: none;
}

.is-drawing .pack-button.rarity-r::before,
.is-drawing .pack-button.rarity-sr::before,
.is-drawing .pack-button.rarity-ssr::before,
.is-drawing .pack-button.rarity-ur::before {
  animation: flashBurst 780ms ease-out both;
}

.is-drawing .pack-button {
  animation: openPack 780ms ease-in-out both;
}

.is-drawing .pack-button img {
  filter: drop-shadow(0 24px 34px rgba(105, 96, 90, 0.22));
}

.is-drawing .pack-button::before {
  inset: -16%;
  z-index: -2;
  background: transparent;
  filter: none;
}

.is-drawing .pack-button.rarity-r::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42), transparent 68%);
}

.is-drawing .pack-button.rarity-sr::before {
  background: radial-gradient(circle, rgba(185, 145, 255, 0.68), transparent 70%);
}

.is-drawing .pack-button.rarity-ssr::before {
  background: conic-gradient(from 80deg, rgba(139, 223, 239, 0.58), rgba(255, 172, 215, 0.58), rgba(255, 226, 112, 0.68), rgba(139, 223, 239, 0.58));
}

.is-drawing .pack-button.rarity-ur::before {
  background: radial-gradient(circle, rgba(255, 226, 112, 0.92), rgba(255, 248, 197, 0.58) 34%, transparent 70%);
}

.is-drawing .pack-button::after {
  inset: -28%;
  z-index: -3;
  background:
    conic-gradient(
      from 20deg,
      transparent 0deg,
      rgba(255, 248, 214, 0.55) 24deg,
      transparent 36deg,
      rgba(215, 170, 91, 0.42) 58deg,
      transparent 78deg,
      rgba(255, 241, 184, 0.5) 104deg,
      transparent 126deg,
      rgba(215, 170, 91, 0.36) 148deg,
      transparent 180deg,
      rgba(255, 248, 214, 0.44) 210deg,
      transparent 360deg
  );
  filter: none;
  animation: burstRays 780ms ease-out both;
}

.is-drawing .pack-button.rarity-n::after,
.is-drawing .pack-button.rarity-n::before {
  display: none;
}

.is-drawing .pack-button.rarity-r::after {
  display: none;
}

.is-drawing .pack-button.rarity-sr::after {
  background:
    conic-gradient(
      from 20deg,
      transparent 0deg,
      rgba(185, 145, 255, 0.42) 32deg,
      transparent 58deg,
      rgba(185, 145, 255, 0.34) 118deg,
      transparent 156deg,
      rgba(185, 145, 255, 0.32) 236deg,
      transparent 360deg
    );
}

.is-drawing .pack-button.rarity-ssr::after {
  background:
    conic-gradient(
      from 20deg,
      transparent 0deg,
      rgba(139, 223, 239, 0.48) 24deg,
      transparent 42deg,
      rgba(255, 172, 215, 0.44) 82deg,
      transparent 112deg,
      rgba(255, 226, 112, 0.48) 156deg,
      transparent 190deg,
      rgba(139, 223, 239, 0.42) 240deg,
      transparent 360deg
    );
}

.is-drawing .pack-button.rarity-ur::after {
  background:
    conic-gradient(
      from 20deg,
      transparent 0deg,
      rgba(255, 248, 214, 0.68) 24deg,
      transparent 36deg,
      rgba(215, 170, 91, 0.56) 58deg,
      transparent 78deg,
      rgba(255, 241, 184, 0.62) 104deg,
      transparent 126deg,
      rgba(215, 170, 91, 0.5) 148deg,
      transparent 180deg,
      rgba(255, 248, 214, 0.58) 210deg,
      transparent 360deg
    );
}

@keyframes cardBackSheen {
  0%,
  100% {
    opacity: 0.22;
    transform: translateX(-18%);
  }
  50% {
    opacity: 0.48;
    transform: translateX(18%);
  }
}

@keyframes revealWash {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  34% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes auraBreathe {
  0%,
  100% {
    opacity: 0.62;
    transform: translateZ(0) scale(1);
  }
  50% {
    opacity: 0.82;
    transform: translateZ(0) scale(1.006);
  }
}

@keyframes auraHue {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

@keyframes rainbowDrift {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

@keyframes sparklePulse {
  0% {
    opacity: 0.72;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1.01);
  }
}

@keyframes burstHalo {
  0% {
    transform: translateX(-50%) scale(0.65);
    opacity: 0.12;
  }
  35% {
    opacity: 0.95;
  }
  100% {
    transform: translateX(-50%) scale(1.28);
    opacity: 0;
  }
}

@keyframes burstRays {
  0% {
    transform: scale(0.22) rotate(0deg);
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  58% {
    transform: scale(1.1) rotate(35deg);
    opacity: 0.78;
  }
  100% {
    transform: scale(1.85) rotate(88deg);
    opacity: 0;
  }
}

@keyframes packShake {
  0% { transform: translateY(0) rotate(-1.2deg); }
  18% { transform: translateY(-0.2rem) rotate(-0.2deg); }
  36% { transform: translateY(-0.65rem) rotate(1.1deg); }
  60% { transform: translateY(-0.3rem) rotate(-0.7deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes edgeSpin {
  from { --edge-angle: 0deg; }
  to { --edge-angle: 360deg; }
}

@keyframes edgePulse {
  0%,
  100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes edgeFlow {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(265%);
  }
}

@keyframes edgeFlowVertical {
  0% {
    transform: translateY(-110%);
  }
  100% {
    transform: translateY(330%);
  }
}

@keyframes edgeHue {
  from { filter: hue-rotate(0deg) drop-shadow(0 0 8px currentColor); }
  to { filter: hue-rotate(360deg) drop-shadow(0 0 8px currentColor); }
}

.result-card[data-ready="true"].rarity-r .edge-flow-right,
.result-card[data-ready="true"].rarity-r .edge-flow-left {
  animation: edgeFlowVertical 5.8s linear infinite;
}

.result-card[data-ready="true"].rarity-sr .edge-flow-right,
.result-card[data-ready="true"].rarity-sr .edge-flow-left {
  animation: edgeFlowVertical 4.8s linear infinite;
}

.result-card[data-ready="true"].rarity-ssr .edge-flow-right,
.result-card[data-ready="true"].rarity-ssr .edge-flow-left {
  animation: edgeFlowVertical 4.4s linear infinite, edgeHue 2.8s linear infinite;
}

.result-card[data-ready="true"].rarity-ur .edge-flow-right,
.result-card[data-ready="true"].rarity-ur .edge-flow-left {
  animation: edgeFlowVertical 3.8s linear infinite, edgePulse 1.8s ease-in-out infinite;
}

@media (min-width: 820px) {
  .home-page .mobile-tabbar {
    display: none;
  }

  .ritual-stage .pack-button {
    width: min(28vw, 23rem);
  }

  .ritual-stage .result-card {
    top: 50%;
    width: min(23vw, 20rem);
  }

  .stage-aspect-chooser {
    top: calc(50% + min(17vw, 15rem));
    bottom: auto;
  }

  .question-dock {
    width: auto;
    transform: translateX(50%);
  }

  .has-card .question-dock {
    transform: translateX(50%) translateY(1rem);
  }

  .mobile-tabbar {
    display: none;
  }
}

@media (max-width: 560px) {
  .home-page {
    overflow-x: hidden;
    padding-bottom: calc(3.9rem + env(safe-area-inset-bottom, 0px));
  }

  .home-topbar {
    width: min(100% - 18px, 31rem);
    min-height: 3.75rem;
    grid-template-columns: 2.25rem 1fr 2.25rem;
    gap: 0.42rem;
  }

  .home-icon-button {
    width: 2.18rem;
    height: 2.18rem;
  }

  .activity-sigil {
    width: min(10.8rem, 54vw);
    min-height: 2.18rem;
    font-size: 0.64rem;
  }

  .home-shell {
    width: min(100% - 18px, 31rem);
    min-height: auto;
    align-items: start;
    padding-top: 0.15rem;
  }

  .home-pack-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
  }

  .home-pack-card {
    min-height: 11.6rem;
    border-radius: 8px;
    padding: 0.72rem;
  }

  .home-pack-card-active {
    grid-column: 1 / -1;
    min-height: clamp(25rem, calc(100dvh - 12.6rem), 32rem);
  }

  .pack-status {
    top: 0.55rem;
    left: 0.55rem;
    min-height: 1.48rem;
    padding: 0 0.52rem;
    font-size: 0.58rem;
  }

  .pack-frame {
    inset: 1.5rem 0.18rem 5.05rem;
  }

  .pack-frame img {
    width: 100%;
    height: auto;
    max-height: 112%;
  }

  .pack-frame-small {
    inset: 1.8rem 0.2rem 4.45rem;
  }

  .pack-frame-small img {
    width: 100%;
    height: auto;
    max-height: 118%;
    object-fit: contain;
  }

  .pack-copy {
    z-index: 4;
    padding-top: 1.35rem;
    background: linear-gradient(to top, rgba(255, 248, 238, 0.94) 0%, rgba(255, 248, 238, 0.72) 48%, rgba(255, 248, 238, 0) 100%);
  }

  .pack-copy small,
  .pack-copy em {
    font-size: 0.58rem;
  }

  .pack-copy strong {
    font-size: clamp(1.58rem, 9vw, 2.6rem);
  }

  .home-pack-card-next,
  .home-pack-card-soon {
    min-height: 13rem;
  }

  .home-pack-card-next .pack-copy strong,
  .home-pack-card-soon .pack-copy strong {
    font-size: clamp(1.16rem, 6vw, 1.6rem);
  }

  .pack-symbol {
    inset: 2.2rem 0.5rem 4.8rem;
  }

  .pack-symbol svg {
    width: min(5.4rem, 70%);
    stroke-width: 3.8;
  }

  .pack-enter {
    right: 0.58rem;
    bottom: 0.58rem;
    width: 1.78rem;
    height: 1.78rem;
  }

  .ritual-header .site-nav {
    display: none;
  }

  .ritual-stage {
    min-height: 100svh;
    padding-top: 3rem;
    padding-bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
  }

  .ritual-stage .pack-button {
    width: min(62vw, 16.8rem);
    margin-top: 0.1rem;
  }

  .ritual-header {
    min-height: 3.65rem;
  }

  .ritual-stage .result-card {
    top: calc(50% - 3.65rem);
    width: min(82vw, 23rem);
  }

  .stage-aspect-chooser {
    bottom: calc(3.45rem + env(safe-area-inset-bottom, 0px));
    width: min(84vw, 18.5rem);
    gap: 0.18rem;
  }

  .stage-aspect-chooser .aspect-button {
    min-height: 2rem;
    border-radius: 11px;
    padding: 0.12rem 0.08rem 0.1rem;
  }

  .stage-aspect-chooser .aspect-icon {
    width: 1.15rem;
    height: 1.15rem;
    stroke-width: 3.2;
  }

  .stage-aspect-chooser .aspect-button small {
    font-size: 0.48rem;
    line-height: 0.95;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: calc(0.28rem + env(safe-area-inset-bottom, 0px));
    left: 0.48rem;
    gap: 0.14rem;
    --tab-gap: 0.14rem;
    border-radius: 14px;
    padding: 0.18rem;
  }

  .mobile-tabbar::before {
    top: 0.18rem;
    bottom: 0.18rem;
    left: 0.18rem;
    width: calc((100% - 0.36rem - (var(--tab-gap) * (var(--tab-count) - 1))) / var(--tab-count));
    border-radius: 11px;
  }

  .mobile-tabbar a {
    min-height: 1.65rem;
    border-radius: 11px;
    font-size: 0.6rem;
  }

  .reading-sheet {
    position: fixed;
    z-index: 24;
    top: calc(4.55rem + env(safe-area-inset-top, 0px));
    right: auto;
    left: 50%;
    overflow: auto;
    width: min(84vw, 20rem);
    max-height: min(52svh, 25rem);
    margin: 0;
    border-radius: 18px;
    padding: 0.9rem 0.92rem 1rem;
    scroll-margin-top: 0;
    box-shadow: 0 16px 42px rgba(31, 34, 44, 0.22);
    transform: translateX(-50%);
  }

  .reading-sheet h2 {
    margin-top: 0.28rem;
    font-size: clamp(1.28rem, 5vw, 1.72rem);
    line-height: 1.06;
  }

  .reading-sheet p {
    margin: 0.62rem 0 0;
    font-size: 0.86rem;
    line-height: 1.62;
  }

  .reading-sheet .eyebrow {
    margin: 0;
    color: #8a622d;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .reading-sheet .share-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.3rem;
    margin-top: 0.8rem;
  }

  .reading-sheet .share-action {
    min-width: 4rem;
    min-height: 1.88rem;
    font-size: 0.68rem;
  }

  .question-dock {
    bottom: 4.7rem;
  }

  .question-dock .draw-button {
    width: 100%;
  }
}

@media (max-width: 560px) and (max-height: 720px) {
  .home-pack-card-active {
    min-height: clamp(22rem, calc(100dvh - 11.9rem), 27rem);
  }

  .pack-frame {
    inset: 1.35rem 0.18rem 4.65rem;
  }

  .pack-frame img {
    width: 100%;
    height: auto;
    max-height: 112%;
  }

  .pack-frame-small img {
    width: 100%;
    height: auto;
    max-height: 118%;
    object-fit: contain;
  }

  .ritual-stage {
    padding-top: 1rem;
    padding-bottom: calc(4.95rem + env(safe-area-inset-bottom, 0px));
  }

  .ritual-stage .result-card {
    top: calc(50% - 4.25rem);
    width: min(74vw, 20rem);
  }

  .stage-aspect-chooser {
    bottom: calc(3.18rem + env(safe-area-inset-bottom, 0px));
  }

  .reading-sheet {
    top: calc(4.35rem + env(safe-area-inset-top, 0px));
    width: min(82vw, 19rem);
    max-height: min(48svh, 21rem);
  }
}

@media (max-width: 560px) and (max-height: 640px) {
  .home-topbar {
    min-height: 3.35rem;
  }

  .home-pack-board {
    gap: 0.48rem;
  }

  .home-pack-card-active {
    min-height: clamp(20rem, calc(100dvh - 11.2rem), 24rem);
  }

  .home-pack-card-next,
  .home-pack-card-soon {
    min-height: 11.8rem;
  }

  .pack-copy strong {
    font-size: clamp(1.36rem, 8vw, 2.2rem);
  }

  .ritual-stage .result-card {
    top: calc(50% - 4.45rem);
    width: min(68vw, 18rem);
  }

  .stage-aspect-chooser .aspect-button {
    min-height: 1.84rem;
  }

  .stage-aspect-chooser .aspect-icon {
    width: 1.04rem;
    height: 1.04rem;
  }

  .reading-sheet {
    top: calc(4.2rem + env(safe-area-inset-top, 0px));
    width: min(80vw, 18rem);
    max-height: min(44svh, 18rem);
  }
}

/* Temporary product shell: keep every viewport on the mobile layout until
   the tablet/desktop experience is designed deliberately. */
:root {
  --phone-shell: 430px;
}

body {
  width: min(100%, var(--phone-shell));
  max-width: var(--phone-shell);
  margin: 0 auto;
  overflow-x: hidden;
}

.home-page,
.stories-page,
.about-page {
  padding-bottom: calc(4.35rem + env(safe-area-inset-bottom, 0px));
}

main,
.home-shell,
.ritual-shell {
  width: min(100% - 18px, 31rem);
}

.home-topbar {
  width: min(100% - 18px, 31rem);
  min-height: 3.75rem;
  grid-template-columns: 2.25rem 1fr 2.25rem;
  gap: 0.42rem;
}

.home-icon-button {
  width: 2.18rem;
  height: 2.18rem;
}

.activity-sigil {
  width: min(10.8rem, 54vw);
  min-height: 2.18rem;
  font-size: 0.64rem;
}

.home-shell {
  min-height: auto;
  align-items: start;
  padding-top: 0.15rem;
}

.home-pack-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.home-pack-card {
  min-height: 11.6rem;
  border-radius: 8px;
  padding: 0.72rem;
}

.home-pack-card-active {
  grid-column: 1 / -1;
  min-height: clamp(25rem, calc(100dvh - 12.6rem), 32rem);
}

.home-pack-card-next,
.home-pack-card-soon {
  min-height: 13rem;
}

.pack-status {
  top: 0.55rem;
  left: 0.55rem;
  min-height: 1.48rem;
  padding: 0 0.52rem;
  font-size: 0.58rem;
}

.pack-frame {
  inset: 1.5rem 0.18rem 5.05rem;
  overflow: visible;
}

.pack-frame img {
  width: 85%;
  height: auto;
  max-width: 85%;
  max-height: none;
  object-fit: contain;
}

.pack-frame-small {
  inset: 1.8rem 0.2rem 4.45rem;
}

.pack-frame-small img {
  width: 85%;
  height: auto;
  max-width: 85%;
  max-height: none;
  object-fit: contain;
}

.pack-copy {
  z-index: 4;
  padding-top: 1.35rem;
  background: none;
}

.pack-copy small,
.pack-copy em {
  width: fit-content;
  color: #4e453b;
  font-size: 0.58rem;
  font-weight: 900;
  -webkit-text-stroke: 0.45px rgba(255, 255, 255, 0.94);
  text-shadow:
    0 0 2px rgba(255, 255, 255, 1),
    0 0 5px rgba(255, 255, 255, 0.96),
    0 0 11px rgba(255, 248, 238, 0.86),
    0 1px 4px rgba(36, 27, 21, 0.22);
}

.pack-copy strong {
  width: fit-content;
  color: #211812;
  font-size: clamp(1.58rem, 9vw, 2.6rem);
  -webkit-text-stroke: 1.05px rgba(255, 255, 255, 0.98);
  paint-order: stroke fill;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 1),
    0 0 6px rgba(255, 255, 255, 0.98),
    0 0 14px rgba(255, 248, 238, 0.9),
    0 2px 7px rgba(36, 27, 21, 0.26);
}

.home-pack-card-next .pack-copy strong,
.home-pack-card-soon .pack-copy strong {
  font-size: clamp(1.16rem, 6vw, 1.6rem);
}

.home-pack-card-active.home-pack-card-guandi .pack-copy strong {
  font-size: clamp(1.28rem, 7vw, 2rem);
}

.pack-symbol {
  inset: 2.2rem 0.5rem 4.8rem;
}

.pack-symbol svg {
  width: min(5.4rem, 70%);
  stroke-width: 3.8;
}

.pack-enter {
  right: 0.58rem;
  bottom: 0.58rem;
  width: 1.78rem;
  height: 1.78rem;
}

.site-header,
.ritual-header {
  display: none;
}

.ritual-stage {
  min-height: 100dvh;
  padding-top: 3rem;
  padding-bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
}

.ritual-stage .pack-button {
  width: min(62vw, 16.8rem);
  margin-top: 0.1rem;
}

.ritual-stage .result-card {
  width: min(76vw, 20.2rem);
}

.stage-aspect-chooser {
  bottom: calc(3.18rem + env(safe-area-inset-bottom, 0px));
}

.question-dock {
  right: 0.7rem;
  bottom: 4.7rem;
}

.reading-sheet {
  width: min(82vw, 19rem);
}

.page-hero,
.story-library,
.about-grid {
  padding: 1.2rem 0 calc(5.2rem + env(safe-area-inset-bottom, 0px));
}

.page-hero h1,
.about-copy h2 {
  font-size: clamp(2.35rem, 12vw, 3.8rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.about-portrait img {
  width: min(19rem, 82vw);
  border-radius: 0;
}

.card-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-heading {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.mobile-tabbar {
  right: auto;
  left: 50%;
  display: grid !important;
  width: min(calc(100% - 2rem), calc(var(--phone-shell) - 2rem));
  transform: translateX(-50%);
}

.stories-page .mobile-tabbar {
  --tab-index: 2;
}

.stories-page .page-hero {
  padding-top: 0.75rem;
  padding-bottom: 0.55rem;
  gap: 0.62rem;
}

.stories-page .page-hero h1 {
  max-width: 8.5ch;
  font-size: clamp(2.08rem, 10.5vw, 3.2rem);
}

.stories-page .page-hero p {
  line-height: 1.48;
}

.stories-page .story-feature,
.stories-page .story-pack-index {
  padding-bottom: 0.72rem;
}

.stories-page .latest-story-card {
  gap: 0.72rem;
  padding: 0.7rem;
}

.stories-page .latest-story-art {
  min-height: 12.5rem;
}

.stories-page .latest-story-art img {
  width: min(92%, 10.8rem);
  max-height: 13.6rem;
}

.stories-page .story-back-link {
  justify-content: center;
  width: 100%;
  margin: 0 0 1.1rem;
  padding: 0.82rem 1rem;
  border-color: rgba(155, 107, 41, 0.28);
  background: rgba(255, 248, 238, 0.92);
  font-size: 0.9rem;
}

.stories-page .latest-story-copy {
  gap: 0.45rem;
}

.stories-page .latest-story-copy h2 {
  font-size: clamp(1.56rem, 7.5vw, 2.45rem);
}

.stories-page .latest-story-copy p {
  line-height: 1.42;
}

.stories-page .story-pack-card {
  min-height: 14.3rem;
}

.stories-page .story-pack-art {
  inset: 1.75rem 0.35rem 4.55rem;
}

.about-page .mobile-tabbar {
  --tab-index: 3;
}

html.is-lite {
  scroll-behavior: auto;
}

html.is-lite body {
  background: linear-gradient(145deg, #fffaf2 0%, #f3eadf 62%, #eef6f4 100%);
}

html.is-lite body::before,
html.is-lite .ritual-stage::before,
html.is-lite .ritual-stage::after,
html.is-lite .card-rotor::before,
html.is-lite .card-rotor::after {
  display: none;
}

html.is-lite *,
html.is-lite *::before,
html.is-lite *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}

html.is-lite .pack-button img,
html.is-lite .mobile-tabbar::before {
  animation: none !important;
  filter: none !important;
  transition-duration: 120ms !important;
}

html.is-lite .edge-flow {
  opacity: 0.52;
}

html.is-lite .result-card[data-ready="true"]::after {
  opacity: 0.72;
}

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

.gallery-card-count {
  display: block;
  color: #8a622d;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-detail {
  display: grid;
  grid-template-columns: minmax(7rem, 0.52fr) 1fr;
  gap: 1rem;
  margin: 0 0 1rem;
  border: 1px solid rgba(155, 107, 41, 0.16);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 253, 248, 0.74);
  box-shadow: 0 18px 50px rgba(155, 107, 41, 0.08);
}

.story-detail[hidden] {
  display: none;
}

.story-detail-art {
  display: grid;
  min-height: 16rem;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 238, 174, 0.22), transparent 31%),
    linear-gradient(145deg, #edf5ef, #fff7e8 58%, #f0e3cd);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.story-detail-art img {
  width: min(82%, 13rem);
  max-height: 20rem;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(80, 67, 52, 0.14));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.story-detail-copy {
  display: grid;
  gap: 0.72rem;
  align-content: start;
}

.story-detail-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 0.95;
}

.story-detail-copy h3 {
  margin: 0 0 0.36rem;
  color: #8a622d;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-detail-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.story-detail-lede,
.story-detail-copy .story-detail-takeaway {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 720px) {
  .story-detail {
    grid-template-columns: 1fr;
  }

  .story-detail-art {
    min-height: 12.5rem;
  }

  .story-detail-art img {
    width: min(58%, 10rem);
    max-height: 13rem;
  }
}
