:root {
  --paper: #f3efe7;
  --ink: #2b2622;
  --bronze: #c98a55;
  --glass: rgb(28 25 22 / 62%);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #1c1916;
  color: var(--paper);
  font: 16px/1.45 var(--sans);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  background: #b9cfe2 url('/img/poster-960.webp') center / cover no-repeat;
}

button {
  font: inherit;
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--bronze);
  outline-offset: 2px;
}

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 10px
    calc(12px + env(safe-area-inset-left));
  pointer-events: none;
}

.bar > * {
  pointer-events: auto;
}

.back,
.bar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgb(243 239 231 / 22%);
  border-radius: 999px;
  background: var(--glass);
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.back {
  padding-left: 10px;
}

.back svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back b {
  font-family: var(--serif);
  font-weight: 600;
}

.bar-right {
  display: flex;
  gap: 8px;
}

.bar button:disabled {
  opacity: 0.45;
  cursor: default;
}

.bar button[aria-pressed='true'],
.bar button[aria-expanded='true'] {
  background: var(--paper);
  color: var(--ink);
}

.places {
  position: fixed;
  top: calc(62px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 4;
  width: min(250px, calc(100vw - 24px));
  max-height: calc(100dvh - 90px - env(safe-area-inset-top));
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid rgb(243 239 231 / 22%);
  border-radius: 16px;
  background: rgb(28 25 22 / 86%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.places[hidden] {
  display: none;
}

.places button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}

.places button:hover,
.places button:focus-visible {
  background: rgb(243 239 231 / 14%);
}

.panel {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 70px 16px 24px;
  background: linear-gradient(rgb(20 17 14 / 30%), rgb(20 17 14 / 62%));
  transition: opacity 0.35s ease;
}

.panel[hidden] {
  display: none;
}

.panel.leaving {
  opacity: 0;
  pointer-events: none;
}

.card {
  width: min(440px, 100%);
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid rgb(243 239 231 / 18%);
  border-radius: 20px;
  background: rgb(28 25 22 / 82%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 70%);
}

.kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}

h1 {
  margin: 0;
  font: 500 clamp(30px, 8vw, 40px) / 1.05 var(--serif);
}

.panel-text {
  min-height: 1.45em;
  margin: 14px 0 10px;
  color: rgb(243 239 231 / 82%);
}

.meter {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgb(243 239 231 / 16%);
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: var(--bronze);
  transition: width 0.2s linear;
}

.meter[hidden] {
  display: none;
}

.how {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: rgb(243 239 231 / 82%);
}

.how b {
  color: var(--paper);
  font-weight: 600;
}

.how-touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .how-touch {
    display: block;
  }

  .how-keys {
    display: none;
  }
}

.go {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.go[hidden] {
  display: none;
}

.panel-alt {
  margin: 14px 0 0;
  font-size: 14px;
  text-align: center;
}

.panel-alt a {
  color: rgb(243 239 231 / 78%);
}

.stick {
  position: fixed;
  z-index: 1;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid rgb(243 239 231 / 45%);
  border-radius: 50%;
  background: rgb(28 25 22 / 22%);
  pointer-events: none;
}

.stick[hidden] {
  display: none;
}

.stick i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: rgb(243 239 231 / 80%);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 3;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--glass);
  font-size: 14px;
  text-align: center;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.toast[hidden] {
  display: none;
}

.debug {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgb(0 0 0 / 60%);
  font:
    11px/1.3 ui-monospace,
    Menlo,
    monospace;
  pointer-events: none;
}

.debug[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .meter i {
    transition: none;
  }
}
