:root {
  --cream: #f6f1e7;
  --green: #b7d6a3;
  --sky: #a7d8f0;
  --peach: #f7c6a3;
  --yellow: #ffd66b;
  --brown: #3b2f2f;
  --path: #d9c2a0;
  --gray: #cfc8bd;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--cream);
  color: var(--brown);
  font-family: 'VT323', monospace;
  font-size: 20px;
  image-rendering: pixelated;
  overflow-x: hidden;
}

/* ---------- header ---------- */

.page-header {
  text-align: center;
  padding: 32px 16px 24px;
}

.title {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 12px;
  color: var(--brown);
}

.subtitle {
  margin: 0;
  font-size: 20px;
  color: #6b5a4a;
}

/* ---------- map container ---------- */

.map {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 2400px; /* scattered destinations */
  background:
    linear-gradient(180deg, var(--sky) 0%, var(--green) 12%, var(--green) 88%, var(--peach) 100%);
  overflow: hidden;
  border-left: 4px solid var(--brown);
  border-right: 4px solid var(--brown);
}

@media (min-width: 520px) {
  .map {
    border-left: 6px solid var(--brown);
    border-right: 6px solid var(--brown);
    border-radius: 8px;
  }
}

/* pixel path */

.map-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.path-line {
  fill: none;
  stroke: var(--path);
  stroke-width: 2.6;
  stroke-linecap: square;
  stroke-dasharray: 3 3;
  shape-rendering: crispEdges;
}

.path-line--branch {
  stroke-width: 1.8;
  stroke-dasharray: 2 4;
  opacity: 0.7;
}

/* ---------- node sections ---------- */

.node-wrap {
  position: absolute;
  width: 100%;
  z-index: 2;
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 3px solid var(--brown);
  border-radius: 10px;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 3px 3px 0 rgba(59, 47, 47, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.node:hover,
.node:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
}

.node--big {
  width: 80px;
  height: 80px;
  box-shadow: 5px 5px 0 rgba(59, 47, 47, 0.25);
}

.node--final {
  box-shadow: 6px 6px 0 rgba(59, 47, 47, 0.3);
}

/* state: locked */
.node--locked {
  background: var(--gray);
  filter: grayscale(0.6) brightness(0.95);
}

/* state: active */
.node--active {
  background: var(--yellow);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

/* state: completed */
.node--completed {
  background: var(--peach);
}

.node--glow.node--active,
.node--glow {
  position: relative;
}

.node__stamp {
  display: none;
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--green);
  border: 2px solid var(--brown);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--brown);
}

.node--completed .node__stamp {
  display: flex;
}

.node__icon {
  width: 36px;
  height: 36px;
  display: block;
}

.node--big .node__icon {
  width: 46px;
  height: 46px;
}

.node__icon svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.node__label {
  position: absolute;
  top: calc(100% + 38px);
  transform: translateX(-50%);
  max-width: 116px;
  text-align: center;
  font-size: 15px;
  line-height: 1.2;
  background: var(--cream);
  border: 2px solid var(--brown);
  border-radius: 6px;
  padding: 2px 8px;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 107, 0.6), 3px 3px 0 rgba(59,47,47,0.25); }
  50% { box-shadow: 0 0 0 10px rgba(255, 214, 107, 0), 3px 3px 0 rgba(59,47,47,0.25); }
}

@keyframes shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -50%) rotate(-4deg); }
  75% { transform: translate(-50%, -50%) rotate(4deg); }
}

.node--shake {
  animation: shake 0.3s ease-in-out;
}

/* ---------- ambient decor ---------- */

.deco {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.cloud {
  width: 48px;
  height: 18px;
  background: #ffffff;
  border: 3px solid var(--brown);
  border-radius: 2px;
  box-shadow:
    8px -8px 0 -2px #ffffff,
    8px -8px 0 0px var(--brown),
    -8px -4px 0 -4px #ffffff;
  opacity: 0.85;
  animation: drift 30s linear infinite;
}

.cloud--small {
  width: 32px;
  height: 12px;
  animation-duration: 22s;
  animation-direction: reverse;
}

@keyframes drift {
  0% { transform: translateX(0); }
  50% { transform: translateX(20px); }
  100% { transform: translateX(0); }
}

.tree {
  width: 18px;
  height: 26px;
}

.tree::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 7px;
  width: 4px;
  height: 10px;
  background: #8a6a4a;
  border: 1px solid var(--brown);
}

.tree::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 18px;
  height: 16px;
  background: #8fbf78;
  border: 2px solid var(--brown);
  border-radius: 2px;
}

.tree--small {
  width: 14px;
  height: 20px;
  transform: scale(0.8);
}

.rock {
  width: 24px;
  height: 14px;
  background: var(--gray);
  border: 2px solid var(--brown);
  border-radius: 6px 8px 3px 4px;
}

.bush {
  width: 28px;
  height: 16px;
  background: #8fbf78;
  border: 2px solid var(--brown);
  border-radius: 50% 50% 35% 35%;
}

.flower {
  width: 10px;
  height: 10px;
  background: var(--peach);
  border: 2px solid var(--brown);
  border-radius: 50%;
}

.flower::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  background: var(--yellow);
  border-radius: 50%;
}

.pond {
  width: 60px;
  height: 32px;
  background: var(--sky);
  border: 3px solid var(--brown);
  border-radius: 50%;
  opacity: 0.85;
}

.signpost {
  width: 4px;
  height: 24px;
  background: #8a6a4a;
  border: 1px solid var(--brown);
}

.signpost::after {
  content: "?";
  position: absolute;
  top: -16px;
  left: -8px;
  width: 18px;
  height: 14px;
  background: var(--yellow);
  border: 2px solid var(--brown);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sparkle {
  width: 10px;
  height: 10px;
  top: -6px;
  right: -6px;
  z-index: 3;
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  background: var(--yellow);
  border: 1px solid var(--brown);
}

.sparkle::before {
  top: 4px;
  left: 0;
  width: 10px;
  height: 2px;
}

.sparkle::after {
  top: 0;
  left: 4px;
  width: 2px;
  height: 10px;
}

.sparkle {
  animation: twinkle 1.6s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- companions (snorlax / wooper) ---------- */

.companion {
  position: absolute;
  width: 16px;
  height: 14px;
  border: 2px solid var(--brown);
  border-radius: 50% 50% 40% 40%;
  bottom: -10px;
}

.companion--snorlax {
  left: -22px;
  background: #6b6f80;
}

.companion--wooper {
  right: -22px;
  background: var(--sky);
}

/* ---------- overlay + memory card ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(59, 47, 47, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.memory-card {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 480px;
  background: var(--cream);
  background-image: radial-gradient(rgba(59,47,47,0.04) 1px, transparent 1px);
  background-size: 10px 10px;
  border: 3px solid var(--brown);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 24px;
  box-shadow: 0 -4px 0 rgba(59,47,47,0.15);
  transition: transform 0.35s ease;
  z-index: 11;
}

.memory-card.is-open {
  transform: translate(-50%, 0);
}

.memory-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent var(--path) transparent transparent;
  filter: drop-shadow(-1px 1px 0 rgba(59,47,47,0.3));
}

.memory-card::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 36px;
  width: 64px;
  height: 22px;
  background: repeating-linear-gradient(45deg, rgba(167,216,240,0.65) 0 6px, rgba(247,198,163,0.65) 6px 12px);
  border: 1px solid rgba(59,47,47,0.25);
  transform: rotate(-4deg);
}

.memory-card__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--brown);
  cursor: pointer;
}

.memory-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

.memory-card__icon svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.memory-card__title {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  margin: 0 0 8px;
}

.memory-card__date {
  margin: 0 0 12px;
  color: #8a7a68;
  font-size: 16px;
}

.memory-card__text {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
}

.memory-card__reflection {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--yellow);
  border: 2px solid var(--brown);
  border-radius: 8px;
  font-style: italic;
  font-size: 18px;
  display: none;
}

.memory-card__photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.memory-card__photos img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 2px solid var(--brown);
  border-radius: 6px;
}

.memory-card__action {
  display: none;
  width: 100%;
  margin-top: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  border: 2px solid var(--brown);
  border-radius: 8px;
  background: var(--yellow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.memory-card__action:active {
  transform: scale(0.97);
}

.memory-card__link {
  display: none;
  margin-top: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--brown);
  text-decoration: none;
  border: 2px solid var(--brown);
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--green);
  text-align: center;
}

/* ---------- shared page layout ---------- */

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

.page-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0 6px;
  text-align: center;
}

.page-subtitle {
  text-align: center;
  margin: 0 0 24px;
  color: #6b5a4a;
  font-size: 20px;
}

/* ---------- nav bar ---------- */

body.has-nav {
  padding-bottom: 70px;
}

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--cream);
  border-top: 3px solid var(--brown);
  z-index: 20;
  padding: 8px 4px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--brown);
  padding: 4px 8px;
  border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-item:hover {
  transform: translateY(-2px);
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.nav-item--active {
  background: var(--yellow);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

.nav-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
}

@media (min-width: 640px) {
  body.has-nav {
    padding-bottom: 0;
    padding-top: 64px;
  }

  .nav-bar {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 3px solid var(--brown);
    justify-content: center;
    gap: 32px;
  }

  .nav-item {
    flex-direction: row;
  }

  .nav-label {
    font-size: 10px;
  }
}

/* ---------- quest log ---------- */

.quest-progress {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-align: center;
  margin-bottom: 18px;
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 3px solid var(--brown);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 3px 3px 0 rgba(59, 47, 47, 0.15);
  transition: background 0.25s ease;
}

.quest-item.is-done {
  background: var(--peach);
}

.quest-checkbox {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 3px solid var(--brown);
  border-radius: 6px;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  transition: transform 0.15s ease, background 0.2s ease;
}

.quest-checkbox:active {
  transform: scale(0.9);
}

.quest-item.is-done .quest-checkbox {
  background: var(--green);
}

.quest-label {
  flex: 1;
  font-size: 20px;
  cursor: pointer;
}

.quest-link {
  font-size: 14px;
  color: var(--brown);
  text-decoration: none;
  border-bottom: 2px solid var(--brown);
  white-space: nowrap;
}

/* ---------- memory log timeline ---------- */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-image: linear-gradient(var(--path), var(--path));
  background-size: 2px 8px;
  background-repeat: repeat-y;
}

.timeline-card {
  position: relative;
  background: var(--cream);
  background-image: radial-gradient(rgba(59,47,47,0.04) 1px, transparent 1px);
  background-size: 10px 10px;
  border: 3px solid var(--brown);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 4px 4px 0 rgba(59, 47, 47, 0.15);
}

.timeline-card::after {
  content: "";
  position: absolute;
  top: -10px;
  right: 18px;
  width: 46px;
  height: 18px;
  background: repeating-linear-gradient(-45deg, rgba(183,214,163,0.65) 0 5px, rgba(255,214,107,0.5) 5px 10px);
  border: 1px solid rgba(59,47,47,0.25);
  transform: rotate(3deg);
  pointer-events: none;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  background: var(--peach);
  border: 2px solid var(--brown);
  border-radius: 50%;
}

.timeline-card--locked::before {
  background: var(--gray);
}

.timeline-card--locked {
  opacity: 0.6;
}

.timeline-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.timeline-card__icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.timeline-card__icon svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.timeline-card__heading {
  flex: 1;
}

.timeline-card__title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  margin: 0 0 4px;
  line-height: 1.5;
}

.timeline-card__date {
  margin: 0;
  font-size: 16px;
  color: #8a7a68;
}

.timeline-card__chevron {
  font-size: 22px;
  transition: transform 0.25s ease;
}

.timeline-card.is-open .timeline-card__chevron {
  transform: rotate(180deg);
}

.timeline-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.timeline-card.is-open .timeline-card__body {
  max-height: 600px;
}

.timeline-card__body-inner {
  padding-top: 12px;
  font-size: 19px;
  line-height: 1.5;
}

.timeline-card__reflection {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--yellow);
  border: 2px solid var(--brown);
  border-radius: 8px;
  font-style: italic;
  font-size: 18px;
}

.timeline-card__photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.timeline-card__photos img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 2px solid var(--brown);
  border-radius: 6px;
  cursor: pointer;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(35, 28, 28, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border: 3px solid var(--brown);
  border-radius: 10px;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: none;
  background: none;
  font-size: 32px;
  line-height: 1;
  color: var(--cream);
  cursor: pointer;
}

.timeline-card__tags {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-chip {
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--brown);
  background: var(--sky);
}

.tag-chip--funny { background: var(--yellow); }
.tag-chip--wholesome { background: var(--green); }
.tag-chip--chaotic { background: var(--peach); }
.tag-chip--memorable { background: var(--sky); }

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border: 3px solid var(--brown);
  border-radius: 6px;
  background: var(--gray);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: scale(1.04) rotate(var(--rot, 0deg));
  box-shadow: 0 0 0 3px var(--yellow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item__icon {
  width: 36px;
  height: 36px;
  opacity: 0.5;
}

.gallery-item__icon svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 13px;
  text-align: center;
  background: rgba(246, 241, 231, 0.85);
  border-top: 2px solid var(--brown);
  padding: 2px 4px;
}

/* ---------- notes ---------- */

.note-card {
  background: var(--cream);
  border: 3px solid var(--brown);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 3px 3px 0 rgba(59, 47, 47, 0.15);
  margin-bottom: 20px;
}

.note-card--reply {
  border-style: dashed;
}

.note-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
}

.note-icon svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.note-heading {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  margin: 0 0 14px;
}

.note-text {
  font-size: 20px;
  line-height: 1.6;
  white-space: pre-line;
  margin: 0;
}

.note-input {
  width: 100%;
  min-height: 120px;
  border: 2px dashed var(--brown);
  border-radius: 8px;
  background: transparent;
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 10px;
  resize: vertical;
  color: var(--brown);
}

.note-save-btn {
  margin-top: 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 10px 16px;
  border: 2px solid var(--brown);
  border-radius: 6px;
  background: var(--green);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.note-save-btn:active {
  transform: scale(0.96);
}

.note-saved-msg {
  font-size: 14px;
  margin-top: 8px;
  color: #6b5a4a;
  display: none;
}

.note-saved-msg.is-visible {
  display: block;
}

/* ---------- trip day badge ---------- */

.trip-day-badge {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.6;
  background: var(--yellow);
  border: 2px solid var(--brown);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- mood / weather badges ---------- */

.mood-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: middle;
}

.mood-badge svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

/* ---------- sound toggle ---------- */

.sound-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border: 2px solid var(--brown);
  border-radius: 50%;
  background: var(--cream);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(59, 47, 47, 0.2);
  transition: transform 0.15s ease;
}

.sound-toggle:active {
  transform: scale(0.92);
}

/* ---------- confetti ---------- */

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--brown);
  animation: confetti-fly 0.9s ease-out forwards;
}

@keyframes confetti-fly {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    opacity: 0;
  }
}

/* ---------- walking companion ---------- */

.companion-walker {
  position: absolute;
  z-index: 4;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  transition: top 0.8s ease, left 0.8s ease;
  pointer-events: none;
}

.companion-walker__sprite {
  width: 100%;
  height: 100%;
  transform: translate(38px, 30px);
  animation: companion-bob 1.6s ease-in-out infinite;
}

.companion-walker__sprite svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

@keyframes companion-bob {
  0%, 100% { transform: translate(38px, 30px) translateY(0); }
  50% { transform: translate(38px, 30px) translateY(-4px); }
}

/* ---------- polaroid photo frames ---------- */

.polaroid {
  display: inline-block;
  background: #ffffff;
  border: 1px solid var(--brown);
  border-radius: 2px;
  padding: 4px 4px 14px;
  box-shadow: 2px 3px 0 rgba(59, 47, 47, 0.18);
  position: relative;
  transform: rotate(var(--rot, -2deg));
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 26px;
  height: 12px;
  background: rgba(255, 214, 107, 0.65);
  border: 1px solid rgba(59, 47, 47, 0.25);
}

.polaroid img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: none;
  border-radius: 0;
}
