@font-face {
  font-family: DM;
  src: url(assets/sans.ttf);
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url(assets/sans-bold.ttf);
  font-weight: 550 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101010;
  --panel: #202020;
  --ink: #f8f8f6;
  --muted: #b5b5b2;
  --accent: #aad86c;
  --line: #383838;
  --glass: rgb(70 69 65 / 70%);
  --glass-edge: rgb(255 255 255 / 32%);
  --sans: DM, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
}
button,
a {
  color: inherit;
}
button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
}
h1,
h2,
h3,
p {
  margin: 0;
}
i[data-icon] {
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex: none;
}
i svg {
  width: 100%;
  height: 100%;
}
a {
  text-underline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.lens {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0 0 clamp(22px, 5vw, 36px) clamp(22px, 5vw, 36px);
  background: #595753;
}
.street-photo,
#video,
.shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.street-photo {
  object-position: 50% 53%;
  filter: saturate(0.72) contrast(0.95);
}
.stage.setup .street-photo {
  filter: saturate(0.72) contrast(0.95) blur(10px);
  transform: scale(1.1);
}
.shade {
  pointer-events: none;
  background: linear-gradient(
    180deg,
    #11111185,
    transparent 25%,
    transparent 74%,
    #09090994
  );
}
.hud {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  padding: max(17px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
}
.hud-button,
.round {
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  color: white;
  backdrop-filter: blur(15px);
}
.hud-button span {
  display: none;
}
.info-button {
  justify-self: end;
}
.identity {
  text-align: center;
  color: white;
  text-shadow: 0 1px 5px #12140f8c;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: 600 12px/1.25 var(--sans);
  color: #eee;
}
.identity h1 {
  font: 600 20px/1.2 var(--sans);
  letter-spacing: -0.65px;
  margin-top: 2px;
}
.marker {
  position: absolute;
  top: 42%;
  left: 34%;
  display: flex;
  align-items: flex-start;
  flex-direction: column-reverse;
  gap: 7px;
  padding: 0;
  transform: translateX(-50%);
  z-index: 1;
  color: white;
}
.marker-point {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-left: 19px;
  border: 1px solid #ffffffaa;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  background: #a6a59c85;
}
.marker-point:after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
}
.marker-stem {
  display: none;
}
.marker-label {
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--glass);
  backdrop-filter: blur(17px);
  box-shadow:
    0 2px 9px #0002,
    inset 0 1px 0 #ffffff12;
  line-height: 1.2;
  text-align: center;
}
.marker-label b {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.35px;
}
.marker-label small {
  display: none;
}
.neighbor {
  left: 77%;
  top: 28%;
}
.neighbor .marker-label {
  min-width: 90px;
}
.neighbor .marker-point:after {
  background: #fff;
}
.ar-arrows {
  position: absolute;
  width: 64px;
  top: 64%;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px #0007);
  pointer-events: none;
}
.ar-arrows svg {
  width: 100%;
  fill: white;
}
.scene-foot {
  position: absolute;
  inset: auto 16px 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.scene-meta {
  display: grid;
  gap: 3px;
}
.state-pill,
.overline {
  font: 600 12px/1.35 var(--sans);
  letter-spacing: 0.01em;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: white;
  text-shadow: 0 1px 4px #000;
}
.state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd;
}
.live .state-dot {
  background: #ace594;
}
.street-address {
  font: 600 16px/1.25 var(--sans);
  letter-spacing: -0.3px;
  text-shadow: 0 1px 5px #171717;
  color: white;
}
.camera-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(15px);
  color: white;
  padding: 12px 16px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px #0002;
}
.camera-button i {
  width: 17px;
  height: 17px;
}
.live .camera-button {
  background: var(--glass);
  color: white;
  border: 1px solid #ffffff52;
}
.live .scene-meta {
  opacity: 0.9;
}
.live .shade {
  background: linear-gradient(
    180deg,
    #10130e84,
    transparent 15%,
    transparent 85%,
    #10130e75
  );
}
#status {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90%, 480px);
  padding: 10px 14px;
  border: 1px solid #ffffff35;
  border-radius: 9px;
  background: #272727eb;
  color: #f2f2ef;
  font-size: 13px;
  z-index: 3;
}
.direction-bar {
  position: relative;
  flex: none;
  background: #101010;
  padding: 22px 17px max(23px, env(safe-area-inset-bottom));
  border-top: 1px solid transparent;
}
.direction-inner {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 1100px;
  margin: auto;
}
.pull {
  position: absolute;
  top: 0;
  left: calc(50% - 29px);
  width: 58px;
  height: 16px;
  display: grid;
  place-items: start center;
  padding-top: 5px;
}
.pull span,
.sheet-grip {
  width: 30px;
  height: 3px;
  background: #474747;
  border-radius: 4px;
}
.direction-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: var(--accent);
  background: #242424;
  transition:
    background-color 300ms ease,
    box-shadow 300ms ease;
}
.direction-icon > * {
  grid-area: 1 / 1;
  pointer-events: none;
}
.compass-needle {
  display: grid;
  transition:
    opacity 170ms ease,
    transform 240ms ease;
}
.compass-needle i {
  width: 25px;
  height: 25px;
  filter: drop-shadow(0 0 7px #abdb6440);
  transition: transform 200ms ease-out;
}
.compass-check,
.compass-ring {
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 200ms ease,
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.compass-check {
  width: 29px;
  height: 29px;
}
.compass-check path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 280ms ease-out;
}
.compass-ring {
  width: 16px;
  height: 16px;
  border: 2px solid #b8b8af;
  border-radius: 50%;
}
.direction-icon:is([data-state="waiting"], [data-state="arrived"])
  .compass-needle {
  opacity: 0;
  transform: scale(0.65);
}
.direction-icon[data-state="waiting"] .compass-ring,
.direction-icon[data-state="arrived"] .compass-check {
  opacity: 1;
  transform: scale(1);
}
.direction-icon[data-state="arrived"] {
  background: #303a27;
  box-shadow: inset 0 0 0 1px #aad86c70;
}
.direction-icon[data-state="arrived"] .compass-check path {
  stroke-dashoffset: 0;
  transition-delay: 65ms;
}
@media (prefers-reduced-motion: reduce) {
  .direction-icon,
  .direction-icon * {
    transition: none !important;
  }
}
.dir-text {
  padding: 2px 0;
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
  flex: 1;
}
.dir-text strong {
  font-weight: 600;
  font-size: clamp(15px, 4.4vw, 20px);
  line-height: 1.2;
  letter-spacing: -0.25px;
}
.dir-text span {
  font-size: 12px;
  color: #aaa9a7;
  line-height: 1.35;
}
.foot-story,
.next-stop {
  flex: none;
  display: grid;
  place-content: center;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #f4f4f2;
  background: #242424;
}
.foot-story span,
.next-stop span {
  display: none;
}
.next-stop {
  background: #303030;
}
.next-stop i,
.foot-story i {
  width: 17px;
  height: 17px;
}
dialog {
  color: var(--ink);
  background: #1a1a1a;
  border: 1px solid #3c3c3c;
  padding: 0;
  border-radius: 20px 20px 0 0;
  max-width: none;
  width: 100%;
  max-height: 91dvh;
  box-shadow: 0 -10px 80px #0005;
  margin: auto 0 0;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #080808b8;
  backdrop-filter: blur(5px);
}
#drawer[open] {
  display: flex;
  flex-direction: column;
  height: min(780px, 90dvh);
}
.sheet-grip {
  margin: 9px auto 0;
  flex: none;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 22px 0;
}
.overline {
  color: var(--accent);
  font-size: 11px;
}
.drawer-head h2,
.dialog-copy h2 {
  font: 600 clamp(29px, 6vw, 36px) / 1.12 var(--sans);
  letter-spacing: -0.75px;
  margin: 5px 0 0;
}
.round {
  background: #303030;
  width: 39px;
  height: 39px;
}
.route-meta {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 22px 15px;
}
.route-meta span {
  padding: 0 4px;
}
.sheet-tabs {
  display: flex;
  border-block: 1px solid var(--line);
  padding: 0 22px;
  gap: 24px;
}
.sheet-tabs button {
  color: var(--muted);
  font-size: 14px;
  padding: 11px 2px;
  border-bottom: 2px solid transparent;
}
.sheet-tabs .chosen {
  border-bottom-color: var(--accent);
  color: var(--ink);
}
.stops {
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #525252 transparent;
}
.stop {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid #353535;
}
.stop.selected {
  background: #2a2c28;
  box-shadow: inset 3px 0 var(--accent);
}
.stop-number {
  font: 600 13px var(--sans);
  font-variant-numeric: tabular-nums;
  color: #ababaa;
}
.selected .stop-number,
.visited .stop-number {
  color: var(--accent);
}
.thumb {
  width: 44px;
  height: 46px;
  border-radius: 3px;
  object-fit: cover;
}
.stop-copy {
  display: grid;
  gap: 2px;
  flex: 1;
}
.stop-name {
  font-size: 15px;
}
.stop small {
  font-size: 12px;
  color: var(--muted);
}
.stop i {
  width: 14px;
}
.progress-area {
  padding: 14px 22px max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.progress-area > div {
  display: flex;
  justify-content: space-between;
}
.progress-area #progress-line {
  margin-top: 8px;
  gap: 5px;
}
#progress-line span {
  height: 3px;
  background: #414141;
  flex: 1;
}
#progress-line .done {
  background: var(--accent);
}
#map-panel {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #252525;
}
#map-graphic,
#map-graphic svg {
  width: 100%;
  height: 100%;
}
.map-key {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #191919e6;
  font-size: 11px;
}
.map-key span {
  width: 18px;
  border-top: 2px dashed var(--accent);
}
.map-key b {
  border-radius: 50%;
  background: var(--accent);
  width: 7px;
  height: 7px;
}
.map-stop {
  cursor: pointer;
}
.map-stop:hover circle,
.map-stop:focus circle {
  stroke: white;
}
.dialog-shell {
  position: relative;
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 1;
}
.dialog-photo {
  width: 100%;
  height: clamp(175px, 28dvh, 260px);
  object-fit: cover;
  display: block;
}
.dialog-copy {
  padding: 24px 23px max(28px, env(safe-area-inset-bottom));
}
.dialog-copy h2 {
  margin: 9px 30px 16px 0;
}
.dialog-copy h3 {
  margin: 18px 0 4px;
  font-size: 16px;
}
.dialog-copy p {
  line-height: 1.6;
  margin: 10px 0;
  color: #dededc;
}
.dialog-copy a {
  color: #dce5d1;
}
.source-links {
  display: grid;
  gap: 4px;
  font-size: 13px;
  margin-top: 16px;
}
.dialog-actions,
.guide-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.guide-links {
  justify-content: start;
  flex-wrap: wrap;
  font-size: 14px;
}
.next,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 15px;
  font-size: 14px;
  border-radius: 24px;
  font-weight: 600;
}
.next {
  background: var(--accent);
  color: #25251e;
}
.secondary {
  border: 1px solid #494949;
}
.next i,
.secondary i {
  width: 16px;
  height: 16px;
}
@media (min-width: 700px) {
  .hud {
    padding: 25px 32px 0;
    align-items: center;
  }
  .hud-button:first-child {
    width: auto;
    padding: 0 16px;
    justify-self: start;
    gap: 9px;
    border-radius: 24px;
  }
  .hud-button span {
    display: inline;
    font-size: 14px;
  }
  .identity h1 {
    font-size: 24px;
  }
  .brand {
    font-size: 11px;
  }
  .scene-foot {
    inset: auto 32px 25px;
  }
  .street-address {
    font-size: 18px;
  }
  .marker {
    top: 32%;
  }
  .marker-label {
    padding: 9px 14px;
  }
  .marker-label b {
    font-size: 16px;
  }
  .marker-label small {
    font-size: 13px;
  }
  .marker-stem {
    height: 36px;
  }
  .neighbor {
    top: 20%;
  }
  .direction-bar {
    padding: 21px 32px 23px;
  }
  .direction-inner {
    max-width: none;
    gap: 16px;
  }
  .direction-icon {
    width: 47px;
    height: 47px;
  }
  .dir-text strong {
    font-size: 21px;
  }
  .dir-text span {
    font-size: 14px;
  }
  .next-stop,
  .foot-story {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    width: auto;
    padding: 0 18px;
    border-radius: 24px;
  }
  .next-stop span,
  .foot-story span {
    display: inline;
    font-size: 14px;
  }
  .ar-arrows {
    width: 82px;
  }
  .state-pill {
    font-size: 11px;
  }
  dialog {
    max-width: 525px;
    border-radius: 15px;
    margin: auto;
    max-height: 88dvh;
  }
  #drawer[open] {
    height: min(730px, 87dvh);
  }
  .drawer-head {
    padding-top: 22px;
  }
  .sheet-grip {
    display: none;
  }
}
@media (max-height: 490px) and (orientation: landscape) {
  .hud {
    padding-top: 8px;
  }
  .identity h1 {
    font-size: 22px;
  }
  .brand {
    display: none;
  }
  .direction-bar {
    padding: 10px 15px;
  }
  .scene-foot {
    bottom: 8px;
  }
  .marker {
    top: 22%;
  }
  .neighbor {
    top: 16%;
  }
  .marker-stem {
    height: 10px;
  }
  .ar-arrows {
    width: 40px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: sheet-in 0.2s ease-out;
  }
  @keyframes sheet-in {
    from {
      transform: translateY(12px);
      opacity: 0.6;
    }
  }
}

body:has(.lens) {
  overscroll-behavior: none;
}
.marker-label b {
  white-space: nowrap;
}
.direction-bar {
  touch-action: pan-x;
}
@media (max-aspect-ratio: 3/4) {
  .street-photo.first-frontage {
    object-position: 66% center;
  }
}

.setup-card {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(325px, calc(100% - 42px));
  padding: 25px 22px 12px;
  text-align: center;
  background: linear-gradient(145deg, #585853dd, #2a2a29eb);
  border: 1px solid var(--glass-edge);
  border-radius: 28px;
  box-shadow:
    0 8px 30px #0003,
    inset 0 1px 0 #ffffff14;
  backdrop-filter: blur(22px);
}
.setup-card h2 {
  font: 600 clamp(27px, 6.5vw, 32px) / 1.08 var(--sans);
  letter-spacing: -1.25px;
}
.setup-card p {
  color: #eeeeeb;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0 18px;
}
.setup-primary {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px;
  border-radius: 28px;
  background: #f6f6f2;
  color: #202020;
  font-size: 16px;
  font-weight: 650;
}
.preview-link {
  min-height: 44px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #eee;
}
.sensor-controls {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.stage.setup .marker {
  display: none;
}
@media (max-height: 500px) and (orientation: landscape) {
  .setup-card {
    width: min(400px, 58vw);
    padding: 10px 16px 0;
    top: 55%;
  }
  .setup-card h2 {
    font-size: 25px;
  }
  .setup-card p {
    font-size: 12px;
    margin: 4px 0 7px;
  }
  .setup-primary {
    min-height: 40px;
    padding: 7px;
  }
  .preview-link {
    min-height: 34px;
  }
}

.stage.setup #status,
.stage.setup .sensor-controls {
  display: none;
}
