:root {
  --desk: #f6d9c4;
  --paper: #fff4e8;
  --paper-2: #fffaf3;
  --ink: #2a211c;
  --muted: #4e3d36;
  --rose: #9d342c;
  --rose-deep: #8a2f2c;
  --rose-fill: #b44438;
  --cream: #fff8f2;
  --butter: #f8d7a2;
  --line: rgba(42, 33, 28, 0.16);
  --shadow: 0 14px 30px rgba(90, 48, 28, 0.08);
  --glow: #f8d7b8;
  --focus: #8a2f2c;
  --petal: #e7a3b0;
  --paw-bg: #8f4e3c;
  --paw-ink: 0.74;
  --art-paper: #fff;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #1a1411;
    --paper: #2b221c;
    --paper-2: #342922;
    --ink: #f7efe6;
    --muted: #e4d2c4;
    --rose: #f0b0a4;
    --rose-deep: #f0b0a4;
    --line: rgba(247, 239, 230, 0.18);
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    --glow: #3a2a24;
    --focus: #f0b0a4;
    --petal: #f0b7c2;
    --paw-bg: #f0c4b6;
    --paw-ink: 0.86;
    --art-paper: #fff6ec;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
}

.paw-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.paw-sheet {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--paw-bg);
}

.paw-sheet use {
  fill: var(--paw-bg);
}

.paw-layer {
  opacity: var(--paw-ink);
  transform-box: fill-box;
  transform-origin: center;
}

.shell {
  position: relative;
  z-index: 1;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -12%, var(--glow) 0, transparent 46%),
    var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -5rem;
  z-index: 3;
  background: var(--paper);
  color: var(--ink);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: calc(0.5rem + env(safe-area-inset-top));
  min-height: 44px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell {
  width: min(70rem, 100%);
  margin-inline: auto;
  padding:
    calc(0.85rem + env(safe-area-inset-top))
    calc(0.85rem + env(safe-area-inset-right))
    calc(1.6rem + env(safe-area-inset-bottom))
    calc(0.85rem + env(safe-area-inset-left));
}

.sheet {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  overflow: clip;
}

.decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.top,
main,
.colophon {
  position: relative;
  z-index: 1;
}

.petal {
  position: absolute;
  top: 0;
  display: block;
  width: 0.7rem;
  height: 0.95rem;
  border-radius: 80% 8% 80% 8%;
  background: var(--petal);
  opacity: 0;
  pointer-events: none;
}

.petal:nth-child(odd) { background: #f0b7c2; }
.petal:nth-child(3n) { width: 0.55rem; height: 0.75rem; background: #f3c7b6; }
.petal:nth-child(1) { left: 6%; }
.petal:nth-child(2) { left: 18%; }
.petal:nth-child(3) { left: 31%; }
.petal:nth-child(4) { left: 44%; }
.petal:nth-child(5) { left: 57%; }
.petal:nth-child(6) { left: 69%; }
.petal:nth-child(7) { left: 80%; }
.petal:nth-child(8) { left: 91%; }

.top-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.1rem;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.3rem 0.15rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  font-weight: 650;
  transition: color 180ms ease;
}

.nav a:hover {
  color: var(--rose-deep);
}

main {
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.2rem, 4vw, 3rem);
}

.hero {
  text-align: center;
  padding-block: clamp(1.5rem, 6vw, 4.5rem) 0.25rem;
}

.title-stage {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 1.1rem 0.15rem 0.35rem;
}

.hero h1 {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.28em;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.65rem, 8.15vw, 7.2rem);
  line-height: 1;
  letter-spacing: 0.012em;
  white-space: nowrap;
}

.title-line {
  display: inline;
  white-space: nowrap;
}

.title-sensei {
  margin: 0;
  color: var(--rose-deep);
  font-style: italic;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: inherit;
  line-height: 1;
}

.bloom {
  position: absolute;
  display: block;
  width: 0.72rem;
  height: 0.98rem;
  border-radius: 80% 10% 80% 10%;
  background: var(--petal);
  pointer-events: none;
}

.bloom-a { top: 0.15rem; left: 0.15rem; }
.bloom-b { top: 42%; right: 0.1rem; background: #f0b7c2; }
.bloom-c {
  bottom: 0.2rem;
  left: 28%;
  width: 0.48rem;
  height: 0.66rem;
  background: #f3c7b6;
}

.block h2 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lede,
.soon,
.block p,
.quiet {
  max-width: 65ch;
}

.lede {
  margin: 1.35rem auto 0;
  font-size: 1.25rem;
  color: var(--muted);
}

.soon {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--rose-deep);
}

.lede,
.block p,
.quiet,
.nav a,
.block h2 {
  font-style: normal;
}

.block p,
.quiet {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  background: var(--rose-fill);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  overflow-wrap: anywhere;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
  background: var(--rose-deep);
  transform: translateY(-2px);
}

.button-quiet {
  background: transparent;
  color: var(--rose-deep);
  border: 2px solid var(--rose-deep);
}

.button-quiet:hover {
  background: var(--butter);
  color: var(--ink);
  border-color: var(--butter);
}

.block {
  margin-top: clamp(3rem, 8vw, 5.5rem);
  padding-top: 0;
  border-top: 0;
}

.text-link {
  color: var(--rose-deep);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 0.18em;
}

.block h2 {
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.plate {
  margin-top: clamp(2.75rem, 8vw, 5rem);
}

.shiso-art {
  display: grid;
  gap: 1rem 2.25rem;
  margin: 0;
  max-width: none;
}

.shiso-art figcaption {
  display: grid;
  align-content: end;
  gap: 0.85rem;
  margin: 0;
}

.shiso-credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.plate-note {
  max-width: 38rem;
  margin-top: 1.35rem;
}

.plate-note h2,
.watch h2 {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

@media (min-width: 52rem) {
  .shiso-art {
    grid-template-columns: minmax(0, 1.45fr) minmax(11rem, 0.7fr);
    align-items: end;
  }

  .plate-note {
    margin-top: 1.1rem;
  }
}

.shiso-frame {
  position: relative;
  background: var(--art-paper);
  padding: 0.45rem;
}

.shiso-stage {
  position: relative;
}

.wisps {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.wisp {
  fill: none;
  stroke: url("#wisp-fade");
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.82;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.channel-line {
  margin: 0.35rem 0 0;
}

.channel-line a {
  color: var(--rose-deep);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
}

.paw {
  display: inline-block;
  margin-left: 0.3rem;
  vertical-align: -0.15em;
  color: var(--rose-deep);
}

.shiso-art img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

@media (prefers-color-scheme: dark) {
  .shiso-frame {
    padding: 0.85rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }
}

.watch {
  margin-top: clamp(3rem, 8vw, 5rem);
  max-width: 38rem;
}

.colophon {
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem 1.3rem;
  border-top: 1px solid var(--line);
}

.colophon p {
  margin: 0;
  max-width: 65ch;
}

.dedication {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
}

.credit {
  margin: 0.15rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.quiet {
  color: var(--muted);
  font-size: 0.98rem;
}

.quiet a {
  color: var(--rose-deep);
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1 {
    animation: title-in 900ms ease both;
  }

  .lede,
  .soon,
  .plate,
  .watch {
    animation-name: arrive;
    animation-duration: 720ms;
    animation-timing-function: ease;
    animation-fill-mode: both;
  }

  .lede { animation-delay: 120ms; }
  .plate { animation-delay: 180ms; }
  .soon { animation-delay: 260ms; }
  .watch { animation-delay: 200ms; }

  .paw-layer { animation: footstep 9.6s ease-in-out infinite; }
  .paw-layer-b { animation-duration: 11.4s; animation-delay: -3.6s; animation-direction: alternate-reverse; }
  .paw-layer-c { animation-duration: 10.4s; animation-delay: -6.2s; }

  .wisp { animation: wisp-rise 4.6s ease-in-out infinite; }
  .wisp-b { animation-delay: -1.55s; }
  .wisp-c { animation-delay: -3.1s; }

  .bloom { animation: sway 8s ease-in-out infinite alternate; }
  .bloom-b { animation-duration: 10s; animation-direction: alternate-reverse; }
  .bloom-c { animation-duration: 9s; animation-delay: 0.6s; }

  .petal {
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .petal:nth-child(odd) { animation-name: fall-a; }
  .petal:nth-child(even) { animation-name: fall-b; }
  .petal:nth-child(1) { animation-duration: 16s; animation-delay: -2s; }
  .petal:nth-child(2) { animation-duration: 18s; animation-delay: -9s; }
  .petal:nth-child(3) { animation-duration: 14s; animation-delay: -5s; }
  .petal:nth-child(4) { animation-duration: 17s; animation-delay: -12s; }
  .petal:nth-child(5) { animation-duration: 15s; animation-delay: -7s; }
  .petal:nth-child(6) { animation-duration: 19s; animation-delay: -3s; }
  .petal:nth-child(7) { animation-duration: 13.5s; animation-delay: -10s; }
  .petal:nth-child(8) { animation-duration: 16.5s; animation-delay: -6s; }
}

@keyframes title-in {
  from { transform: translate3d(0, 0.45rem, 0); }
  to { transform: none; }
}

@keyframes arrive {
  from { transform: translate3d(0, 10px, 0); }
  to { transform: none; }
}

@keyframes footstep {
  0%, 100% { opacity: calc(var(--paw-ink) * 0.58); transform: translate3d(0, 0, 0); }
  50% { opacity: var(--paw-ink); transform: translate3d(0, 14px, 0); }
}

@keyframes wisp-rise {
  0% { opacity: 0.2; transform: translateY(8%); }
  16% { opacity: 0.9; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-78%); }
}

@keyframes sway {
  from { transform: translate3d(0, 0, 0) rotate(-10deg); }
  to { transform: translate3d(0.15rem, 0.35rem, 0) rotate(12deg); }
}

@keyframes fall-a {
  0% { transform: translate3d(0, -3rem, 0) rotate(-18deg); opacity: 0; }
  10% { opacity: 0.7; }
  100% { transform: translate3d(1.25rem, 120rem, 0) rotate(200deg); opacity: 0; }
}

@keyframes fall-b {
  0% { transform: translate3d(0, -3rem, 0) rotate(14deg); opacity: 0; }
  10% { opacity: 0.62; }
  100% { transform: translate3d(-1.4rem, 120rem, 0) rotate(-180deg); opacity: 0; }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .nav a:hover,
  .button:hover {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(42, 33, 28, 0.7);
  }

  .button-quiet,
  .sheet {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .button,
  .sheet,
  .theme-toggle {
    border: 1px solid CanvasText;
  }
}

.theme-switch {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.theme-toggle svg {
  display: block;
}

.theme-word,
.theme-note,
.theme-offer-day {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.theme-switch:focus-visible + .shell .theme-toggle {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.theme-switch:checked + .shell .theme-offer-night {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.theme-switch:checked + .shell .theme-offer-day {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

@media (prefers-color-scheme: dark) {
  .theme-offer-night {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .theme-offer-day {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .theme-switch:checked + .shell .theme-offer-day {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .theme-switch:checked + .shell .theme-offer-night {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
}

@media (prefers-color-scheme: light) {
  body:has(#theme:checked) {
    --desk: #1a1411;
    --paper: #2b221c;
    --paper-2: #342922;
    --ink: #f7efe6;
    --muted: #e4d2c4;
    --rose: #f0b0a4;
    --rose-deep: #f0b0a4;
    --line: rgba(247, 239, 230, 0.18);
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    --glow: #3a2a24;
    --focus: #f0b0a4;
    --petal: #f0b7c2;
    --paw-bg: #f0c4b6;
    --paw-ink: 0.86;
    --art-paper: #fff6ec;
    color-scheme: dark;
  }

  body:has(#theme:checked) .shiso-frame {
    padding: 0.85rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }
}

@media (prefers-color-scheme: dark) {
  body:has(#theme:checked) {
    --desk: #f6d9c4;
    --paper: #fff4e8;
    --paper-2: #fffaf3;
    --ink: #2a211c;
    --muted: #4e3d36;
    --rose: #9d342c;
    --rose-deep: #8a2f2c;
    --rose-fill: #b44438;
    --cream: #fff8f2;
    --butter: #f8d7a2;
    --line: rgba(42, 33, 28, 0.16);
    --shadow: 0 14px 30px rgba(90, 48, 28, 0.08);
    --glow: #f8d7b8;
    --focus: #8a2f2c;
    --petal: #e7a3b0;
    --paw-bg: #8f4e3c;
    --paw-ink: 0.74;
    --art-paper: #fff;
    color-scheme: light;
  }

  body:has(#theme:checked) .shiso-frame {
    padding: 0.45rem;
    box-shadow: none;
  }
}
