:root {
  color-scheme: light;
  --plum: #321529;
  --rose: #8e234a;
  --paper: #f9f5f1;
  --ink: #2a1b29;
  --muted: #6d5665;
  --line: #e8dce0;
  --pink: #faedf2;
  --nav-height: 3.5rem;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.wrap { width: min(calc(100% - 2rem), 47rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 4; inset: .6rem auto auto .6rem; padding: .5rem 1rem; background: white; transform: translateY(-175%); }
.skip-link:focus { transform: none; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--plum);
  color: white;
  padding: clamp(1.65rem, 6vw, 3.25rem) 0 1.3rem;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(119deg, transparent 64%, #ad476c28 84%, #d267884a);
}
.event {
  color: #ffd8e6;
  font: 800 .77rem/1.35 system-ui, sans-serif;
  letter-spacing: .105em;
}
.event span { letter-spacing: .025em; margin-inline-start: .25rem; }
h1 { margin-top: .3rem; font-size: clamp(2.05rem, 8vw, 3.45rem); line-height: 1.2; letter-spacing: .025em; }
.venue { color: #f5dde9; display: flex; flex-wrap: wrap; gap: .12rem .85rem; margin-top: .55rem; font-size: .9rem; }
.key-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-top: 1.2rem;
}
.key-times > div { border-top: 1px solid #b96d8d; padding-top: .45rem; }
.key-times dt { color: #ffd8e6; font-size: .77rem; font-weight: 700; }
.key-times dd { font: 750 clamp(1.45rem, 6.4vw, 2.2rem)/1.2 system-ui, sans-serif; font-variant-numeric: tabular-nums; }

.navigation {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fffafd;
  border-bottom: 1px solid var(--line);
}
.nav-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .13rem;
  align-items: center;
  min-height: var(--nav-height);
}
.nav-links a {
  display: grid;
  align-items: center;
  text-align: center;
  min-height: 2.75rem;
  padding: .2rem;
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
  border-radius: .4rem;
}
.nav-links a:hover, .nav-links a:focus-visible,
body:has(#show:target) .nav-links a[href="#show"],
body:has(#rehearsal:target) .nav-links a[href="#rehearsal"],
body:has(#cast:target) .nav-links a[href="#cast"],
body:has(#notes:target) .nav-links a[href="#notes"] {
  background: var(--pink);
  color: var(--rose);
}

main { padding-top: .1rem; }
#main, .guide-section { scroll-margin-top: calc(var(--nav-height) + .7rem); }
.guide-section { margin: 1.5rem 0 2.6rem; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .15rem .7rem;
  border-bottom: 2px solid var(--plum);
  padding-bottom: .36rem;
  margin-bottom: .75rem;
}
h2 { font-size: clamp(1.27rem, 5.05vw, 1.8rem); line-height: 1.4; }
.section-heading span, h3 span { color: var(--muted); font-size: .8rem; font-weight: 650; white-space: nowrap; }
h3 { margin: .9rem 0 .4rem; font-size: 1.04rem; }
h3 span { margin-left: .4rem; }
.section-note, .notice { color: var(--muted); font-size: .86rem; margin: .15rem 0 .55rem; }
.notice { background: #fff3e5; color: #623f21; border-left: 3px solid #a25f24; padding: .65rem .75rem; }

.timeline, .roster, .notes {
  background: white;
  border: 1px solid var(--line);
  border-radius: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.timeline li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  align-items: start;
  gap: .45rem;
  padding: .66rem .64rem;
}
.timeline li + li, .roster li + li, .notes > div + div { border-top: 1px solid var(--line); }
.timeline .milestone { background: #fff5f8; }
.slot time, .time-text, .count, .roster strong {
  color: var(--rose);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}
.slot time, .time-text { font-size: .9rem; line-height: 1.35; }
.time-text { display: block; overflow-wrap: anywhere; }
.duration { display: block; color: var(--muted); font-size: .72rem; line-height: 1.2; }
.cue { min-width: 0; }
.cue h4 { overflow-wrap: anywhere; font-size: .92rem; line-height: 1.48; }
.cue p { color: var(--muted); font-size: .78rem; margin-top: .1rem; }
.count {
  align-self: start;
  padding: .12rem .38rem;
  background: var(--pink);
  border-radius: .3rem;
  font-size: .72rem;
  white-space: nowrap;
}
#rehearsal .timeline:last-child li { grid-template-columns: 6rem minmax(0, 1fr); }
#rehearsal .timeline:last-child .time-text { font-size: .79rem; }
.roster li { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .6rem .75rem; font-size: .9rem; }
.roster small { display: block; color: var(--muted); font-size: .76rem; }
.roster strong { white-space: nowrap; }
.notes > div { padding: .7rem .85rem; }
.notes dt { font-size: .96rem; font-weight: 750; }
.notes dd { margin-top: .2rem; font-size: .88rem; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: .55rem; color: var(--muted); font-size: .8rem; padding-bottom: 1.5rem; }
footer a { text-underline-offset: .18em; }

@media (min-width: 38rem) {
  .key-times { max-width: 35rem; }
  .timeline li { grid-template-columns: 4.5rem minmax(0, 1fr) auto; padding: .72rem .85rem; gap: .7rem; }
  #rehearsal .timeline:last-child li { grid-template-columns: 7rem minmax(0, 1fr); }
  .nav-links a { font-size: .88rem; }
}
@media (max-height: 24rem) {
  .navigation { position: static; }
  #main, .guide-section { scroll-margin-top: .5rem; }
}
@media print {
  .navigation, .skip-link, footer a { display: none; }
  .hero, .hero * { color: black; background: white; }
  .hero::after { display: none; }
  .timeline li, .roster li, .notes > div { break-inside: avoid; }
}
