:root {
  --paper: #f8f6f1;
  --paper-deep: #eeeae1;
  --ink: #171715;
  --ink-soft: #393a35;
  --rose: #f2d8d4;
  --sage: #dfe7dc;
  --vermilion: #c7352f;
  --line: rgba(23, 23, 21, .27);
  --studio-width: 320px;
  --ui-font: Inter, "Helvetica Neue", Arial, sans-serif;
  --reading-font: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  --utility-font: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #deddd8; font-family: var(--utility-font); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #175c70; outline-offset: 3px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

body:not(.is-page-only) {
  display: grid;
  grid-template-columns: var(--studio-width) minmax(0, 1fr);
  grid-template-rows: 58px minmax(0, 1fr);
  min-height: 100vh;
}
.studio-bar {
  position: sticky;
  z-index: 40;
  top: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--studio-width) 1fr auto;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid #262724;
  color: #f7f4ec;
  background: #181916;
}
.studio-brand { display: flex; align-items: center; gap: 11px; padding: 0 18px; border-right: 1px solid #343531; }
.studio-brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid currentColor; font: 600 11px/1 var(--ui-font); letter-spacing: .08em; }
.studio-brand strong, .studio-brand small { display: block; font-family: var(--ui-font); }
.studio-brand strong { font-size: 11px; letter-spacing: .12em; }
.studio-brand small { margin-top: 2px; color: #a9aaa3; font-size: 9px; letter-spacing: .08em; }
.mode-switch { justify-self: center; display: flex; gap: 2px; padding: 3px; border: 1px solid #454640; }
.mode-switch__button, .studio-reset { min-height: 36px; border: 0; color: #d4d5cf; background: transparent; cursor: pointer; }
.mode-switch__button { min-width: 88px; padding: 6px 14px; }
.mode-switch__button.is-active { color: #171715; background: #f7f4ec; }
.studio-reset { margin-right: 14px; padding: 5px 13px; border: 1px solid #454640; }

.studio-panel {
  grid-column: 1;
  grid-row: 2;
  height: calc(100vh - 58px);
  overflow-y: auto;
  border-right: 1px solid #c8c7c0;
  background: #f2f1ec;
}
.studio-panel__intro, .studio-block { padding: 24px 20px; border-bottom: 1px solid #d3d2cb; }
.studio-label { margin: 0 0 8px; color: #777971; font: 600 10px/1.2 var(--ui-font); letter-spacing: .14em; }
.studio-panel__intro h2 { margin: 0; font: 500 26px/1.25 var(--reading-font); }
.studio-panel__intro > p:last-child, .studio-note p { margin: 12px 0 0; color: #5d5f58; font-size: 12px; line-height: 1.8; }
.studio-block__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.studio-block__heading h2 { margin: 0; font-size: 13px; }
.studio-block__heading span { color: #777971; font: 10px/1 var(--ui-font); letter-spacing: .08em; }
.scene-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.scene-item { display: grid; grid-template-columns: 1fr auto; align-items: stretch; border: 1px solid #d0cfc8; background: #fbfaf6; }
.scene-item.is-selected { border-color: var(--ink); }
.scene-item__select { display: grid; grid-template-columns: 30px 1fr; gap: 8px; min-width: 0; padding: 10px; border: 0; text-align: left; background: transparent; cursor: pointer; }
.scene-item__select > span:first-child { color: var(--vermilion); font: 500 11px/1.6 var(--ui-font); }
.scene-item__select strong, .scene-item__select small { display: block; }
.scene-item__select strong { font-size: 12px; }
.scene-item__select small { margin-top: 2px; color: #777971; font-size: 10px; line-height: 1.4; }
.scene-item__controls { display: grid; grid-template-columns: repeat(3, 28px); align-content: center; gap: 2px; padding: 5px; }
.scene-item__controls button { display: grid; place-items: center; min-width: 28px; min-height: 28px; padding: 0; border: 1px solid #d2d1ca; color: #565851; background: #fff; cursor: pointer; }
.scene-item__controls button:disabled { color: #aaa; background: transparent; cursor: default; }
.scene-item__lock { align-self: center; padding: 0 9px; color: #888a83; font: 9px/1 var(--ui-font); letter-spacing: .08em; }
.field-list { display: grid; gap: 13px; }
.field-list label { display: grid; gap: 6px; color: #5d5f58; font-size: 11px; }
.field-list input, .field-list textarea { width: 100%; border: 1px solid #c7c6bf; border-radius: 0; padding: 9px 10px; color: var(--ink); background: #fff; line-height: 1.55; }
.field-list textarea { min-height: 78px; resize: vertical; }
.field-note, .inspector-empty { margin: 12px 0 0; color: #777971; font-size: 10px; line-height: 1.6; }

.studio-preview { grid-column: 2; grid-row: 2; min-width: 0; padding: 18px; overflow: auto; }
.preview-meta { display: flex; justify-content: space-between; width: min(100%, 1440px); margin: 0 auto 8px; color: #666861; font: 9px/1 var(--ui-font); letter-spacing: .09em; }
body[data-studio-mode="preview"] { display: block; background: var(--paper); }
body[data-studio-mode="preview"] .studio-panel { display: none; }
body[data-studio-mode="preview"] .studio-preview { padding: 0; }
body[data-studio-mode="preview"] .preview-meta { display: none; }
body[data-studio-mode="preview"] .studio-bar { position: fixed; inset: 0 0 auto; }
body[data-studio-mode="preview"] .bridal-page { margin-top: 58px; }
body.public-demo[data-studio-mode="preview"] .bridal-page { margin-top: 0; }
body.public-demo .demo-ribbon__state { margin: 0; }
.is-page-only { display: block !important; background: var(--paper); }
.is-page-only .studio-bar, .is-page-only .studio-panel, .is-page-only .preview-meta { display: none !important; }
.is-page-only:not(.public-demo) .skip-link { display: none !important; }
.is-page-only .studio-preview { padding: 0; }

.bridal-page { position: relative; width: min(100%, 1440px); margin: 0 auto; overflow: clip; color: var(--ink); background: var(--paper); font-family: var(--reading-font); }
.bridal-scene { position: relative; }
.bridal-scene[hidden] { display: none; }
.media-frame { margin: 0; }
.media-frame img { display: block; width: 100%; height: auto; }
.media-frame figcaption { margin-top: 10px; color: #66675f; font: 11px/1.6 var(--utility-font); letter-spacing: .05em; }
.media-frame.is-image-failed { display: grid; place-items: center; min-height: 220px; border: 1px solid var(--line); color: #5f615b; background: var(--paper-deep); }
.media-frame.is-image-failed::after { content: "画像を表示できません"; font: 13px/1.7 var(--utility-font); }
.scene-number { color: var(--vermilion); font: 400 clamp(17px, 1.7vw, 25px)/1 var(--reading-font); }

.scene-intro { min-height: 67vw; max-height: 965px; background: var(--paper); }
.intro-photo { position: absolute; inset: 0; }
.intro-photo::after { content: ""; position: absolute; right: auto; bottom: -3%; left: -4%; width: 45%; height: 14%; background: rgba(242, 216, 212, .9); transform: skewY(7deg); transform-origin: left bottom; pointer-events: none; }
.intro-copy { position: absolute; z-index: 2; top: 12%; left: 7.5%; width: 43%; }
.scene-kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; font: 12px/1.4 var(--utility-font); letter-spacing: .18em; }
.scene-kicker::before { content: ""; width: 40px; height: 1px; background: var(--vermilion); }
.intro-copy h1 { margin: 0; font-size: clamp(54px, 6.2vw, 94px); font-weight: 400; line-height: 1.23; letter-spacing: .035em; text-wrap: balance; }
.scene-intro > .scene-number { position: absolute; z-index: 3; top: 3.5%; left: 1.4%; }
.chapter-rail { position: fixed; z-index: 12; top: 50%; left: calc((100vw - min(100vw, 1440px)) / 2 + 16px); transform: translateY(-50%); }
body:not(.is-page-only):not([data-studio-mode="preview"]) .chapter-rail { left: calc(var(--studio-width) + 28px); }
.chapter-rail ol { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.chapter-rail a { display: grid; place-items: center; width: 35px; min-height: 31px; border-bottom: 1px solid rgba(23, 23, 21, .23); color: var(--ink); font: 12px/1 var(--reading-font); text-decoration: none; }
.chapter-rail a[aria-current="true"] { color: var(--vermilion); border-color: currentColor; }

.scene-memory { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.2vw; min-height: 80vw; max-height: 1140px; padding: clamp(80px, 9vw, 138px) 5.5vw; background: #fbfaf7; }
.memory-photo { grid-column: 2 / 8; align-self: start; width: 82%; }
.memory-copy { grid-column: 8 / 12; align-self: center; max-width: 350px; padding-top: 9vw; }
.memory-copy h2 { margin: 24px 0 20px; font-size: clamp(32px, 3vw, 46px); font-weight: 400; line-height: 1.35; }
.memory-copy p { margin: 0; font-size: clamp(14px, 1.2vw, 17px); line-height: 2.1; }

.scene-fragments { min-height: 98vw; max-height: 1420px; padding: clamp(76px, 8vw, 120px) 5.5vw clamp(110px, 12vw, 180px); background: var(--paper); }
.fragments-heading { display: grid; grid-template-columns: 7% 34% 1fr; gap: 2vw; align-items: end; margin-bottom: 7vw; }
.fragments-heading h2 { margin: 0; font-size: clamp(38px, 4.3vw, 64px); font-weight: 400; line-height: 1.2; }
.fragments-heading p { max-width: 420px; margin: 0 0 5px; font-size: clamp(13px, 1.15vw, 16px); line-height: 2; }
.fragment-sequence { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 3.3vw 2vw; align-items: start; }
.fragment-photo--portrait { grid-column: 2 / 5; grid-row: 1 / 3; }
.fragment-photo--group { grid-column: 6 / 12; grid-row: 1; margin-top: 5vw; }
.fragment-photo--detail { grid-column: 5 / 9; grid-row: 2; margin-top: 2vw; }

.scene-day { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2vw; align-items: center; min-height: 44vw; max-height: 660px; padding: 6vw 5.5vw; color: #f7f4ed; background: #171816; }
.scene-day > .scene-number { grid-column: 1; align-self: start; }
.scene-day h2 { grid-column: 2 / 7; margin: 0; font-size: clamp(62px, 7.4vw, 110px); font-weight: 400; line-height: 1.17; letter-spacing: .02em; }
.scene-day > p { grid-column: 7 / 10; margin: 0; font-size: clamp(13px, 1.15vw, 16px); line-height: 2.05; }
.day-echo { grid-column: 10 / 13; width: 88%; justify-self: end; }

.scene-details { padding: clamp(76px, 8vw, 118px) 6.8vw clamp(84px, 8vw, 120px); background: var(--sage); }
.details-heading { display: grid; grid-template-columns: 7% 35% 1fr; gap: 2vw; align-items: end; margin-bottom: 4.5vw; }
.details-heading h2 { margin: 0; font-size: clamp(38px, 4.4vw, 66px); font-weight: 400; line-height: 1.2; }
.details-heading p { max-width: 430px; margin: 0 0 6px; font-size: 14px; line-height: 1.9; }
.service-ledger { margin: 0; border-top: 1px solid var(--line); }
.service-ledger > div { display: grid; grid-template-columns: 34% 1fr; gap: 4vw; padding: 24px 0; border-bottom: 1px solid var(--line); }
.service-ledger dt, .service-ledger dd { margin: 0; }
.service-ledger dt { display: grid; grid-template-columns: 55px 1fr; align-items: baseline; font-size: clamp(18px, 1.8vw, 26px); }
.service-ledger dt span { font-size: 15px; }
.service-ledger dd { align-self: center; font: 13px/1.9 var(--utility-font); }
.workflow-rail { display: grid; grid-template-columns: 34% 1fr; gap: 4vw; margin-top: 5vw; }
.workflow-rail h3 { margin: 0; font-size: 18px; font-weight: 400; }
.workflow-rail ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; list-style: none; border-top: 1px solid var(--line); }
.workflow-rail li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 18px 16px 0 0; border-right: 1px solid var(--line); }
.workflow-rail li:last-child { border-right: 0; padding-left: 16px; }
.workflow-rail li span { font-size: 12px; }
.workflow-rail li p { margin: 0; font: 12px/1.8 var(--utility-font); }
.workflow-rail li strong { display: block; margin-bottom: 5px; font-family: var(--reading-font); font-size: 16px; font-weight: 400; }

.scene-profile { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.4vw; align-items: center; min-height: 56vw; max-height: 830px; padding: clamp(74px, 8vw, 120px) 5.5vw; background: #fbfaf7; }
.scene-profile > .scene-number { grid-column: 1; align-self: start; }
.profile-photo { grid-column: 2 / 5; }
.profile-copy { grid-column: 5 / 8; align-self: center; }
.profile-label { margin: 0 0 12px; font: 10px/1.4 var(--ui-font); letter-spacing: .14em; }
.profile-copy h2 { margin: 0 0 24px; font-size: clamp(24px, 2.3vw, 34px); font-weight: 400; line-height: 1.45; }
.profile-copy > p:not(.profile-label) { margin: 0 0 12px; font-size: 12px; line-height: 2; }
.afterword { grid-column: 8 / 13; align-self: end; padding: 3vw 0 1vw; }
.afterword-title { margin: 0 0 16px; font-size: clamp(24px, 2.5vw, 38px); line-height: 1.5; }
.afterword > p:not(.afterword-title) { margin: 0 0 36px; font-size: clamp(14px, 1.25vw, 17px); line-height: 1.9; }
.consultation-action { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 66px; padding: 16px 24px; border: 1px solid var(--vermilion); color: var(--vermilion); font: 15px/1.4 var(--utility-font); text-decoration: none; --op-action-sweep: var(--vermilion); }
.consultation-action:hover, .consultation-action:focus-visible { color: #fff; }
.platform-credit { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; padding: 18px 5.5vw; border-top: 1px solid var(--line); background: var(--paper); font: 9px/1.4 var(--ui-font); letter-spacing: .12em; }

@media (max-width: 900px) {
  :root { --studio-width: 280px; }
  .studio-bar { grid-template-columns: var(--studio-width) 1fr auto; }
  .chapter-rail { left: 10px; }
  body:not(.is-page-only):not([data-studio-mode="preview"]) .chapter-rail { left: calc(var(--studio-width) + 10px); }
  .intro-copy h1 { font-size: clamp(48px, 6.4vw, 66px); }
}

@media (max-width: 760px) {
  html { scroll-behavior: auto; }
  body:not(.is-page-only) { display: block; }
  .studio-bar { position: sticky; display: grid; grid-template-columns: 1fr auto; min-height: 54px; }
  .studio-brand { border-right: 0; }
  .studio-brand small, .studio-reset { display: none; }
  .mode-switch { justify-self: end; margin-right: 10px; }
  .mode-switch__button { min-width: 70px; }
  .studio-panel { height: auto; max-height: none; border-right: 0; }
  .studio-preview { padding: 0; }
  .preview-meta { display: none; }
  body[data-studio-mode="edit"] .studio-preview { display: none; }
  body[data-studio-mode="preview"] .bridal-page { margin-top: 54px; }

  .bridal-page { width: 100%; }
  .scene-number { font-size: 18px; }
  .scene-intro { display: flex; flex-direction: column; min-height: 0; max-height: none; }
  .intro-photo { position: relative; order: 1; inset: auto; }
  .intro-photo::after { right: auto; bottom: -4%; left: -8%; width: 50%; height: 17%; }
  .intro-copy { position: relative; order: 2; top: auto; left: auto; width: auto; padding: 43px 24px 34px; }
  .scene-kicker { margin-bottom: 18px; font-size: 10px; }
  .scene-kicker::before { width: 28px; }
  .intro-copy h1 { font-size: clamp(41px, 12vw, 56px); line-height: 1.34; letter-spacing: .02em; }
  .scene-intro > .scene-number { display: none; }
  .chapter-rail { position: static; order: 3; transform: none; padding: 0 24px 34px; }
  .chapter-rail ol { grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
  .chapter-rail a { width: 100%; min-height: 45px; border-bottom: 1px solid var(--line); }

  .scene-memory { display: flex; flex-direction: column; min-height: 0; max-height: none; padding: 54px 0 82px; gap: 0; }
  .memory-photo { order: 1; width: 78%; margin: 0; }
  .memory-photo figcaption { padding-left: 20px; }
  .memory-copy { order: 2; max-width: none; padding: 42px 24px 0 34%; }
  .memory-copy h2 { margin: 18px 0 16px; font-size: 31px; }
  .memory-copy p { font-size: 13px; line-height: 2; }

  .scene-fragments { min-height: 0; max-height: none; padding: 68px 0 92px; }
  .fragments-heading { display: block; margin: 0 24px 50px; padding-left: 10%; }
  .fragments-heading h2 { margin: 18px 0; font-size: 39px; }
  .fragments-heading p { font-size: 13px; line-height: 2; }
  .fragment-sequence { display: block; }
  .fragment-photo { width: auto; margin-top: 0; margin-bottom: 42px; }
  .fragment-photo figcaption { padding-inline: 12px; }
  .fragment-photo--portrait { width: 64%; margin-left: 27%; }
  .fragment-photo--group { width: 88%; margin-left: 0; }
  .fragment-photo--detail { width: 71%; margin-left: auto; }

  .scene-day { display: block; min-height: 0; max-height: none; padding: 62px 24px 68px; }
  .scene-day h2 { margin: 22px 0 34px; font-size: clamp(55px, 17vw, 74px); line-height: 1.2; }
  .scene-day > p { max-width: 280px; margin: 0 0 46px 18%; font-size: 13px; line-height: 2; }
  .day-echo { width: 48%; margin-left: auto; }

  .scene-details { padding: 64px 24px 74px; }
  .details-heading { display: block; margin-bottom: 42px; }
  .details-heading h2 { margin: 18px 0 16px; font-size: 39px; }
  .details-heading p { font-size: 13px; }
  .service-ledger > div { display: block; padding: 22px 0; }
  .service-ledger dt { grid-template-columns: 42px 1fr; margin-bottom: 12px; font-size: 21px; }
  .service-ledger dd { padding-left: 42px; font-size: 12px; line-height: 1.85; }
  .workflow-rail { display: block; margin-top: 52px; }
  .workflow-rail h3 { margin-bottom: 18px; }
  .workflow-rail ol { display: block; }
  .workflow-rail li { grid-template-columns: 32px 1fr; padding: 17px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-rail li:last-child { padding-left: 0; }

  .scene-profile { display: grid; grid-template-columns: 42% 1fr; gap: 18px 20px; min-height: 0; max-height: none; padding: 68px 24px 74px; }
  .scene-profile > .scene-number { grid-column: 1 / -1; }
  .profile-photo { grid-column: 1; align-self: start; }
  .profile-copy { grid-column: 2; }
  .profile-label { font-size: 8px; }
  .profile-copy h2 { margin-bottom: 16px; font-size: 21px; }
  .profile-copy > p:not(.profile-label) { font-size: 10px; line-height: 1.8; }
  .afterword { grid-column: 1 / -1; padding: 48px 0 0; }
  .afterword-title { font-size: 28px; }
  .afterword > p:not(.afterword-title) { margin-bottom: 28px; font-size: 13px; }
  .consultation-action { min-height: 60px; padding: 14px 18px; font-size: 14px; }
  .platform-credit { padding: 18px 24px; }
}

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

@media (forced-colors: active) {
  .intro-photo::after { display: none; }
  .consultation-action { border: 1px solid ButtonText; }
}
