:root {
  --bg: #050403;
  --ink: #e8dcc0;
  --dim: #8a7a5c;
  --gold: #d2ab5c;
  --gold-hi: #f1d998;
  --line: rgba(210, 171, 92, 0.28);
  --serif: 'Cormorant Garamond', Cormorant, Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font-family: var(--serif); }

.top {
  position: fixed; inset: 0 0 auto 0; padding: 22px 32px; display: flex; justify-content: space-between;
  align-items: baseline; font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim); pointer-events: none; z-index: 3;
}
.top b { color: var(--gold); font-weight: 600; }
.chapter-title { font-family: var(--serif); font-size: 15px; letter-spacing: .12em; color: var(--gold); text-transform: none; }

.caption {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); width: min(880px, 86vw); text-align: center;
  font-size: 22px; line-height: 1.4; font-style: italic; color: var(--ink); text-shadow: 0 1px 12px #000; z-index: 3;
  min-height: 62px; transition: opacity .4s;
}

.bar {
  position: fixed; inset: auto 0 0 0; padding: 14px 32px 20px; display: grid; grid-template-columns: auto auto 1fr auto;
  gap: 18px; align-items: center; font-family: var(--sans); font-size: 12px; color: var(--dim); z-index: 4;
  background: linear-gradient(to top, rgba(5,4,3,.95), rgba(5,4,3,0));
}
.bar button {
  font: inherit; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); background: none;
  border: 1px solid var(--line); padding: 7px 14px; cursor: pointer;
}
.bar button:hover { border-color: var(--gold); color: var(--gold-hi); }
.time { font-variant-numeric: tabular-nums; letter-spacing: .08em; min-width: 104px; }
.track { position: relative; height: 18px; cursor: pointer; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 1px; background: var(--line); }
.track .fill { position: absolute; left: 0; top: 8px; height: 1px; background: var(--gold); }
.track .mark { position: absolute; top: 4px; width: 1px; height: 9px; background: var(--dim); }
.chapters { display: flex; gap: 4px; }
.chapters button { padding: 6px 8px; letter-spacing: .08em; min-width: 30px; }
.chapters button.on { border-color: var(--gold); color: var(--gold-hi); }

/* Return to the House Archives (embedded or standalone). */
.bar { grid-template-columns: auto auto 1fr auto auto; }
.bar #leave { white-space: nowrap; }

/* Embedded in the site: the essential controls only, resting out of sight while the chronicle plays. */
body.embed .chapters { display: none; }
body.embed .bar { grid-template-columns: auto auto 1fr auto; padding: 18px 32px 22px; transition: opacity .7s ease, transform .7s ease; }
body.embed .bar button { font: 600 10.5px var(--sans); letter-spacing: .24em; padding: 9px 16px; }
body.embed.idle .bar { opacity: 0; transform: translateY(10px); pointer-events: none; }
body.embed.idle { cursor: none; }
#start {
  position: fixed; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%); display: none;
  flex-direction: column; align-items: center; gap: 16px; padding: 18px; border: 0; background: none; cursor: pointer;
  font: 600 10.5px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold-hi);
}
body.needs-start #start { display: flex; }
.start-ring { display: grid; place-items: center; width: 84px; height: 84px; border: 1px solid rgba(241, 217, 152, .6); border-radius: 50%;
  box-shadow: 0 0 40px rgba(241, 217, 152, .18), inset 0 0 24px rgba(241, 217, 152, .08); transition: transform .4s ease, box-shadow .4s ease; }
.start-tri { width: 0; height: 0; margin-left: 6px; border-left: 20px solid var(--gold-hi); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
#start:hover .start-ring, #start:focus-visible .start-ring { transform: scale(1.05); box-shadow: 0 0 60px rgba(241, 217, 152, .3), inset 0 0 24px rgba(241, 217, 152, .12); }
#start:focus-visible, .bar button:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }
@media (max-width: 760px) {
  .bar { padding: 10px 14px 14px; gap: 10px; font-size: 10px; }
  .time { min-width: 0; }
  body.embed .bar { padding: 10px 14px 14px; }
  body.embed .bar button { padding: 8px 10px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) { body.embed .bar { transition: none; } }
/* Scaled down on small screens by the archives (chronicle:ui): the controls keep a usable size. */
.bar, #start { zoom: var(--ui, 1); }
