:root {
  --bg: #0b0a09;
  --card: #151311;
  --ink: #f6f2ec;
  --soft: #9a938a;
  --hot: #ff8a3d;
  --cold: #57c7ff;
  --rest: #8fd6a0;
  --tone: var(--hot);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px;
}

.card {
  position: relative;
  width: min(340px, 100%);
  padding: 16px 12px 12px;
  border-radius: 28px;
  background: linear-gradient(180deg, #1d1a17, var(--card) 50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  isolation: isolate;
}
.card[data-stage="1"] { --tone: var(--cold); }
.card[data-stage="2"] { --tone: var(--rest); }
/* the air of the room: it takes the colour of the stage */
.card__air {
  position: absolute;
  left: 50%;
  top: 40px;
  width: 380px;
  height: 300px;
  margin-left: -190px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tone), transparent);
  opacity: 0.2;
  z-index: -1;
  transition: background-color 1s ease;
}

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 8px; }
.head__place { font-size: 11.5px; font-weight: 560; color: var(--soft); letter-spacing: 0.02em; }
.head__title { font-size: 19px; line-height: 24px; font-weight: 680; font-stretch: 106%; letter-spacing: -0.015em; }
.deg { display: flex; align-items: baseline; gap: 2px; font-size: 22px; line-height: 26px; font-weight: 700; color: var(--tone); transition: color 0.8s ease; }
.deg small { font-size: 12px; font-weight: 600; }

/* ---- the ring of the stage ---- */
.ring { position: relative; width: min(178px, 46vh); margin: 6px auto 8px; }
.ring svg { display: block; width: 100%; height: auto; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring__track { stroke: rgba(255, 255, 255, 0.07); }
.ring__arc { stroke: var(--tone); stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 60%, transparent)); transition: stroke 0.8s ease; }
.ring__ticks path { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.2; stroke-linecap: round; }
.ring__read { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 1px; text-align: center; }
.ring__name { height: 17px; overflow: hidden; font-size: 12.5px; line-height: 17px; font-weight: 640; color: var(--tone); transition: color 0.8s ease; }
.ring__time { font-size: 34px; line-height: 38px; font-weight: 720; font-stretch: 106%; letter-spacing: -0.02em; }
.ring__what { height: 16px; overflow: hidden; font-size: 11.5px; line-height: 16px; color: var(--soft); }
.ring__read span { display: block; white-space: nowrap; }

/* ---- the three stages ---- */
.stops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stop {
  display: grid;
  gap: 1px;
  padding: 8px 9px 9px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}
.stop__name { font-size: 12.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop__meta { font-size: 11px; color: var(--soft); }
.stop__bar { height: 3px; margin-top: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.stop__bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--c, var(--hot)); transform: scaleX(0); transform-origin: 0 50%; }
.stop:nth-child(2) { --c: var(--cold); }
.stop:nth-child(3) { --c: var(--rest); }
.stop.is-on { background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 0 0 1.4px color-mix(in srgb, var(--c, var(--hot)) 70%, transparent); }
.stop.is-done { opacity: 0.6; }
@media (hover: hover) { .stop:hover { background: rgba(255, 255, 255, 0.09); } }
.stop:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-height: 420px) {
  .card { padding-top: 12px; padding-bottom: 10px; }
  .ring { margin: 4px auto 6px; }
  .stop { padding: 6px 8px 7px; }
}
@media (min-width: 900px) and (min-height: 680px) {
  .card { zoom: 1.5; }
}
