:root {
  color-scheme: dark;
  --studio-black: #10110f;
  --studio-panel: #191a18;
  --studio-line: rgba(255,255,255,.16);
  --studio-muted: #a8aaa5;
  --ink: #0a0b0a;
  --paper: #eae5dc;
  --paper-light: #f0ece5;
  --steel: #858685;
  --cobalt: #003eaa;
  --display: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  --reading: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
  --rail: clamp(64px,6.25vw,90px);
}

* { box-sizing: border-box; }
html { background: var(--studio-black); scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--studio-black); color: #fff; font-family: var(--reading); }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  background: #fff;
  color: #111;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid #8bc4ff; outline-offset: 4px; }

/* The restrained Control Room remains visually separate from the page. */
.studio-bar {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto 0;
  min-height: 58px;
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  background: rgba(12,13,11,.96);
  border-bottom: 1px solid var(--studio-line);
  backdrop-filter: blur(12px);
}
.studio-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.studio-brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.54);
  font-size: 11px;
  letter-spacing: .08em;
}
.studio-brand strong, .studio-brand small { display: block; }
.studio-brand strong { font-size: 11px; letter-spacing: .14em; }
.studio-brand small { margin-top: 3px; color: var(--studio-muted); font-size: 10px; }
.mode-switch { display: flex; padding: 3px; border: 1px solid var(--studio-line); }
.mode-switch__button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--studio-muted);
  cursor: pointer;
}
.mode-switch__button.is-active { background: #f0eee9; color: #111; }
.studio-reset {
  justify-self: end;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.52);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.studio-panel {
  position: fixed;
  z-index: 90;
  top: 58px;
  bottom: 0;
  left: 0;
  width: 312px;
  padding: 24px 18px 54px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--studio-panel);
  border-right: 1px solid var(--studio-line);
}
.studio-panel__intro { padding: 0 4px 24px; border-bottom: 1px solid var(--studio-line); }
.studio-label { margin: 0 0 10px; color: #8fb4e9; font-size: 10px; letter-spacing: .2em; }
.studio-panel__intro h1 { margin: 0; font: 500 25px/1.3 var(--display); }
.studio-panel__intro > p:last-child { margin: 13px 0 0; color: var(--studio-muted); font-size: 12px; line-height: 1.8; }
.studio-block { padding: 24px 4px; border-bottom: 1px solid var(--studio-line); }
.studio-block__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.studio-block__heading h2 { margin: 0; font-size: 13px; font-weight: 600; }
.studio-block__heading span { color: var(--studio-muted); font-size: 10px; }
.scene-list { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.scene-item { display: grid; grid-template-columns: minmax(0,1fr) auto; border: 1px solid transparent; background: #222320; }
.scene-item.is-selected { border-color: #8fb4e9; }
.scene-item__select {
  min-height: 50px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.scene-item__select > span:first-child { color: #8c8f88; font-size: 10px; }
.scene-item__select strong, .scene-item__select small { display: block; }
.scene-item__select strong { font-size: 12px; font-weight: 500; }
.scene-item__select small { margin-top: 3px; color: var(--studio-muted); font-size: 9px; }
.scene-item__toggle {
  width: 42px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.08);
  background: transparent;
  color: #d9dad7;
  cursor: pointer;
}
.scene-item__toggle[aria-pressed="false"] { color: #777a73; }
.scene-item__toggle:disabled { opacity: .25; cursor: default; }
.inspector-empty, .studio-note p { margin: 0; color: var(--studio-muted); font-size: 11px; line-height: 1.8; }
.field-list { display: grid; gap: 15px; }
.field-list label { display: grid; gap: 7px; }
.field-list label > span { color: #c8c9c6; font-size: 11px; }
.field-list input, .field-list textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0;
  background: #0f100e;
  color: #fff;
}
.field-list input { min-height: 44px; padding: 10px 11px; }
.field-list textarea { min-height: 84px; padding: 10px 11px; resize: vertical; line-height: 1.7; }
.field-note { margin: 9px 0 0; color: #8c8f88; font-size: 10px; line-height: 1.7; }
.studio-note a { display: inline-block; margin-top: 14px; color: #bcd4f4; font-size: 11px; }

.studio-preview { min-height: 100vh; padding: 86px 28px 56px 340px; background: #121310; transition: padding .3s var(--ease); }
.preview-meta {
  max-width: 1080px;
  margin: 0 auto 10px;
  display: flex;
  justify-content: space-between;
  color: #777a74;
  font-size: 9px;
  letter-spacing: .12em;
}
body[data-studio-mode="preview"] .studio-panel { display: none; }
body[data-studio-mode="preview"] .studio-preview { padding: 58px 0 0; }
body[data-studio-mode="preview"] .preview-meta { display: none; }
body[data-studio-mode="preview"] .product-page { max-width: none; box-shadow: none; }
body[data-presentation="page"] .studio-bar,
body[data-presentation="page"] .studio-panel,
body[data-presentation="page"] .preview-meta { display: none; }
body[data-presentation="page"] .studio-preview { padding: 0; }
body[data-presentation="page"] .product-page { max-width: none; box-shadow: none; }
body[data-presentation="page"] .product-page__progress { top: 0; }

/* Front Stage */
.product-page {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  overflow: clip;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
  line-break: strict;
  word-break: normal;
}
.product-page__progress { position: fixed; z-index: 80; top: 58px; left: 0; right: 0; height: 2px; pointer-events: none; }
.product-page__progress span { display: block; width: 100%; height: 100%; background: var(--cobalt); transform: scaleX(0); transform-origin: left; }
.product-scenes { position: relative; }
.product-scene { position: relative; width: 100%; display: grid; grid-template-columns: var(--rail) minmax(0,1fr); overflow: hidden; }
.scene-marker {
  position: relative;
  z-index: 6;
  min-width: 0;
  border-right: 1px solid rgba(255,255,255,.24);
  color: rgba(255,255,255,.68);
  font: 400 clamp(20px,2.05vw,30px)/1 var(--display);
  letter-spacing: .04em;
}
.scene-marker span { position: absolute; top: clamp(22px,3.5vw,50px); left: 50%; transform: translateX(-50%); }
.scene-marker i { position: absolute; top: clamp(62px,7vw,104px); left: 24%; right: 24%; height: 1px; background: currentColor; }
.scene-marker b { position: absolute; top: clamp(82px,9.3vw,138px); left: 50%; width: 1px; height: clamp(22px,3vw,44px); background: rgba(255,255,255,.35); }
.paper-stage { background: var(--paper); color: #141411; }

.atlas-crop { position: relative; overflow: hidden; background: #151513; }
.atlas-crop > picture { display: contents; }
.atlas-crop img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
}
.atlas-crop.is-image-failed::after {
  content: attr(aria-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  background: #2c2d29;
  color: #efede7;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}
.atlas-crop.is-image-failed img { display: none; }
.material-mobile-grid.is-image-failed::after {
  content: "黒、金属、ガラス、紙、陶器の質感を三段に編集した架空の商品撮影";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #d0cbc2;
  color: #242521;
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}
.material-mobile-grid.is-image-failed img { display: none; }

/* 01 — precision arrival */
.scene-hero { aspect-ratio: 864/418; min-height: 560px; background: #060706; }
.scene-hero__stage { position: relative; min-width: 0; isolation: isolate; overflow: hidden; }
.atlas-crop--hero { position: absolute; z-index: -2; inset: 0 0 0 39%; }
.atlas-crop--hero > img { width: 178.7%; left: -75%; }
.scene-hero__stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #070807 0%, rgba(7,8,7,.95) 25%, rgba(7,8,7,.28) 49%, transparent 72%);
  pointer-events: none;
}
.scene-hero__copy { position: absolute; z-index: 3; top: 22%; left: 8.3%; }
.scene-hero__copy h1 { margin: 0; font: 400 clamp(48px,5.2vw,78px)/1.45 var(--display); letter-spacing: .04em; }
.scene-hero__copy h1 span { display: block; }
.scene-hero__copy p { width: max-content; margin: clamp(42px,5vw,72px) 0 0; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.65); font: 400 clamp(18px,1.75vw,26px)/1.5 var(--display); letter-spacing: .14em; }

/* 02 — material study */
.scene-materials { aspect-ratio: 864/350; min-height: 460px; }
.scene-materials .scene-marker, .scene-scope .scene-marker { background: #090a09; }
.scene-materials__stage { position: relative; min-width: 0; padding: clamp(42px,5.2vw,78px) 3.9% clamp(30px,4vw,60px); }
.scene-materials__stage h2, .scene-scope__stage h2, .scene-delivery__stage h2 {
  position: relative;
  z-index: 3;
  margin: 0;
  font: 400 clamp(20px,2vw,30px)/1.5 var(--display);
  letter-spacing: .12em;
}
.scene-materials__stage h2::after { content: ""; display: block; width: 31%; height: 1px; margin-top: 18px; background: rgba(20,20,17,.62); }
.atlas-crop--materials { position: absolute; left: 3.9%; right: 3.7%; bottom: 8%; height: 58%; background: #d1ccc3; }
.atlas-crop--materials img { width: 115%; left: -7.4%; transform: translateY(-28.25%); }
.material-mobile-grid { display: none; }

/* 03 — macro proof */
.scene-macro { aspect-ratio: 864/252; min-height: 330px; background: #6e706f; }
.scene-macro .scene-marker { background: #090a09; }
.atlas-crop--macro { position: absolute; inset: 0 0 0 var(--rail); }
.atlas-crop--macro img { width: 106.9%; left: -6.9%; transform: translateY(-42.18%); }

/* 04 — utility ledger */
.scene-scope { aspect-ratio: 864/190; min-height: 290px; }
.scene-scope__stage { min-width: 0; padding: clamp(42px,4.5vw,66px) 3.8% 34px; display: grid; grid-template-columns: 17% minmax(0,1fr); align-items: stretch; }
.scene-scope__stage h2 { align-self: start; }
.scope-ledger { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-left: 1px solid rgba(20,20,17,.38); border-bottom: 1px solid rgba(20,20,17,.38); list-style: none; }
.scope-ledger li { min-width: 0; display: grid; place-items: center; border-right: 1px solid rgba(20,20,17,.38); border-top: 1px solid rgba(20,20,17,.38); }
.scope-ledger svg { width: min(58%,80px); fill: none; stroke: #595a58; stroke-width: 1; vector-effect: non-scaling-stroke; }
.scope-ledger span, .scope-ledger b { display: none; }

/* 05 — delivery contact sheet */
.scene-delivery { aspect-ratio: 864/365; min-height: 500px; background: #191b1a; }
.scene-delivery .scene-marker { background: #090a09; }
.scene-delivery__stage { position: relative; min-width: 0; padding: clamp(40px,4.5vw,66px) 2.4% 34px; background: linear-gradient(90deg,#1c1e1d,#171918); }
.scene-delivery__stage h2 { position: absolute; top: clamp(42px,5.2vw,78px); left: 3.8%; color: rgba(255,255,255,.76); }
.atlas-crop--delivery { position: absolute; top: 8%; right: 2%; bottom: 8%; left: 20.5%; border: 1px solid rgba(255,255,255,.22); }
.atlas-crop--delivery > img { width: 130%; left: -28.5%; transform: translateY(-66.7%); }
.delivery-dots { display: none; }

/* 06 — consultation close */
.scene-close { aspect-ratio: 864/246; min-height: 390px; background: #070807; }
.scene-close .scene-marker { background: #090a09; }
.scene-close__stage { min-width: 0; height: 100%; display: grid; grid-template-columns: minmax(0,1fr) 27%; }
.atlas-crop--close { min-width: 0; height: 100%; }
.atlas-crop--close > img { width: 137%; left: -8.6%; transform: translateY(-86.5%); }
.consultation-action {
  min-width: 0;
  padding: 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--cobalt);
  color: #fff;
  text-decoration: none;
}
.consultation-action span { font: 400 clamp(26px,2.8vw,42px)/1.5 var(--display); letter-spacing: .14em; }
.consultation-action i { width: 78%; margin-top: 30px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.65); font: normal 300 26px/1 var(--reading); text-align: right; }

.noscript-note { position: fixed; z-index: 20; left: 12px; bottom: 12px; margin: 0; padding: 10px 14px; background: #fff; color: #111; font-size: 11px; }

@media (max-width: 1120px) {
  .studio-panel { width: 286px; }
  .studio-preview { padding-left: 310px; padding-right: 18px; }
  .scene-hero { min-height: 500px; }
  .scene-materials { min-height: 410px; }
  .scene-delivery { min-height: 450px; }
  .atlas-crop--close > img { width: 200%; left: -12.5%; }
}

@media (max-width: 760px) {
  :root { --rail: 0px; }
  html { scroll-behavior: auto; }
  .studio-bar {
    position: sticky;
    grid-template-columns: minmax(0,1fr) auto;
    min-height: 60px;
    padding: 8px 10px;
  }
  .studio-brand strong { font-size: 9px; }
  .studio-brand small { font-size: 8px; }
  .studio-brand__mark { width: 32px; height: 32px; }
  .mode-switch__button { min-height: 44px; padding: 0 12px; font-size: 12px; }
  .studio-reset { display: none; }
  .studio-panel { position: static; width: 100%; height: auto; min-height: calc(100dvh - 60px); padding: 24px 18px 80px; border-right: 0; }
  .studio-preview { display: none; padding: 0; }
  body[data-studio-mode="preview"] .studio-panel { display: none; }
  body[data-studio-mode="preview"] .studio-preview { display: block; padding: 0; }
  body[data-studio-mode="preview"] .studio-bar { position: sticky; }
  body[data-studio-mode="preview"] .product-page { max-width: none; box-shadow: none; }
  body[data-presentation="page"] .studio-bar { display: none; }
  .product-page__progress { top: 60px; }

  .product-scenes { display: flex; flex-direction: column; }
  .product-scene { display: block; overflow: visible; }
  .scene-marker {
    position: absolute;
    z-index: 12;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(20,20,17,.36);
    color: rgba(20,20,17,.72);
    font: 400 10px/1 var(--display);
    pointer-events: none;
  }
  .scene-marker span { top: auto; bottom: 3px; left: 0; transform: none; }
  .scene-marker i { top: auto; right: auto; bottom: 6px; left: 28px; width: 38px; background: currentColor; }
  .scene-marker b { display: none; }
  .scene-macro .scene-marker span,
  .scene-materials .scene-marker span { font-size: 0; }
  .scene-macro .scene-marker span::after,
  .scene-materials .scene-marker span::after { font-size: 10px; }
  .scene-macro .scene-marker span::after { content: "02"; }
  .scene-materials .scene-marker span::after { content: "03"; }

  /* Mobile is a separate edit: product, promise, early macro, material proof, utility, delivery, close. */
  .scene-hero { order: 1; min-height: 550px; aspect-ratio: auto; display: flex; flex-direction: column; background: #070807; }
  .scene-hero .scene-marker { color: rgba(20,20,17,.72); }
  .scene-hero__stage { flex: 1; display: grid; grid-template-rows: 380px 170px; overflow: visible; }
  .atlas-crop--hero { position: relative; inset: auto; z-index: 1; grid-row: 1; width: 100%; height: 380px; }
  .atlas-crop--hero > img { width: 220%; left: -93%; }
  .scene-hero__stage::after { display: none; }
  .scene-hero__copy { position: relative; z-index: 3; top: auto; left: auto; grid-row: 2; padding: 25px 30px 24px; background: var(--paper-light); color: #181816; }
  .scene-hero__copy h1 { font-size: clamp(32px,10.1vw,42px); line-height: 1.35; letter-spacing: .02em; white-space: nowrap; }
  .scene-hero__copy h1 span { display: inline; }
  .scene-hero__copy p { margin: 10px 0 0; padding: 0; border: 0; font-size: 16px; letter-spacing: .12em; }

  .scene-macro { order: 2; min-height: 145px; aspect-ratio: auto; }
  .scene-macro .scene-marker { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.32); }
  .atlas-crop--macro { position: relative; inset: auto; height: 133px; }
  .atlas-crop--macro img { width: 130%; left: -15%; transform: translateY(-23.36%); }

  .scene-materials { order: 3; min-height: 385px; aspect-ratio: auto; }
  .scene-materials .scene-marker { color: rgba(20,20,17,.72); background: transparent; }
  .scene-materials__stage { min-height: 385px; padding: 25px 30px 31px; }
  .scene-materials__stage h2 { font-size: 15px; letter-spacing: .1em; }
  .scene-materials__stage h2::after { width: 41%; margin-top: 12px; }
  .atlas-crop--materials { display: none; }
  .material-mobile-grid { position: absolute; left: 30px; right: 30px; bottom: 28px; height: 254px; display: grid; grid-template-rows: 84px 84px 82px; gap: 2px; overflow: hidden; }
  .material-mobile-row { position: relative; display: block; overflow: hidden; background: #d0cbc2; }
  .material-mobile-row img { position: absolute; top: 0; left: -9%; width: 118%; max-width: none; height: auto; }
  .material-mobile-row--one img { transform: translateY(-37%); }
  .material-mobile-row--two img { transform: translateY(-42.55%); }
  .material-mobile-row--three img { transform: translateY(-49.20%); }

  .scene-scope { order: 4; min-height: 340px; aspect-ratio: auto; }
  .scene-scope .scene-marker { color: rgba(20,20,17,.72); background: transparent; }
  .scene-scope__stage { min-height: 340px; padding: 20px 30px 30px; display: block; }
  .scene-scope__stage h2 { margin-bottom: 10px; font-size: 18px; }
  .scope-ledger { display: block; border: 1px solid rgba(20,20,17,.42); }
  .scope-ledger li { min-height: 51px; padding: 4px 12px; display: grid; grid-template-columns: 46px 1fr auto; place-items: center stretch; border: 0; border-bottom: 1px solid rgba(20,20,17,.36); }
  .scope-ledger li:last-child { border-bottom: 0; }
  .scope-ledger svg { width: 38px; height: 38px; }
  .scope-ledger span { display: block; font-size: 11px; }
  .scope-ledger b { display: block; font: normal 300 18px/1 var(--reading); color: #747570; }

  .scene-delivery { order: 5; min-height: 300px; aspect-ratio: auto; }
  .scene-delivery .scene-marker { color: rgba(20,20,17,.72); background: transparent; }
  .scene-delivery__stage { min-height: 300px; padding: 20px 25px 34px; background: var(--paper); color: #161714; }
  .scene-delivery__stage h2 { position: static; color: #161714; font-size: 18px; }
  .atlas-crop--delivery { top: 52px; right: 25px; bottom: 38px; left: 25px; border: 4px solid #121311; }
  .atlas-crop--delivery > img { width: 150%; left: -37%; transform: translateY(-67.05%); }
  .delivery-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 10px; }
  .delivery-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9b9c98; }
  .delivery-dots .is-current { background: var(--cobalt); }

  .scene-close { order: 6; min-height: 440px; aspect-ratio: auto; }
  .scene-close .scene-marker { color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.32); }
  .scene-close__stage { display: grid; grid-template-columns: 1fr; grid-template-rows: 260px 180px; }
  .atlas-crop--close { height: 260px; }
  .atlas-crop--close > img { width: 235%; left: -14.7%; transform: translateY(-86.5%); }
  .consultation-action { min-height: 180px; padding: 28px 30px 34px; }
  .consultation-action span { font-size: 27px; }
  .consultation-action i { width: 44%; margin-top: 18px; padding-bottom: 4px; font-size: 22px; }
}

@media (max-width: 370px) {
  .studio-brand strong { display: none; }
  .scene-hero__copy { padding-left: 22px; padding-right: 22px; }
  .scene-hero__copy h1 { font-size: 31px; }
  .scene-materials__stage, .scene-scope__stage { padding-left: 22px; padding-right: 22px; }
  .atlas-crop--materials { left: 22px; right: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .product-page, .studio-panel, .studio-bar { forced-color-adjust: auto; }
  .scene-hero__stage::after { display: none; }
  .paper-stage, .consultation-action { border: 1px solid CanvasText; }
}
