:root {
  --bg: #0F0E0C;
  --bg-warm: #151310;
  --cream: #F0E8D8;
  --cream-dim: #A89E8C;
  --vermillion: #C73B2B;
  --vermillion-deep: #8B2218;
  --gold: #D4A853;
  --gold-dim: #8B7234;
  --ink: #2A2520;
  --blue-charm: #2B4C7C;
  --ff-serif: 'Noto Serif JP', 'Georgia', serif;
  --ff-sans: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--ff-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- HERO: Torii Gate Entrance ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(199,59,43,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(15,10,5,1) 0%, transparent 70%),
    linear-gradient(180deg, #0A0806 0%, #1A1410 40%, #0F0E0C 100%);
  cursor: none;
}

/* Atmospheric floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  bottom: -10px;
  background: var(--gold);
  border-radius: 50%;
  animation: particleRise linear infinite;
}

@keyframes particleRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.1; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

/* ---- TORII GATE (proportionally accurate) ---- */
.torii-gate {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: min(70vw, 520px);
  z-index: 2;
  filter: drop-shadow(0 0 60px rgba(139,34,24,0.3));
}

/* Kasagi — top curved beam with upward sweep at ends */
.torii-kasagi {
  height: clamp(16px, 2.5vw, 24px);
  background: linear-gradient(180deg, #A83020 0%, #8B2218 60%, #6B1A12 100%);
  width: 115%;
  margin-left: -7.5%;
  border-radius: 3px;
  position: relative;
  box-shadow: 0 4px 20px rgba(139,34,24,0.4);
}

/* Upward curved ends of kasagi */
.torii-kasagi::before,
.torii-kasagi::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 12%;
  height: 12px;
  background: linear-gradient(180deg, #A83020, #8B2218);
  border-radius: 4px 4px 0 0;
}
.torii-kasagi::before { left: -2%; transform: rotate(-3deg); }
.torii-kasagi::after { right: -2%; transform: rotate(3deg); }

/* Shimaki — second beam below kasagi */
.torii-shimaki {
  height: clamp(10px, 1.5vw, 14px);
  background: linear-gradient(180deg, #9B2B1E 0%, #7A2015 100%);
  width: 108%;
  margin-left: -4%;
  margin-top: 4px;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(139,34,24,0.3);
}

/* Nuki — horizontal beam connecting pillars */
.torii-nuki {
  height: clamp(8px, 1.2vw, 12px);
  background: linear-gradient(180deg, #8B2218 0%, #6B1A12 100%);
  width: 80%;
  margin: clamp(30px, 5vw, 50px) auto 0;
  border-radius: 2px;
  position: relative;
}

/* Gakuzuka — central tablet on nuki */
.torii-nuki::before {
  content: '祈';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(24px, 4vw, 40px);
  height: clamp(18px, 3vw, 30px);
  background: var(--gold);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-size: clamp(10px, 1.5vw, 16px);
  color: #3E2812;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Hashira — main pillars */
.torii-hashira-left,
.torii-hashira-right {
  position: absolute;
  width: clamp(18px, 3vw, 30px);
  height: clamp(200px, 35vw, 340px);
  background: linear-gradient(90deg, #6B1A12 0%, #8B2218 30%, #A83020 50%, #8B2218 70%, #6B1A12 100%);
  top: clamp(55px, 9vw, 88px);
  box-shadow: 4px 0 20px rgba(0,0,0,0.3), -4px 0 20px rgba(0,0,0,0.3);
}

.torii-hashira-left { left: 13%; }
.torii-hashira-right { right: 13%; }

/* Pillar bases */
.torii-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: clamp(8px, 1.2vw, 14px);
  background: linear-gradient(180deg, #5C1510, #3E0E0A);
  border-radius: 2px;
}

/* ---- PRAYING HANDS (emoji) ---- */
.praying-hands {
  position: fixed;
  font-size: 40px;
  z-index: 100;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: opacity 0.5s ease;
  line-height: 1;
}

/* Bow animation */
.praying-hands.bowing {
  animation: bowDip 0.9s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes bowDip {
  0% { transform: rotate(0deg) scale(1); }
  40% { transform: rotate(25deg) scale(0.85) translateY(20px); }
  70% { transform: rotate(25deg) scale(0.85) translateY(20px); }
  100% { transform: rotate(0deg) scale(0.8) translateY(10px); }
}

.praying-hands.rising {
  animation: bowRise 0.6s ease-out forwards;
}

@keyframes bowRise {
  0% { transform: rotate(0deg) scale(0.8) translateY(10px); opacity: 1; }
  100% { transform: rotate(0deg) scale(1.1) translateY(-30px); opacity: 0; }
}

/* ---- HERO TEXT ---- */
.hero-prompt {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: clamp(160px, 28vw, 300px);
  pointer-events: none;
}

.hero-jp {
  font-family: var(--ff-serif);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--gold);
  letter-spacing: 0.6em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(212,168,83,0.3);
}

.hero h1 {
  font-family: var(--ff-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--cream);
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.hero-instruction {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--cream-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: instructionPulse 2.5s ease-in-out infinite;
}

@keyframes instructionPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---- GATE TRANSITION ---- */
.gate-transition {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(199,59,43,0.15), rgba(15,14,12,0.95));
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.gate-transition.active {
  opacity: 1;
  animation: gateOpen 1.2s ease-out 0.4s forwards;
}

@keyframes gateOpen {
  0% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* After entering, reset cursor */
.hero.entered {
  cursor: auto;
}

/* ---- RITUAL ---- */
.ritual {
  padding: 8rem 1.5rem;
  background: var(--bg-warm);
  border-top: 1px solid rgba(212,168,83,0.1);
}

.ritual-inner {
  max-width: 780px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--vermillion);
  margin-bottom: 1.2rem;
}

.ritual h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 3.5rem;
  color: var(--cream);
}

.ritual-steps {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.step {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.step-number {
  font-family: var(--ff-serif);
  font-size: 2rem;
  color: var(--gold);
  flex-shrink: 0;
  width: 3rem;
  text-align: center;
  line-height: 1;
  padding-top: 0.2rem;
}

.step h3 {
  font-family: var(--ff-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--cream-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ---- EMA ---- */
.ema {
  padding: 8rem 1.5rem;
  background: var(--bg);
}

.ema-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}

.ema-visual {
  display: flex;
  justify-content: center;
}

.ema-plaque {
  width: 180px;
  height: 130px;
  background: linear-gradient(160deg, #D4A853 0%, #C49840 50%, #A8832E 100%);
  border-radius: 4px 4px 4px 4px;
  position: relative;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.ema-plaque::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: var(--vermillion);
  border-radius: 50%;
  border: 3px solid var(--gold);
}

.ema-plaque::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 16px;
  background: var(--vermillion-deep);
}

.ema-flower {
  font-size: 2.2rem;
  opacity: 0.25;
  position: absolute;
  bottom: 8px;
  right: 10px;
}

.ema-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.ema-lines span {
  display: block;
  height: 2px;
  background: rgba(15,14,12,0.25);
  border-radius: 1px;
}

.ema-lines span:nth-child(1) { width: 100px; }
.ema-lines span:nth-child(2) { width: 80px; }
.ema-lines span:nth-child(3) { width: 60px; }

.ema-content h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1.2rem;
}

.ema-content p {
  color: var(--cream-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.price-tag {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  margin-top: 0.5rem;
}

/* ---- OMAMORI ---- */
.omamori {
  padding: 8rem 1.5rem;
  background: var(--bg-warm);
  border-top: 1px solid rgba(212,168,83,0.06);
}

.omamori-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.omamori-content {
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.omamori-content h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.omamori-content p {
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.charm-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.charm {
  width: 140px;
  height: 200px;
  border-radius: 8px 8px 24px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.charm:hover {
  transform: translateY(-4px);
}

.charm-red { background: linear-gradient(170deg, #C73B2B, #8B2218); }
.charm-blue { background: linear-gradient(170deg, #2B4C7C, #1A2F4E); }
.charm-gold { background: linear-gradient(170deg, #D4A853, #8B7234); }

.charm-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.2rem;
  position: relative;
}

.charm-pattern {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px 6px 20px 20px;
  background: repeating-conic-gradient(rgba(255,255,255,0.03) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
}

.charm-kanji {
  font-family: var(--ff-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  position: relative;
  z-index: 1;
  margin-bottom: 0.3rem;
}

.charm-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  position: relative;
  z-index: 1;
}

.charm::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 20px;
  background: rgba(255,255,255,0.3);
  z-index: 2;
}

.charm::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  z-index: 2;
}

.omamori-note {
  color: var(--cream-dim);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

/* ---- OMIKUJI ---- */
.omikuji {
  padding: 8rem 1.5rem;
  background: var(--bg);
}

.omikuji-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}

.fortune-box {
  width: 100px;
  margin: 0 auto;
  position: relative;
}

.box-top {
  width: 60px;
  height: 8px;
  background: var(--gold);
  border-radius: 3px 3px 0 0;
  margin: 0 auto;
}

.box-body {
  width: 100px;
  height: 120px;
  background: linear-gradient(180deg, #5C3D1E 0%, #3E2812 100%);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.box-slot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 0 0 2px 2px;
}

.stick {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  width: 4px;
  height: 50px;
  background: linear-gradient(180deg, #F0E8D8, #C49840);
  border-radius: 2px;
}

.omikuji-content h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1.2rem;
}

.omikuji-content p {
  color: var(--cream-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.omikuji-content strong {
  color: var(--cream);
}

/* ---- BODHI ---- */
.bodhi {
  padding: 8rem 1.5rem;
  background: var(--bg-warm);
  border-top: 1px solid rgba(212,168,83,0.06);
}

.bodhi-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.bodhi h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 3.5rem;
}

.bodhi-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.stage {
  text-align: center;
}

.stage-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.stage h3 {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.stage p {
  color: var(--cream-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

.bodhi-coda {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  color: var(--gold);
  font-style: italic;
}

/* ---- CLOSING ---- */
.closing {
  padding: 10rem 1.5rem;
  background: var(--bg);
  text-align: center;
  position: relative;
}

.closing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--vermillion-deep), transparent);
}

.closing-inner {
  max-width: 600px;
  margin: 0 auto;
}

.closing-jp {
  font-family: var(--ff-serif);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
}

.closing h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.2rem;
}

.closing p {
  color: var(--cream-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- FOOTER ---- */
.site-footer {
  padding: 2.5rem 1.5rem;
  background: var(--bg);
  border-top: 1px solid rgba(240,232,216,0.06);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-mark {
  font-family: var(--ff-serif);
  font-size: 0.9rem;
  color: var(--cream);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--cream-dim);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  .ema-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .omikuji-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .bodhi-stages {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .charm-row {
    gap: 1.2rem;
  }

  .charm {
    width: 110px;
    height: 160px;
  }

  .step {
    gap: 1.2rem;
  }

  .torii-gate {
    width: min(85vw, 360px);
  }

  .hero-prompt {
    margin-top: clamp(120px, 45vw, 240px);
  }

  .praying-hands {
    width: 80px;
    height: 100px;
  }

  .hero {
    cursor: auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ---- COURTYARD ---- */
.courtyard {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* Distant field & sky */
.courtyard-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg,
      #1a2a3a 0%,
      #2a4055 18%,
      #4a6a80 28%,
      #6a9aaa 35%,
      #8abccc 40%,
      #4a7a6a 48%,
      #2d4a3d 58%,
      #1a3028 68%,
      #0f1f1a 100%);
}

/* Misty mid-ground hill */
.courtyard::before {
  content: '';
  position: absolute;
  bottom: 35%;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg,
    rgba(60,100,80,0.3) 0%,
    rgba(40,70,55,0.5) 50%,
    rgba(20,45,35,0.6) 100%);
  z-index: 1;
}

/* Stone path leading into courtyard */
.courtyard-path {
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 60px;
  z-index: 2;
}

.courtyard-path::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 28px,
      rgba(180,165,145,0.4) 28px,
      rgba(180,165,145,0.4) 32px
    );
  border-radius: 40%;
}

/* Bamboo fence strips */
.courtyard-fence {
  position: absolute;
  bottom: 28%;
  left: 0;
  width: 120px;
  height: 80px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  opacity: 0.6;
}

.courtyard-fence span {
  display: block;
  height: 4px;
  background: linear-gradient(90deg, rgba(80,60,40,0.6), rgba(100,80,50,0.6));
  border-radius: 2px;
}

.courtyard-fence.right {
  left: auto;
  right: 0;
}

/* Stone lantern left */
.courtyard-lantern {
  position: absolute;
  bottom: 30%;
  z-index: 2;
}

.courtyard-lantern.left {
  left: 10%;
}

.courtyard-lantern.right {
  right: 10%;
}

/* Koi pond — stone-edged */
.courtyard-pond {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(85vw, 580px);
  height: 140px;
  z-index: 2;
  border-radius: 50% / 35%;
  overflow: visible;
}

/* Stone rim around pond */
.courtyard-pond::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50% / 35%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(140,130,110,0.5) 0%, transparent 30%),
    radial-gradient(ellipse at 70% 80%, rgba(120,115,100,0.4) 0%, transparent 25%),
    radial-gradient(ellipse at 50% 50%, rgba(100,95,85,0.3) 0%, transparent 60%),
    linear-gradient(135deg, rgba(180,170,150,0.3), rgba(80,70,60,0.2));
  z-index: -1;
}

/* Floating particles */
.courtyard-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* Three-koi pond — inside courtyard-pond */
.koi-pond {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(60,110,140,0.55) 0%,
    rgba(40,80,110,0.65) 50%,
    rgba(30,60,90,0.75) 100%);
  border-radius: 50% / 35%;
  position: relative;
  overflow: visible;
  box-shadow:
    inset 0 5px 25px rgba(100,180,220,0.08),
    inset 0 -15px 40px rgba(0,30,50,0.4);
}

/* Koi fish — CSS-drawn body + tail fin */
.koi {
  position: absolute;
  pointer-events: none;
  width: 32px;
  height: 14px;
}

.koi-body {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 60% 80% 80% 60% / 80% 60% 60% 80%;
  top: 0;
  left: 0;
}

.koi-tail {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
}

.koi-1 { top: 18%; left: -40px; }
.koi-1 .koi-body { background: linear-gradient(135deg, #E87030, #C04020, #F09040); }
.koi-1 .koi-tail { border-width: 8px 0 8px 12px; border-color: transparent transparent transparent #C04020; }
.koi-1 { animation: koi1Swim 10s linear infinite; }

.koi-2 { top: 48%; left: -40px; }
.koi-2 .koi-body { background: linear-gradient(135deg, #F0E0C0, #D0A060, #F8F0D8); }
.koi-2 .koi-tail { border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #C49030; }
.koi-2 { animation: koi2Swim 14s linear infinite; animation-delay: -5s; }

.koi-3 { top: 75%; left: -40px; }
.koi-3 .koi-body { background: linear-gradient(135deg, #D83020, #A01010, #E84030); }
.koi-3 .koi-tail { border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #A01010; }
.koi-3 { animation: koi3Swim 12s linear infinite; animation-delay: -8s; }

@keyframes koi1Swim {
  0%   { transform: translateX(0) scaleX(1); }
  40%  { transform: translateX(520px) scaleX(1); }
  41%  { transform: translateX(520px) scaleX(-1); }
  90%  { transform: translateX(-40px) scaleX(-1); }
  91%  { transform: translateX(-40px) scaleX(1); }
  100% { transform: translateX(0) scaleX(1); }
}

@keyframes koi2Swim {
  0%   { transform: translateX(0) scaleX(1); }
  40%  { transform: translateX(480px) scaleX(1); }
  41%  { transform: translateX(480px) scaleX(-1); }
  90%  { transform: translateX(-40px) scaleX(-1); }
  91%  { transform: translateX(-40px) scaleX(1); }
  100% { transform: translateX(0) scaleX(1); }
}

@keyframes koi3Swim {
  0%   { transform: translateX(0) scaleX(1); }
  40%  { transform: translateX(500px) scaleX(1); }
  41%  { transform: translateX(500px) scaleX(-1); }
  90%  { transform: translateX(-40px) scaleX(-1); }
  91%  { transform: translateX(-40px) scaleX(1); }
  100% { transform: translateX(0) scaleX(1); }
}

/* Ripple rings */
.koi-pond::before {
  content: '';
  position: absolute;
  bottom: 30%;
  left: 30%;
  width: 30px;
  height: 10px;
  border: 1px solid rgba(180,200,220,0.2);
  border-radius: 50%;
  animation: ripple 4s ease-out infinite;
}

.koi-pond::after {
  content: '';
  position: absolute;
  bottom: 50%;
  right: 35%;
  width: 20px;
  height: 8px;
  border: 1px solid rgba(180,200,220,0.15);
  border-radius: 50%;
  animation: ripple 5s ease-out infinite 2s;
}

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(3); opacity: 0; }
}

/* Station entrance buttons */
.courtyard-stations {
  position: relative;
  z-index: 3;
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0 2rem 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.station-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.station-btn:hover {
  transform: translateY(-6px);
}

.station-btn:hover .station-gate {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212,168,83,0.3);
}

.station-gate {
  width: clamp(100px, 18vw, 140px);
  height: clamp(130px, 22vw, 170px);
  border: 2px solid var(--vermillion-deep);
  border-radius: 4px 4px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, rgba(15,14,12,0.8) 0%, rgba(15,14,12,0.5) 100%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.station-gate::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 6px;
  background: var(--vermillion);
  border-radius: 2px;
}

.station-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 8vw, 64px);
  height: clamp(52px, 8vw, 64px);
}

.station-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: filter 0.3s ease;
}

.station-btn:hover .station-icon svg {
  filter: drop-shadow(0 0 12px rgba(212,168,83,0.6));
}

.station-jp {
  font-family: var(--ff-serif);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 700;
  text-align: center;
}

.station-en {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.station-label {
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* Courtyard header */
.courtyard-header {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.courtyard-header h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.courtyard-header p {
  font-size: 0.85rem;
  color: var(--cream-dim);
  letter-spacing: 0.15em;
}

/* Courtyard section containers (inline ritual areas) */
.courtyard-section {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg-warm);
  overflow-y: auto;
}

.courtyard-section.active {
  display: block;
}

.courtyard-section-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.courtyard-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  margin-bottom: 2rem;
  background: none;
  border: none;
  font-family: var(--ff-sans);
}

.courtyard-back:hover {
  color: var(--cream);
}

/* Omamori page — uses reference image */
.omamori-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.omamori-card {
  text-align: center;
  position: relative;
}

.omamori-img {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto;
  /* Blend into the warm dark background */
  mix-blend-mode: normal;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.omamori-card-label {
  margin-top: 0.8rem;
  font-family: var(--ff-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
}

.omamori-card-sub {
  font-size: 0.75rem;
  color: var(--cream-dim);
  margin-top: 0.2rem;
}

@media (max-width: 600px) {
  .omamori-page-grid {
    grid-template-columns: 1fr;
  }
  .courtyard-stations {
    gap: 1rem;
  }
}