/* The Website's own styles: a sitcom set with a lilac wall, a gold picture frame, an orange couch, and a handwritten wordmark. */
@font-face {
  font-family: "Neucha";
  src: url("fonts/neucha.ttf?v=eSe9bOCQ-gMoV9y8") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Var";
  src: url("fonts/ibm-plex-sans-variable.ttf?v=OwMapCFhdCBb2Ecf") format("truetype");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --sz-lilac: #bca0d8;
  --sz-lilac-deep: #8e6bb4;
  --sz-gold: #f2b82b;
  --sz-orange: #e4732f;
  --sz-orange-deep: #b8501c;
  --sz-brick: #8f3b2c;
  --sz-teal: #2fb5ae;
  --sz-cream: #fdf3e1;
  --sz-ink: #2a1a2e;
  --sz-red: #e53b2c;
  --sz-yellow: #f6c400;
  --sz-blue: #2b7fd6;
  --sz-green: #36a852;
  --sz-body: "IBM Plex Sans Var", "IBM Plex Sans", Arial, sans-serif;
  --sz-display: "Neucha", "Comic Sans MS", cursive;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--sz-cream);
}

body {
  margin: 0;
  color: var(--sz-ink);
  font: 17px/1.5 var(--sz-body);
  background: var(--sz-cream);
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* Ticker: the owner's quotes run along the top, separated by the show's coloured dots. */
.sz-ticker {
  overflow: hidden;
  background: var(--sz-ink);
  color: var(--sz-cream);
  white-space: nowrap;
}

.sz-ticker-track {
  display: inline-flex;
  gap: 28px;
  padding: 10px 0;
  animation: sz-run 26s linear infinite;
}

.sz-ticker-track span {
  font: 400 22px/1 var(--sz-display);
}

.sz-ticker-track i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: auto 0;
  border-radius: 50%;
  background: var(--sz-red);
}

.sz-ticker-track i:nth-of-type(4n+2) {
  background: var(--sz-yellow);
}

.sz-ticker-track i:nth-of-type(4n+3) {
  background: var(--sz-blue);
}

.sz-ticker-track i:nth-of-type(4n) {
  background: var(--sz-green);
}

@keyframes sz-run {
  to {
    transform: translateX(-50%);
  }
}

/* Header: the wordmark sits on the cream wall, the page's name stays readable. */
.sz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 64px);
}

.sz-logo {
  font: 400 30px/1 var(--sz-display);
  text-decoration: none;
  color: var(--sz-ink);
}

.sz-logo span + span {
  margin-left: 4px;
}

.sz-logo span + span::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--sz-red);
  box-shadow: 12px 0 0 var(--sz-blue), 24px 0 0 var(--sz-yellow), 36px 0 0 var(--sz-green);
  vertical-align: middle;
}

/* Opening: the set on the left, the copy on the right. */
.sz-opening {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: 8px clamp(20px, 5vw, 64px) 56px;
}

.sz-set {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .18), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 38px),
    var(--sz-lilac);
  border-radius: 4px;
}

/* A brick band along the floor, as in the apartment's kitchen. */
.sz-set::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  background:
    linear-gradient(var(--sz-brick) 0 0) 0 0 / 100% 2px no-repeat,
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(60, 20, 10, .35) 22px 24px),
    repeating-linear-gradient(90deg, var(--sz-brick) 0 56px, #7a3026 56px 58px);
  opacity: .9;
}

.sz-hero {
  position: absolute;
  left: 50%;
  bottom: 88px;
  width: auto;
  height: min(534px, 66vh);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: sz-breathe 4s ease-in-out infinite;
}

@keyframes sz-breathe {
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

/* The couch: drawn as one flat orange piece. */
.sz-couch {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: min(440px, 88%);
  transform: translateX(-50%);
  overflow: visible;
}

/* Gold picture frames on the wall, as in the apartment. */
.sz-frame {
  position: absolute;
  margin: 0;
  padding: 10px;
  background: var(--sz-gold);
  box-shadow: inset 0 0 0 3px #b8861a, 0 10px 18px rgba(42, 26, 46, .25);
  transition: transform .25s ease;
}

.sz-frame img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--sz-cream);
}

.sz-frame--meme-a {
  top: 44px;
  left: 36px;
  width: 170px;
  transform: rotate(-4deg);
}

.sz-frame--meme-b {
  top: 92px;
  right: 34px;
  width: 150px;
  transform: rotate(3deg);
}

.sz-frame:hover {
  transform: rotate(0) scale(1.04);
}

/* Copy beside the set. */
.sz-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.sz-kicker {
  margin: 0;
  font: 400 26px/1.1 var(--sz-display);
  color: var(--sz-brick);
}

.sz-copy h1 {
  margin: 0;
  font: 400 clamp(56px, 7.4vw, 96px)/.98 var(--sz-display);
  letter-spacing: -.5px;
}

.sz-copy h1 span {
  display: block;
}

.sz-dots {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-top: 14px;
  border-radius: 50%;
  background: var(--sz-red);
  box-shadow: 14px 0 0 var(--sz-blue), 28px 0 0 var(--sz-yellow), 42px 0 0 var(--sz-green);
}

.sz-copy p {
  max-width: 34em;
  margin: 0;
  font-size: 19px;
}

.sz-note {
  padding: 8px 14px;
  background: var(--sz-orange);
  color: var(--sz-cream);
  font: 400 20px/1.2 var(--sz-display);
  transform: rotate(-1.5deg);
}

.sz-button {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 999px;
  background: var(--sz-orange);
  color: var(--sz-cream);
  box-shadow: 0 6px 0 var(--sz-orange-deep);
  font: 400 30px/1 var(--sz-display);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.sz-button:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 var(--sz-orange-deep);
}

.sz-button:focus-visible {
  outline: 3px solid var(--sz-blue);
  outline-offset: 4px;
}

/* Phones: the set first at full width, then the copy in reading order. */
@media (max-width: 860px) {
  .sz-opening {
    grid-template-columns: 1fr;
    padding-bottom: 40px;
  }

  .sz-set {
    min-height: 500px;
  }

  .sz-hero {
    height: min(420px, 60vh);
  }

  .sz-frame--meme-a {
    width: 120px;
    left: 14px;
  }

  .sz-frame--meme-b {
    width: 108px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sz-ticker-track,
  .sz-hero {
    animation: none;
  }
}

/* The route: the field on the left, its tasks and reactions beside it. */
.sz-play {
  padding: 24px clamp(20px, 5vw, 64px) 56px;
  background: var(--sz-cream);
}

.sz-play-head h2,
.sz-quotes h2 {
  margin: 0 0 18px;
  font: 400 clamp(44px, 5.4vw, 68px)/1 var(--sz-display);
}

.sz-play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
}

.sz-field {
  min-width: 0;
  padding: 14px;
  background: var(--sz-ink);
  border-radius: 6px;
  color: var(--sz-cream);
}

.sz-hud {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.sz-stop {
  margin: 0;
  font: 400 22px/1.1 var(--sz-display);
  color: var(--sz-yellow);
}

.sz-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.sz-meter b {
  min-width: 2.2em;
  text-align: right;
  font-weight: 700;
}

.sz-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(253, 243, 225, .18);
}

.sz-bar i {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: 999px;
  background: var(--sz-teal);
  transition: width .4s ease;
}

.sz-meter--hustle .sz-bar i {
  background: var(--sz-red);
}

.sz-stage {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

#sz-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 420;
  touch-action: manipulation;
}

.sz-pause {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  justify-items: center;
  background: rgba(42, 26, 46, .72);
  font: 400 34px/1.1 var(--sz-display);
  text-align: center;
}

.sz-pause[hidden] {
  display: none;
}

.sz-controls,
.sz-sound {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.sz-sound {
  font-size: 14px;
}

.sz-range input {
  vertical-align: middle;
  width: 120px;
}

.sz-check input {
  vertical-align: middle;
}

.sz-btn {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--sz-orange);
  color: var(--sz-cream);
  box-shadow: 0 4px 0 var(--sz-orange-deep);
  font: 400 19px/1.1 var(--sz-display);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.sz-btn:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--sz-orange-deep);
}

.sz-btn:disabled {
  background: #6d5a74;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .6;
}

.sz-btn:focus-visible {
  outline: 3px solid var(--sz-blue);
  outline-offset: 3px;
}

/* The panel beside the field: the stop's task, its reactions, and the next step. */
.sz-panel {
  padding: 22px;
  background: #fff8ec;
  border: 3px solid var(--sz-gold);
  border-radius: 6px;
  box-shadow: 0 10px 18px rgba(42, 26, 46, .18);
  min-height: 420px;
}

.sz-panel-kicker {
  margin: 0 0 4px;
  color: var(--sz-brick);
  font: 400 20px/1.1 var(--sz-display);
}

.sz-panel h3 {
  margin: 0 0 8px;
  font: 400 40px/1.02 var(--sz-display);
}

.sz-panel > p {
  margin: 0 0 16px;
  font-size: 17px;
}

.sz-options,
.sz-panel-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sz-options .sz-btn,
.sz-panel-actions .sz-btn {
  justify-self: start;
}

.sz-quote-line {
  padding: 10px 14px;
  background: var(--sz-lilac);
  color: var(--sz-ink);
  font: 400 26px/1.2 var(--sz-display);
}

.sz-track {
  position: relative;
  height: 46px;
  margin: 16px 0 10px;
  border-radius: 999px;
  background: #e6d7ef;
  overflow: hidden;
}

.sz-track--bar {
  height: 22px;
}

.sz-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 41%;
  width: 18%;
  background: var(--sz-green);
}

.sz-marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 6px;
  margin-left: -3px;
  background: var(--sz-ink);
  border-radius: 3px;
}

.sz-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--sz-orange);
}

.sz-count {
  margin: 8px 0 12px;
  font-size: 15px;
}

.sz-reaction {
  margin: 16px 0 0;
  padding: 12px;
  background: var(--sz-lilac);
  border-radius: 4px;
}

.sz-reaction[hidden],
.sz-reaction img[hidden] {
  display: none;
}

.sz-reaction img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 0 10px;
}

.sz-reaction figcaption {
  font: 400 24px/1.2 var(--sz-display);
}

/* The quotes: the owner's words on gold frames, one per card. */
.sz-quotes {
  padding: 40px clamp(20px, 5vw, 64px) 56px;
  background: var(--sz-lilac);
}

.sz-quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.sz-quote {
  margin: 0;
  padding: 22px;
  background: var(--sz-cream);
  border-left: 8px solid var(--sz-red);
  font: 400 28px/1.15 var(--sz-display);
}

.sz-quote:nth-child(2n) {
  border-left-color: var(--sz-blue);
}

.sz-quote:nth-child(3n) {
  border-left-color: var(--sz-green);
}

.sz-quote cite {
  display: block;
  margin-top: 10px;
  font: 400 15px/1.3 var(--sz-body);
  font-style: normal;
}

.sz-frame--quote {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: 340px;
  transform: none;
}

.sz-frame--quote:hover {
  transform: rotate(-1deg) scale(1.02);
}

.sz-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  background: var(--sz-ink);
  color: var(--sz-cream);
}

.sz-footer p {
  margin: 0;
  font-size: 15px;
}

.sz-footer a {
  color: var(--sz-yellow);
}

.sz-star {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  animation: sz-breathe 4s ease-in-out infinite;
}

/* Phones: the field first, the panel right under it. */
@media (max-width: 960px) {
  .sz-play-grid {
    grid-template-columns: 1fr;
  }

  .sz-panel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .sz-quote-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sz-hud {
    grid-template-columns: 1fr;
  }

  .sz-controls .sz-btn {
    flex: 1 1 45%;
  }

  .sz-quote {
    font-size: 24px;
  }
}
