/* Limestone and ink, with one accent: the dull gold of the brooch pins. A playscript set in Spectral. */
:root {
  --stone: #d9dad5;
  --stone-deep: #cbccc6;
  --ink: #1c1d1f;
  --ink-soft: #55585a;
  --rule: #b7b9b3;
  --pin: #9a7426;
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --caps: "Spectral SC", "Spectral", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --stone: #161716; --stone-deep: #202220; --ink: #d8d6cf; --ink-soft: #9a9a93; --rule: #3a3c39; --pin: #c9a24a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font: 300 18px/1.6 var(--serif);
  padding: calc(env(safe-area-inset-top, 0px) + 40px) 20px calc(env(safe-area-inset-bottom, 0px) + 60px);
}
.masthead, .curve, .day, .script, .foot, .more { max-width: 760px; margin-inline: auto; }
h1 { font: 300 clamp(2.4rem, 7vw, 3.6rem)/1.05 var(--serif); letter-spacing: -0.01em; margin: 0 0 14px; text-wrap: balance; }
.where { margin: 0 0 18px; color: var(--ink-soft); font-style: italic; }
.about { margin: 0; max-width: 60ch; }

.curve { margin-top: 44px; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 2px; height: 96px; border-bottom: 1px solid var(--ink); }
.bar { appearance: none; border: 0; padding: 0; margin: 0; background: none; height: 100%; display: flex; align-items: flex-end; cursor: pointer; position: relative; }
.bar span { display: block; width: 100%; background: var(--ink); opacity: 0.32; min-height: 2px; }
.bar:hover span, .bar:focus-visible span { opacity: 0.7; }
.bar[aria-selected="true"] span { background: var(--pin); opacity: 1; }
.bar.today::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--pin); }
.bar:focus-visible { outline: 2px solid var(--pin); outline-offset: 2px; }
.gap { position: relative; }
.gap::before { content: "closed"; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%) rotate(-90deg); transform-origin: center; font: italic 300 0.7rem/1 var(--serif); color: var(--ink-soft); white-space: nowrap; }
.months { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; margin-top: 12px; font: italic 300 0.8rem/1 var(--serif); color: var(--ink-soft); }
.months span { white-space: nowrap; overflow: visible; }

.day { margin-top: 36px; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--stone); padding: 12px 0; z-index: 2; border-bottom: 1px solid var(--rule); }
.notice { margin: 0 0 10px; font-style: italic; color: var(--ink-soft); }
.dayhead { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; }
.dayinfo { text-align: center; min-width: 0; }
.dayinfo h2 { font: 400 1.35rem/1.25 var(--serif); margin: 0; text-wrap: balance; }
.dayinfo p { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.step { appearance: none; background: none; border: 1px solid var(--rule); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; font: 300 1.5rem/1 var(--serif); cursor: pointer; }
.step:disabled { opacity: 0.3; cursor: default; }
.step:focus-visible, .jumpnow:focus-visible { outline: 2px solid var(--pin); outline-offset: 2px; }
.jumpnow { display: block; text-align: center; margin-top: 8px; color: var(--pin); font-style: italic; }

.script { margin-top: 28px; display: grid; gap: 1.1em; }
.speech { margin: 0; max-width: 34em; }
.speech .who { display: block; font: 400 0.92rem/1.2 var(--caps); letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 2px; text-transform: lowercase; }
.speech.J { margin-left: auto; width: min(34em, 88%); }
.speech.O { width: min(34em, 88%); }
.speech .t { overflow-wrap: anywhere; }
.speech.empty .t { color: var(--ink-soft); font-style: italic; }
.speech.opener .t { font-weight: 400; }
.pause { height: 0.6em; border-top: 1px dotted var(--rule); margin: 0.4em 15%; }
.nowmark { position: relative; border-top: 1px solid var(--pin); margin: 0.6em 0; scroll-margin-top: 140px; }
.nowmark::after { content: "the room is about here now"; position: absolute; right: 0; top: 4px; font: italic 300 0.8rem/1 var(--serif); color: var(--pin); }
.more { height: 1px; }
.preview { max-width: 760px; margin: 40px auto 0; padding: 12px 14px; border: 1px dashed var(--pin); color: var(--ink-soft); font-style: italic; }
.foot { margin-top: 60px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.9rem; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .bars { height: 72px; gap: 1px; }
  .gap::before { display: none; }
  .speech.J, .speech.O { width: 92%; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
