:root {
  color-scheme: dark;
  --canvas-bg: #0f0f0f;
  --grid: rgba(161, 161, 170, .15);
  --line: rgba(123, 123, 123, .78);
  --cyan: #66ffff;
  --scale: 1;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 320px; min-height: 100%; background: #020202; }

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: Inter, Arial, "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.viewport {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.canvas-shell {
  width: min(969px, 100vw);
  height: min(428px, calc(100vw * 428 / 969));
  position: relative;
}

.canvas {
  width: 969px;
  height: 428px;
  position: absolute;
  inset: 0 auto auto 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px #525252;
  background-color: var(--canvas-bg);
  background-image: radial-gradient(circle, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  transform: scale(var(--scale));
  transform-origin: top left;
  isolation: isolate;
  user-select: none;
}

.connections {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.connections path {
  fill: none;
  stroke: var(--line);
  stroke-width: .75;
  vector-effect: non-scaling-stroke;
  transition: stroke .25s ease, opacity .25s ease;
}

.image-node {
  position: absolute;
  z-index: 2;
  width: 402px;
  height: 225px;
  overflow: hidden;
  border: 1px solid #7b7b7b;
  border-radius: 15px;
  pointer-events: none;
}
.image-node > img { width: 100%; height: 100%; display: block; border-radius: 14px; object-fit: cover; pointer-events: none; }

.image-node--city { left: -268px; top: -136px; opacity: .8; }
.image-node--city > img { object-position: 50% 78%; }
.image-node--hero { left: 288px; top: -68px; }
.image-node--hero > img { object-position: center; }
.image-node--left { left: -243px; top: 246px; opacity: .82; }
.image-node--left > img { object-position: 52% center; }
.image-node--right { left: 802px; top: 133px; opacity: .6; }
.image-node--right > img { position: relative; left: 0; transform: scaleX(-1); object-position: center; }

.node-label {
  position: absolute;
  z-index: 3;
  left: 802px;
  top: 109px;
  height: 19px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
  white-space: nowrap;
}
.node-label img { width: 13px; height: 13px; opacity: .58; filter: grayscale(1); }

.comment-group {
  position: absolute;
  z-index: 8;
  left: 192px;
  top: 136px;
  width: 376px;
  height: 106px;
  pointer-events: none;
}

.comment-author {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 50%;
  background: #f5f5f5;
  box-shadow: 0 5px 14px rgba(0,0,0,.28);
}
.comment-author img { position: absolute; width: 108px; height: 70px; left: -51px; top: -2px; max-width: none; object-fit: cover; }

.comment-box {
  position: absolute;
  left: 79px;
  top: 0;
  width: 297px;
  height: 106px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(17,17,17,.98), rgba(6,25,28,.92));
  box-shadow: 0 14px 35px rgba(0,0,0,.24);
  backdrop-filter: blur(13px);
}

.comment-line { position: absolute; left: 17px; top: 13px; margin: 0; display: flex; align-items: center; gap: 5px; font-size: 20px; line-height: 30px; font-weight: 500; white-space: nowrap; }
.comment-line span:first-child { color: var(--cyan); }
.comment-line span:last-child { color: #ededed; font-weight: 400; }

.send-comment {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.send-comment img { width: 100%; height: 100%; }

.presence {
  position: absolute;
  z-index: 9;
  height: 53px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,.2));
  transition: transform .38s cubic-bezier(.18,.89,.32,1.28), filter .3s ease;
}
.presence--cynthia:hover { transform: translateY(-3px) scale(1.018); filter: drop-shadow(0 8px 14px rgba(0,0,0,.28)); }
.presence--cynthia:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.presence--cynthia.is-clicked { animation: bubble-click .58s cubic-bezier(.18,.89,.32,1.28); }

.presence--braxton { left: 155px; top: 272px; width: 177px; pointer-events: none; cursor: default; transition: none; }
.presence--cynthia { left: 0; top: 0; width: 180px; }

.presence-traveler--cynthia {
  position: absolute;
  z-index: 9;
  left: 569px;
  top: 327px;
  width: 215px;
  height: 53px;
  animation: cynthia-group-drift 8s ease-in-out infinite;
  will-change: transform;
}

.presence-pill {
  position: absolute;
  top: 0;
  height: 53px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 6px;
  border-radius: 28px;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.presence-pill--cyan { left: 0; width: 177px; color: #050505; background: var(--cyan); }
.presence-pill--white { left: 0; width: 180px; color: #0f0f0f; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.13); }

.presence-avatar { width: 41px; height: 41px; position: relative; flex: 0 0 auto; overflow: hidden; border-radius: 50%; }
.presence-avatar img { position: absolute; max-width: none; pointer-events: none; }
.presence-avatar--braxton { background: #302117; }
.presence-avatar--braxton img { width: 76px; height: 94px; left: -21px; top: -12px; object-fit: cover; }
.presence-avatar--cynthia { background: #1f2e3d; }
.presence-avatar--cynthia img { width: 60px; height: 59px; left: -9px; top: -18px; object-fit: cover; }

.floating-cursor {
  position: absolute;
  z-index: 10;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  pointer-events: none;
  will-change: transform;
  offset-anchor: 0 0;
  offset-rotate: 0deg;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
.floating-cursor--braxton {
  left: 122px;
  top: 256px;
  width: 35px;
  height: 35px;
  offset-path: none;
  offset-rotate: 0deg;
  animation: none;
  transform: rotate(-45deg);
  will-change: auto;
}
.floating-cursor--cynthia {
  left: 181px;
  top: -19px;
  width: 35px;
  height: 35px;
  offset-path: none;
  offset-rotate: 0deg;
  animation: none;
  transform: rotate(-45deg);
  will-change: auto;
}

@keyframes bubble-click {
  0%, 100% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-5px) scale(1.045); }
  68% { transform: translateY(1px) scale(.992); }
}
@keyframes cynthia-group-drift {
  0%, 100% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(-85px,-55px,0); }
  52% { transform: translate3d(75px,-100px,0); }
  78% { transform: translate3d(115px,-25px,0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
