/* ─────────────────────────────────────────────────────────────
   For Chi · 母の日
   Mobile-first. Wabi-sabi editorial. Sumi ink + warm bone paper.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Warm bone-paper palette */
  --paper:        #f3ebdd;
  --paper-deep:   #e8dec9;
  --paper-card:   #faf3e4;

  /* Sumi-ink type */
  --ink:          #1c1714;
  --ink-soft:     #4a3f33;
  --ink-faint:    #8a7a64;

  /* The single accent — shu-iro, vermillion */
  --vermillion:   #c84a32;
  --hanko:        #b53826;
  --hanko-deep:   #8e2d20;

  /* A whisper of indigo, used once */
  --ai:           #2e3e54;

  /* Type families */
  --serif:        "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --mincho:       "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --hand:         "Italianno", "Apple Chancery", cursive;

  /* Rhythm */
  --pad-x:        clamp(1.25rem, 6vw, 2.5rem);
  --max-w:        38rem;
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (min-width: 480px) {
  html, body { font-size: 18px; }
}

::selection { background: var(--vermillion); color: var(--paper); }

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

/* ───── Paper grain overlay ─────────────────────────────────── */
/* SVG fractal noise = real paper texture without an image file */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  mix-blend-mode: multiply;
  opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.36  0 0 0 0 0.28  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Soft vignette — like an old book */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 50%, rgba(58,42,28,0.08) 100%),
    radial-gradient(ellipse at 50% 100%, transparent 60%, rgba(58,42,28,0.08) 100%);
}

/* ───── Panels ──────────────────────────────────────────────── */

main {
  display: block;
}

.panel {
  min-height: 100svh;          /* small viewport units = correct on iOS */
  padding: clamp(3rem, 10vh, 5rem) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

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

/* First panel should be visible immediately */
.panel.cover {
  opacity: 1;
  transform: none;
}


/* ─────────────────────────────────────────────────────────────
   Chapter markers — used on every panel for editorial cohesion
   ───────────────────────────────────────────────────────────── */
.chapter {
  position: absolute;
  top: clamp(1.2rem, 4vh, 2rem);
  left: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  z-index: 6;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.9s ease 0.3s, transform 0.9s ease 0.3s;
}
.is-visible .chapter,
.cover .chapter { opacity: 1; transform: none; }

.chapter > span:first-child {
  font-family: var(--mincho);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--vermillion);
  width: 1.6rem; height: 1.6rem;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--vermillion);
  border-radius: 2px;
}
.chapter__label {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.28em;
  text-transform: lowercase;
}


/* ─────────────────────────────────────────────────────────────
   PANEL 1 — Cover  (architectural, asymmetric, with depth)
   ───────────────────────────────────────────────────────────── */

.cover {
  /* Override generic panel centering — we compose absolutely */
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(255,255,255,0.4), transparent 55%),
    radial-gradient(ellipse at 80% 0%, rgba(220,200,170,0.18), transparent 65%),
    var(--paper);
}

/* The bold gesture: a vermillion sun-disc, partially off-screen */
.cover__disc {
  position: absolute;
  top: clamp(7vh, 11vh, 14vh);
  right: -38vw;
  width: clamp(420px, 92vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%,
      #e26c4f 0%,
      var(--vermillion) 42%,
      var(--hanko) 78%,
      var(--hanko-deep) 100%);
  -webkit-mask-image: radial-gradient(circle, black 70%, rgba(0,0,0,0.85) 86%, transparent 99%);
          mask-image: radial-gradient(circle, black 70%, rgba(0,0,0,0.85) 86%, transparent 99%);
  z-index: 2;
  /* Off-state: fade in via TRANSITION (not animation) so transform stays free for tap */
  opacity: 0;
  scale: 0.86;
  translate: 0 var(--parallax-disc, 0px);
  transition: opacity 1.6s cubic-bezier(.2,.7,.2,1) 0.2s,
              scale   1.6s cubic-bezier(.2,.7,.2,1) 0.2s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* Slow continuous rotation of the patterns inside the disc */
.cover__disc-spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: discSpin 120s linear infinite;
  pointer-events: none;
}
@keyframes discSpin {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* Two pattern layers — wiped in via a rotating conic mask (shutter reveal) */
@property --wipe {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.cover__disc-pattern {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-repeat: repeat;
  pointer-events: none;
  /* Subtle blend so white pattern lines feel like dye on cloth, not stickers */
  mix-blend-mode: soft-light;
  /* The shutter mask — visible region grows clockwise from 12 o'clock as --wipe grows */
  --wipe: 0deg;
  -webkit-mask: conic-gradient(from 0deg, black 0deg, black var(--wipe), transparent var(--wipe), transparent 360deg);
          mask: conic-gradient(from 0deg, black 0deg, black var(--wipe), transparent var(--wipe), transparent 360deg);
  transition: --wipe 1.4s cubic-bezier(.4, 0, .4, 1);
}
.cover__disc-pattern.is-active { --wipe: 360deg; }
.cover__disc-pattern.no-transition { transition: none !important; }
.is-loaded .cover__disc {
  opacity: 0.96;
  scale: 1;
}
/* Tap pulse — uses transform; composes with `scale` so they never fight */
.cover__disc.is-tapped {
  animation: discBoop 1.1s cubic-bezier(.2,.7,.3,1.5);
}
@keyframes discBoop {
  0%   { transform: scale(1); }
  18%  { transform: scale(0.94); }
  55%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Distant ink-wash mountains, three layered ridges */
.cover__mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: clamp(180px, 32vh, 360px);
  pointer-events: none;
  z-index: 1;
  color: var(--ink);
}
.cover__mountains path { fill: currentColor; }

/* A second blurred shape behind for a soft halo of ink-bleed */
.cover__disc-shadow {
  position: absolute;
  top: clamp(5vh, 9vh, 12vh);
  right: -42vw;
  width: clamp(460px, 100vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 56, 38, 0.18), transparent 70%);
  filter: blur(28px);
  z-index: 0;
  translate: 0 var(--parallax-shadow, 0px);
}
@keyframes discRise {
  from { opacity: 0; scale: 0.86; }
  to   { opacity: 0.96; scale: 1; }
}

/* ─── Cover crane — a single bird drifting once across the sky ─── */
.cover__crane {
  position: absolute;
  top: clamp(20vh, 24vh, 28vh);
  left: 0;
  width: clamp(54px, 14vw, 78px);
  height: auto;
  color: var(--ink-soft);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  /* Bird animation: enters from left, drifts right with gentle bob, exits */
  animation: craneFly 22s cubic-bezier(.4,.0,.6,1) 4.5s 1 forwards;
}
.is-loaded .cover__crane { /* gate to load so it doesn't fire before assets settle */ }

.crane-bird {
  fill: currentColor;
  stroke: none;
}
.crane-body { /* angular paper silhouette, no extras */ }
.crane-wing {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: wingFlap 1.6s ease-in-out infinite;
}

@keyframes craneFly {
  0%   { transform: translateX(-22vw) translateY(0);    opacity: 0; }
  6%   { opacity: 0.78; }
  22%  { transform: translateX(18vw)  translateY(-12px); }
  44%  { transform: translateX(40vw)  translateY(8px); }
  64%  { transform: translateX(60vw)  translateY(-8px); }
  82%  { transform: translateX(82vw)  translateY(6px); }
  92%  { opacity: 0.78; }
  100% { transform: translateX(125vw) translateY(0);    opacity: 0; }
}

@keyframes wingFlap {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.45); }
}

/* Top "magazine" tag bar */
.cover__tag {
  position: absolute;
  top: clamp(1.2rem, 4vh, 2rem);
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 5;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}
.cover__tag-jp {
  font-family: var(--mincho);
  font-weight: 600;
  color: var(--vermillion);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: none;
}
.cover__tag-en {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
}
.cover__tag-rule {
  flex: 1;
  height: 1px;
  background: var(--ink-faint);
  opacity: 0.4;
}
.cover__tag-num {
  font-family: var(--mincho);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-faint);
  text-transform: none;
}
.cover__tag {
  translate: 0 var(--parallax-tag, 0px);
}

/* The hero block — anchored bottom-left */
.cover__hero {
  position: absolute;
  bottom: clamp(14vh, 18vh, 22vh);
  left: var(--pad-x);
  right: var(--pad-x);
  z-index: 10;
  max-width: 22rem;
}
.cover__for {
  font-family: var(--hand);
  font-size: clamp(2rem, 9vw, 2.8rem);
  color: var(--ink-soft);
  line-height: 1;
  margin-bottom: -0.05em;
  opacity: 0;
  animation: fadeUp 1.1s ease 0.9s forwards;
}
.cover__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(5.6rem, 28vw, 9rem);
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 1.2s ease 1.15s forwards;
  /* Slight optical adjustment for italic */
  margin-left: -0.04em;
}
.cover__period {
  /* Period stays in ink — it may rest against the red disc, must read */
  color: var(--ink);
  font-style: normal;
  display: inline-block;
  margin-left: -0.05em;
  vertical-align: baseline;
}
.cover__rule {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--ink);
  margin: 1.3em 0 1em;
  opacity: 0;
  animation: ruleGrow 0.9s ease 1.6s forwards;
  transform-origin: left;
}
@keyframes ruleGrow {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}
.cover__name-jp {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(1.3rem, 5.2vw, 1.7rem);
  color: var(--ink);
  letter-spacing: 0.4em;
  margin-bottom: 0.4em;
  opacity: 0;
  animation: fadeUp 1s ease 1.85s forwards;
}
.cover__meaning {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.85rem, 3.5vw, 1rem);
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fadeUp 1s ease 2.1s forwards;
}

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

/* Scroll hint — now uses 読 (read) */
.scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  z-index: 5;
  opacity: 0;
  animation: fadeUp 1s ease 2.4s forwards;
}
.scroll-hint__line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, transparent, var(--ink-faint));
  animation: lineDrop 2.2s ease-in-out infinite;
}
.scroll-hint__label {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  background: var(--paper);
  padding: 0 0.3rem;
}
@keyframes lineDrop {
  0%, 100% { transform: scaleY(0.6); transform-origin: top; opacity: 0.4; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}


/* ─────────────────────────────────────────────────────────────
   PANEL 2 — Letter
   ───────────────────────────────────────────────────────────── */

.letter {
  background:
    radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.3), transparent 70%),
    var(--paper);
}

.card--letter {
  width: 100%;
  max-width: 28rem;
  /* Layered washi: gradient base + scattered fibers as tiny dots */
  background:
    radial-gradient(circle at 80% 28%, rgba(170,130,80,0.07) 0px, transparent 1.2px),
    radial-gradient(circle at 22% 64%, rgba(150,110,70,0.06) 0px, transparent 1.4px),
    radial-gradient(circle at 64% 82%, rgba(170,130,80,0.05) 0px, transparent 1px),
    radial-gradient(circle at 12% 22%, rgba(140,100,60,0.05) 0px, transparent 1.2px),
    radial-gradient(circle at 92% 70%, rgba(160,120,80,0.05) 0px, transparent 1.4px),
    radial-gradient(circle at 38% 12%, rgba(190,150,100,0.04) 0px, transparent 1px),
    radial-gradient(circle at 78% 50%, rgba(170,130,80,0.05) 0px, transparent 1.2px),
    linear-gradient(168deg, var(--paper-card) 0%, #f6ecd6 60%, #f1e4ca 100%);
  padding: clamp(1.6rem, 7vw, 2.6rem) clamp(1.4rem, 6vw, 2.4rem);
  position: relative;
  overflow: hidden;
  transform: rotate(-1deg);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 8px 28px rgba(60,40,20,0.10),
    0 30px 60px rgba(60,40,20,0.06);
  border-radius: 2px;
}

/* Faint 春 watermark behind the letter copy */
.card__watermark {
  position: absolute;
  top: 50%;
  right: -0.18em;
  transform: translateY(-50%);
  font-family: var(--mincho);
  font-weight: 400;
  font-size: clamp(11rem, 38vw, 16rem);
  color: var(--ink);
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
  line-height: 0.78;
  letter-spacing: 0;
  user-select: none;
}

/* Letter content above the watermark */
.card__header,
.card__body,
.card__footer {
  position: relative;
  z-index: 1;
}

/* Subtle deckle on the card */
.card--letter::before,
.card--letter::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 6px;
  background-image:
    radial-gradient(circle at 4px 3px, var(--paper-deep) 1.5px, transparent 2px),
    radial-gradient(circle at 12px 4px, var(--paper-deep) 1px, transparent 1.5px);
  background-size: 16px 6px;
  opacity: 0.6;
}
.card--letter::before { top: -6px; }
.card--letter::after  { bottom: -6px; transform: scaleY(-1); }

.card__header {
  margin-bottom: 1.4rem;
}
.card__date {
  font-family: var(--mincho);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.8rem;
}
.card__heading {
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  color: var(--ink);
  line-height: 1;
}

.card__body p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.05rem, 4.2vw, 1.15rem);
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1rem;
}
.card__body p:last-child {
  margin-bottom: 0;
  font-style: italic;
  color: var(--ink-soft);
}

.card__footer {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card__sign {
  font-family: var(--hand);
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  color: var(--ink);
  line-height: 1;
}

/* Hanko stamp — the vermillion seal */
.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: var(--hanko);
  color: var(--paper-card);
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0;
  border-radius: 4px;
  position: relative;
  transform: rotate(-6deg) scale(0.8);
  opacity: 0;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.18),
    0 1px 2px rgba(0,0,0,0.15);
  /* Imperfect ink-stamp edges */
  -webkit-mask-image: radial-gradient(ellipse at 30% 30%, black 60%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0.7) 100%);
          mask-image: radial-gradient(ellipse at 30% 30%, black 60%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0.7) 100%);
}
.is-visible .hanko {
  animation: stamp 0.6s cubic-bezier(.2,.9,.3,1.4) 0.5s forwards;
}
@keyframes stamp {
  0%   { opacity: 0; transform: rotate(8deg) scale(1.6); }
  60%  { opacity: 1; transform: rotate(-8deg) scale(0.92); }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}

/* Tap to re-stamp the letter */
.card--letter .hanko {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.card--letter .hanko.is-restamped {
  animation: restamp 0.65s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes restamp {
  0%   { transform: rotate(-6deg) scale(1); }
  20%  { transform: rotate(2deg)  scale(1.15); }
  55%  { transform: rotate(-12deg) scale(0.88); }
  100% { transform: rotate(-6deg) scale(1); }
}


/* ─────────────────────────────────────────────────────────────
   PANEL 3 — Salon (scissors + noren)
   ───────────────────────────────────────────────────────────── */

.salon {
  gap: 2.5rem;
  padding-top: clamp(4rem, 12vh, 6rem);
}

/* Scissors figure */
.scissors-figure {
  position: relative;
  width: clamp(160px, 48vw, 220px);
  aspect-ratio: 240 / 360;
}
.scissors {
  width: 100%; height: 100%;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(60,40,20,0.18));
}

/* Blades open & close — slow, breathing */
.blade {
  transform-origin: 120px 200px;
  transform-box: fill-box;
}
.is-visible .blade--left  { animation: snipLeft  6s ease-in-out infinite; }
.is-visible .blade--right { animation: snipRight 6s ease-in-out infinite; }

@keyframes snipLeft {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(0deg); }
}
@keyframes snipRight {
  0%, 100% { transform: rotate(8deg); }
  50%      { transform: rotate(0deg); }
}

/* The petal field — bounded to the scissors figure */
.petal-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -20px;
  width: 12px; height: 12px;
  background: radial-gradient(ellipse at 30% 30%,
              #fde6e2 0%,
              #f6c4bc 50%,
              #e8a59b 100%);
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  box-shadow: 0 1px 1px rgba(140,60,50,0.12);
  opacity: 0;
}
.petal.is-falling { animation: petalFall var(--dur, 7s) linear var(--delay, 0s) infinite; }

@keyframes petalFall {
  0%   { transform: translate(0, 0) rotate(0deg);    opacity: 0; }
  10%  { opacity: 0.95; }
  50%  { transform: translate(var(--dx, 8px),  50%) rotate(180deg); }
  100% { transform: translate(var(--dx2, -10px), 360px) rotate(380deg); opacity: 0; }
}

/* ─── Noren — the salon sign ─── */
.noren {
  width: 100%;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The bamboo cord above */
.noren__cord {
  width: 90%;
  height: 2px;
  background: linear-gradient(to right,
    transparent 0%, var(--ink-faint) 12%, var(--ink-faint) 88%, transparent 100%);
  position: relative;
  margin-bottom: 0;
}
.noren__cord::before, .noren__cord::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-soft);
}
.noren__cord::before { left: 8%; }
.noren__cord::after  { right: 8%; }

.noren__cloth {
  width: 100%;
  background:
    linear-gradient(to bottom, rgba(40,30,20,0.04), transparent 8%),
    var(--paper-card);
  padding: 1.8rem 1.5rem 2rem;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(60,40,20,0.06),
    0 8px 24px rgba(60,40,20,0.10);
}
/* Subtle stitched seam down the centre — like a real two-panel noren */
.noren__cloth::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: rgba(60,40,20,0.08);
  pointer-events: none;
}
/* Soft scalloped hem along the bottom edge */
.noren__cloth::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -10px;
  height: 12px;
  background-image:
    radial-gradient(circle at 6px 0, var(--paper-card) 6px, transparent 6.5px);
  background-size: 12px 12px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 4px 6px rgba(60,40,20,0.08));
}

.noren__shop {
  font-family: var(--mincho);
  font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 2rem);
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.18em;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.noren__shop span { display: inline-block; }

.noren__shop-en {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.18em;
}

.noren__divider {
  display: block;
  width: 40%;
  height: 1px;
  background: var(--ink-faint);
  margin: 1.2rem auto;
  opacity: 0.5;
}

.noren__menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.noren__menu li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.7rem;
  align-items: baseline;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.3s;
}
.noren__menu li:active { opacity: 0.7; }

.noren__mark {
  font-family: var(--mincho);
  font-weight: 600;
  color: var(--vermillion);
  font-size: 1rem;
  text-align: center;
  transition: transform 0.3s;
}
.noren__line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  position: relative;
  display: inline-block;
  /* Brushstroke underline grown via background-size */
  background-image: linear-gradient(var(--vermillion), var(--vermillion));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.6s cubic-bezier(.4,.1,.3,1);
  padding-bottom: 2px;
}
/* Marked state — a brush of vermillion underlines the line */
.noren__menu li.is-marked .noren__line {
  background-size: 100% 1.5px;
}
.noren__menu li.is-marked .noren__mark {
  animation: markPulse 0.5s cubic-bezier(.2,.7,.3,1.4);
}
@keyframes markPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); color: var(--hanko); }
  100% { transform: scale(1); }
}

.noren__hours {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(60,40,20,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}


/* ─────────────────────────────────────────────────────────────
   PANEL 4 — Haiku (true vertical, right-to-left)
   ───────────────────────────────────────────────────────────── */

.haiku {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.35), transparent 70%),
    var(--paper);
  gap: 1.5rem;
  position: relative;
}

/* Faint enso (zen circle) brushstroke behind the haiku */
.haiku__enso {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(280px, 75vw, 380px);
  height: clamp(280px, 75vw, 380px);
  transform: translate(-50%, -50%) rotate(-18deg);
  color: var(--ink);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.haiku__enso path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
.is-visible .haiku__enso path {
  animation: ensoDraw 2.4s cubic-bezier(.3,.7,.4,1) 0.2s forwards;
}
@keyframes ensoDraw {
  to { stroke-dashoffset: 0; }
}

.haiku__board {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row-reverse; /* right-to-left */
  align-items: flex-start;
  justify-content: center;
  gap: clamp(2rem, 10vw, 4rem);
  padding: 1.5rem 0.5rem;
  min-height: 50vh;
}

/* Each column is read top-to-bottom; columns ordered right-to-left */
.haiku__column {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 6vw, 1.8rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
}
.haiku__column span {
  display: block;
  text-transform: lowercase;
  padding: 0.05em 0;
  opacity: 0;
}
.haiku__space { height: 0.8em; }

/* Stagger each column's appearance — like ink set down line by line */
.is-visible .haiku__column--1 span { animation: inkSet 0.8s ease calc(0.4s + var(--i, 0) * 0.04s) forwards; }
.is-visible .haiku__column--2 span { animation: inkSet 0.8s ease calc(1.5s + var(--i, 0) * 0.04s) forwards; }
.is-visible .haiku__column--3 span { animation: inkSet 0.8s ease calc(3.0s + var(--i, 0) * 0.04s) forwards; }

@keyframes inkSet {
  from { opacity: 0; transform: translateY(-4px); filter: blur(1.5px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* The haiku hanko — small red stamp at the foot of the leftmost column */
.haiku__hanko {
  position: absolute;
  bottom: 0;
  left: 12%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--hanko);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 3px;
  transform: rotate(-4deg);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.2),
    0 1px 2px rgba(0,0,0,0.12);
  opacity: 0;
}
.is-visible .haiku__hanko { animation: stamp 0.6s ease 4.2s forwards; }

/* Tap the haiku hanko → vermillion glow blooms */
.haiku__hanko {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.haiku__hanko.is-pulsed {
  animation: hankoGlow 1.2s ease;
}
@keyframes hankoGlow {
  0%   { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.2),
                     0 1px 2px rgba(0,0,0,0.12),
                     0 0 0 0 rgba(200,74,50,0); }
  50%  { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.2),
                     0 1px 2px rgba(0,0,0,0.12),
                     0 0 32px 4px rgba(200,74,50,0.55); }
  100% { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.2),
                     0 1px 2px rgba(0,0,0,0.12),
                     0 0 0 0 rgba(200,74,50,0); }
}

/* Framed state — when haiku is "signed", a fine ink rule appears around it */
.haiku__board::before {
  content: "";
  position: absolute;
  inset: -1.2rem -0.4rem;
  border: 0.5px solid var(--ink);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.7s cubic-bezier(.3,.7,.3,1), transform 0.7s cubic-bezier(.3,.7,.3,1);
  pointer-events: none;
}
.haiku__board.is-framed::before {
  opacity: 0.35;
  transform: scale(1);
}

.haiku__caption {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.3em;
  text-align: center;
}


/* ─────────────────────────────────────────────────────────────
   PANEL 5 — Closing
   ───────────────────────────────────────────────────────────── */

.closing {
  gap: 1.2rem;
  text-align: center;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

/* Small disc echo of the cover, far smaller — a quiet bookend */
.closing__disc {
  position: absolute;
  bottom: -32vw;
  left: -20vw;
  width: 60vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,
    var(--vermillion) 0%,
    var(--hanko) 60%,
    var(--hanko-deep) 100%);
  -webkit-mask-image: radial-gradient(circle, black 70%, rgba(0,0,0,0.85) 86%, transparent 99%);
          mask-image: radial-gradient(circle, black 70%, rgba(0,0,0,0.85) 86%, transparent 99%);
  opacity: 0;
  scale: 0.86;
  z-index: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 1.6s cubic-bezier(.2,.7,.2,1) 0.4s,
              scale   1.6s cubic-bezier(.2,.7,.2,1) 0.4s;
}
.is-visible .closing__disc {
  opacity: 1;
  scale: 1;
}

/* Distant horizon echo on the closing panel */
.closing__mountains {
  position: absolute;
  top: 22%;
  left: 0;
  width: 100%;
  height: clamp(40px, 6vh, 70px);
  pointer-events: none;
  z-index: 0;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 2s ease 0.6s, transform 2s ease 0.6s;
}
.closing__mountains path { fill: currentColor; }
.is-visible .closing__mountains { opacity: 1; transform: none; }
.closing__disc.is-tapped {
  animation: discBoop 1.4s cubic-bezier(.2,.7,.3,1.5);
}

.closing > *:not(.closing__disc):not(.chapter) {
  position: relative;
  z-index: 1;
}

.closing__brushstroke {
  width: clamp(160px, 50vw, 240px);
  margin-bottom: 1rem;
}
.closing__path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.is-visible .closing__path {
  animation: brushDraw 1.6s cubic-bezier(.2,.6,.3,1) 0.3s forwards;
}
@keyframes brushDraw {
  to { stroke-dashoffset: 0; }
}

.closing__line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 5vw, 1.4rem);
  color: var(--ink-soft);
}

.closing__sign {
  font-family: var(--hand);
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  color: var(--ink);
  line-height: 1;
}

.closing__footer {
  margin-top: 2rem;
  font-family: var(--mincho);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.3em;
}


/* ─────────────────────────────────────────────────────────────
   Reduced motion — let the design rest
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .panel {
    opacity: 1;
    transform: none;
  }
}


/* ─────────────────────────────────────────────────────────────
   Tablet & desktop refinements (mobile remains the priority)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .salon {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 6vw, 5rem);
  }
  .scissors-figure {
    width: 240px;
  }
  .haiku__board {
    gap: 6rem;
  }
}
