@font-face {
  font-family: "Shantell Sans";
  src: url("fonts/shantell-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* ground and ink */
  --color-paper: #FDFCF8;
  --color-paper-raised: #FFFFFF;
  --color-ink: #23201C;
  --color-ink-soft: #5E574E;
  --color-rule: #23201C;
  --color-on-fill: #23201C;
  --color-focus: #2F5D8A;
  --color-ending: #C2412D;

  /* marker set: one role each, only visible when a sound is on */
  --fill-lantern: #F6DC7A;
  --fill-screen: #F6DC7A;
  --fill-peach: #F4B79A;
  --fill-brown: #BD8A55;
  --fill-orange: #E8824A;
  --fill-green: #7FAE6B;
  --fill-violet: #9C8BD0;
  --fill-slate: #8FA3B8;
  --fill-blend: multiply;
  --fill-opacity: 0.92;
  --opacity-paused: 0.5;
  --opacity-pulse: 0.7;
  --opacity-swipe: 0.92;
  --opacity-glow: 0.45;
  --opacity-backdrop: 0.85;
  --glow: transparent;

  /* misregistration stands in for every shadow */
  --register-x: 3px;
  --register-y: 2px;
  --register-hover-x: 5px;
  --register-hover-y: 4px;

  /* type */
  --font-hand: "Shantell Sans", ui-rounded, "Chalkboard SE", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-title: clamp(2.75rem, 1.6rem + 5vw, 5rem);
  --text-tagline: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-time: clamp(2.5rem, 2rem + 3vw, 3.75rem);
  --text-name: 1.25rem;
  --text-body: 1rem;
  --text-small: 0.8125rem;
  --weight-regular: 400;
  --weight-name: 600;
  --weight-title: 800;
  --leading-tight: 1.02;
  --leading-body: 1.45;
  --tracking-title: -0.02em;

  /* space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --page-max: 68rem;
  --page-gutter: clamp(1.25rem, 5vw, 4rem);
  --intro-max: 24rem;
  --door-max: 15rem;
  --mixer-max: 26rem;
  --note-max: 36rem;
  --note-clearance: 10rem;
  --card-max: 24rem;
  --tilt-card: -1.5deg;
  --tilt-tape: 3deg;
  --door-ajar: 0.6;
  --door-open: 0.35;
  --door-swing: -9deg;
  --door-peek: 0.86;
  --door-peek-swing: -4deg;
  --marker-rise: 0.14em;
  --marker-height: 0.34em;
  --marker-full: 0.9em;
  --bar-height: 5.5rem;

  /* line and shape */
  --stroke: 2px;
  --stroke-icon: 2.25px;
  --stroke-rule: 1.5px;
  --radius-pill: 999px;
  --radius-cup: 0.2rem 0.2rem 0.45rem 0.45rem;
  --size-cup: 0.875rem;
  --size-icon: 3rem;
  --size-hit: 2.75rem;
  --size-switch-w: 3.25rem;
  --size-switch-h: 1.875rem;
  --size-thumb: 1.5rem;
  --size-switch-thumb: 1.125rem;
  --size-track: 0.5rem;
  --size-readout: 2ch;
  --focus-ring: 3px;
  --focus-offset: 3px;

  /* motion */
  --dur-press: 90ms;
  --dur-state: 240ms;
  --dur-slide: 520ms;
  --dur-fade: 900ms;
  --dur-ending: 1600ms;
  --dur-boil: 750ms;
  --dur-steam: 2400ms;
  --steam-rise: -3px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.6, 0, 0.8, 0.4);
  --ease-settle: cubic-bezier(0.34, 1.4, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-paper: #20242C;
    --color-paper-raised: #2A2F3A;
    --color-ink: #F1E9D8;
    --color-ink-soft: #B9B0A0;
    --color-rule: #F1E9D8;
    --color-on-fill: #1B1A18;
    --color-focus: #F2CF63;
    --color-ending: #F28A76;
    --fill-lantern: #F2CF63;
    --fill-screen: #F2CF63;
    --fill-peach: #E9A283;
    --fill-brown: #B58250;
    --fill-orange: #E07B43;
    --fill-green: #76A262;
    --fill-violet: #9383C8;
    --fill-slate: #7E93AB;
    --fill-blend: normal;
    --fill-opacity: 1;
    --opacity-swipe: 0.3; /* light digits have to stay readable across it */
    --glow: rgb(242 207 99 / 0.2);
  }
}

/* the room switched off: line only, and the laptop is the one light left */
:root.is-room-off {
  --fill-lantern: transparent;
  --fill-peach: transparent;
  --fill-brown: transparent;
  --fill-orange: transparent;
  --fill-green: transparent;
  --fill-violet: transparent;
  --fill-slate: transparent;
  --glow: transparent;
  --color-on-fill: var(--color-ink);
  --color-ending: var(--color-ink);
}

/* one marker per sound, shared by its row and its object on the shelf */
[data-sound="zentral"], [data-item="zentral"] { --marker: var(--fill-brown); }
[data-sound="diner"], [data-item="diner"] { --marker: var(--fill-orange); }
[data-sound="quiet-cafe"], [data-item="quiet-cafe"] { --marker: var(--fill-slate); }
[data-sound="lofi"], [data-item="lofi"] { --marker: var(--fill-orange); }
[data-sound="piano"], [data-item="piano"] { --marker: var(--fill-violet); }
[data-sound="hum"], [data-item="hum"] { --marker: var(--fill-brown); }

.sound.is-on,
:root:has([data-sound="zentral"].is-on) [data-item="zentral"],
:root:has([data-sound="diner"].is-on) [data-item="diner"],
:root:has([data-sound="quiet-cafe"].is-on) [data-item="quiet-cafe"],
:root:has([data-sound="lofi"].is-on) [data-item="lofi"],
:root:has([data-sound="piano"].is-on) [data-item="piano"],
:root:has([data-sound="hum"].is-on) [data-item="hum"] {
  --icon-fill: var(--marker);
}

.is-playing .lantern { --icon-fill: var(--fill-lantern); }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-hand);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
}

h1, h2, h3, p, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
ol { list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible {
  outline: var(--focus-ring) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.defs { position: absolute; width: 0; height: 0; }

/* drawing */
.line {
  fill: none;
  stroke: var(--color-ink);
  stroke-width: var(--stroke-icon);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: url(#wobble-1);
}
.line * { vector-effect: non-scaling-stroke; }

.fill {
  fill: var(--icon-fill, transparent);
  opacity: var(--fill-opacity);
  transform: translate(var(--register-x), var(--register-y));
  transition: fill var(--dur-state) var(--ease-out);
}

.lantern-glow { fill: transparent; transition: fill var(--dur-state) var(--ease-out); }
.is-playing .lantern-glow { fill: var(--glow); }

@keyframes boil {
  0% { filter: url(#wobble-1); }
  33.4% { filter: url(#wobble-2); }
  66.7% { filter: url(#wobble-3); }
}
@keyframes steam {
  50% { transform: translateY(var(--steam-rise)); }
}

/* outside: the cafe from the street */
.street {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-7) var(--page-gutter);
  text-align: center;
}
.title {
  font-size: var(--text-title);
  font-weight: var(--weight-title);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-title);
}
.tagline { font-size: var(--text-tagline); color: var(--color-ink-soft); }
.door { width: min(100%, var(--door-max)); overflow: visible; }
/* reaching for the button eases the door off its latch */
.door-light { fill: var(--fill-lantern); opacity: 0; transition: opacity var(--dur-state) var(--ease-out); }
.door-leaf { transform-box: fill-box; transform-origin: left center; transition: transform var(--dur-state) var(--ease-settle); }
.door-leaf path { fill: var(--color-paper); }
.street:has([data-enter]:is(:hover, :focus-visible)) .door-light { opacity: 1; }
.street:has([data-enter]:is(:hover, :focus-visible)) .door-leaf { transform: scaleX(var(--door-peek)) skewY(var(--door-peek-swing)); }
.street:has([data-enter]:active) .door-leaf { transform: scaleX(var(--door-ajar)) skewY(var(--door-swing)); }
.outside.is-leaving {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: var(--color-paper);
  animation: slide-away var(--dur-slide) var(--ease-in) forwards;
}
@keyframes slide-away {
  to { transform: translateX(-100%); }
}
.tally { font-family: var(--font-mono); font-size: var(--text-small); color: var(--color-ink-soft); }

/* inside: the room, then the table, with the time kept right under the scene */
.inside {
  min-height: 100svh;
  display: grid;
  align-content: start; /* the card follows the room, however tall the window */
}
.top {
  display: flex;
  flex-wrap: wrap; /* the leave question drops under the mark when the bar is narrow */
  align-items: center;
  gap: 0 var(--space-5);
  padding: var(--space-4) var(--page-gutter);
  padding-right: calc(var(--page-gutter) + var(--size-hit) + var(--space-3)); /* the i sits in this corner */
}
.top .link-button { min-height: var(--size-hit); }
.link-button.leave { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-name); text-decoration: none; }
/* the door is the mark; where it leads shows once it is reached for */
.leave-hint { margin-left: var(--space-2); font-size: var(--text-small); text-decoration: underline; opacity: 0; transition: opacity var(--dur-state) var(--ease-out); }
.leave:hover .leave-hint, .leave:focus-visible .leave-hint { opacity: 1; }
@media (hover: none) { .leave-hint { opacity: 1; } }
/* the question beside it already says it */
.leave:has(+ .leave-warn:not([hidden])) .leave-hint { opacity: 0; }
.leave-icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; }
.leave-icon { overflow: visible; }
.leave-light { stroke: none; fill: var(--fill-lantern); opacity: 0; transition: opacity var(--dur-state) var(--ease-out); }
/* the leaf swings on its left hinge and lets the light out */
.leave-leaf {
  fill: var(--color-paper);
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform var(--dur-state) var(--ease-settle);
}
.leave:hover .leave-light, .leave:focus-visible .leave-light { opacity: 1; }
.leave:hover .leave-leaf, .leave:focus-visible .leave-leaf { transform: scaleX(var(--door-ajar)) skewY(var(--door-swing)); }
.leave:active .leave-leaf { transform: scaleX(var(--door-open)) skewY(var(--door-swing)); }
.leave-warn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-4); font-size: var(--text-small); }
.leave-warn .link-button { font-weight: var(--weight-name); }
.top-title { font-size: var(--text-name); font-weight: var(--weight-title); letter-spacing: var(--tracking-title); }
.scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--page-gutter);
  text-align: center;
}
.stage { display: grid; justify-items: center; gap: var(--space-3); width: 100%; max-width: var(--intro-max); }
.shelf { display: block; width: 100%; max-width: var(--intro-max); overflow: visible; }
/* the table is part of the room: empty until you sit, then a laptop and a cup that drains */
.shelf .seated { display: none; }
.is-seated .shelf .seated { display: inline; }
.is-seated .shelf .free { display: none; }
/* the sitter fades in and out with the work, so standing up is not a jump cut */
.shelf .person {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fade) ease-in-out, visibility 0s var(--dur-fade);
}
.is-working .shelf .person { opacity: 1; visibility: visible; transition-delay: 0s; }
.screen-light { transition: fill var(--dur-fade) ease-in-out, opacity var(--dur-fade) ease-in-out; }
.sweater { --icon-fill: var(--fill-violet); }
.face { --icon-fill: var(--fill-lantern); }
.backpack { --icon-fill: var(--fill-green); }
.coffee { --icon-fill: var(--fill-brown); }
.is-working .screen-light { --icon-fill: var(--fill-screen); opacity: var(--opacity-glow); }
.time {
  position: relative;
  isolation: isolate;
  flex: none;
  min-height: var(--size-hit);
  padding: 0 var(--space-3);
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--font-hand);
  font-size: var(--text-time);
  font-weight: var(--weight-title);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-title);
  line-height: 1;
  cursor: pointer;
  transition: color var(--dur-fade) var(--ease-out), opacity var(--dur-state) var(--ease-out);
}
/* a marker swipe under the digits, off register like every other fill */
.time::before {
  content: "";
  position: absolute;
  inset: auto 0 var(--marker-rise);
  z-index: -1;
  height: var(--marker-height);
  border-radius: var(--radius-pill);
  background: var(--fill-lantern);
  opacity: var(--opacity-swipe);
  transform: translate(var(--register-x), var(--register-y)) rotate(var(--tilt-card));
  transition: background-color var(--dur-fade) var(--ease-out);
}
.time:disabled { cursor: default; }
.is-break .time::before { background: var(--fill-green); }
.is-ending .time { color: var(--color-ending); }
.is-ending .time::before { background: var(--fill-peach); }
.is-paused .time { opacity: var(--opacity-paused); }
@keyframes ending {
  50% { opacity: var(--opacity-pulse); }
}
.say { font-size: var(--text-name); font-weight: var(--weight-name); line-height: var(--leading-tight); }
.sitting { display: grid; justify-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.sitting .link-button { min-height: var(--size-hit); font-size: var(--text-small); color: var(--color-ink-soft); }
.sitting-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-1) var(--space-3); color: var(--color-ink-soft); }
.sitting-label { font-family: var(--font-mono); font-size: var(--text-small); white-space: nowrap; }
.cups { display: inline-flex; gap: var(--space-1); }
.cups i {
  width: var(--size-cup);
  height: var(--size-cup);
  border: var(--stroke) solid var(--color-ink);
  border-radius: var(--radius-cup);
}
.cups i.full { background: var(--fill-brown); }

.play {
  position: relative;
  isolation: isolate;
  flex: none;
  min-height: var(--size-hit);
  padding: var(--space-2) var(--space-5);
  border: var(--stroke) solid var(--color-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-weight: var(--weight-name);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.play-icon { flex: none; width: 0.75em; height: 0.75em; fill: currentColor; }
.play::before,
.switch::before {
  content: "";
  position: absolute;
  inset: calc(var(--stroke) * -1);
  z-index: -1;
  border-radius: inherit;
  background: var(--pill-fill, transparent);
  opacity: var(--fill-opacity);
  transform: translate(var(--register-x), var(--register-y));
  transition: transform var(--dur-state) var(--ease-settle), background-color var(--dur-state) var(--ease-out);
}
.play { --pill-fill: var(--fill-lantern); }
.play--quiet { --pill-fill: transparent; }
@media (prefers-color-scheme: dark) {
  .play:not(.play--quiet) { color: var(--color-on-fill); border-color: var(--color-ink); background: var(--fill-lantern); }
  .play:not(.play--quiet)::before { background: transparent; border: var(--stroke) solid var(--color-ink); }
}
.play:hover::before,
.switch:hover::before { transform: translate(var(--register-hover-x), var(--register-hover-y)); }
.play:active::before,
.switch:active::before { transform: none; transition-duration: var(--dur-press); }

/* volume: an ink line, a marker band up to the level, a number where the price would be */
.volume {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}
.volume-label { font-size: var(--text-small); color: var(--color-ink-soft); }
.slider {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  align-items: center;
  height: var(--size-hit);
}
.slider::before {
  content: "";
  position: absolute;
  left: 0;
  width: var(--level, 0%);
  height: var(--size-track);
  z-index: -1;
  border-radius: var(--radius-pill);
  background: var(--band, transparent);
  outline: var(--stroke-rule) solid var(--band-outline, transparent);
  opacity: var(--fill-opacity);
  transform: translate(var(--register-x), var(--register-y));
}
.sound .slider { --band-outline: var(--color-ink-soft); }
.sound.is-on .slider { --band: var(--marker); --band-outline: transparent; }
.volume--master .slider { --band: var(--fill-lantern); }

.slider input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: var(--size-hit);
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.slider input::-webkit-slider-runnable-track {
  height: var(--stroke);
  background: var(--color-ink);
  border-radius: var(--radius-pill);
}
.slider input::-moz-range-track {
  height: var(--stroke);
  background: var(--color-ink);
  border-radius: var(--radius-pill);
}
.slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--size-thumb);
  height: var(--size-thumb);
  margin-top: calc((var(--stroke) - var(--size-thumb)) / 2);
  border: var(--stroke) solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-paper-raised);
}
.slider input::-moz-range-thumb {
  width: var(--size-thumb);
  height: var(--size-thumb);
  border: var(--stroke) solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-paper-raised);
}
.slider input:focus-visible { outline: none; }
.slider:has(input:focus-visible) {
  outline: var(--focus-ring) solid var(--color-focus);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-pill);
}

.readout {
  flex: none;
  min-width: var(--size-readout);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  text-align: right;
  color: var(--color-ink-soft);
}

/* the mixer: every sound and its volume, always in view beside the scene */
.mixer { width: 100%; max-width: var(--mixer-max); text-align: left; }
.mixer .link-button { min-height: var(--size-hit); margin-top: var(--space-2); font-size: var(--text-small); color: var(--color-ink-soft); }
.mixer .sound { padding: var(--space-3) 0; }
.mixer .sound:not(.is-broken) .sound-note { display: none; }

/* the menu */
.menu { margin-top: var(--space-4); }
/* a volume only matters once its sound is on */
.sound:not(.is-on) .volume { display: none; }
.sound:first-child { border-top: 0; }
.sound {
  display: grid;
  grid-template-columns: var(--size-switch-w) var(--size-icon) 1fr;
  grid-template-areas:
    "switch icon text"
    "volume volume volume";
  align-items: center;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  padding: var(--space-4) 0;
  border-top: var(--stroke-rule) solid var(--color-rule);
}
.sound .volume { grid-area: volume; }
.sound-text { grid-area: text; min-width: 0; }

.switch {
  grid-area: switch;
  position: relative;
  isolation: isolate;
  width: var(--size-switch-w);
  height: var(--size-switch-h);
  padding: 0;
  border: var(--stroke) solid var(--color-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
}
/* widen the hit area to the full touch target without changing the drawing */
.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc((var(--size-switch-h) - var(--size-switch-thumb)) / 2 - var(--stroke));
  width: var(--size-switch-thumb);
  height: var(--size-switch-thumb);
  border: var(--stroke) solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-paper);
  translate: 0 -50%;
  box-shadow: 0 0 0 calc((var(--size-hit) - var(--size-switch-thumb)) / 2) transparent;
  transition: translate var(--dur-state) var(--ease-settle), background-color var(--dur-state) var(--ease-out);
}
/* the house's own switch, boxed so it reads as the one above the rest */
.master-row {
  display: grid;
  grid-template-columns: var(--size-switch-w) var(--size-icon) 1fr;
  grid-template-areas:
    "switch icon text"
    "volume volume volume";
  align-items: center;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  margin: 0 calc(var(--space-4) * -1); /* the box steps out so its switch lines up with the rows below */
  padding: var(--space-3) var(--space-4);
  border: var(--stroke) solid var(--color-ink);
  background: var(--color-paper-raised);
  box-shadow: var(--register-hover-x) var(--register-hover-y) 0 var(--fill-lantern);
}
.master-row .switch { grid-area: switch; }
.master-row .vignette { grid-area: icon; }
.master-row .volume { grid-area: volume; }
.master-row:not(.is-off) .vignette { --icon-fill: var(--fill-lantern); }
.master-row:not(.is-off) .switch { --pill-fill: var(--fill-lantern); }
.master-row.is-off .slider { --band: transparent; --band-outline: var(--color-ink-soft); }
.sound.is-on .switch { --pill-fill: var(--marker); }
.master-row:not(.is-off) .switch::after,
.sound.is-on .switch::after {
  translate: calc(var(--size-switch-w) - var(--size-switch-h)) -50%;
  background: var(--color-ink);
}

.vignette {
  grid-area: icon;
  width: var(--size-icon);
  height: var(--size-icon);
  overflow: visible;
}
.sound-name {
  font-size: var(--text-name);
  font-weight: var(--weight-name);
  line-height: var(--leading-tight);
}
.sound-note { color: var(--color-ink-soft); }
.credit {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-ink-soft);
}
.keys { margin-top: var(--space-2); }
kbd { padding: 0 var(--space-1); border: var(--stroke-rule) solid currentColor; border-radius: var(--radius-cup); font-family: var(--font-mono); font-size: var(--text-small); }
.keys kbd:not(:first-child) { margin-left: var(--space-3); }
/* no keyboard to press on a touch screen */
@media (hover: none) { .keys { display: none; } }
.sound.is-broken .sound-note::after { content: " This one would not load."; }

/* the house card: a note taped to the wall, the one block that is always coloured in */
.house {
  display: grid;
  justify-items: center;
  padding: var(--space-4) var(--page-gutter) var(--space-7);
}
.house-card {
  position: relative;
  display: grid;
  justify-items: start;
  gap: var(--space-2);
  max-width: var(--card-max);
  padding: var(--space-6) var(--space-5) var(--space-5);
  border: var(--stroke) solid var(--color-ink);
  background: var(--color-paper-raised);
  box-shadow: var(--register-hover-x) var(--register-hover-y) 0 var(--fill-lantern);
  rotate: var(--tilt-card);
}
.house-card::before {
  content: "";
  position: absolute;
  top: calc(var(--space-3) * -1);
  left: 50%;
  width: var(--space-8);
  height: var(--space-5);
  background: var(--fill-peach);
  opacity: var(--fill-opacity);
  mix-blend-mode: var(--fill-blend);
  translate: -50% 0;
  rotate: var(--tilt-tape);
}
.house-kicker { font-family: var(--font-mono); font-size: var(--text-small); color: var(--color-ink-soft); }
.house-title { font-size: var(--text-name); font-weight: var(--weight-name); line-height: var(--leading-tight); }
.house-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  color: inherit;
  font-weight: var(--weight-name);
}
/* a word run over with the highlighter, not a link with a rule under it */
.highlight, .link-button.highlight { position: relative; isolation: isolate; padding: 0 var(--space-1); text-decoration: none; }
.sitting .link-button.highlight { min-height: 0; margin-top: var(--space-2); line-height: var(--leading-body); color: var(--color-ink); }
.is-room-off .highlight { text-decoration: underline; } /* with the marker colours off, the link still has to read as one */
.highlight::before {
  content: "";
  position: absolute;
  inset: auto 0 var(--marker-rise);
  z-index: -1;
  height: var(--marker-height);
  border-radius: var(--radius-pill);
  background: var(--fill-lantern);
  opacity: var(--opacity-swipe);
  transition: height var(--dur-state) var(--ease-out);
}
.highlight:hover::before, .highlight:focus-visible::before { height: var(--marker-full); }

/* the note behind the i: how to use the place, then the small print */
.info-button {
  position: absolute;
  top: var(--space-4);
  right: var(--page-gutter);
  display: grid;
  place-items: center;
  width: var(--size-hit);
  height: var(--size-hit);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: var(--text-name);
  cursor: pointer;
}
.info {
  width: min(100% - 2 * var(--page-gutter), var(--note-max));
  padding: 0;
  border: var(--stroke) solid var(--color-ink);
  background: var(--color-paper-raised);
  color: var(--color-ink);
  box-shadow: var(--register-hover-x) var(--register-hover-y) 0 var(--fill-lantern);
}
.info::backdrop { background: var(--color-paper); opacity: var(--opacity-backdrop); }
.info-body { display: grid; justify-items: start; gap: var(--space-5); padding: var(--space-6) var(--space-5) var(--space-4); }
.info-title { font-size: var(--text-name); font-weight: var(--weight-title); letter-spacing: var(--tracking-title); line-height: var(--leading-tight); }
.info-list { display: grid; gap: var(--space-4); list-style: none; }
.info-list h3, .info-keys h3, .info-about h3 { font-size: var(--text-body); font-weight: var(--weight-name); }
.info-keys .link-button { min-height: var(--size-hit); }
.info-about p + p { margin-top: var(--space-2); }
.info-about a { color: inherit; }
.info .colophon { padding: var(--space-4) 0 0; border-top: var(--stroke-rule) solid var(--color-rule); }
.info-close { min-height: var(--size-hit); font-weight: var(--weight-name); }
.colophon {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-ink-soft);
}
.colophon p + p { margin-top: var(--space-2); }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* the one question the page asks */
.note {
  position: fixed;
  left: 50%;
  bottom: var(--space-4);
  z-index: 2;
  width: min(100% - 2 * var(--page-gutter), var(--note-max));
  padding: var(--space-4);
  border: var(--stroke) solid var(--color-ink);
  background: var(--color-paper-raised);
  font-size: var(--text-small);
  color: var(--color-ink-soft);
  translate: -50% 0;
}
.note[hidden] { display: none; }
/* until the question is answered, the page keeps room for it at the bottom */
body:has(.note:not([hidden])) { padding-bottom: var(--note-clearance); }
html:has(.note:not([hidden])) { scroll-padding-bottom: var(--note-clearance); }
.note .link-button { min-height: var(--size-hit); }
.note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-3);
}
.chip.chip--quiet { background: transparent; color: var(--color-ink); }
.chip {
  min-height: var(--size-hit);
  padding: var(--space-1) var(--space-5);
  border: var(--stroke) solid var(--color-ink);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-paper);
  font: inherit;
  font-weight: var(--weight-name);
  cursor: pointer;
}

@media (min-width: 58rem) {
  .note {
    display: flex;
    align-items: center;
    gap: var(--space-5);
  }
  .note .note-actions { flex: none; margin-top: 0; }
  .scene { flex-direction: row; align-items: flex-start; gap: var(--space-8); }
  .stage, .mixer { flex: none; }
  .mixer { width: var(--mixer-max); }
}

@media (prefers-reduced-motion: no-preference) {
  .is-playing .sound.is-on .vignette .line,
  .is-playing .lantern .line {
    animation: boil var(--dur-boil) steps(1) infinite;
  }
  .is-ending:not(.is-paused) .time { animation: ending var(--dur-ending) ease-in-out infinite; }
  .is-working .shelf .steam,
  .is-playing .sound.is-on .steam {
    animation: steam var(--dur-steam) ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
  .outside.is-leaving { animation: none; }
}
