@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}

:root {
  --night: #0c1a2e;
  --night-2: #132844;
  --chalk: #f5f2e6;
  --chalk-dim: rgba(245, 242, 230, 0.62);
  --chalk-faint: rgba(245, 242, 230, 0.14);
  --pitch: #2e8c40;
  --yellow: #ffd23f;
  --yellow-edge: #b8901a;
  --red: #e5343a;
  --zeno: #8f52ff; /* Zeno's kit */
  --zeno-edge: #5a2cc0;
  --display: "Big Shoulders Display", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--night);
  color: var(--chalk);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  font-family: var(--body);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

#app {
  position: relative;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--night);
}

/* ---- stage & HUD ---------------------------------------------------------- */

#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#pitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hud {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(var(--safe-t) + 6px) calc(var(--safe-r) + 12px) 14px calc(var(--safe-l) + 16px);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.92) 55%, rgba(12, 26, 46, 0));
  pointer-events: none;
}

.hud-score {
  font: 900 40px/1 var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  min-width: 2ch;
}

.hud-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  font-weight: 600;
  color: var(--chalk-dim);
  font-variant-numeric: tabular-nums;
}

.hud-pause {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--chalk-dim);
  pointer-events: auto;
}
.hud-pause svg { width: 18px; height: 18px; fill: var(--chalk); }

body:not([data-mode="playing"]) .hud-pause { visibility: hidden; }
body[data-mode="title"] .hud { visibility: hidden; }
body:not([data-mode="playing"]) .powers,
body:not([data-mode="playing"]) .power-toast { visibility: hidden; }

/* Under the scoreboard: the power pills, then (in the same spot) either the
   new-power notice or the possession card, pushed down if the pills wrap. */
.hud-stack {
  position: absolute;
  top: calc(var(--safe-t) + 52px);
  left: calc(var(--safe-l) + 14px);
  right: calc(var(--safe-r) + 14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.hud-slot { position: relative; }

/* Powers Zeno is carrying: a dot in the kit colour of whoever he took it from,
   and a bar that drains as it runs out. */
.powers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.powers:empty { display: none; }

.power {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px 0 6px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(12, 26, 46, 0.82);
  font: 800 14px/1 var(--display);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.power i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1.5px rgba(245, 242, 230, 0.7);
}
.power b {
  font-weight: 800;
  color: var(--chalk-dim);
  font-variant-numeric: tabular-nums;
}
.power::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: calc(var(--left, 1) * 100%);
  background: var(--yellow);
}
.power.is-total { background: var(--yellow); color: var(--night); }
.power.is-total b { color: rgba(12, 26, 46, 0.7); }
.power.is-total::after { background: var(--night); }

/* A new power: who it came from and what it does. */
.power-toast {
  position: absolute;
  top: 0;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 14px 10px;
  border-left: 5px solid var(--c, var(--yellow));
  border-radius: 6px;
  background: rgba(12, 26, 46, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -6px);
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.power-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.power-toast strong { font: 900 21px/1 var(--display); color: var(--yellow); }
.power-toast span { font-size: 13px; color: var(--chalk); }

/* The possession clock is a referee's card: yellow, then red for the last 10s. */
.card-timer {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -8px);
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.card-timer.is-shown { opacity: 1; transform: translate(-50%, 0); }

.card {
  width: 40px;
  height: 54px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--night);
  font: 900 30px/1 var(--display);
  font-variant-numeric: tabular-nums;
  transform: rotate(-8deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s, color 0.2s;
}
.card-timer.is-red .card {
  background: var(--red);
  color: var(--chalk);
  animation: card-wave 0.5s ease-in-out infinite alternate;
}

.card-label {
  font: 800 19px/1 var(--display);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

@keyframes card-wave {
  from { transform: rotate(-12deg) translateY(0); }
  to { transform: rotate(-3deg) translateY(-3px); }
}

/* ---- controls -------------------------------------------------------------- */

.controls {
  position: relative;
  flex: none;
  height: calc(188px + var(--safe-b));
  padding: 14px calc(var(--safe-r) + 20px) calc(var(--safe-b) + 14px) calc(var(--safe-l) + 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--night);
  border-top: 2px solid var(--chalk);
}

/* A faint halfway line running through the pad, which doubles as the centre circle. */
.controls::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc((100% - var(--safe-b)) / 2);
  height: 2px;
  background: var(--chalk-faint);
  pointer-events: none;
}

.pad {
  position: relative;
  width: 156px;
  height: 156px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--chalk-dim);
  background: var(--night);
  touch-action: none;
}

.pad-arrow {
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--chalk-dim);
  transition: color 0.08s, transform 0.08s;
  pointer-events: none;
}
.pad-arrow svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.pad-arrow.up { top: 6px; left: 50%; margin-left: -22px; }
.pad-arrow.down { bottom: 6px; left: 50%; margin-left: -22px; }
.pad-arrow.left { left: 6px; top: 50%; margin-top: -22px; }
.pad-arrow.right { right: 6px; top: 50%; margin-top: -22px; }
.pad-arrow.is-on { color: var(--yellow); transform: scale(1.15); }


.pad-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 2px solid var(--chalk-dim);
  background: rgba(245, 242, 230, 0.08);
  pointer-events: none;
  will-change: transform;
}
.pad-knob::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--chalk);
}

.actions {
  position: relative;
  width: 178px;
  height: 156px;
  flex: none;
}

.btn-action {
  position: absolute;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 900 24px/1 var(--display);
  letter-spacing: 0.02em;
  touch-action: none;
  transition: opacity 0.15s, transform 0.06s, box-shadow 0.06s;
}

/* One action button: yellow Shoot with the ball, purple Slide without it. */
.btn-act {
  right: 0;
  top: 0;
  width: 104px;
  height: 104px;
  background: var(--yellow);
  color: var(--night);
  font-size: 27px;
  box-shadow: 0 6px 0 var(--yellow-edge), 0 12px 24px rgba(0, 0, 0, 0.45);
}
.btn-act:not(.is-off):not(.is-slide) { animation: shoot-ready 0.9s ease-in-out infinite; }
.btn-act.is-down { box-shadow: 0 2px 0 var(--yellow-edge), 0 6px 14px rgba(0, 0, 0, 0.45); }
.btn-act.is-slide {
  background: var(--zeno);
  color: var(--chalk);
  box-shadow: 0 6px 0 var(--zeno-edge), 0 12px 24px rgba(0, 0, 0, 0.45);
}
.btn-act.is-charging {
  background: conic-gradient(#ff7a1f calc(var(--charge, 0) * 1turn), var(--yellow) 0);
  animation: none;
}
.btn-act.is-slide.is-down { box-shadow: 0 2px 0 var(--zeno-edge), 0 6px 14px rgba(0, 0, 0, 0.45); }

/* Sprint: hold it. The ring is the meter: it drains while sprinting and
   refills at the same rate. */
.btn-sprint {
  left: 0;
  bottom: 0;
  width: 86px;
  height: 86px;
  color: var(--chalk);
  background: conic-gradient(var(--yellow) calc(var(--sprint, 1) * 1turn), rgba(245, 242, 230, 0.16) 0);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}
.btn-sprint::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--night-2);
}
.btn-sprint span { position: relative; font-size: 22px; }
.btn-sprint.is-active::before { background: #2a2250; }
.btn-sprint.is-active span { color: var(--yellow); }
.btn-sprint.is-empty span { color: var(--chalk-dim); }

.btn-action.is-down { transform: translateY(4px); }
.btn-action.is-off { opacity: 0.28; animation: none; }

@keyframes shoot-ready {
  0%, 100% { box-shadow: 0 6px 0 var(--yellow-edge), 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(255, 210, 63, 0.55); }
  50% { box-shadow: 0 6px 0 var(--yellow-edge), 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 0 12px rgba(255, 210, 63, 0); }
}

/* ---- screens -------------------------------------------------------------- */

.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--safe-t) + 24px) calc(var(--safe-r) + 26px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 26px);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.93) 0%, rgba(12, 26, 46, 0.74) 46%, rgba(12, 26, 46, 0.94) 100%);
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.screen[hidden] { display: none; }

.screen-body {
  width: 100%;
  max-width: 420px;
  margin: auto 0;
}

.wordmark {
  margin: 0 0 18px -4px;
  font: 900 clamp(72px, 24vw, 118px)/0.8 var(--display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  transform: skewX(-9deg);
  transform-origin: left bottom;
  color: var(--chalk);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.wordmark span { display: block; }

.lede {
  margin: 0 0 22px;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.4;
  color: var(--chalk);
}

.howto {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.howto li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--chalk-dim);
}

.chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 900 13px/1 var(--display);
}
.chip-pad { border: 2px solid var(--chalk-dim); color: var(--chalk); }
.chip-pad svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chip-shoot { background: var(--yellow); color: var(--night); }
.chip-sprint { border: 3px solid var(--yellow); color: var(--chalk); background: var(--night-2); }
.chip-power { border: 2px solid var(--yellow); color: var(--yellow); }
.chip-keys { border: 2px solid var(--chalk-dim); color: var(--chalk); }
.chip-keys svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.howto .desktop-only { display: none; }
@media (hover: hover) and (pointer: fine) {
  .howto .desktop-only { display: grid; }
  body[data-mode="playing"] #pitch { cursor: crosshair; }
}
.chip-power svg { width: 22px; height: 22px; fill: currentColor; }

.cta {
  display: block;
  width: 100%;
  height: 64px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--night);
  font: 900 30px/1 var(--display);
  letter-spacing: 0.02em;
  box-shadow: 0 6px 0 var(--yellow-edge), 0 14px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.06s, box-shadow 0.06s;
}
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--yellow-edge), 0 8px 18px rgba(0, 0, 0, 0.4); }

.ghost {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 12px;
  border-radius: 14px;
  border: 2px solid var(--chalk-dim);
  font: 800 21px/1 var(--display);
  letter-spacing: 0.02em;
}
.ghost:active { background: var(--chalk-faint); }

.best {
  margin: 16px 0 0;
  min-height: 1.2em;
  font: 800 20px/1.2 var(--display);
  color: var(--chalk-dim);
  text-align: center;
}

/* Add-to-Home-Screen reminder: a chalk card with an arrow pointing at the
   browser button that does it (bottom for iPhone Safari, top right elsewhere). */
.install-tip {
  position: absolute;
  z-index: 15;
  left: 50%;
  bottom: calc(var(--safe-b) + 46px);
  width: min(300px, calc(100% - 32px));
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  background: var(--chalk);
  color: var(--night);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}
.install-tip[hidden] { display: none; }
.install-tip[data-at="top-right"] {
  top: calc(var(--safe-t) + 46px);
  bottom: auto;
  left: auto;
  right: calc(var(--safe-r) + 12px);
  transform: none;
}
.install-title { margin: 0 0 4px; font: 900 21px/1 var(--display); }
.install-line { margin: 0; font-size: 14px; line-height: 1.4; }
.install-line b { font-weight: 700; }
.install-sub { margin: 4px 0 0; font-size: 12px; color: rgba(12, 26, 46, 0.62); }
.install-sub[hidden] { display: none; }
.share-glyph {
  width: 18px;
  height: 18px;
  margin: 0 1px -3px;
  fill: none;
  stroke: #0a7aff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-dots { font-size: 18px; line-height: 0; }
.install-go {
  display: block;
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--night);
  font: 900 19px/1 var(--display);
  box-shadow: 0 3px 0 var(--yellow-edge);
}
.install-go[hidden] { display: none; }
.install-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: rgba(12, 26, 46, 0.55);
}
.install-close:active { background: rgba(12, 26, 46, 0.08); }

/* The arrow bobs towards the browser's button. */
.install-arrow {
  position: absolute;
  left: 50%;
  bottom: -44px;
  width: 24px;
  height: 40px;
  margin-left: -12px;
  fill: none;
  stroke: var(--chalk);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  animation: install-bob 1s ease-in-out infinite;
}
.install-tip[data-at="top-right"] .install-arrow {
  top: -44px;
  bottom: auto;
  left: auto;
  right: 14px;
  margin: 0;
  transform: rotate(180deg);
  animation-name: install-bob-up;
}
.install-tip.has-button .install-arrow { display: none; }

@keyframes install-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 7px; } }
@keyframes install-bob-up { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* Keep the title and full-time content clear of the reminder. */
body[data-install-tip="bottom"] .screen { padding-bottom: calc(var(--safe-b) + 150px); }
body[data-install-tip="top-right"] .screen { padding-top: calc(var(--safe-t) + 150px); }

.screen-heading {
  margin: 0 0 8px;
  font: 900 clamp(64px, 20vw, 96px)/0.85 var(--display);
  text-transform: uppercase;
  transform: skewX(-9deg);
  transform-origin: left bottom;
}

/* Guide: a long scrolling page with a sticky bar at the top. */
.screen-guide {
  justify-content: flex-start;
  padding-top: 0;
  background: rgba(12, 26, 46, 0.97);
}
.guide-top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 -26px;
  padding: calc(var(--safe-t) + 14px) 26px 12px;
  background: var(--night);
  border-bottom: 2px solid var(--chalk-faint);
}
.guide-back {
  height: 38px;
  padding: 0 14px;
  border: 2px solid var(--chalk-dim);
  border-radius: 10px;
  font: 800 18px/1 var(--display);
}
.guide-heading { margin: 0; font: 900 36px/1 var(--display); text-transform: uppercase; transform: skewX(-9deg); }
.guide-body { max-width: 440px; padding-bottom: 10px; }
.guide-section { padding: 18px 0 4px; border-bottom: 1px solid var(--chalk-faint); }
.guide-section h3 { margin: 0 0 8px; font: 900 24px/1.1 var(--display); color: var(--yellow); }
.guide-section p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.guide-list { margin: 0 0 10px; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.guide-list li { margin-bottom: 6px; }
.guide-list li::marker { color: var(--yellow); }
.guide-players, .guide-keepers { list-style: none; margin: 0 0 12px; padding: 0; }
.guide-player {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--chalk-faint);
}
.gp-name { font-weight: 700; }
.gp-power { font: 800 17px/1 var(--display); color: var(--yellow); text-align: right; }
.gp-does { grid-column: 2 / 4; font-size: 14px; color: var(--chalk-dim); }
.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(245, 242, 230, 0.6);
  vertical-align: -2px;
}
.guide-keepers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 15px; }
.guide-keepers .swatch { margin-right: 8px; }
.guide-play { margin: 18px 0 calc(var(--safe-b) + 8px); flex: none; }
#btn-guide { margin-top: 12px; }

/* Paused: a compact panel at the top, so the snack on the pitch shows below. */
.screen-pause {
  justify-content: flex-start;
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.95) 0%, rgba(12, 26, 46, 0.9) 36%, rgba(12, 26, 46, 0) 54%);
}
.screen-pause .screen-body { margin: 0; }
.screen-pause .screen-heading { font-size: clamp(48px, 14vw, 64px); margin-bottom: 14px; }
.pause-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pause-row .ghost { margin-top: 0; font-size: 18px; }

.reason {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--chalk-dim);
}

.final-score {
  margin: 0;
  font: 900 clamp(76px, 26vw, 120px)/0.9 var(--display);
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.over-best {
  margin: 6px 0 22px;
  font: 800 20px/1.2 var(--display);
  color: var(--chalk-dim);
}
.over-best.is-new { color: var(--yellow); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 26px;
  border-top: 2px solid var(--chalk-faint);
  border-bottom: 2px solid var(--chalk-faint);
}
.stats div { padding: 12px 0; }
.stats div + div { border-left: 2px solid var(--chalk-faint); padding-left: 14px; }
.stats dt { font-size: 13px; color: var(--chalk-dim); }
.stats dd { margin: 4px 0 0; font: 900 30px/1 var(--display); font-variant-numeric: tabular-nums; }

.scored-past {
  margin: -12px 0 22px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--chalk-dim);
}
.scored-past:empty { display: none; }

/* Phones held sideways: the pitch needs portrait, so ask for it. */
.rotate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--night);
  text-align: center;
}
.rotate svg { width: 64px; height: 64px; fill: none; stroke: var(--chalk); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rotate p { margin: 0; font: 800 24px/1.1 var(--display); }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate { display: flex; }
}

/* Short screens (iPhone SE): tighten up the title. */
@media (max-height: 700px) {
  .wordmark { font-size: clamp(60px, 19vw, 92px); margin-bottom: 12px; }
  .lede { font-size: 15px; margin-bottom: 14px; }
  .howto { gap: 8px; margin-bottom: 18px; }
  .howto li { font-size: 13.5px; }
  .controls { height: calc(172px + var(--safe-b)); }
}

@media (prefers-reduced-motion: reduce) {
  .card-timer.is-red .card,
  .btn-act:not(.is-off) { animation: none; }
  .card-timer, .power-toast, .pad-arrow, .pad-arrow svg { transition: none; }
  .install-arrow { animation: none; }
}
