/* ==========================================================================
   Wandering Wojo — Hand-Drawn Aesthetic
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Patrick+Hand&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Color Palette --- */
:root {
  --white:      #FFF8F0;
  --off-white:  #FAF6EF;
  --beige:      #F5EDDF;
  --beige-dark: #E8DCC8;
  --warm-gray:  #C4BFB6;
  --mid-gray:   #999590;
  --dark-gray:  #6B6560;
  --charcoal:   #3A3632;
  --near-black: #2C2825;

  /* Accent — warm terracotta */
  --accent:       #3A3632;
  --accent-light: #6B6560;
  --terracotta:   #C1440E;
  --sage:         #7C9A7E;

  /* Semantic */
  --text-primary:   var(--near-black);
  --text-secondary: var(--charcoal);
  --text-muted:     var(--mid-gray);
  --bg-page:        var(--off-white);
  --bg-card:        var(--white);
  --bg-card-hover:  var(--white);
  --border-subtle:  var(--beige-dark);

  /* Typography */
  --font-display: 'Caveat', cursive;
  --font-body:    'Patrick Hand', cursive;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Hand-drawn border radii */
  --rough-radius:     255px 15px 225px 15px / 15px 225px 15px 255px;
  --rough-radius-alt: 15px 255px 15px 225px / 225px 15px 255px 15px;
  --rough-radius-sm:  185px 8px 165px 8px / 8px 165px 8px 185px;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out-expo);
  --transition-med: 300ms var(--ease-out-expo);
  --transition-slow: 600ms var(--ease-out-expo);
}

/* --- Dark Mode (auto-detect system theme) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --white:      #1A1817;
    --off-white:  #1E1D1B;
    --beige:      #2A2825;
    --beige-dark: #353230;
    --warm-gray:  #5A5652;
    --mid-gray:   #8A8580;
    --dark-gray:  #B0ABA5;
    --charcoal:   #D4D0CC;
    --near-black: #F0EBE3;

    --accent:       #D4D0CC;
    --accent-light: #B0ABA5;

    --bg-page: var(--off-white);
    --bg-card: var(--white);
    --bg-card-hover: var(--white);
    --border-subtle: var(--beige-dark);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.25);
  }
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle paper texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--near-black);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h4 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--near-black);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   Floating Title
   ========================================================================== */
.floating-title {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  background: var(--bg-card);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius);
  padding: 0.5rem 1rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  max-width: 300px;
  transition: box-shadow var(--transition-fast), max-width var(--transition-med);
  filter: url(#roughen);
}

.floating-title:hover {
  box-shadow: var(--shadow-lg);
}

.floating-title__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--near-black);
  user-select: none;
}

.floating-title__desc {
  display: none;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.floating-title--open .floating-title__desc {
  display: block;
}

/* Wojo illustration in panel — inline with blurb text */
.wojo-illustration--panel {
  float: right;
  width: 80px;
  margin: 0 0 var(--space-xs) var(--space-sm);
}

.floating-title__blurb {
  margin-bottom: 0.75rem;
}

/* --- Anonymous Contact Form --- */
.contact-form {
  border-top: 2px solid var(--beige-dark);
  padding-top: 0.75rem;
}

.contact-form__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--near-black);
  margin-bottom: 0.375rem;
}

.contact-form__input {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius-sm);
  padding: 0.5rem 0.625rem;
  resize: vertical;
  min-height: 60px;
  transition: border-color var(--transition-fast);
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--terracotta);
}

.contact-form__input::placeholder {
  color: var(--warm-gray);
}

.contact-form__hint {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.contact-form__btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--near-black);
  border: none;
  border-radius: var(--rough-radius-sm);
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.contact-form__btn:hover {
  opacity: 0.85;
  transform: rotate(-0.5deg);
}

.contact-form__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form__status {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-top: 0.375rem;
  text-align: center;
}

.contact-form__status--ok { color: #7C9A7E; }
.contact-form__status--err { color: #C1440E; }

/* Other projects */
.other-projects {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--beige-dark);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.other-projects__label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--medium-gray);
  letter-spacing: 0.02em;
}

.other-projects__link {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--charcoal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.other-projects__link:hover {
  color: var(--terracotta);
}

/* ==========================================================================
   Entry Navigation
   ========================================================================== */
.entry-nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius);
  padding: 4px 12px;
  box-shadow: var(--shadow-md);
  filter: url(#roughen);
}

.entry-nav__btn {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--beige-dark);
  border-radius: var(--rough-radius-sm);
  cursor: pointer;
  background: var(--bg-page);
  color: var(--mid-gray);
  transition: all var(--transition-fast);
}

.entry-nav__btn:hover {
  color: var(--near-black);
  background: var(--beige);
  transform: rotate(-1deg);
}

.entry-nav__info {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  padding: 0 0.75rem;
  white-space: nowrap;
  user-select: none;
}

/* ==========================================================================
   Map Container
   ========================================================================== */
.map-container {
  position: relative;
  width: 100%;
  height: 100vh;
  transition: height var(--transition-slow);
}


#map {
  width: 100%;
  height: 100%;
}

.map-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--beige);
  text-align: center;
  padding: var(--space-xl);
}

.map-fallback__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--charcoal);
  margin-bottom: var(--space-md);
}

.map-fallback__route {
  display: none;
}

.map-fallback__instructions {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--mid-gray);
  max-width: 380px;
  line-height: 1.6;
}

.map-fallback__instructions a {
  color: var(--charcoal);
  text-decoration: underline;
  text-decoration-color: var(--warm-gray);
  text-underline-offset: 2px;
}

/* ==========================================================================
   Cork Board Pins (Map Markers)
   ========================================================================== */
.cork-pin {
  cursor: pointer;
  transition: transform var(--transition-fast);
  z-index: 1;
}

.cork-pin:hover {
  transform: translateY(-2px) rotate(0.5deg);
  z-index: 100;
}

.cork-pin__card {
  background: var(--bg-card);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius);
  padding: 0.75rem 0.875rem;
  min-width: 160px;
  max-width: 200px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-med);
  position: relative;
  filter: url(#roughen);
}

/* Paper texture on cards */
.cork-pin__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--rough-radius);
  opacity: 0.02;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cork-pin:hover .cork-pin__card {
  box-shadow: var(--shadow-lg);
}

/* Cork pin nail */
.cork-pin__nail {
  width: 14px;
  height: 14px;
  background: var(--terracotta);
  border-radius: 50%;
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 -1px 2px rgba(0,0,0,0.15);
  z-index: 2;
}

.cork-pin__nail::after {
  content: '';
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 3px;
}

.cork-pin__type {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--rough-radius-sm);
}

.cork-pin__type--field-notes { color: var(--dark-gray); background: var(--beige); }
.cork-pin__type--dispatch { color: var(--dark-gray); background: var(--beige); }
.cork-pin__type--video-log { color: var(--dark-gray); background: var(--beige); }
.cork-pin__type--wojo-report { color: var(--dark-gray); background: var(--beige); }

.cork-pin__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--near-black);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.cork-pin__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cork-pin__date {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--mid-gray);
}

.cork-pin__number {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--warm-gray);
  letter-spacing: 0.04em;
}

/* Grouped pin — stacked card effect */
.cork-pin--grouped .cork-pin__card {
  position: relative;
}

.cork-pin--grouped .cork-pin__card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: -4px;
  bottom: -4px;
  background: var(--beige);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius-alt);
  z-index: -1;
  opacity: 0.6;
}

/* Cork pin highlighted state */
.cork-pin--highlighted {
  z-index: 200 !important;
}

.cork-pin--highlighted .cork-pin__card {
  border-color: var(--charcoal);
  box-shadow: var(--shadow-lg);
  animation: pinPulse 0.6s var(--ease-out-expo);
}

@keyframes pinPulse {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.06) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ==========================================================================
   Expanded Entry (Cork Board & Linear)
   ========================================================================== */
.entry-expanded {
  background: var(--bg-card);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius);
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-xl);
  animation: expandIn 0.4s var(--ease-out-expo) forwards;
  filter: url(#roughen);
  position: relative;
  /* Hide scrollbar so it doesn't clip outside rounded corners */
  scrollbar-width: none; /* Firefox */
}

.entry-expanded::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Paper texture on expanded entry */
.entry-expanded::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--rough-radius);
  opacity: 0.02;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: scale(0.95) rotate(-0.5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.entry-expanded__header {
  padding: var(--space-lg);
  border-bottom: 2px solid var(--beige);
}

/* Wojo illustration in expanded entry header */
.entry-expanded__header .wojo-illustration {
  float: right;
  width: 100px;
  margin: 0 0 var(--space-sm) var(--space-md);
  opacity: 0.85;
}

.wojo-illustration__img {
  width: 100%;
  height: auto;
  display: block;
}

/* Sticky header — holds close button + tab bar */
.entry-expanded__sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card);
  border-radius: var(--rough-radius) var(--rough-radius) 0 0;
}

.entry-expanded__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 11;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--mid-gray);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.entry-expanded__close:hover {
  color: var(--near-black);
  transform: rotate(-4deg) scale(1.1);
}

/* --- Entry Tabs (grouped locations) --- */
.entry-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--beige-dark);
  padding: var(--space-sm) var(--space-lg);
  padding-right: calc(var(--space-lg) + 40px); /* room for close button */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.entry-tabs::-webkit-scrollbar {
  display: none;
}

.entry-tabs__tab {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--mid-gray);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: var(--space-xs) var(--space-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.entry-tabs__tab:hover {
  color: var(--charcoal);
}

.entry-tabs__tab--active {
  color: var(--near-black);
  border-bottom-color: var(--terracotta);
  font-weight: 600;
}

.entry-expanded__type {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--rough-radius-sm);
  color: var(--dark-gray);
  background: var(--beige);
}

.entry-expanded__location {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-xs);
}

.entry-expanded__date {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-sm);
}

.entry-expanded__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--near-black);
  line-height: 1.2;
}

.entry-expanded__body {
  padding: var(--space-lg);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--charcoal);
}

.entry-expanded__body p {
  margin-bottom: var(--space-md);
  color: var(--charcoal);
}

/* --- Photos --- */
.entry-expanded__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
  padding: 0 var(--space-lg) var(--space-lg);
}

.entry-expanded__photo {
  border-radius: var(--rough-radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  border: 2px solid var(--beige-dark);
  transition: transform var(--transition-fast);
}

.entry-expanded__photo:hover {
  transform: scale(1.03) rotate(0.5deg);
}

.entry-expanded__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Single photo inline with text */
.entry-expanded__photo--inline {
  float: right;
  width: 45%;
  aspect-ratio: auto;
  margin: 0 0 var(--space-md) var(--space-md);
  border-radius: var(--rough-radius-sm);
  border: 2px solid var(--beige-dark);
  filter: url(#roughen);
}

.entry-expanded__photo--inline img {
  height: auto;
}

/* --- Video embed --- */
.entry-expanded__video {
  padding: 0 var(--space-lg) var(--space-lg);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--rough-radius-sm);
  overflow: hidden;
  background: var(--beige);
  border: 2px solid var(--beige-dark);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Wojo mood bar --- */
.wojo-mood {
  padding: var(--space-sm) var(--space-lg) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.wojo-mood__label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--mid-gray);
  white-space: nowrap;
}

.wojo-mood__bar {
  flex: 1;
  height: 6px;
  background: var(--beige);
  border-radius: var(--rough-radius);
  overflow: hidden;
}

.wojo-mood__fill {
  height: 100%;
  border-radius: var(--rough-radius);
  transition: width 0.6s var(--ease-out-expo);
}

/* --- Giscus --- */
.entry-expanded__comments {
  padding: var(--space-lg);
  border-top: 2px solid var(--beige);
}


/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(26, 24, 23, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--rough-radius-sm);
  box-shadow: var(--shadow-xl);
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius-sm);
  color: var(--charcoal);
  font-family: var(--font-display);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.lightbox__close:hover {
  background: var(--beige);
  transform: rotate(-2deg);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--beige-dark);
  border-radius: var(--rough-radius-sm);
  color: var(--charcoal);
  font-family: var(--font-display);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.lightbox__nav:hover {
  background: var(--beige);
  transform: translateY(-50%) rotate(-1deg);
}

.lightbox__nav--prev { left: var(--space-lg); }
.lightbox__nav--next { right: var(--space-lg); }

/* ==========================================================================
   Map Markers
   ========================================================================== */
.marker-visited {
  width: 12px;
  height: 12px;
  background: var(--charcoal);
  border: 2px solid var(--white);
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.marker-visited:hover {
  transform: scale(1.3);
}

.marker-current {
  width: 18px;
  height: 18px;
  background: var(--near-black);
  border: 2px solid var(--white);
  border-radius: 50%;
  cursor: pointer;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: var(--shadow-md);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

.marker-planned {
  width: 8px;
  height: 8px;
  background: transparent;
  border: 2px solid var(--warm-gray);
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.marker-planned:hover {
  transform: scale(1.4);
  border-color: var(--charcoal);
}

/* --- Mapbox Popup Overrides --- */
.mapboxgl-popup-content {
  background: var(--bg-card) !important;
  color: var(--near-black) !important;
  border: 2px solid var(--beige-dark) !important;
  border-radius: var(--rough-radius) !important;
  padding: var(--space-md) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: var(--font-body);
  max-width: 220px;
}

.mapboxgl-popup-tip {
  border-top-color: var(--bg-card) !important;
}

.mapboxgl-popup-close-button {
  color: var(--mid-gray) !important;
  font-size: 1.125rem !important;
  right: 6px !important;
  top: 6px !important;
}

.popup-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.popup-date {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--mid-gray);
  margin-bottom: 0.375rem;
}

.popup-note {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--dark-gray);
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--beige-dark);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--warm-gray);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .floating-title {
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 0.375rem 0.75rem;
    max-width: calc(100vw - 2rem);
  }

  .floating-title__name {
    font-size: 1.1rem;
  }

  .floating-title__desc {
    font-size: 0.95rem;
  }

  .entry-nav {
    bottom: 1.25rem;
  }

  .entry-expanded {
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 40px);
    border-radius: 30px 8px 25px 8px / 8px 25px 8px 30px;
  }

  .entry-expanded::after {
    border-radius: 30px 8px 25px 8px / 8px 25px 8px 30px;
  }

  .entry-expanded__sticky-header {
    border-radius: 30px 8px 0 0 / 8px 25px 0 0;
  }

  .entry-tabs {
    padding: var(--space-xs) var(--space-md);
    padding-right: calc(var(--space-md) + 40px);
  }

  .entry-tabs__tab {
    font-size: 0.9rem;
    padding: var(--space-xs) var(--space-sm);
  }

  .entry-expanded__header .wojo-illustration {
    width: 72px;
  }

  .wojo-illustration--panel {
    width: 64px;
  }

  .cork-pin__card {
    min-width: 130px;
    max-width: 160px;
    padding: 0.5rem;
  }

  .cork-pin__title {
    font-size: 1.05rem;
  }

  .lightbox__nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .lightbox__nav--prev { left: var(--space-sm); }
  .lightbox__nav--next { right: var(--space-sm); }
}

@media (max-width: 480px) {
  .entry-expanded__header {
    padding: var(--space-md);
  }

  .entry-expanded__body {
    padding: var(--space-md);
    font-size: 1rem;
  }

  .entry-expanded__photos {
    grid-template-columns: 1fr 1fr;
    padding: 0 var(--space-md) var(--space-md);
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden { display: none !important; }

.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
