/* ============================================================
   UEDA RYU — Portfolio v3「陽だまりの回廊」/ Sunlit Corridor
   A small museum: a bright paper corridor whose light, ink and air
   change room by room. One live environment, driven by 3 CSS vars
   (--stage-bg / --stage-ink / --stage-accent) written by common.js.
   No frameworks, no templates. Vanilla only.
   ============================================================ */

[hidden] { display: none !important; }

:root {
  /* corridor base (the paper the museum is printed on — v2 heritage) */
  --kami: #FAF8F3;
  --sumi: #201C15;
  --kohaku: #B4781C;

  /* live environment — common.js writes these three each frame */
  --stage-bg: #FAF8F3;
  --stage-ink: #201C15;
  --stage-accent: #B4781C;

  /* everything else derives from the three above, so a room's whole
     mood follows from its data-stage declaration alone */
  --stage-ink-2: color-mix(in srgb, var(--stage-ink) 74%, transparent);
  --stage-ink-3: color-mix(in srgb, var(--stage-ink) 54%, transparent);
  --stage-line: color-mix(in srgb, var(--stage-ink) 13%, transparent);
  --stage-line-2: color-mix(in srgb, var(--stage-ink) 26%, transparent);
  --stage-panel: color-mix(in srgb, var(--stage-ink) 5%, transparent);
  --stage-accent-soft: color-mix(in srgb, var(--stage-accent) 13%, transparent);

  /* type */
  --serif: "Shippori Mincho B1", serif;
  --serif-old: "Zen Old Mincho", serif;
  --fraunces: "Fraunces", serif;
  --sans: "Zen Kaku Gothic New", sans-serif;
  --mono: "IBM Plex Mono", monospace;

  /* motion */
  --ease: cubic-bezier(.33, 1, .68, 1);
  --ease-big: cubic-bezier(.65, 0, .35, 1);

  /* rhythm */
  --wrap: min(92vw, 1280px);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  background: var(--stage-bg);
  color: var(--stage-ink-2);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--stage-accent); color: var(--stage-bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--stage-ink) 24%, transparent); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--stage-accent); }
::-webkit-scrollbar-track { background: transparent; }

.mono { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.sp-only { display: none; }
.nowrap { white-space: nowrap; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--stage-accent);
  outline-offset: 3px;
}

.room__wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
  position: relative;
}

/* rooms fill the viewport; the 40vh threshold band lives in this padding */
.room, .statement, .services, .process, .about, .contact {
  position: relative;
  padding-block: clamp(96px, 15vh, 190px);
}
.room {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- opening: light sweep on load ---------- */
.opening {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: linear-gradient(180deg, #FCFAF5, #F1EBDF);
}
.opening::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .7) 48%, transparent 100%);
  transform: translateY(-115%);
}
html.opened .opening {
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility 0s .9s;
}
html.opened .opening::after { animation: opening-sweep 1s var(--ease-big) forwards; }
@keyframes opening-sweep { to { transform: translateY(115%); } }

.js .hero__inner { opacity: 0; transform: translateY(18px); }
html.opened .hero__inner {
  opacity: 1;
  transform: none;
  transition: opacity 1s ease .35s, transform 1s var(--ease) .35s;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--stage-bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--stage-line);
}
.nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
  height: 64px;
  display: flex;
  align-items: center;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  color: var(--stage-ink);
}
/* Ink-brush weeping-sakura mark — alpha mask filled with the current stage ink,
   so it repaints itself for every room (white brushwork in the dark rooms). */
.nav__mark {
  width: 34px;
  height: 34px;
  display: block;
  margin-right: 12px;
  background-color: var(--stage-ink);
  -webkit-mask: url("images/brand-mark.png") center / contain no-repeat;
  mask: url("images/brand-mark.png") center / contain no-repeat;
}
/* Nameplate: engraved-serif museum signage, not techy mono */
.nav__wordmark {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .22em;
  transform: translateY(1px);
}
.nav__cta {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--stage-accent);
  border: 1px solid var(--stage-accent);
  border-radius: 2px;
  padding: 8px 20px;
  /* opaque-ish fill so hero decorations behind never reduce legibility */
  background: color-mix(in srgb, var(--stage-bg) 88%, transparent);
  transition: background-color .3s ease, color .3s ease;
}
.nav__cta:hover { background: var(--stage-accent); color: var(--stage-bg); }

/* ---------- 順路レール (PC) ---------- */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 66px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}
.rail__line {
  position: absolute;
  left: 24px;
  top: 16vh;
  bottom: 16vh;
  width: 1px;
  background: var(--stage-line-2);
  transform: scaleY(0);
  transform-origin: top;
}
html.opened .rail__line { transform: scaleY(1); transition: transform 1.1s var(--ease) .45s; }
.rail__stop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-left: 20px;
  pointer-events: auto;
}
.rail__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--stage-line-2);
  background: var(--stage-bg);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.rail__num {
  font-size: 8.5px;
  letter-spacing: .1em;
  color: var(--stage-ink-3);
  transition: color .3s ease;
}
.rail__name {
  position: absolute;
  left: 42px;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: none;
  color: var(--stage-ink);
  background: color-mix(in srgb, var(--stage-bg) 88%, transparent);
  border: 1px solid var(--stage-line);
  border-radius: 2px;
  padding: 4px 11px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.rail__stop:hover .rail__name,
.rail__stop:focus-visible .rail__name { opacity: 1; transform: none; }
.rail__stop:hover .rail__dot { transform: scale(1.25); border-color: var(--stage-accent); }
.rail__stop.is-active .rail__dot {
  background: var(--stage-accent);
  border-color: var(--stage-accent);
  box-shadow: 0 0 0 4px var(--stage-accent-soft);
}
.rail__stop.is-active .rail__num { color: var(--stage-accent); }

/* ---------- 順路バー (mobile) ---------- */
.railbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 101;
  background: var(--stage-line);
  display: none;
}
.railbar__fill { display: block; height: 100%; width: 0; background: var(--stage-accent); }
.railchip {
  position: fixed;
  top: 74px; left: 14px;
  z-index: 96;
  display: none;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: none;
  color: var(--stage-ink-2);
  background: color-mix(in srgb, var(--stage-bg) 84%, transparent);
  border: 1px solid var(--stage-line);
  border-radius: 2px;
  padding: 5px 11px;
  backdrop-filter: blur(6px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  padding: 14px 36px;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn svg { transition: transform .3s ease; }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { border: 1px solid var(--stage-accent); color: var(--stage-accent); }
.btn--primary:hover { background: var(--stage-accent); color: var(--stage-bg); }
.btn--ghost { color: var(--stage-ink-2); border: 1px solid var(--stage-line-2); }
.btn--ghost:hover { color: var(--stage-ink); border-color: var(--stage-accent); }
.btn--large { padding: 18px 48px; font-size: 15px; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  color: var(--stage-accent);
  font-weight: 500;
  border-bottom: 1px solid var(--stage-accent-soft);
  padding-bottom: 2px;
  transition: border-color .3s ease;
}
.arrow-link svg { transition: transform .3s ease; }
.arrow-link:hover { border-color: var(--stage-accent); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- shared section head ---------- */
.section-head { margin-bottom: clamp(44px, 6vw, 72px); }
.section-label { font-size: 12px; color: var(--stage-accent); margin-bottom: 14px; }
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.5;
  color: var(--stage-ink);
}

/* ---------- hero (00) ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 0;
  position: relative;
  overflow: hidden;
}
.hero__inner { width: 100%; position: relative; z-index: 1; }

/* Ink-wash weeping sakura — same mask technique as the nav mark, so the
   brushwork is painted in the current stage ink. Fades in after the opening. */
.hero__shidare {
  position: absolute;
  top: 6vh;
  right: -4vw;
  width: min(46vw, 720px);
  aspect-ratio: 1;
  background-color: color-mix(in oklab, var(--stage-ink), transparent 12%);
  -webkit-mask: url("images/hero-shidare.webp") center / contain no-repeat;
  mask: url("images/hero-shidare.webp") center / contain no-repeat;
  opacity: 0;
  animation: shidare-in 1.8s cubic-bezier(.33,1,.68,1) 1s forwards;
  pointer-events: none;
}
@keyframes shidare-in { to { opacity: .9; } }

/* Three ink petals drifting down from the branch — the only motion in the hero */
.hero__petals i {
  position: absolute;
  top: -28px;
  width: 13px;
  height: 9px;
  background: color-mix(in oklab, var(--stage-ink), transparent 52%);
  border-radius: 80% 20% 70% 30% / 60% 40% 70% 40%;
  animation: petal-fall var(--pd, 24s) linear var(--pdl, 0s) infinite;
  pointer-events: none;
}
.hero__petals i:nth-child(1) { left: 64%; --pd: 26s; --pdl: 3s; }
.hero__petals i:nth-child(2) { left: 76%; --pd: 21s; --pdl: 11s; transform: scale(.85); }
.hero__petals i:nth-child(3) { left: 88%; --pd: 31s; --pdl: 18s; transform: scale(1.15); }
@keyframes petal-fall {
  0%   { transform: translate3d(0, -4vh, 0) rotate(0deg); opacity: 0; }
  5%   { opacity: 1; }
  100% { transform: translate3d(-16vw, 108vh, 0) rotate(300deg); opacity: 1; }
}

@media (max-width: 880px) {
  /* Push the crown mostly off-canvas so it never fights the header CTA */
  .hero__shidare { width: 92vw; top: -2vh; right: -30vw; opacity: 0; animation-name: shidare-in-sp; }
  @keyframes shidare-in-sp { to { opacity: .68; } }
}
@media (prefers-reduced-motion: reduce) {
  .hero__shidare { animation: none; opacity: .9; }
  .hero__petals { display: none; }
}
.hero__label { font-size: 12px; color: var(--stage-accent); margin-bottom: 28px; }
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.32;
  color: var(--stage-ink);
  margin-bottom: 28px;
}
.hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 2.1;
  margin-bottom: 44px;
  max-width: 640px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: 68px;
  font-size: 10px;
  color: var(--stage-ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--stage-accent), transparent);
  animation: scroll-pulse 2.4s ease infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- statement ---------- */
.statement__text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  line-height: 2.05;
  max-width: 900px;
  color: var(--stage-ink);
}
.statement__text .char {
  color: color-mix(in srgb, var(--stage-ink) 26%, transparent);
  transition: color .12s linear;
  will-change: color;
}
.statement__text .char.is-lit { color: var(--stage-ink); }

/* ---------- room shared parts ---------- */
.room__plate {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--stage-accent);
  border: 1px solid var(--stage-line-2);
  padding: 8px 16px;
  border-radius: 2px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.room__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 1.42;
  color: var(--stage-ink);
}

.caption-plate {
  background: var(--stage-panel);
  border: 1px solid var(--stage-line);
  border-radius: 4px;
  padding: clamp(20px, 2.4vw, 30px);
  max-width: 460px;
}
.cp__badge {
  display: inline-block;
  font-size: 11px;
  color: var(--stage-accent);
  background: var(--stage-accent-soft);
  padding: 5px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}
.cp__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.12rem, 1.7vw, 1.42rem);
  line-height: 1.6;
  color: var(--stage-ink);
  margin-bottom: 14px;
}
.cp__desc { font-size: 14px; line-height: 2; color: var(--stage-ink-2); margin-bottom: 18px; }
.cp__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cp__tags li {
  font-size: 10.5px;
  color: var(--stage-accent);
  border: 1px solid var(--stage-line-2);
  padding: 4px 10px;
  border-radius: 2px;
}
.cp__visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--stage-accent);
  border-bottom: 1px solid var(--stage-accent-soft);
  padding-bottom: 3px;
  transition: border-color .3s ease, gap .3s ease;
}
.cp__visit:hover { border-color: var(--stage-accent); gap: 12px; }

/* browser-window frame for screenshots */
.frame {
  display: block;
  border: 1px solid var(--stage-line-2);
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  background: var(--stage-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}
.frame__bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--stage-line);
}
.frame__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--stage-line-2); }
.frame__shot { display: block; overflow: hidden; aspect-ratio: 1440 / 900; }
.frame__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
a.frame:hover .frame__shot img,
.collect__frame:hover .frame__shot img { transform: scale(1.03); }

/* ---------- 01 燈 ---------- */
.tomoshibi__body {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.tomoshibi__lead {
  display: flex;
  gap: clamp(22px, 3vw, 42px);
  align-items: flex-start;
}
.room__title--vertical {
  writing-mode: vertical-rl;
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  letter-spacing: .24em;
  line-height: 1.12;
  flex: 0 0 auto;
  transition: letter-spacing 1.4s var(--ease) .2s;
}
.room--tomoshibi [data-room-in].is-in .room__title--vertical { letter-spacing: .1em; }
.tomoshibi__shot { position: relative; }
.tomoshibi__glow {
  position: absolute;
  inset: -14% -10%;
  z-index: 0;
  background: radial-gradient(circle at 58% 46%, color-mix(in srgb, var(--stage-accent) 55%, transparent), transparent 62%);
  filter: blur(34px);
}
.tomoshibi__shot .frame { position: relative; z-index: 1; }

/* ---------- 02 うつろい ---------- */
.room--utsuroi {
  height: 220svh;
  min-height: 220svh;
  padding-block: 0;
  display: block;
}
.utsuroi__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
}
.utsuroi__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  grid-template-areas:
    "plate plate"
    "title title"
    "shot  cap";
  column-gap: clamp(32px, 5vw, 64px);
  row-gap: clamp(20px, 3vw, 36px);
  align-items: center;
}
.utsuroi__wrap .room__plate { grid-area: plate; }
.room__title--utsuroi {
  grid-area: title;
  font-family: var(--serif-old);
  font-weight: 700;
}
.utsuroi__frame { grid-area: shot; }
.utsuroi__wrap .caption-plate { grid-area: cap; }
.room--utsuroi .cp__name { font-family: var(--serif-old); }

/* ---------- 03 墨流 ---------- */
.room--sumi { overflow: hidden; }
.sumi__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.sumi__wrap {
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  grid-template-areas:
    "plate ."
    "title shot"
    "cap   shot";
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: clamp(20px, 3vw, 32px);
  align-items: end;
}
.sumi__wrap .room__plate { grid-area: plate; }
.sumi__wrap .room__title {
  grid-area: title;
  align-self: end;
  text-shadow: 0 2px 24px var(--stage-bg), 0 0 8px var(--stage-bg);
}
.sumi__wrap .caption-plate {
  grid-area: cap;
  background: color-mix(in srgb, var(--stage-bg) 84%, transparent);
  backdrop-filter: blur(3px);
}
.sumi__shot { grid-area: shot; justify-self: end; align-self: end; max-width: 380px; width: 100%; }

/* ---------- 04 カルテア ---------- */
.kartea__body {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.55fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-block: clamp(30px, 4vw, 52px);
}
.kartea__features { display: flex; flex-direction: column; }
.kartea__features li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-block: 15px;
  border-top: 1px solid var(--stage-line);
  font-size: 15px;
  color: var(--stage-ink);
}
.kartea__features li:last-child { border-bottom: 1px solid var(--stage-line); }
.kartea__features .mono { font-size: 11px; color: var(--stage-accent); }
.frame--screen { position: relative; box-shadow: 0 28px 72px color-mix(in srgb, var(--stage-accent) 26%, transparent); }
.frame--screen .frame__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(122deg, color-mix(in srgb, var(--stage-accent) 12%, transparent), transparent 42%);
  pointer-events: none;
}
.room--kartea .cp__name { font-family: var(--sans); font-weight: 700; }
.room--kartea .room__title { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; }
.room--kartea .caption-plate { max-width: none; }

/* ---------- 05 窓口 LINE ---------- */
.line__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.room--line .room__title { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; margin-bottom: 20px; }
.line__desc { font-size: 15px; line-height: 2.05; margin-bottom: 28px; max-width: 560px; color: var(--stage-ink-2); }
.line__facts { display: grid; gap: 12px; max-width: 560px; }
.line__facts li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 13.5px;
  color: var(--stage-ink-2);
  border-top: 1px solid var(--stage-line);
  padding-top: 12px;
}
.line__facts .mono { font-size: 10.5px; color: var(--stage-accent); min-width: 52px; }
.line__demo { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* the phone keeps a literal dark UI: on the paper page it reads as a
   real device, not a themed element. Colors here are intentional, not vars. */
.phone {
  width: 306px;
  max-width: 100%;
  background: #04060a;
  border: 1px solid #232b3a;
  border-radius: 34px;
  padding: 9px;
  box-shadow: 0 26px 60px rgba(20, 24, 16, .22);
}
.phone__screen {
  display: flex;
  flex-direction: column;
  height: 464px;
  background: #0d1016;
  border-radius: 26px;
  overflow: hidden;
}
.line-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #11151d;
  border-bottom: 1px solid #1c2330;
  color: rgba(233, 237, 244, .55);
}
.line-head__name { font-size: 13.5px; font-weight: 700; color: #E9EDF4; }
.line-head__badge {
  margin-left: auto;
  font-size: 8.5px;
  letter-spacing: .12em;
  color: #E8A33D;
  background: rgba(232, 163, 61, .12);
  border-radius: 2px;
  padding: 3px 7px;
}
.line-chat {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.line-chat::-webkit-scrollbar { width: 4px; }
.line-chat::-webkit-scrollbar-thumb { background: #232b3a; border-radius: 4px; }
.line-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; }
.line-msg--bot { align-self: flex-start; }
.line-msg--user { align-self: flex-end; flex-direction: row; justify-content: flex-end; }
.line-msg__bubble { font-size: 12.5px; line-height: 1.6; padding: 9px 12px; border-radius: 4px 14px 14px 14px; }
.line-msg--bot .line-msg__bubble { background: #252b37; color: rgba(233, 237, 244, .92); }
.line-msg--user .line-msg__bubble { background: #06c755; color: #04130a; border-radius: 14px 4px 14px 14px; font-weight: 500; }
.line-msg__meta { font-size: 8.5px; line-height: 1.3; color: rgba(233, 237, 244, .35); font-family: var(--mono); white-space: nowrap; text-align: right; }
.line-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.line-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(233, 237, 244, .5); animation: line-blink 1.2s infinite ease-in-out; }
.line-typing i:nth-child(2) { animation-delay: .18s; }
.line-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes line-blink {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}
.line-quick { display: flex; gap: 6px; padding: 0 12px 10px; flex-wrap: wrap; }
.line-quick[hidden] { display: none; }
.line-quick button {
  font-size: 11px;
  color: #06c755;
  background: none;
  border: 1px solid rgba(6, 199, 85, .55);
  border-radius: 14px;
  padding: 5px 12px;
  transition: background-color .2s ease;
}
.line-quick button:hover { background: rgba(6, 199, 85, .12); }
.line-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #1c2330;
  background: #11151d;
}
.line-menu button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 4px;
  background: none;
  border: 0;
  border-right: 1px solid #1c2330;
  border-bottom: 1px solid #1c2330;
  color: rgba(233, 237, 244, .65);
  font-size: 10.5px;
  transition: background-color .2s ease, color .2s ease;
}
.line-menu button:nth-child(3n) { border-right: 0; }
.line-menu button:nth-child(n+4) { border-bottom: 0; }
.line-menu button svg { color: #E8A33D; }
.line-menu button:hover { background: rgba(232, 163, 61, .08); color: #E9EDF4; }
.line__demo-note { font-size: 11px; color: var(--stage-ink-3); text-align: center; }
.line-reset {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--stage-ink-3);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--stage-line-2);
  padding: 0 0 1px;
  margin-left: 6px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.line-reset:hover { color: var(--stage-accent); border-color: var(--stage-accent); }

/* ---------- 06 収蔵庫 ---------- */
.vault__lead { margin-bottom: clamp(40px, 5vw, 64px); max-width: 22em; }
.vault__case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  background: var(--stage-panel);
  border: 1px solid var(--stage-line);
  border-radius: 6px;
  padding: clamp(28px, 4vw, 52px);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.vault__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.6;
  color: var(--stage-ink);
  margin: 18px 0;
}
.vault__desc { margin-bottom: 16px; }
.vault__note { font-size: 13px; color: var(--stage-ink-3); margin-bottom: 26px; }
.vault__facts { display: grid; gap: 12px; }
.vault__facts li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 13.5px;
  color: var(--stage-ink-2);
  border-top: 1px solid var(--stage-line);
  padding-top: 12px;
}
.vault__facts .mono { font-size: 10.5px; color: var(--stage-accent); min-width: 52px; }

/* architecture stack diagram */
.stack { display: flex; flex-direction: column; }
.stack__node {
  background: color-mix(in srgb, var(--stage-bg) 70%, transparent);
  border: 1px solid var(--stage-line-2);
  border-radius: 3px;
  padding: 14px 18px;
  text-align: center;
}
.stack__node--accent { border-color: color-mix(in srgb, var(--stage-accent) 45%, transparent); }
.stack__name { display: block; font-size: 14.5px; font-weight: 500; color: var(--stage-ink); line-height: 1.5; }
.stack__sub {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--stage-ink-2);
  margin-top: 4px;
  word-break: keep-all;
}
.stack__link {
  width: 1px;
  height: 26px;
  margin-inline: auto;
  background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--stage-accent) 60%, transparent) 0 4px, transparent 4px 10px);
  animation: stack-flow 1.2s linear infinite;
}
@keyframes stack-flow { to { background-position: 0 10px; } }
.stack__branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stack__node--small { padding: 12px 10px; }
.stack__node--small .stack__name { font-size: 13px; }
.stack__node--small .stack__sub { font-size: 10.5px; }

.vault__cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 48px); }
.collect__frame { display: block; }
.collect__meta { padding-top: 22px; }
.collect__title { font-size: 17px; font-weight: 700; color: var(--stage-ink); line-height: 1.6; margin: 10px 0; }
.collect__desc { font-size: 14px; margin-bottom: 14px; }

/* ---------- 工房案内 / services ---------- */
.services__list { border-top: 1px solid var(--stage-line); }
.service {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--stage-line);
}
.service__no { font-size: 13px; color: var(--stage-accent); padding-top: 8px; }
.service__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  color: var(--stage-ink);
  margin-bottom: 14px;
  transition: color .3s ease;
}
@media (hover: hover) { .service:hover .service__title { color: var(--stage-accent); } }
.service__desc { max-width: 720px; margin-bottom: 12px; }
.service__eg { font-size: 13px; color: var(--stage-ink-3); }

/* ---------- 順路のご案内 / process ---------- */
.process__steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.step { position: relative; padding-top: 24px; }
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: -24px;
  height: 1px;
  background: var(--stage-line);
}
.step:last-child::before { right: 0; }
.step::after {
  content: "";
  position: absolute;
  top: -3px; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--stage-accent);
}
.step__no { font-size: 11px; color: var(--stage-accent); display: block; margin-bottom: 10px; }
.step__title { font-size: 16px; font-weight: 700; color: var(--stage-ink); margin-bottom: 8px; }
.step__desc { font-size: 12.5px; line-height: 1.9; color: var(--stage-ink-3); }
.corridor__cta { margin-top: clamp(40px, 5vw, 56px); text-align: center; font-size: 15px; }

/* ---------- 作者 / about ---------- */
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.about__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  color: var(--stage-ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 24px;
}
.about__name-en { font-size: 12px; color: var(--stage-ink-3); }
.about__bio { margin-bottom: 28px; }
.about__strengths { display: grid; }
.strength { padding-block: 28px; border-top: 1px solid var(--stage-line); }
.strength__title { font-size: 16px; font-weight: 700; color: var(--stage-ink); margin-bottom: 10px; padding-left: 18px; position: relative; }
.strength__title::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--stage-accent);
}
.strength__desc { font-size: 14px; }
.about__tech {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--stage-line);
  font-size: 10.5px;
  line-height: 2.2;
  color: var(--stage-ink-3);
}

/* ---------- 受付 / contact ---------- */
.contact { text-align: center; overflow: hidden; }
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(720px 420px at 50% 100%, var(--stage-accent-soft), transparent 65%);
  pointer-events: none;
}
.contact__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.5;
  color: var(--stage-ink);
  margin: 14px 0 24px;
}
.contact__lead { margin-bottom: 40px; max-width: 720px; }
.contact__form {
  width: min(640px, 100%);
  margin-inline: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--stage-ink-3); }
.form__req { color: var(--stage-accent); margin-left: 4px; }
.form__input {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--stage-ink);
  background: color-mix(in srgb, var(--stage-ink) 4%, transparent);
  border: 1px solid var(--stage-line-2);
  border-radius: 2px;
  padding: 13px 16px;
  width: 100%;
  transition: border-color .3s ease, background .3s ease;
}
.form__input::placeholder { color: var(--stage-ink-3); }
.form__input:focus { outline: none; border-color: var(--stage-accent); background: color-mix(in srgb, var(--stage-bg) 60%, transparent); }
.form__textarea { resize: vertical; min-height: 150px; }
.form__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form__status { font-size: 13.5px; color: #B8542E; min-height: 1em; margin: 0; }
.form__status:empty { display: none; }
.form__submit { align-self: center; }
.form__submit[disabled] { opacity: .55; pointer-events: none; }
.contact__done {
  width: min(640px, 100%);
  margin-inline: auto;
  border: 1px solid color-mix(in srgb, var(--stage-accent) 35%, transparent);
  border-radius: 2px;
  background: var(--stage-accent-soft);
  padding: 36px 28px;
}
.contact__done-title { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--stage-ink); margin-bottom: 10px; }
.contact__done-desc { font-size: 14px; color: var(--stage-ink-2); }
.contact__mail-row { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.contact__mail-note { font-size: 12.5px; color: var(--stage-ink-3); }
.contact__mail { font-size: 12px; color: var(--stage-ink-2); text-transform: none; }
.contact__copy {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--stage-ink-3);
  background: none;
  border: 1px solid var(--stage-line-2);
  border-radius: 2px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}
.contact__copy:hover, .contact__copy.is-copied { color: var(--stage-accent); border-color: var(--stage-accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--stage-line); padding-block: 28px; }
.footer__inner { display: flex; align-items: center; gap: 24px; font-size: 10.5px; color: var(--stage-ink-3); }
.footer__note { margin-right: auto; }
.footer__top { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--stage-ink-3); transition: color .3s ease; }
.footer__top:hover { color: var(--stage-accent); }

/* ---------- reveal ---------- */
.js [data-fade-in], .js [data-room-in] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js [data-fade-in].is-in, .js [data-room-in].is-in { opacity: 1; transform: none; }
.js .room--tomoshibi [data-room-in] { transition-duration: 1.2s; }
.js .room--kartea [data-room-in] { transition-duration: .35s; transform: translateY(14px); }
.js .room--kartea [data-room-in].is-in { transform: none; }

/* ============================================================
   Responsive — corridor collapses to a vertical scroll of rooms
   ============================================================ */
@media (max-width: 880px) {
  .rail { display: none; }
  .railbar, .railchip { display: block; }

  .sp-only { display: inline; }
  .hero__scroll { display: none; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .tomoshibi__body { grid-template-columns: 1fr; gap: 36px; }
  .tomoshibi__lead { gap: 24px; }
  .room__title--vertical { font-size: clamp(2.2rem, 12vw, 3rem); }

  .room--utsuroi { height: auto; min-height: auto; padding-block: clamp(96px, 15vh, 190px); }
  .utsuroi__sticky { position: static; height: auto; display: block; }
  .utsuroi__wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "plate" "title" "shot" "cap";
    row-gap: 28px;
  }
  .utsuroi__wrap .caption-plate { max-width: none; }

  .sumi__wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "plate" "title" "cap" "shot";
    align-items: start;
  }
  .sumi__shot { justify-self: stretch; max-width: 100%; }

  .kartea__body { grid-template-columns: 1fr; gap: 28px; }
  .room--kartea .caption-plate { max-width: none; }

  .line__body { grid-template-columns: 1fr; gap: 40px; }
  .line__demo { order: -1; }

  .vault__case { grid-template-columns: 1fr; gap: 32px; }
  .vault__cards { grid-template-columns: 1fr; }

  .service { grid-template-columns: 1fr; gap: 8px; }
  .service__no { padding-top: 0; }

  .process__steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 20px 0 20px 28px; }
  .step::before { top: 0; bottom: 0; left: 3px; right: auto; width: 1px; height: auto; }
  .step:last-child::before { bottom: auto; height: 40px; }
  .step::after { top: 26px; left: 0; }
  .step__desc br { display: none; }

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

  .form__row { grid-template-columns: 1fr; }
  .form__submit { align-self: stretch; justify-content: center; }
  .contact__mail-row { flex-wrap: wrap; justify-content: center; }
  .contact__mail-note { width: 100%; }

  .footer__inner { flex-wrap: wrap; row-gap: 6px; justify-content: space-between; }
  .footer__note { width: 100%; order: 3; margin-right: 0; }
}

@media (max-width: 520px) {
  .room__title { font-size: clamp(1.8rem, 8.5vw, 2.6rem); }
  .hero__title { font-size: clamp(2.2rem, 11vw, 3.2rem); }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js [data-fade-in], .js [data-room-in], .js .hero__inner { opacity: 1; transform: none; }
  .statement__text .char { color: var(--stage-ink); }
  .room__title--vertical { letter-spacing: .1em; }
  .rail__line { transform: scaleY(1); }
  .opening { display: none; }
}
