:root {
  --ink: #0a0b09;
  --panel: rgba(12, 13, 10, 0.72);
  --rule: rgba(232, 223, 208, 0.14);
  --amber: #d7a44a;
  --paper: #efe6d6;
  --mist: #9a9386;
  --live: #c45c3e;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  cursor: default;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #070806;
}

#player {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #070806;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 18%, transparent 70%, rgba(0, 0, 0, 0.52) 100%);
}

.grain,
.scan {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.grain {
  opacity: 0.07;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scan {
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.55) 2px 3px
  );
}

.chrome {
  position: absolute;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 28px 36px;
  transition: opacity 0.45s ease;
}

.top {
  top: 0;
  left: 0;
  right: 0;
  align-items: center;
}

.bottom {
  bottom: 0;
  left: 0;
  right: 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.mark {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--live);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(196, 92, 62, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

.live.is-hold {
  color: var(--mist);
}

.live.is-hold i {
  background: var(--mist);
  animation: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.actions,
.nav {
  display: flex;
  gap: 10px;
}

.ghost,
.solid {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--paper);
  padding: 8px 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  cursor: pointer;
}

.ghost:hover,
.solid:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.solid {
  background: var(--amber);
  color: #1a1408;
  border-color: var(--amber);
}

.status {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 28rem;
  text-align: center;
  color: var(--mist);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}

.status.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.place h1 {
  margin: 0.12em 0 0.15em;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  letter-spacing: -0.03em;
  line-height: 0.92;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.kicker,
.where,
.credit,
.eta {
  margin: 0;
}

.kicker,
.credit,
.eta {
  color: var(--mist);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.where {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--paper);
}

.credit {
  margin-top: 10px;
}

.clock {
  text-align: right;
  min-width: 9rem;
}

.eta {
  margin: 8px 0 14px;
}

.nav {
  justify-content: flex-end;
}

.drawer {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100%;
  padding: 28px 24px 40px;
  background: #10110e;
  border-left: 1px solid var(--rule);
  overflow: auto;
}

.drawer[hidden] {
  display: none;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.drawer h2,
dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.8rem;
}

.drawer ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer li {
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  cursor: pointer;
}

.drawer li strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
}

.drawer li span {
  color: var(--mist);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer li.is-now strong {
  color: var(--amber);
}

dialog {
  width: min(440px, 92vw);
  border: 1px solid var(--rule);
  background: #141510;
  color: var(--paper);
  padding: 28px;
}

dialog::backdrop {
  background: rgba(6, 7, 5, 0.72);
}

dialog form {
  display: grid;
  gap: 16px;
}

dialog label {
  display: grid;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

dialog input,
dialog select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: #0c0d0a;
  color: var(--paper);
}

dialog .check {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-template-columns: auto 1fr;
}

dialog .check input {
  width: auto;
}

dialog menu {
  display: flex;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
}

body.is-watching .chrome,
body.is-watching .drawer {
  opacity: 0;
  pointer-events: none;
}

body.is-watching:hover .chrome {
  opacity: 1;
  pointer-events: auto;
}

.atlas {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: #0c100f;
}

.atlas[hidden] {
  display: none;
}

#atlasMap {
  position: absolute;
  inset: 0;
  background: #0c100f;
}

.atlas-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(8, 9, 7, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 9, 7, 0.28) 0%, transparent 18%, transparent 78%, rgba(8, 9, 7, 0.45) 100%);
}

.atlas-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 36px;
  pointer-events: none;
}

.atlas-bar button {
  pointer-events: auto;
}

.atlas-kicker,
.atlas-count,
.atlas-hint {
  margin: 0;
  color: var(--mist);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.atlas-bar h2 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 2.4rem;
}

.atlas-hint {
  position: absolute;
  z-index: 2;
  left: 36px;
  bottom: 28px;
  pointer-events: none;
}

.leaflet-container {
  background: #0c100f;
  font-family: var(--mono);
}

.leaflet-control-zoom {
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
}

.leaflet-control-zoom a {
  background: #141510 !important;
  color: var(--paper) !important;
  border-bottom-color: var(--rule) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
}

.bit {
  background: none;
  border: 0;
}

.bit-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.bit-dot {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background:
    radial-gradient(circle at 35% 30%, #f0d7a2, #c48a2c 55%, #6b4312);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 4px rgba(215, 164, 74, 0.16);
}

.bit-dot::after {
  content: "";
  position: absolute;
  top: 44px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--paper);
  transform: rotate(45deg);
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
}

.bit-ini {
  position: absolute;
  top: 14px;
  left: 0;
  width: 56px;
  text-align: center;
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: #1a1408;
  pointer-events: none;
}

.bit-label {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  min-width: 7rem;
  text-align: center;
  pointer-events: none;
}

.bit-label em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--paper);
  text-shadow: 0 2px 10px #000;
}

.bit-label small {
  color: var(--mist);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bit.is-live .bit-dot {
  border-color: var(--live);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(196, 92, 62, 0.28);
}

.atlas[data-zoom="mid"] .bit-label,
.atlas[data-zoom="near"] .bit-label {
  display: flex;
}

.atlas[data-zoom="mid"] .bit-label em {
  display: none;
}

.bit-cluster {
  background: none;
}

.bit-cluster span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1408;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

body.is-watching:hover .chrome {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .chrome {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .clock,
  .nav {
    text-align: left;
    justify-content: flex-start;
  }

  .place h1 {
    font-size: 2.4rem;
  }

  .actions {
    flex-wrap: wrap;
  }
}
