:root {
  --ink: #0b1220;
  --panel: #121c2e;
  --panel-top: #1a2740;
  --edge: rgba(255, 255, 255, 0.09);
  --text: #f3f6fb;
  --muted: #93a3bb;
  --amber: #ffc94d;
  --green: #63e07a;
  --red: #ff5a4f;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  background: var(--ink);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
}

#app {
  display: grid;
  grid-template: 76px 1fr / 174px 1fr;
  height: 100vh;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

/* ---------- Buttons ---------- */

button {
  font: inherit;
  font-weight: 700;
  color: inherit;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: linear-gradient(#2a3b59, #1f2d47);
  box-shadow:
    0 3px 0 #070c16,
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  min-height: 48px;
  min-width: 56px;
  padding: 6px 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.06s,
    box-shadow 0.06s,
    filter 0.15s;
}

button:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #070c16,
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

button.active {
  border-color: var(--amber);
  background: linear-gradient(#4a4324, #3a3320);
  box-shadow:
    0 3px 0 #070c16,
    0 0 0 2px rgba(255, 201, 77, 0.35),
    0 0 18px rgba(255, 201, 77, 0.3);
}

button.primary {
  color: var(--ink);
  border-color: #ffe39a;
  background: linear-gradient(#ffd766, #f5a623);
  box-shadow:
    0 3px 0 #8a5a08,
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

button.danger {
  background: linear-gradient(#5a2c33, #45222a);
}

button:disabled {
  opacity: 0.45;
}

button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

/* ---------- Top bar ---------- */

#hud {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  padding: 8px 14px 8px 0;
  background: linear-gradient(var(--panel-top), var(--panel));
  border-bottom: 1px solid var(--edge);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

#hud > * + * {
  margin-left: 14px;
}

#brand {
  width: 174px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#brand > * + * {
  margin-left: 8px;
}

#brand svg {
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 11px;
  fill: var(--ink);
  background: linear-gradient(#ffdc73, #f5a623);
  box-shadow:
    0 2px 0 #8a5a08,
    0 0 16px rgba(255, 201, 77, 0.35);
}

.chip {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px 0 10px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: rgba(7, 12, 22, 0.55);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.chip > * + * {
  margin-left: 10px;
}

.small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.big {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

#time {
  min-width: 120px;
}

#phase {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--amber);
}

#phase.night {
  color: #fff;
  background: #3c4bb0;
}

#phase.sunrise,
#phase.sunset {
  background: #ff9d4d;
}

#daybar {
  position: relative;
  height: 6px;
  margin-top: 4px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

#daymark {
  position: absolute;
  top: -3px;
  width: 6px;
  height: 12px;
  margin-left: -3px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--ink);
}

#cash {
  min-width: 58px;
  color: var(--green);
}

/* The little sky: a sun and a moon ride around a dial, hidden below the horizon. */
#sky {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

#sky::after {
  content: "";
  position: absolute;
  top: 62%;
  right: 0;
  bottom: 0;
  left: 0;
  background: #2c5a3a;
  border-top: 2px solid rgba(0, 0, 0, 0.25);
}

#orbit {
  position: absolute;
  top: 5px;
  right: 0;
  bottom: -5px;
  left: 0;
}

#orbit i {
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
}

#orbit .sun {
  top: 3px;
  background: #ffd94f;
  box-shadow: 0 0 8px 2px rgba(255, 217, 79, 0.7);
}

#orbit .moon {
  bottom: 3px;
  background: #e6ecf7;
  box-shadow: inset -4px -2px 0 #b3bdd0;
}

.coin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 19px;
  color: #7a4d00;
  background: radial-gradient(circle at 35% 30%, #ffe89a, #f5b02e);
  border: 2px solid #ffe9a8;
  box-shadow: 0 2px 0 #8a5a08;
}

#gauge {
  flex: 1;
  min-width: 160px;
}

#gauge-word {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
}

#gauge-word.low {
  color: var(--red);
}

#gauge-word.tight {
  color: var(--amber);
}

#gauge-word.good {
  color: var(--green);
}

#gauge-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    #e2473e 0%,
    #e2473e 31%,
    #f6d44e 35%,
    #f6d44e 41%,
    #55cf6d 46%,
    #55cf6d 100%
  );
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(7, 12, 22, 0.6);
}

/* Zero reserves: just enough power and nothing spare. */
#gauge-zero {
  position: absolute;
  left: 33.33%;
  top: -3px;
  width: 2px;
  height: 20px;
  margin-left: -1px;
  background: var(--ink);
}

#emergency {
  display: flex;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--red);
  white-space: nowrap;
}

#emergency > * + * {
  margin-left: 8px;
}

#emergency[hidden] {
  display: none;
}

#emergency-bar {
  flex: 1;
  max-width: 150px;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

#emergency-fill {
  display: block;
  height: 100%;
  background: var(--red);
}

main.alarm::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(255, 60, 50, 0.75);
  animation: alarm 0.9s ease-in-out infinite alternate;
}

@keyframes alarm {
  from {
    opacity: 0.25;
  }
  to {
    opacity: 1;
  }
}

#map.cutting {
  cursor: crosshair;
}

#cut svg {
  grid-row: 1 / 4;
  width: 44px;
  height: 48px;
  fill: none;
  stroke-linecap: round;
}

#cut .wire {
  stroke: #c9d3e3;
  stroke-width: 4;
}

#cut .slash {
  stroke: var(--red);
  stroke-width: 5;
}

#gauge-mark {
  position: absolute;
  top: -6px;
  width: 10px;
  height: 26px;
  margin-left: -5px;
  border-radius: 5px;
  background: #fff;
  box-shadow:
    0 0 0 2px var(--ink),
    0 0 10px rgba(255, 255, 255, 0.7);
  transition: left 0.2s ease-out;
}

#gauge-text {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#speed {
  display: flex;
}

#speed > * + * {
  margin-left: 8px;
}

#speed button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#speed button > * + * {
  margin-left: 6px;
}

#play:not(.primary) svg {
  margin-left: 0;
}

#play.primary {
  padding: 6px 18px;
  animation: nudge 1.6s ease-in-out infinite;
}

#play:not(.primary) #go {
  display: none;
}

@keyframes nudge {
  50% {
    filter: brightness(1.12);
    box-shadow:
      0 3px 0 #8a5a08,
      0 0 22px rgba(255, 201, 77, 0.65);
  }
}

/* ---------- Build buttons ---------- */

#palette {
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: linear-gradient(90deg, var(--panel), #0f1828);
  border-right: 1px solid var(--edge);
  z-index: 1;
}

#palette > * + * {
  margin-top: 7px;
}

#palette .heading {
  text-align: center;
}

#palette button {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  column-gap: 8px;
  padding: 5px 8px;
  text-align: left;
  min-height: 60px;
  flex: none;
}

#palette .per {
  font-size: 11px;
  font-weight: 800;
  color: var(--amber);
  white-space: nowrap;
}

#palette canvas {
  grid-row: 1 / 4;
  width: 44px;
  height: 48px;
}

#palette .name {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  align-self: end;
}

#palette .cost {
  align-self: start;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

#palette .cost b {
  color: var(--green);
}

#palette button.poor {
  filter: saturate(0.4) brightness(0.8);
}

#palette button.poor .cost b {
  color: var(--red);
}

#tip {
  margin-top: auto;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
}

/* ---------- Map and the things floating over it ---------- */

main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#map {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* A dark edge always, and a deep blue frame that closes in as night falls. */
main::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(4, 8, 16, 0.5) 100%);
  box-shadow: inset 0 0 calc(var(--night, 0) * 140px)
    rgba(18, 28, 120, calc(var(--night, 0) * 0.85));
}

#zoom {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

#zoom > * + * {
  margin-top: 8px;
}

#forecast {
  position: absolute;
  left: 84px;
  bottom: 16px;
  z-index: 3;
  width: min(560px, calc(100% - 100px));
  padding: 12px 14px 10px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: linear-gradient(rgba(26, 39, 64, 0.96), rgba(18, 28, 46, 0.96));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.18s ease-out;
}

#forecast h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
}

#forecast canvas {
  display: block;
  width: 100%;
  height: 210px;
}

#forecast p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

#zoom button {
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
}

#toast {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(11, 18, 32, 0.92);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  animation: drop 0.22s ease-out;
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

#inspector {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  width: 280px;
  padding: 16px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: linear-gradient(rgba(26, 39, 64, 0.96), rgba(18, 28, 46, 0.96));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.18s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

#inspector-text h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 900;
}

#inspector-text p {
  margin: 0;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 14px;
  font-weight: 600;
  color: #cdd7e6;
  font-variant-numeric: tabular-nums;
}

#inspector-buttons {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}

#inspector-buttons > * {
  margin: 4px;
}

#inspector-buttons button {
  flex: 1 1 110px;
  font-size: 15px;
}

/* ---------- End screen ---------- */

#end {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 16, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade 0.3s ease-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

#end .card {
  width: min(460px, 90%);
  padding: 30px 28px 26px;
  border: 1px solid var(--edge);
  border-radius: 24px;
  background: linear-gradient(var(--panel-top), var(--panel));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes pop {
  from {
    transform: scale(0.8);
  }
}

#end-badge {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

#end-badge svg {
  width: 46px;
  height: 46px;
}

#end.win #end-badge {
  background: radial-gradient(circle at 35% 30%, #ffe89a, #f5a623);
  box-shadow:
    0 0 0 6px rgba(255, 201, 77, 0.2),
    0 0 40px rgba(255, 201, 77, 0.55);
  fill: var(--ink);
}

#end.loss #end-badge {
  background: #232b3a;
  box-shadow: 0 0 0 6px rgba(255, 90, 79, 0.25);
  fill: #6d7789;
}

#end h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 900;
}

#end-stars {
  margin-bottom: 8px;
  font-size: 54px;
  line-height: 1;
}

#end-stars:empty {
  display: none;
}

#end-stars i {
  display: inline-block;
  margin: 0 4px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.16);
}

#end-stars i.earned {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 201, 77, 0.7);
  -webkit-animation: star-pop 0.45s 1.3s backwards;
  animation: star-pop 0.45s 1.3s backwards;
}

#end-stars i.earned:nth-child(2) {
  -webkit-animation-delay: 1.75s;
  animation-delay: 1.75s;
}

#end-stars i.earned:nth-child(3) {
  -webkit-animation-delay: 2.2s;
  animation-delay: 2.2s;
}

@-webkit-keyframes star-pop {
  0% {
    color: rgba(255, 255, 255, 0.16);
    text-shadow: none;
    -webkit-transform: scale(1);
  }
  50% {
    -webkit-transform: scale(1.7);
  }
  100% {
    -webkit-transform: scale(1);
  }
}

@keyframes star-pop {
  0% {
    color: rgba(255, 255, 255, 0.16);
    text-shadow: none;
    transform: scale(1);
  }
  50% {
    transform: scale(1.7);
  }
  100% {
    transform: scale(1);
  }
}

#menu .modes em {
  font-style: normal;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--amber);
}

#sound {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 15px;
}

#end.win h1 {
  color: var(--amber);
}

#end.loss h1 {
  color: var(--red);
}

#end p {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: #cdd7e6;
}

#end-stats {
  display: flex;
  margin-bottom: 20px;
}

#end-stats > * + * {
  margin-left: 10px;
}

#end-stats:empty {
  display: none;
}

#end-stats div {
  flex: 1;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: rgba(7, 12, 22, 0.5);
}

#end-stats b {
  display: block;
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

#end button {
  font-size: 19px;
  font-weight: 900;
  padding: 10px 30px;
}

[hidden] {
  display: none !important;
}

/* ---------- Main menu ---------- */

#menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 201, 77, 0.16), transparent 60%),
    linear-gradient(#16223a, #0b1220);
}

#menu > * + * {
  margin-top: 10px;
}

#menu[hidden] {
  display: none;
}

#menu .logo {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(#ffd766, #f5a623);
  box-shadow:
    0 6px 0 #8a5a08,
    0 0 50px rgba(255, 201, 77, 0.45);
}

#menu .logo svg {
  width: 56px;
  height: 56px;
  fill: var(--ink);
}

#menu h1 {
  margin: 14px 0 0;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

#menu .tagline {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
}

#menu .modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#menu .modes > * {
  margin: 7px;
}

#menu .modes button {
  width: 226px;
  min-height: 124px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 20px;
}

#menu .modes button > * + * {
  margin-top: 8px;
}

#menu .modes b {
  font-size: 21px;
  font-weight: 900;
  color: var(--amber);
}

#menu .modes span {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

#saves {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#settings {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 12, 22, 0.6);
}

#settings[hidden] {
  display: none;
}

#settings .line {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

#settings .line > * + * {
  margin-left: 8px;
}

#settings .line button {
  flex: none;
  padding: 10px 18px;
}

#settings-note {
  min-height: 18px;
  margin-top: 6px;
}

#reload-note {
  flex: 1;
}

#brand {
  cursor: pointer;
}

#saves-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 12, 22, 0.72);
}

#saves-panel[hidden] {
  display: none;
}

#settings .card,
#saves-panel .card {
  width: 520px;
  max-height: 86%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  border: 1px solid var(--edge);
  border-radius: 22px;
  background: linear-gradient(#1a2740, #121c2e);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

#settings h2,
#saves-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
  color: var(--amber);
}

#save-new,
#save-list > div {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

#save-new[hidden] {
  display: none;
}

#save-new > * + *,
#save-list > div > * + * {
  margin-left: 8px;
}

#settings-name,
#save-name {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: rgba(7, 12, 22, 0.6);
  -webkit-user-select: text;
  user-select: text;
}

#save-note {
  min-height: 18px;
  margin-bottom: 8px;
}

#save-list > div {
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: rgba(7, 12, 22, 0.4);
}

#save-list > div > div {
  flex: 1;
  min-width: 0;
}

#save-list b,
#save-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#save-list span {
  font-size: 13px;
  color: var(--muted);
}

#saves-close {
  display: block;
  margin: 12px auto 0;
  padding: 10px 32px;
}

#saves button {
  margin: 0 6px;
  padding: 10px 24px;
  min-height: 44px;
  font-size: 17px;
}

#end .row {
  display: flex;
  justify-content: center;
}

#end .row > * + * {
  margin-left: 10px;
}

/* ---------- Tutorial coach ---------- */

#coach {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 3;
  width: min(340px, calc(100% - 32px));
  padding: 14px 16px 16px;
  border: 2px solid var(--amber);
  border-radius: 18px;
  background: linear-gradient(rgba(26, 39, 64, 0.97), rgba(18, 28, 46, 0.97));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#coach h2 {
  margin: 2px 0 6px;
  font-size: 19px;
  font-weight: 900;
  color: var(--amber);
}

#coach p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

#coach button {
  margin-top: 12px;
}

#coach-end {
  display: flex;
}

#coach-end > * + * {
  margin-left: 10px;
}

#coach-end[hidden],
#coach-next[hidden] {
  display: none;
}

/* What the coach is talking about. */
.coach-focus {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 14px;
  animation: point 0.8s ease-in-out infinite alternate;
}

@keyframes point {
  from {
    outline-color: rgba(255, 201, 77, 0.25);
  }
  to {
    outline-color: rgba(255, 201, 77, 1);
  }
}

#version {
  position: absolute;
  bottom: 14px;
  opacity: 0.6;
}

/* An iPad in landscape is 1024 points wide: the top bar drops the name to make room. */
@media (max-width: 1100px) {
  #brand {
    width: 62px;
  }

  #brand span {
    display: none;
  }

  #hud > * + * {
    margin-left: 10px;
  }

  #speed > * + * {
    margin-left: 6px;
  }
}
