:root {
  --bg-1: #68604D;
  --bg-2: #5a5342;
  --panel: #D5C7AD;
  --panel-strong: #F1EAD8;
  --text: #68604D;
  --text-light: #F1EAD8;
  --muted: #68604D;
  --accent: #BABE75;
  --accent-2: #BEC5A4;
  --good: #BEC5A4;
  --warn: #BABE75;
  --bad: #a08060;
  --shadow: 0 20px 45px rgba(80, 70, 50, 0.25);
  --radius: 8px;
  --node-width: 360px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(186, 190, 117, 0.15), transparent 28%),
    radial-gradient(circle at 80% 25%, rgba(190, 197, 164, 0.15), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(213, 199, 173, 0.1), transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(186,190,117,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186,190,117,0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
  pointer-events: none;
}

#viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#world {
  position: absolute;
  width: 7600px;
  height: 4200px;
  left: 0;
  top: 0;
  transform: translate(0px, 0px);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top left;
}

.connection-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.connection-line {
  fill: none;
  stroke: rgba(104, 96, 77, 0.2);
  stroke-width: 3;
  stroke-linecap: round;
}

.connection-line.active {
  stroke: url(#lineGradient);
  stroke-width: 4;
  filter: drop-shadow(0 0 6px rgba(186, 190, 117, 0.5));
}

.node {
  position: absolute;
  width: var(--node-width);
  padding: 20px;
  border-radius: var(--radius);
  background: #D5C7AD;
  border: 1.5px solid #BABE75;
  box-shadow: var(--shadow);
  transition: transform 500ms ease, opacity 500ms ease, border-color 500ms ease, box-shadow 500ms ease;
  opacity: 0.2;
  transform: scale(0.92);
}

.node.current {
  opacity: 1;
  transform: scale(1);
  border-color: #BABE75;
  background: #F1EAD8;
  box-shadow: 0 20px 45px rgba(80, 70, 50, 0.3), 0 0 20px rgba(186, 190, 117, 0.25);
}

.node.visited {
  opacity: 0.68;
  transform: scale(0.96);
}

.node.final.current {
  border-color: #BEC5A4;
  background: #F1EAD8;
  box-shadow: 0 20px 45px rgba(80, 70, 50, 0.3), 0 0 20px rgba(190, 197, 164, 0.3);
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.node-type {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #68604D;
  background: #BEC5A4;
  border: 1px solid #BABE75;
}

.node-title {
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 18px;
}

.node.final .node-title {
  font-size: 1.5rem;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-btn,
.utility-btn {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: #68604D;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  background: #BEC5A4;
  border: 1px solid #BABE75;
  text-align: left;
  box-shadow: 0 4px 10px rgba(80,70,50,0.12);
}

.option-btn:hover,
.utility-btn:hover {
  transform: translateY(-2px);
  background: #BABE75;
  box-shadow: 0 8px 16px rgba(80,70,50,0.18);
}

.option-btn:active,
.utility-btn:active {
  transform: translateY(0px) scale(0.99);
}

.option-next {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(104,96,77,0.7);
}

.final-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.utility-btn.primary {
  background: #BEC5A4;
}

.hud {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  pointer-events: none;
  z-index: 10;
}

.hud-card {
  pointer-events: auto;
  background: #D5C7AD;
  border: 1.5px solid #BABE75;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.top-panel {
  max-width: min(420px, calc(100vw - 36px));
}

.path-panel {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: min(320px, calc(100vw - 36px));
  max-height: 60vh;
}

.hud-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #68604D;
  margin-bottom: 8px;
  font-weight: 700;
}

.site-title {
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.site-subtitle,
.path-empty,
.path-item small {
  color: rgba(104,96,77,0.75);
  font-size: 0.92rem;
  line-height: 1.4;
}

.path-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.path-item {
  padding: 10px 12px;
  border-radius: 6px;
  background: #BEC5A4;
  border: 1px solid #BABE75;
  font-size: 0.93rem;
  line-height: 1.35;
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mini-btn {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: #68604D;
  background: #BEC5A4;
  border: 1px solid #BABE75;
  cursor: pointer;
  transition: 180ms ease;
}

.mini-btn:hover {
  background: #BABE75;
  transform: translateY(-1px);
}

.focus-ring {
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 999px;
  border: 1px solid rgba(186,190,117,0.25);
  box-shadow: 0 0 80px rgba(186, 190, 117, 0.08);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 900ms cubic-bezier(0.22, 1, 0.36, 1), top 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* RIGHT SIDE INFO OVERLAY */
.info-overlay {
  position: fixed;
  top: 18px;
  right: 18px;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 14px;
  pointer-events: none;
  z-index: 10;
}

.info-card {
  pointer-events: auto;
  background: #D5C7AD;
  border: 1.5px solid #BABE75;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.info-text {
  margin: 0;
  color: #68604D;
  font-size: 0.94rem;
  line-height: 1.5;
}

.video-link {
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid #BABE75;
  box-shadow: 0 10px 20px rgba(80,70,50,0.15);
  background: #BEC5A4;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(80,70,50,0.2);
  border-color: #BABE75;
}

.video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-overlay-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.08));
}

.play-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: white;
  font-size: 1.05rem;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.video-copy {
  display: grid;
  text-align: right;
  color: white;
}

.video-copy strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.video-copy span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
}

/* TWO SOCIALS PANELS - BOTTOM LEFT, SIDE BY SIDE */
.socials-panel {
  position: fixed;
  bottom: 18px;
  width: 180px;
  z-index: 11;
}

.my-socials-panel {
  left: 18px;
}

.her-socials-panel {
  left: 210px;
}

.social-links {
  display: grid;
  gap: 8px;
}

.social-links a {
  display: block;
  text-decoration: none;
  color: #68604D;
  padding: 9px 11px;
  border-radius: 6px;
  background: #BEC5A4;
  border: 1px solid #BABE75;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 4px 10px rgba(80,70,50,0.1);
  font-size: 0.88rem;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: #BABE75;
  box-shadow: 0 8px 14px rgba(80,70,50,0.15);
}

@media (max-width: 1200px) {
  .info-overlay {
    width: min(320px, calc(100vw - 36px));
  }
}

@media (max-width: 900px) {
  :root {
    --node-width: min(84vw, 340px);
  }

  .top-panel {
    max-width: min(100%, 480px);
  }

  .path-panel {
    top: auto;
    bottom: 18px;
    left: 18px;
    right: 18px;
    width: auto;
    max-height: 28vh;
    transform: none;
  }

  .info-overlay {
    top: 18px;
    right: 18px;
    width: min(300px, calc(100vw - 36px));
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding-right: 2px;
  }

  .my-socials-panel,
  .her-socials-panel {
    width: 160px;
  }

  .my-socials-panel {
    left: 18px;
  }

  .her-socials-panel {
    left: 190px;
  }
}