:root {
  --ink:#422823;
  --muted:#643b34;
  --line:#77392d4d;
  --accent:#8e2a2f;
  --editorial-edge:clamp(24px,5.1vw,104px);
  --folio-height:68px;
  --book-top:clamp(190px,23dvh,264px);
  --heading-size:clamp(27px,3.25vw,66px);
}

body {
  background:var(--texture),
    radial-gradient(ellipse at var(--light-x,50%) var(--light-y,34%),#fbf1df,#ecdbbe 73%,#cfaf8c);
}
.site-header {
  grid-template-columns:1fr auto;
  border-bottom:1px solid var(--line);
  padding-inline:var(--editorial-edge);
}
.running-chapter { justify-self:end; font-size:14px; font-weight:700; white-space:nowrap }
.desk { display:block; padding:0; isolation:isolate }
.stage { position:absolute; inset:var(--book-top) 0 var(--folio-height) }
.book-view {
  width:min(49vw,91dvh,1000px);
  height:clamp(232px,41dvh,530px);
  transform:translate(-1.5vw,calc(4.6dvh + 30px));
}
.desk:has([data-station="studio"]:not([hidden])) .studio-house { --piece-scale:1.10 }
.copy {
  position:absolute;
  inset:0;
  z-index:4;
  padding:0;
  overflow:visible;
  pointer-events:none;
}
.station {
  position:absolute;
  inset:0;
  padding:var(--header-height) var(--editorial-edge) var(--folio-height);
  margin:0;
}
.chapter-number {
  position:absolute;
  top:calc(var(--header-height) + 8px - .21em);
  left:var(--editorial-edge);
  color:#8b40352b;
  font:var(--title-weight) clamp(72px,10vw,170px)/1.45 var(--title);
}
.station-title {
  position:relative;
  width:fit-content;
  max-width:62vw;
  margin:calc(clamp(17px,3dvh,37px) - .12em) auto 0;
  padding-block:.12em;
  text-align:center;
  font:var(--title-weight) var(--heading-size)/1.25 var(--title);
  letter-spacing:0;
}
.station-title span { display:block }
.page-notes {
  position:absolute;
  inset:calc(var(--header-height) + clamp(125px,18dvh,195px)) var(--editorial-edge) var(--folio-height);
  display:grid;
  grid-template-columns:minmax(0,18.5vw) minmax(0,1fr) minmax(0,18.5vw);
  column-gap:12px;
  align-items:stretch;
}
.notes-left,.notes-right {
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  gap:clamp(13px,2.5dvh,35px);
  padding-block:16px;
}
.notes-left { grid-column:1 }
.notes-right { grid-column:3; align-items:end }
.margin-note {
  position:relative;
  width:min(100%,21ch);
  border-top:1px solid #965c47a3;
  padding:7px 0 5px;
  font-size:clamp(14px,1.1vw,18px);
  line-height:1.75;
  pointer-events:auto;
  overflow-wrap:anywhere;
}
.margin-note > strong { color:var(--accent); font-size:14px }
.edition-note { font-size:14px }
[data-station="studio"] .notes-left { justify-content:space-between; padding-block:clamp(25px,6dvh,72px) clamp(28px,8dvh,95px) }
[data-station="studio"] .notes-right { justify-content:space-around }
[data-station="invitations"] .notes-left { justify-content:start; padding-top:clamp(26px,7dvh,90px) }
[data-station="invitations"] .notes-right { justify-content:center }
[data-station="details"] .notes-right { gap:clamp(5px,1.3dvh,14px) }
.note-button {
  display:inline-grid;
  align-content:center;
  gap:0;
  min-width:44px;
  min-height:48px;
  border:0;
  border-bottom:1px dotted #965c47a3;
  padding:2px 0;
  background:none;
  color:var(--accent);
  text-align:left;
  font-size:14px;
  line-height:1.65;
}
.note-button:hover { background:#a9634311 }
.note-button span { color:var(--muted) }
.invitation-options { display:grid; margin-top:7px }
.invitation-options button {
  min-height:44px;
  padding:0 10px;
  text-align:left;
  border:0;
  border-block-end:1px solid #965c472e;
  border-inline-start:2px solid transparent;
  background:transparent;
  color:var(--ink);
  font-size:14px;
}
.invitation-options button:hover,.invitation-options button[aria-pressed="true"] { background:#a9634320 }
.invitation-options button[aria-pressed="true"] { border-inline-start-color:var(--accent); font-weight:700 }
.invitation-spec { margin-top:9px; font-size:14px }
:is(.invitation-spec,.suite-price) strong { color:var(--accent); font-size:clamp(17px,1.35vw,25px); white-space:nowrap }
.suite-price p { line-height:1.7 }

.book-pin { position:absolute; width:0; height:0; pointer-events:none }
.annotation-line {
  position:absolute;
  left:var(--line-x);
  top:var(--line-y);
  width:var(--line-width,0px);
  height:1px;
  background:#8c4e43a8;
  transform:rotate(var(--line-angle));
  transform-origin:left center;
  pointer-events:none;
}
.annotation-line::after {
  content:"";
  position:absolute;
  right:-2px;
  top:-2px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#8c4e43c9;
}

.contents-note { width:100%; max-width:27ch }
.contents-list { padding:0; list-style:none }
.contents-list button {
  width:100%;
  display:grid;
  grid-template-columns:auto minmax(4px,1fr) auto;
  align-items:center;
  gap:6px;
  min-height:44px;
  border:0;
  padding:3px 6px;
  text-align:start;
  white-space:nowrap;
  background:transparent;
  font-size:14px;
}
.contents-leader { border-bottom:1px dotted #94674f }
.contents-list button:is(:hover,[aria-current]) { background:#a9634320; color:var(--accent) }
.contents-list button[aria-current] { font-weight:700 }
.page-footnote {
  position:absolute;
  bottom:7px;
  right:0;
  max-width:28ch;
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
  pointer-events:auto;
}
.page-footnote span { color:var(--accent); font-weight:700 }

.booking-form {
  --reply-column:min(100%,clamp(163px,15.7vw,255px));
  --reply-field-gap:clamp(12px,1.9dvh,22px);
  grid-template-rows:auto minmax(0,1fr);
  row-gap:clamp(12px,1.7dvh,19px);
  padding-top:clamp(18px,3.5dvh,42px);
}
.reply-intro {
  grid-area:1 / 1;
  width:var(--reply-column);
  padding-top:7px;
  border-top:1px solid #965c47a3;
}
.booking-form > :is(.notes-left,.notes-right) {
  grid-row:2;
  align-items:stretch;
  justify-content:start;
  gap:0;
  width:var(--reply-column);
  padding:0 0 4px;
  overflow:auto;
  overscroll-behavior:contain;
  pointer-events:auto;
  scrollbar-width:thin;
}
.station .booking-form > .notes-right { justify-self:end; padding-top:0 }
.booking-form .form-field + .form-field { margin-block-start:var(--reply-field-gap) }
.form-field { display:grid; min-width:0 }
.form-field label { font-size:14px; font-weight:700; line-height:1.4 }
.booking-form :is(input,select) {
  min-width:0;
  min-height:44px;
  width:100%;
  padding:3px 2px;
  color:inherit;
  background:transparent;
  border:0;
  border-bottom:1px solid #996550;
  border-radius:0;
  font-size:16px;
  scroll-margin-block:12px;
}
.booking-form :is(input,select):focus-visible { outline-color:var(--accent); outline-offset:0; background:#fff7e6 }
.booking-form input[aria-invalid="true"] { border-bottom:2px solid var(--accent) }
.booking-form option { color:var(--ink); background:var(--paper) }
.field-error,.form-status { color:#762925; font-size:14px; font-weight:700; line-height:1.45 }
.field-error:not(:empty) { margin-top:2px }
.form-status:not(:empty) { margin-top:8px }
.colophon { font-size:14px; font-style:normal; color:var(--muted) }
.booking-form .colophon { width:100%; margin-top:clamp(17px,2.8dvh,32px) }
.colophon p + p { border-top:1px dotted #94674f; margin-top:8px; padding-top:8px }

.editorial-footer {
  position:absolute;
  z-index:5;
  inset:auto var(--editorial-edge) 0;
  height:var(--folio-height);
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  column-gap:16px;
  border-top:1px solid var(--line);
}
.folio { grid-column:2; white-space:nowrap }
.editorial-action {
  grid-column:3;
  display:inline-flex;
  justify-self:start;
  align-items:center;
  gap:16px;
  min-height:48px;
  min-width:48px;
  padding:0 15px;
  border:1px solid #74252a;
  border-radius:2px;
  background:#8e2a2f;
  color:#fff1dc;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
  box-shadow:0 2px 0 #9d7659;
}
.editorial-action:hover { background:#74252a }
.editorial-action:focus-visible { outline-color:var(--accent) }
.editorial-action .icon { width:18px; height:18px }
.editorial-footer .turn-hint { position:static; justify-self:start; transform:none; padding:0 }

.station.is-page-entering > :is(.chapter-number,.station-title,.page-notes) { animation:editorial-enter .38s ease-out both }
.station.is-page-leaving > :is(.chapter-number,.station-title,.page-notes) { animation:editorial-exit .23s ease-in both }
@keyframes editorial-enter {
  from { opacity:0; transform:perspective(1100px) translateX(calc(var(--page-direction,1) * 22px)) rotateY(calc(var(--page-direction,1) * 8deg)) }
  to { opacity:1; transform:none }
}
@keyframes editorial-exit {
  to { opacity:0; transform:perspective(1100px) translateX(calc(var(--page-direction,1) * -22px)) rotateY(calc(var(--page-direction,1) * -8deg)) }
}

@media (min-width:901px) and (max-height:800px) {
  :root { --folio-height:64px; --book-top:183px }
  .desk:has([data-station="studio"]:not([hidden])) .studio-house { --piece-scale:1.02; --scene-y:42% }
}
@media (min-width:901px) and (max-width:1150px) {
  :root { --editorial-edge:4.3vw; --heading-size:clamp(29px,3.5vw,42px) }
  .page-notes { grid-template-columns:minmax(0,19vw) minmax(0,1fr) minmax(0,19vw) }
  .station .notes-right { justify-content:start; padding-top:clamp(38px,8.2dvh,100px) }
  .page-footnote { max-width:19vw }
}

@media (min-width:901px) and (max-width:1500px) and (orientation:landscape) {
  .booking-form .colophon { margin-top:auto; padding-top:clamp(17px,2.8dvh,32px) }
}

@media (max-width:900px), (orientation:portrait) {
  :root {
    --editorial-edge:clamp(17px,5vw,48px);
    --folio-height:60px;
    --book-top:clamp(128px,calc(74px + 12vw),176px);
    --book-bottom:clamp(422px,52dvh,545px);
    --heading-size:clamp(24px,5.25vw,49px);
  }
  .site-header { grid-template-columns:1fr auto auto; gap:12px }
  .stage { inset:var(--book-top) 0 auto; height:calc(var(--book-bottom) - var(--book-top)); overflow:clip }
  .book-view {
    width:min(calc(100% - 129px),35dvh,448px);
    height:auto;
    transform:translate(-25px,0);
  }
  .chapter-number { font-size:clamp(60px,14vw,108px) }
  .station-title { margin-top:calc(17px - .12em); max-width:calc(100% - 52px); padding-inline-start:21px }
  .page-notes {
    inset:calc(var(--book-bottom) + 4px) var(--editorial-edge) calc(var(--folio-height) + 5px);
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start;
    gap:0 14px;
    padding:2px 2px 10px;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    pointer-events:auto;
    touch-action:pan-y;
  }
  .station .notes-left,.station .notes-right {
    display:flex;
    align-items:stretch;
    justify-content:start;
    padding:0;
    gap:6px;
    overflow:visible;
  }
  .notes-right { grid-column:2 }
  .margin-note { width:100%; max-width:none; font-size:14px; padding:5px 0 4px }
  .margin-note[data-marker]::before {
    content:attr(data-marker);
    float:left;
    margin:.22em 5px 0 0;
    width:17px;
    height:17px;
    border-radius:50%;
    background:var(--accent);
    color:#fff1dc;
    font:700 12px/17px var(--sans);
    text-align:center;
  }
  .annotation-line {
    left:var(--pin-x);
    top:var(--pin-y);
    width:16px;
    height:16px;
    border:1px solid #fff2db;
    border-radius:50%;
    background:var(--accent);
    color:#fff1dc;
    font:700 11px/14px var(--sans);
    text-align:center;
    transform:translate(-50%,-50%);
  }
  .annotation-line::after { content:none }
  .desk:has(.station:is([data-station="studio"],[data-station="details"]):not([hidden])) {
    --book-bottom:clamp(448px,56dvh,578px);
  }
  .desk:has(.station:is([data-station="studio"],[data-station="details"]):not([hidden])) .book-view {
    width:min(calc(100% - 107px),38dvh,448px);
  }
  :is([data-station="studio"],[data-station="details"]) .page-notes { align-content:stretch }
  :is([data-station="studio"],[data-station="details"]) :is(.notes-left,.notes-right) {
    justify-content:space-around;
  }
  [data-station="studio"] .page-notes {
    grid-template-rows:auto auto;
    row-gap:clamp(8px,1.25dvh,13px);
    align-content:space-evenly;
    align-items:start;
  }
  [data-station="studio"] :is(.notes-left,.notes-right) { display:contents }
  [data-station="studio"] .notes-left > .margin-note { grid-column:1 }
  [data-station="studio"] .notes-right > .margin-note { grid-column:2 }
  [data-station="studio"] .margin-note:first-child { grid-row:1 }
  [data-station="studio"] .margin-note:nth-child(2) { grid-row:2 }
  .invitation-note { display:flow-root }
  .invitation-options { clear:both; margin-top:4px }
  [data-station="invitations"] .page-notes { align-content:stretch }
  [data-station="invitations"] :is(.notes-left,.notes-right) { justify-content:center }
  .invitation-options button { min-height:clamp(44px,6.1dvh,63px) }
  .invitation-spec { margin-top:6px }
  [data-station="process"] .notes-left { grid-column:1/-1 }
  [data-station="process"] .page-notes {
    align-content:stretch;
    grid-template-rows:max-content minmax(min-content,1fr);
  }
  .contents-list button { min-height:clamp(44px,6.1dvh,64px) }
  .page-footnote { position:static; grid-column:1/-1; align-self:end; max-width:none; padding-block:5px; margin-top:4px; border-top:1px dotted #965c47a3 }
  .booking-form.page-notes {
    --reply-row-gap:clamp(4px,1dvh,13px);
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(5,max-content) minmax(min-content,1fr);
    gap:var(--reply-row-gap) 10px;
    align-content:stretch;
    padding-top:2px;
  }
  .booking-form > :is(.notes-left,.notes-right) { display:contents }
  .reply-intro {
    grid-column:1/-1;
    width:100%;
    padding-top:5px;
    margin-bottom:calc(7px - var(--reply-row-gap));
  }
  .booking-form .form-field + .form-field { margin-block-start:0 }
  .form-field.full-width,.booking-form .form-status,.booking-form .colophon { grid-column:1/-1 }
  .booking-form .form-status { grid-row:5 }
  .booking-form .colophon { grid-row:6; align-self:end; margin-top:0 }
  .colophon p + p { margin-top:4px; padding-top:4px }
  .editorial-footer { column-gap:8px }
  .editorial-action { padding-inline:8px; gap:6px }
}

@media (max-height:680px) and (max-width:900px) and (orientation:landscape) {
  :root { --book-top:103px; --book-bottom:68dvh }
  .book-view { width:min(28vw,40dvh); transform:translate(-19px,0) }
}

@media (min-width:600px) and (max-width:900px) and (orientation:portrait) {
  .desk:has([data-station="studio"]:not([hidden])) {
    --book-top:calc(clamp(128px,calc(74px + 12vw),176px) + 16px);
    --book-bottom:clamp(454px,57.3dvh,590px);
  }
  .desk:has([data-station="studio"]:not([hidden])) .book-view {
    width:min(calc(100% - 107px),36.8dvh,448px);
  }
}
