:root {
  --ink: #171310;
  --paper: #f7eddb;
  --warm: #e8cf9d;
  --line: rgba(23, 19, 16, 0.2);
  --red: #a7332c;
  --green: #2f6859;
  --white: #fffaf0;
  --shadow: 0 24px 70px rgba(23, 19, 16, 0.2);
  --cell-w: 192px;
  --cell-h: 208px;
  --atlas-w: 1536px;
  --atlas-h: 1872px;
  --font-bubble: "Boogaloo", "Playpen Sans", ui-sans-serif, system-ui, sans-serif;
  --mirim-land-x: 72%;
  --mirim-land-bottom: clamp(104px, 13vh, 150px);
  color-scheme: light;
  font-family: "Playpen Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: #120f0d;
  color: var(--ink);
  font-optical-sizing: auto;
}

body,
button,
a {
  font: inherit;
}

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

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 16px;
  right: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 8px;
  background: rgba(18, 15, 13, 0.74);
  color: var(--white);
  backdrop-filter: blur(18px);
}

.brand-lockup img {
  display: block;
  width: 124px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  color: rgba(255, 250, 240, 0.82);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-trigger,
.visit-band a {
  min-height: 38px;
  border: 1px solid rgba(255, 250, 240, 0.26);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.nav-trigger {
  padding: 0 14px;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(232, 207, 157, 0.28), transparent 25%),
    #120f0d;
}

.dream-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(247, 237, 219, 0.12), rgba(247, 237, 219, 0) 24%, rgba(18, 15, 13, 0.24) 100%),
    url("../assets/generated/shirokuro-story-bg-landscape.png") center center / cover no-repeat;
  isolation: isolate;
}

.dream-stage::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 15, 13, 0.62), transparent 22%, transparent 78%, rgba(18, 15, 13, 0.64)),
    linear-gradient(180deg, rgba(18, 15, 13, 0.28), transparent 30%, rgba(18, 15, 13, 0.28));
  content: "";
  pointer-events: none;
}

.stage-glow {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: radial-gradient(circle at 54% 46%, rgba(255, 250, 240, 0.22), transparent 34%);
  pointer-events: none;
}

.actor {
  position: absolute;
  z-index: 7;
  display: grid;
  justify-items: center;
  gap: 8px;
  opacity: 0;
  transform: translate(-50%, 0);
  transition:
    opacity 380ms ease,
    transform 540ms ease;
}

.actor.is-visible {
  opacity: 1;
}

.actor.is-acting {
  transform: translate(-50%, -8px);
}

.sprite-frame,
.sprite {
  width: var(--cell-w);
  height: var(--cell-h);
}

.sprite-frame {
  transform-origin: 50% 100%;
}

.sprite {
  position: relative;
  overflow: hidden;
}

.sprite img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: var(--atlas-w);
  max-width: none;
  height: var(--atlas-h);
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
}

.actor-mirim {
  left: var(--mirim-land-x);
  bottom: var(--mirim-land-bottom);
}

.actor-mirim .sprite-frame {
  transform: scale(1.68);
}

.guide-bubble {
  position: absolute;
  z-index: 8;
  right: clamp(232px, 30vw, 430px);
  bottom: clamp(360px, 54vh, 460px);
  width: min(360px, calc(100vw - 44px));
  min-height: 112px;
  padding: 20px 24px 22px;
  border: 2px solid rgba(23, 19, 16, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 18px 44px rgba(23, 19, 16, 0.22);
  color: var(--green);
  transform: rotate(-1.5deg);
}

.guide-bubble::after {
  position: absolute;
  right: 26px;
  bottom: -17px;
  width: 28px;
  height: 28px;
  border-right: 2px solid rgba(23, 19, 16, 0.28);
  border-bottom: 2px solid rgba(23, 19, 16, 0.28);
  background: rgba(255, 250, 240, 0.92);
  content: "";
  transform: rotate(45deg);
}

.guide-bubble p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-bubble);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 400;
  line-height: 0.98;
}

.guide-bubble.is-changing {
  animation: bubble-pop 360ms ease;
}

.concept-band,
.mascot-strip,
.room-story,
.visit-band {
  position: relative;
  z-index: 3;
  background: var(--paper);
}

.concept-band {
  padding: clamp(56px, 8vw, 100px) clamp(18px, 5vw, 70px);
}

.concept-band > div:first-child {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(20px, 5vw, 68px);
  align-items: start;
  margin: 0 auto 34px;
  max-width: 1180px;
}

.section-label {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.concept-band h1,
.mascot-note h2,
.room-card h2,
.visit-band h2 {
  margin-bottom: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto;
  max-width: 1180px;
}

.feature-grid article {
  overflow: hidden;
  border: 1px solid rgba(23, 19, 16, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.68);
}

.feature-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-grid h2,
.feature-grid p {
  margin-right: 18px;
  margin-left: 18px;
}

.feature-grid h2 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1;
}

.feature-grid p,
.room-card p,
.visit-band p {
  color: #64594d;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.45;
}

.feature-grid p {
  margin-bottom: 18px;
}

.mascot-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.45fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(54px, 8vw, 92px) clamp(18px, 5vw, 70px);
  border-top: 1px solid rgba(23, 19, 16, 0.12);
  border-bottom: 1px solid rgba(23, 19, 16, 0.12);
  background:
    radial-gradient(circle at 82% 24%, rgba(167, 51, 44, 0.11), transparent 24%),
    #fff7e8;
}

.route-list {
  display: grid;
  gap: 10px;
}

.route-list a {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid rgba(23, 19, 16, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.8);
  font-size: 15px;
  font-weight: 800;
}

.route-list a::after {
  content: "->";
}

.room-story {
  min-height: 86vh;
  display: grid;
  align-items: end;
  padding: clamp(24px, 5vw, 64px);
  background:
    linear-gradient(180deg, rgba(18, 15, 13, 0.1), rgba(18, 15, 13, 0.54)),
    url("../assets/photos/dining-room.jpg") center / cover no-repeat;
}

.room-card {
  width: min(620px, 100%);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.visit-band {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 28px clamp(18px, 5vw, 70px);
}

.visit-band img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.visit-band h2 {
  font-size: clamp(28px, 5vw, 48px);
}

.visit-band p {
  margin-bottom: 0;
}

.visit-band a {
  display: inline-grid;
  align-items: center;
  padding: 0 16px;
  border-color: rgba(23, 19, 16, 0.2);
  background: #171310;
  color: var(--white);
}

@keyframes bubble-pop {
  0% {
    transform: rotate(-1.5deg) scale(1);
  }
  45% {
    transform: rotate(1deg) scale(1.035);
  }
  100% {
    transform: rotate(-1.5deg) scale(1);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 820px) {
  :root {
    --mirim-land-x: 70%;
    --mirim-land-bottom: clamp(84px, 10vh, 122px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .guide-bubble {
    right: 18px;
    bottom: 420px;
    width: min(300px, calc(100vw - 36px));
    min-height: 104px;
    padding: 18px 20px 20px;
  }

  .actor-mirim .sprite-frame {
    transform: scale(1.28);
  }

  .concept-band > div:first-child,
  .mascot-strip,
  .visit-band {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .visit-band {
    justify-items: start;
  }
}
