:root {
  --red: #e31c23;
  --orange: #ff6b00;
  --yellow: #ffd700;
  --teal: #00b4c8;
  --pink: #ff3e8a;
  --cream: #fffbf0;
  --white: #ffffff;
  --dark: #1a0a00;
  --brown: #7a3b10;
  --green: #00815F;
  --diner-bg: #1a0800;
  --diner-accent: #cc3300;
  --sidebar-bg: #2a1208;
  --sidebar-panel: #3a1800;
  --sidebar-panel-soft: #4c240e;
  --sidebar-stripe: rgba(255, 214, 128, 0.17);
}

@font-face {
  font-family: 'Love Is Amour';
  src: url('../assets/fonts/Love%20Is%20Amour.ttf') format('truetype');
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--yellow);
  color: var(--dark);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0px,
    var(--yellow) 18px,
    #ffca00 18px,
    #ffca00 20px
  );
}

h1,
h2,
h3,
.tagline,
.place-item .name {
  font-family: 'Lilita One', cursive;
}

/* ── Loading Overlay ─────────────────────────────────────── */

#loading-overlay {
  position: fixed;
  inset: 0;
  background: #1a0800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-burger {
  font-size: 30vw;
  display: block;
  animation: burgerWobble 1s ease-in-out infinite;
  line-height: 1;
  margin-bottom: 0;
}

.loading-title {
  font-family: 'Lilita One', cursive;
  font-size: 6vw;
  color: var(--yellow);
  text-shadow:
    3px 3px 0 var(--red),
    6px 6px 12px rgba(255, 100, 0, 0.4);
  letter-spacing: 0.03em;
  margin: 0;
}

.loading-sub {
  color: var(--orange);
  margin-top: 1vw;
  font-size: 2vw;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: pulseFade 1.4s ease-in-out infinite;
}

@keyframes burgerWobble {
  0%,
  100% {
    transform: rotate(-12deg) scale(1);
  }
  50% {
    transform: rotate(12deg) scale(1.25);
  }
}

@keyframes pulseFade {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ── Header ─────────────────────────────────────────────── */

#header {
  position: relative;
  text-align: center;
  border-bottom: 3px solid var(--white);
  background: var(--red);
  min-height: 76px;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: 0 0.5rem;
}

#header-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 215, 0, 0.18) 0 2px, transparent 2px 30px),
    linear-gradient(0deg, rgba(26, 10, 0, 0.12) 0 2px, transparent 2px 28px);
  pointer-events: none;
}

#header-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.25rem 0.55rem 1rem;
}

#header h1 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.32rem;
  font-size: 2.35rem;
  color: var(--yellow);
  text-shadow:
    3px 3px 0 var(--dark),
    -1px -1px 0 #8b2000,
    0 0 20px rgba(255, 180, 0, 0.45);
  letter-spacing: 0.02em;
  animation: neonGlow 4s ease-in-out infinite;
}

.brand-burger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.35rem;
  flex-shrink: 0;
  filter: drop-shadow(2px 2px 0 var(--dark));
  transition: filter 0.15s, transform 0.15s;
}

.brand-burger-btn:hover {
  filter: drop-shadow(3px 3px 0 var(--dark));
  transform: rotate(-4deg) scale(1.08);
}

.brand-burger-btn.active {
  filter: drop-shadow(3px 3px 0 var(--red));
}

/* burger icon styles moved to css/icons.css */

.sodermalm-separator {
  display: inline-block;
  font-family: 'Love Is Amour', 'Lilita One', cursive;
  font-size: 1.45em;
  font-weight: 400;
  line-height: 0.72;
  color: var(--cream);
  transform: translateY(0.09em);
  text-shadow:
    2px 2px 0 var(--dark),
    0 0 16px rgba(255, 215, 0, 0.42);
}

#header .sodermalm-word {
  display: inline-block;
  font-family: 'Love Is Amour', 'Lilita One', cursive;
  font-size: 1.65em;
  font-weight: 400;
  line-height: 0.72;
  color: var(--cream);
  transform: translateY(0.08em);
  text-shadow:
    2px 2px 0 var(--dark),
    0 0 16px rgba(255, 215, 0, 0.42);
}

@keyframes neonGlow {
  0%,
  100% {
    text-shadow:
      3px 3px 0 var(--dark),
      0 0 12px rgba(255, 180, 0, 0.3);
  }
  50% {
    text-shadow:
      3px 3px 0 var(--dark),
      0 0 28px rgba(255, 200, 0, 0.65),
      0 0 50px rgba(255, 100, 0, 0.25);
  }
}

.menu-count {
  display: block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.35rem 0.7rem;
  border-radius: 5px;
  border: 2px solid var(--dark);
  box-shadow: 2px 2px 0 var(--dark);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* burger child styles moved to css/icons.css */

#sidebar-close {
  display: none;
}

.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--dark);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--dark);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  padding: 3px 10px;
  transition:
    background 0.15s,
    transform 0.12s,
    box-shadow 0.12s;
}

.close-btn:hover {
  background: var(--orange);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--dark);
}

/* ── Layout ──────────────────────────────────────────────── */

main {
  display: flex;
  flex: 1;
  min-height: 0;
  border-top: 3px solid var(--dark);
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────── */

#sidebar {
  width: 310px;
  min-width: 270px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  border-right: 4px solid var(--diner-accent);
  border-image: repeating-linear-gradient(
      0deg,
      var(--orange) 0px,
      var(--orange) 8px,
      var(--cream) 8px,
      var(--cream) 16px
    )
    1 stretch;
  border-image-slice: 1;
}

#sidebar-header {
  flex-shrink: 0;
  background:
    repeating-linear-gradient(90deg, var(--sidebar-stripe) 0 8px, transparent 8px 16px),
    var(--sidebar-panel);
}

.sidebar-header-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

#sidebar-checkered {
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    var(--orange) 0px,
    var(--orange) 8px,
    var(--cream) 8px,
    var(--cream) 16px
  );
  opacity: 0.72;
}

#sidebar-title {
  text-align: center;
  font-family: 'Lilita One', cursive;
  font-size: 1.05rem;
  color: var(--yellow);
  padding: 0.45rem 1rem 0.4rem;
  letter-spacing: 0.06em;
  text-shadow:
    2px 2px 0 #5a1800,
    0 0 12px rgba(255, 180, 0, 0.25);
}

#sidebar-search-wrap {
  flex-shrink: 0;
  padding: 0.5rem;
  background:
    repeating-linear-gradient(90deg, var(--sidebar-stripe) 0 8px, transparent 8px 16px),
    var(--sidebar-panel);
  border-bottom: 3px solid var(--sidebar-panel);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
}

#search {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--dark);
  border-radius: 5px;
  background: var(--cream);
  color: var(--dark);
  font-size: 0.9rem;
  outline: none;
  font-weight: 600;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
#search:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

#search::placeholder {
  color: #9a8870;
}

#search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--red);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  cursor: pointer;
  opacity: 0.9;
  margin-right: 2px;
}

#search::-webkit-search-cancel-button:hover {
  opacity: 1;
}

#search::-ms-clear {
  display: none;
}

/* ── Price Sort Toggle ── */

#sidebar-sort-wrap {
  flex-shrink: 0;
  padding: 0 0.5rem 0.35rem;
}

.sidebar-sort-btn {
  display: flex;
  align-items: center;
  width: 100%;
  border: 3px solid var(--dark);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--dark);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, var(--sidebar-stripe) 0 8px, transparent 8px 16px),
    var(--sidebar-panel);
  color: var(--yellow);
  padding: 0.35rem 0.6rem;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.sidebar-sort-btn:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--dark);
  color: #fff;
  text-shadow: 0 0 4px var(--yellow), 0 0 8px var(--yellow);
}

.sidebar-sort-btn:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 #2a1208;
}

.sort-light {
  transition: opacity 0.2s;
}

.sort-spacer {
  flex: 1;
}

.sort-arrow {
  display: flex;
  gap: 0.25rem;
  font-size: 1.3rem;
  line-height: 1;
  margin-left: 0.3rem;
}

.sort-arrow-asc,
.sort-arrow-desc {
  transition: opacity 0.2s;
}

/* ── Beverage Toggle ── */

.beverage-toggle {
  display: block;
  width: 100%;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--yellow);
  padding: 0;
}

.beverage-toggle:hover .beverage-switch {
  border-color: var(--yellow);
}

.beverage-toggle-label {
  display: block;
  color: var(--yellow);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.beverage-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  background: #2a1208;
  border: 2px solid #2a1208;
  border-radius: 5px;
  padding: 0.22rem;
}

.beverage-option {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
  transition:
    color 0.18s ease,
    transform 0.18s ease,
    text-shadow 0.18s ease;
}

/* ── The thumb: a clear glass cylinder lying on its side ── */
.beverage-thumb {
  position: absolute;
  z-index: 1;
  top: 0.22rem;
  bottom: 0.22rem;
  left: 0.22rem;
  width: calc(50% - 0.345rem);
  border-radius: 6px;
  overflow: hidden;
  /* empty-glass tint + tube shading: top sheen, belly, bottom shadow */
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.04) 24%,
      rgba(0, 0, 0, 0.08) 72%,
      rgba(0, 0, 0, 0.22) 100%
    ),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32),
    2px 2px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.32s cubic-bezier(0.5, 0.05, 0.3, 1);
}

.beverage-toggle[data-bev='beer'] .beverage-thumb {
  transform: translateX(calc(100% + 0.25rem));
}

/* The liquid body fills the whole glass; its TOP edge is carved into a wavy
   surface via clip-path (set in JS). Only the surface deforms — the body stays
   put — which is what real sloshing looks like (a travelling surface wave, not
   a rocking block). Default = a flat surface with a little headspace. */
.bev-fill {
  position: absolute;
  inset: 0;
  clip-path: polygon(0% 27%, 100% 27%, 100% 100%, 0% 100%);
  will-change: clip-path;
}

.beverage-toggle[data-bev='soda'] .bev-fill {
  background: linear-gradient(
    180deg,
    #b3631f 0%,
    #7a3b10 30%,
    #481d07 72%,
    #280f03 100%
  );
}

.beverage-toggle[data-bev='beer'] .bev-fill {
  background: linear-gradient(
    180deg,
    #ffe87a 0%,
    #ffc21e 32%,
    #f0a000 72%,
    #c87e00 100%
  );
}

/* Foam / fizz band that hugs the wavy surface (clip-path band set in JS). */
.bev-foam {
  position: absolute;
  inset: 0;
  clip-path: polygon(0% 16%, 100% 16%, 100% 30%, 0% 30%);
  pointer-events: none;
  will-change: clip-path;
}

/* Beer: a creamy white head */
.beverage-toggle[data-bev='beer'] .bev-foam {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #fffaf0 55%,
    rgba(255, 247, 226, 0.65) 100%
  );
}

/* Soda: a thin translucent fizz line */
.beverage-toggle[data-bev='soda'] .bev-foam {
  background: linear-gradient(
    180deg,
    rgba(255, 244, 226, 0.92) 0%,
    rgba(220, 160, 100, 0.45) 100%
  );
}

/* Rising carbonation bubbles inside the liquid */
.bev-bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bev-bubbles i {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.6);
  opacity: 0;
  animation: bev-bubble-rise 2.4s ease-in infinite;
}

.bev-bubbles i:nth-child(1) {
  left: 12%;
  animation-delay: 0s;
  animation-duration: 2.1s;
}
.bev-bubbles i:nth-child(2) {
  left: 22%;
  width: 2px;
  height: 2px;
  animation-delay: 0.6s;
  animation-duration: 2.7s;
}
.bev-bubbles i:nth-child(3) {
  left: 31%;
  animation-delay: 1.2s;
  animation-duration: 2.4s;
}
.bev-bubbles i:nth-child(4) {
  left: 41%;
  width: 2px;
  height: 2px;
  animation-delay: 0.3s;
  animation-duration: 3s;
}
.bev-bubbles i:nth-child(5) {
  left: 50%;
  animation-delay: 1.6s;
  animation-duration: 2.2s;
}
.bev-bubbles i:nth-child(6) {
  left: 59%;
  width: 2px;
  height: 2px;
  animation-delay: 0.9s;
  animation-duration: 2.9s;
}
.bev-bubbles i:nth-child(7) {
  left: 68%;
  animation-delay: 1.9s;
  animation-duration: 2.5s;
}
.bev-bubbles i:nth-child(8) {
  left: 77%;
  width: 2px;
  height: 2px;
  animation-delay: 0.5s;
  animation-duration: 2.3s;
}
.bev-bubbles i:nth-child(9) {
  left: 86%;
  animation-delay: 1.4s;
  animation-duration: 2.8s;
}
.bev-bubbles i:nth-child(10) {
  left: 94%;
  width: 2px;
  height: 2px;
  animation-delay: 2.1s;
  animation-duration: 2.6s;
}

@keyframes bev-bubble-rise {
  0% {
    bottom: 4%;
    opacity: 0;
    transform: translateX(0);
  }
  15% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.7;
  }
  100% {
    bottom: 88%;
    opacity: 0;
    transform: translateX(2px);
  }
}

/* Glossy horizontal highlight — light skimming the top of the cylinder */
.bev-shine {
  position: absolute;
  top: 12%;
  left: 7%;
  right: 7%;
  height: 22%;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 3;
  pointer-events: none;
}

/* ── The pour + slosh is simulated in JS (setupBeverageToggle → runSlosh) ──
   A damped harmonic oscillator drives the surface tilt; CSS only defines the
   resting look. The fill's transform-origin (set above) is the pivot. */

.beverage-toggle[data-bev='soda'] .beverage-option-soda,
.beverage-toggle[data-bev='beer'] .beverage-option-beer {
  color: var(--cream);
  transform: scale(1.06);
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.6),
    1px 1px 0 rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .bev-bubbles i {
    animation: none;
  }
  .bev-crest {
    opacity: 0;
  }
}

#sidebar-featured {
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) var(--sidebar-bg);
  padding: 0.4rem 0.45rem 0;
}

#sidebar-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0.45rem 0.45rem;
}

#sidebar-list-wrap::-webkit-scrollbar {
  width: 14px;
}
#sidebar-list-wrap::-webkit-scrollbar-track {
  background: var(--sidebar-bg);
  border: 2px solid var(--sidebar-panel);
}
#sidebar-list-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ffec8b, #daa520, #b8860b);
  border: 3px solid var(--dark);
  border-radius: 2px;
}
#sidebar-list-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #fff0b3, #ffd700, #daa520);
}

/* ── Place list items ────────────────────────────────────── */

#place-list .place-item {
  min-height: 76px;
  padding: 0.62rem 0.7rem 1.7rem;
  margin-bottom: 0.42rem;
  border-radius: 6px;
  cursor: pointer;
  border-left: 5px solid var(--red);
  background: var(--cream);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
  /* entrance animation */
  opacity: 0;
  transform: translateX(-14px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    background 0.1s,
    box-shadow 0.12s;
}

#place-list .place-item.visible {
  opacity: 1;
  transform: translateX(0);
}

#place-list .place-item:hover {
  background: #fffbe6;
  transform: translateX(5px) !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}

#place-list .place-item.active {
  background: var(--yellow);
  border-left-color: var(--dark);
  transform: translateX(5px) !important;
}

#place-list .place-item.no-coords {
  opacity: 0.3 !important;
  transform: none !important;
  cursor: default;
  border-left-color: #aaa;
}

#sidebar.passport-list-mode #sidebar-featured {
  display: none;
}

#sidebar.passport-list-mode #place-list .place-item {
  border-left-color: var(--orange);
}

#sidebar.passport-list-mode #place-list .place-item.passport-open {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.18), transparent 42%), var(--cream);
}

#sidebar.passport-list-mode #place-list .place-item.passport-collected {
  background:
    repeating-linear-gradient(-12deg, rgba(148, 22, 22, 0.08) 0 7px, transparent 7px 15px), #fff0b8;
  border-left-color: var(--red);
}

#sidebar.passport-list-mode #place-list .place-item.passport-collected::after {
  content: 'PASS';
  position: absolute;
  left: 11px;
  bottom: 4px;
  color: rgba(148, 22, 22, 0.8);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-7deg);
}

#sidebar.passport-list-mode .place-stamp:not(.stamped) {
  color: rgba(158, 28, 28, 0.16);
}

#place-list .place-item .name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--dark);
  line-height: 1.16;
  padding-right: 2.5rem;
}

#place-list .place-item .address {
  font-size: 0.75rem;
  color: #665533;
  line-height: 1.25;
  margin-top: 2px;
  padding-right: 2.5rem;
}

#place-list .place-item .item-footer {
  position: absolute;
  right: 0.62rem;
  bottom: 0.45rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

#place-list .place-item .price-tag {
  display: inline-block;
  font-size: 0.69rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.26);
  opacity: 0.58;
}

/* ── Map ─────────────────────────────────────────────────── */

#map-container {
  flex: 1;
  position: relative;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
}

/* ── Language Toggle (floating on map) ────────────────────── */

.lang-toggle-floating {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  background: var(--dark);
  color: var(--cream);
  border: 4px solid var(--dark);
  border-radius: 8px;
  box-shadow:
    3px 3px 0 var(--dark),
    0 6px 16px rgba(26, 10, 0, 0.24);
  cursor: pointer;
  font-family: 'Lilita One', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition:
    transform 0.15s,
    filter 0.15s,
    box-shadow 0.15s;
  line-height: 1;
}

.lang-toggle-floating:hover {
  transform: translateY(-1px) scale(1.04);
  filter: saturate(1.12);
  box-shadow:
    4px 4px 0 var(--dark),
    0 8px 18px rgba(26, 10, 0, 0.28);
}

.lang-toggle-floating:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    1px 1px 0 var(--dark),
    0 3px 10px rgba(26, 10, 0, 0.22);
}

.lang-toggle-floating::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transform-origin: left center;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 -12px 20px rgba(0, 0, 0, 0.18);
}

.lang-flag {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  font-size: 0;
  line-height: 0;
  text-indent: -999px;
  overflow: hidden;
}

.lang-flag::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 -12px 20px rgba(0, 0, 0, 0.18);
  transform-origin: right center;
}

.lang-toggle-floating[data-lang='sv'] .lang-flag::before,
.lang-toggle-floating[data-prev-lang='sv']::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath fill='%23006aa7' d='M0 0h16v10H0z'/%3E%3Cpath fill='%23fecc00' d='M5 0h2v10H5zM0 4h16v2H0z'/%3E%3C/svg%3E")
    center / cover no-repeat;
}

.lang-toggle-floating[data-lang='en'] .lang-flag::before,
.lang-toggle-floating[data-prev-lang='en']::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cpath fill='%23012169' d='M0 0h60v30H0z'/%3E%3Cpath stroke='%23fff' stroke-width='6' d='M0 0l60 30M60 0L0 30'/%3E%3Cpath fill='%23c8102e' d='M0 0l20 10h-6L0 3zm60 0h-6L34 10h6zM0 30h6l20-10h-6zm60 0L40 20h6l14 7z'/%3E%3Cpath stroke='%23fff' stroke-width='10' d='M30 0v30M0 15h60'/%3E%3Cpath stroke='%23c8102e' stroke-width='6' d='M30 0v30M0 15h60'/%3E%3C/svg%3E")
    center / cover no-repeat;
}

.lang-toggle-floating.flag-swapping::before {
  opacity: 1;
  animation: flagFoldOut 0.46s cubic-bezier(0.55, 0, 0.25, 1) both;
}

.lang-toggle-floating.flag-swapping .lang-flag::before {
  animation: flagFoldIn 0.46s cubic-bezier(0.25, 1, 0.35, 1) both;
}

@keyframes flagFoldOut {
  0% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    filter: brightness(1);
    transform: skewX(0deg);
  }
  55% {
    opacity: 1;
    clip-path: polygon(0 0, 58% 7%, 58% 93%, 0 100%);
    filter: brightness(0.9);
    transform: skewX(-5deg);
  }
  100% {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    filter: brightness(0.78);
    transform: skewX(-8deg);
  }
}

@keyframes flagFoldIn {
  0% {
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    filter: brightness(0.78);
    transform: skewX(8deg);
  }
  45% {
    clip-path: polygon(42% 7%, 100% 0, 100% 100%, 42% 93%);
    filter: brightness(0.92);
    transform: skewX(5deg);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    filter: brightness(1);
    transform: skewX(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-toggle-floating.flag-swapping::before,
  .lang-toggle-floating.flag-swapping .lang-flag::before {
    animation: none;
  }
}

.lang-code {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 24px;
  padding: 0 5px;
  border: 2px solid var(--dark);
  border-radius: 5px;
  background: var(--red);
  color: var(--white);
  font-size: 1rem;
  text-shadow: 1px 1px 0 var(--dark);
  box-shadow: 2px 2px 0 rgba(26, 10, 0, 0.45);
}

.lang-toggle-floating[data-lang='sv'] .lang-code {
  background: var(--red);
  color: var(--white);
}

.lang-toggle-floating[data-lang='en'] .lang-code {
  background: var(--yellow);
  color: var(--dark);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.45);
}

/* ── Legend ──────────────────────────────────────────────── */

#legend {
  position: absolute;
  bottom: 20px;
  right: 16px;
  background: var(--white);
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  z-index: 1000;
  border: 3px solid var(--dark);
  box-shadow: 3px 3px 0 var(--dark);
  font-weight: 600;
}

#legend .legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--dark);
}

#legend .legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid var(--dark);
  flex-shrink: 0;
}

#legend-passport {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--white);
  border: 2.5px solid var(--dark);
  border-radius: 6px;
  width: 44px;
  height: 52px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 2px 3px 0 var(--dark);
  transition: transform 0.15s, box-shadow 0.15s;
  animation: passportBob 3s ease-in-out infinite;
}

#legend-passport:hover {
  transform: translateX(-50%) translateY(2px) scale(1.08);
  box-shadow: 3px 4px 0 var(--dark);
}

#legend-passport:active {
  transform: translateX(-50%) translateY(4px) scale(0.96);
  box-shadow: 1px 2px 0 var(--dark);
}

@keyframes passportBob {
  0%, 100% { transform: translateX(-50%) translateY(4px); }
  50% { transform: translateX(-50%) translateY(2px); }
}

/* ── Popups ──────────────────────────────────────────────── */

.leaflet-popup-content-wrapper {
  background: var(--white);
  color: var(--dark);
  border-radius: 8px;
  border: 3px solid var(--dark);
  box-shadow: 4px 4px 0 var(--dark);
  font-weight: 600;
}

.leaflet-popup-tip {
  background: var(--white);
}

.leaflet-popup-content {
  margin: 14px 4px 6px 12px;
}

.leaflet-popup-content strong {
  color: var(--red);
  font-family: 'Lilita One', cursive;
  font-size: 1rem;
}

.leaflet-popup-content em {
  display: inline-block;
  margin-top: 4px;
  background: var(--yellow);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1.5px solid var(--dark);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.popup-category-dot {
  display: inline-block;
  width: 16px;
  height: 3px;
  background: #7a3b10;
  vertical-align: top;
  border: none;
  position: relative;
  margin-top: 3px;
}
.popup-category-dot::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--dot-color);
  border-radius: 3px 3px 0 0;
}
.popup-category-dot::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--dot-color);
  border-radius: 0 0 3px 3px;
}

.leaflet-popup-content hr {
  border: none;
  border-top: 2px solid var(--dark);
  margin: 6px 0;
}

.leaflet-popup-content small {
  color: #665533;
  font-weight: 500;
}

.popup-scroll {
  max-height: 200px;
  overflow-y: auto;
}

/* ── Marker ──────────────────────────────────────────────── */

.burger-marker {
  background: none;
  border: none;
  filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.35));
  transition:
    filter 0.15s,
    opacity 0.15s,
    transform 0.3s ease;
}

.burger-marker svg {
  position: relative;
  z-index: 1;
  transform-origin: 50% 85%;
  transition: transform 0.16s ease;
}

.burger-marker-dim {
  opacity: 0.34;
  filter: saturate(0.6) drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.18));
}

.burger-marker-highlight {
  z-index: 950 !important;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.85)) drop-shadow(0 6px 10px rgba(0, 104, 56, 0.45)) drop-shadow(2px 4px 3px rgba(0, 0, 0, 0.35)) !important;
}

.burger-marker-highlight::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 54px;
  border: 4px solid #FFD700;
  border-radius: 12px;
  background:
    repeating-linear-gradient(
      0deg,
      #008751,
      #008751 8px,
      #fff 8px,
      #fff 14px
    );
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.6),
    0 0 22px rgba(255, 215, 0, 0.65),
    0 8px 16px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -52%) perspective(200px) rotateX(18deg);
  pointer-events: none;
  animation: markerTrayPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes markerPopIn {
  0% {
    transform: translateY(-18px) scale(0.5);
    opacity: 0;
  }
  65% {
    transform: translateY(4px) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes markerBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-16px) scale(1.2);
  }
  65% {
    transform: translateY(-5px) scale(1.05);
  }
  82% {
    transform: translateY(-10px) scale(1.1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.burger-marker-bounce svg {
  animation: markerBounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes markerTrayPop {
  0% {
    transform: translate(-50%, -52%) perspective(200px) rotateX(18deg) scale(0.4);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -52%) perspective(200px) rotateX(18deg) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -52%) perspective(200px) rotateX(18deg) scale(1);
    opacity: 1;
  }
}

/* ── Marker mushroom cloud ───────────────────────────────── */

.marker-mushroom {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  animation: mushroomBloom 0.7s ease-out forwards;
}

@keyframes mushroomBloom {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.2);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  70% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}

/* ── Ketchup explosion ───────────────────────────────────── */

@keyframes ketchupBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0.95;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
}

@keyframes ketchupDrop {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.5);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* ── Mascot ──────────────────────────────────────────────── */

#mascot {
  position: fixed;
  bottom: 134px;
  right: 18px;
  z-index: 1001;
  cursor: pointer;
  user-select: none;
}

#mascot-svg {
  display: block;
  width: 100px;
  height: 120px;
  filter: drop-shadow(3px 5px 5px rgba(0, 0, 0, 0.4));
  transition: filter 0.2s;
}

#mascot:hover #mascot-svg {
  filter: drop-shadow(4px 7px 8px rgba(0, 0, 0, 0.55));
}

/* Mascot SVG class animations */
.mascot-bob {
  animation: mascotBob 2.2s ease-in-out infinite;
  transform-origin: 100px 180px;
}

.mascot-hat {
  animation: hatWobble 2.2s ease-in-out infinite;
  transform-origin: 100px 47px;
}

.mascot-eye {
  animation: blink 3.8s ease-in-out infinite;
}

/* Pause all mascot animations (used for idle periods) */
#mascot.mascot-paused .mascot-bob,
#mascot.mascot-paused .mascot-hat,
#mascot.mascot-paused .mascot-eye,
#mascot.mascot-paused .mascot-arm-wave {
  animation: none !important;
}
.eye-left {
  transform-origin: 80px 72px;
}
.eye-right {
  transform-origin: 120px 72px;
  animation-delay: 0.06s;
}

.mascot-arm-wave {
  animation: armWave 0.6s ease-in-out infinite alternate;
  transform-origin: 166px 128px;
}

@keyframes mascotBob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}
@keyframes hatWobble {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}
@keyframes blink {
  0%,
  88%,
  100% {
    transform: scaleY(1);
  }
  92% {
    transform: scaleY(0.06);
  }
  96% {
    transform: scaleY(1);
  }
}
@keyframes armWave {
  0% {
    transform: rotate(-22deg);
  }
  100% {
    transform: rotate(16deg);
  }
}

/* Excited state — triggered by JS */
#mascot.excited .mascot-bob {
  animation: mascotExcited 0.35s ease-in-out 3;
}
@keyframes mascotExcited {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  30% {
    transform: translateY(-14px) rotate(4deg);
  }
  70% {
    transform: translateY(-6px) rotate(-3deg);
  }
}

/* ── Mascot speech bubble ────────────────────────────────── */

#mascot-featured {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  z-index: 1002;
}

#mascot-bubble.visible ~ #mascot-featured {
  display: none;
}

.mascot-featured-card {
  background: var(--yellow);
  color: var(--dark);
  border: 2.5px solid var(--dark);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--dark);
  max-width: 180px;
  transition: transform 0.15s, background 0.15s;
}

.mascot-featured-card:hover {
  background: var(--red);
  color: white;
  transform: translateY(-2px);
}

.mascot-featured-label {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.mascot-featured-name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 2px;
}

.mascot-featured-burger {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 1px;
  opacity: 0.85;
}

#mascot-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  right: -8px;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 8px 12px 8px 34px;
  border-radius: 12px;
  border: 2.5px solid var(--dark);
  box-shadow: 3px 3px 0 var(--dark);
  max-width: 210px;
  min-width: 140px;
}

#mascot-bubble.visible {
  display: block;
  animation: bubblePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bubblePop {
  0% {
    transform: scale(0.4) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

#mascot-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 22px;
  border: 8px solid transparent;
  border-top-color: var(--dark);
}

#mascot-dismiss {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dark);
  color: white;
  border: 2px solid var(--yellow);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#mascot-dismiss:hover {
  background: var(--red);
}

#mascot-bubble-action {
  margin-top: 6px;
}

.mascot-action-btn {
  display: inline-block;
  background: var(--dark);
  color: var(--yellow);
  border: 2px solid var(--dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition:
    background 0.12s,
    transform 0.1s;
  white-space: nowrap;
}

.mascot-action-btn:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-1px);
}

/* ── Passport Filter Toggle ─────────────────────────────── */

.passport-filter-toggle {
  display: block;
  width: 100%;
  border: 3px solid var(--dark);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--dark);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 8px, transparent 8px 16px),
    var(--red);
  color: var(--dark);
  padding: 0.35rem;
}

.passport-filter-toggle:hover {
  filter: saturate(1.18);
}

.passport-filter-label {
  display: block;
  color: var(--cream);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  line-height: 1;
  margin-bottom: 0.32rem;
  text-shadow: 1px 1px 0 var(--dark);
}

.passport-filter-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  background: var(--dark);
  border: 2px solid var(--dark);
  border-radius: 5px;
  padding: 0.22rem;
}

.passport-filter-option {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.passport-filter-thumb {
  position: absolute;
  z-index: 0;
  top: 0.22rem;
  bottom: 0.22rem;
  left: 0.22rem;
  width: calc(50% - 0.345rem);
  border-radius: 4px;
  background: linear-gradient(180deg, #fff4a8 0%, var(--yellow) 48%, #e0a600 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    2px 2px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.passport-filter-toggle[data-filter='stamped'] .passport-filter-thumb {
  transform: translateX(calc(100% + 0.25rem));
}

.passport-filter-toggle[data-filter='all'] .passport-filter-option-all,
.passport-filter-toggle[data-filter='stamped'] .passport-filter-option-stamped {
  color: var(--dark);
  transform: scale(1.06);
}

/* ── Passport Modal ──────────────────────────────────────── */

#passport-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

#passport-modal.visible {
  display: flex;
}

.passport-modal-content {
  background: var(--cream);
  border: 4px solid var(--dark);
  border-radius: 12px;
  padding: 2rem;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 6px 6px 0 var(--dark);
}

.passport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--dark);
  padding-bottom: 0.5rem;
}

.passport-header h2 {
  font-family: 'Lilita One', cursive;
  color: var(--red);
  font-size: 1.8rem;
}

.passport-close-btn {
  flex-shrink: 0;
}

.passport-stamps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stamp-card {
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.stamp-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--dark);
}

.stamp-card.collected {
  border-color: var(--green);
  background: linear-gradient(135deg, #e8f5e9 0%, var(--white) 100%);
}

.stamp-card .stamp-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.stamp-card .stamp-type {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  color: var(--white);
  margin-bottom: 0.5rem;
}

.stamp-card .stamp-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.stamp-card .stamp-btn:hover {
  background: var(--orange);
}

.stamp-card .stamp-btn.stamped {
  background: var(--green);
  cursor: default;
}

.stamp-card .stamp-ink {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--green);
  opacity: 0.3;
  pointer-events: none;
}

.stamp-card.collected .stamp-ink {
  display: block;
  animation: stampInk 0.3s ease-out;
}

@keyframes stampInk {
  0% {
    transform: translate(-50%, -50%) rotate(-15deg) scale(2);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) rotate(-15deg) scale(1);
    opacity: 0.3;
  }
}

/* ── Badges ─────────────────────────────────────────────── */

.passport-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.badge-card {
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.badge-card.earned {
  border-color: var(--yellow);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, #fffde7 0%, var(--white) 100%);
}

.badge-card .badge-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.badge-card .badge-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.badge-card .badge-desc {
  font-size: 0.72rem;
  color: #665533;
}

/* ── Passport Actions ───────────────────────────────────── */

.passport-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.passport-share-btn {
  background: var(--yellow);
  color: var(--dark);
  border: 3px solid var(--dark);
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.passport-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--dark);
}

/* ── Place stamp: circular ink stamp overlaid on each tile ── */

.place-stamp {
  position: absolute;
  top: -0.42rem;
  right: -0.35rem;
  transform: rotate(10deg);
  width: 50px;
  height: 50px;
  color: rgba(158, 28, 28, 0.22);
  cursor: pointer;
  user-select: none;
  transition:
    color 0.2s,
    transform 0.2s;
  pointer-events: all;
}

/* Ghost stamp appears on tile hover (hint that it can be stamped) */
#place-list .place-item:hover .place-stamp:not(.stamped) {
  color: rgba(158, 28, 28, 0.34);
  transform: rotate(10deg) scale(1.04);
}

.place-stamp.stamped {
  color: rgba(148, 22, 22, 0.9);
  cursor: pointer;
}

.stamp-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* SVG fill classes — driven by currentColor so CSS can control opacity */
.stamp-svg .s-outer {
  fill: rgba(158, 28, 28, 0.06);
  stroke: currentColor;
  stroke-width: 2.6;
}
.stamp-svg .s-inner {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}
.stamp-svg .s-text {
  fill: currentColor;
}
.stamp-svg .s-icon {
  font-size: 19px;
}

.stamp-svg .s-icon-beer {
  font-size: 20px;
}

/* Ink-heavy fill when stamped */
.place-stamp.stamped .stamp-svg .s-outer {
  fill: rgba(148, 22, 22, 0.09);
}

/* Slam-down animation */
@keyframes stampImpact {
  0% {
    transform: rotate(10deg) scale(3.5);
    opacity: 0;
    filter: blur(3px);
  }
  50% {
    transform: rotate(10deg) scale(0.8);
    opacity: 1;
    filter: none;
  }
  75% {
    transform: rotate(10deg) scale(1.1);
  }
  100% {
    transform: rotate(10deg) scale(1);
  }
}

.place-stamp.stamp-anim {
  animation: stampImpact 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Passport Stamp Progress ───────────────────────────── */

.passport-stamp-progress {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #110400;
  border: 2px solid #3d1000;
  border-radius: 8px;
}

.passport-stamp-progress-bar {
  height: 10px;
  background: #280e00;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
}

.passport-stamp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  border-radius: 5px;
  transition: width 0.3s ease;
}

.passport-stamp-progress-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--yellow);
  text-align: center;
  letter-spacing: 0.05em;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1024px) {
  body {
    height: auto;
  }

  .icon-fries-mark,
  .icon-soda-mark {
    display: none;
  }

  #header {
    min-height: 60px;
    border-bottom-width: 3px;
  }

  #header-overlay {
    background:
      linear-gradient(90deg, rgba(255, 215, 0, 0.16) 0 2px, transparent 2px 24px),
      linear-gradient(0deg, rgba(26, 10, 0, 0.12) 0 2px, transparent 2px 24px);
  }

  #header-content {
    padding: 0.35rem 0;
  }

  #header h1 {
    justify-content: flex-start;
    gap: 0.24rem;
    font-size: clamp(1.85rem, 4vw, 2.15rem);
    letter-spacing: 0.01em;
  }

  .brand-burger-btn {
    font-size: clamp(1.85rem, 4vw, 2.15rem);
  }

  .sodermalm-separator,
  #header .sodermalm-word {
    font-size: 1.6em;
    transform: translateY(0.1em);
  }

  main {
    flex-direction: column-reverse;
  }

  /* Mobile: sidebar as full-screen overlay with a visible grab stripe */
  #sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    width: auto;
    min-width: 0;
    transform: translateX(calc(-100% + 14px));
    transition: transform 0.25s ease;
    background: var(--sidebar-bg);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #sidebar-close {
    display: inline-flex;
  }

  #sidebar-checkered {
    display: none;
  }

  #sidebar-header {
  }

  .sidebar-header-row {
    padding: 0.5rem 0.8rem;
  }

  #sidebar-header .close-btn {
    display: inline-flex;
  }

  #sidebar-title {
    text-align: left;
    font-size: 1rem;
    padding: 0.2rem 0;
  }

  #sidebar-search-wrap {
    padding: 0.5rem 0.8rem;
  }

  #search {
    font-size: 1rem;
    padding: 8px 12px;
  }

  #sidebar-featured {
    display: block;
  }

  #sidebar-list-wrap {
    overflow-y: auto;
    flex: 1;
  }

  .place-item {
    padding: 0.6rem 0.8rem;
  }

  .place-item .name {
    font-size: 1rem;
  }

  .place-item .address {
    font-size: 0.8rem;
  }

  .place-item .category {
    font-size: 0.75rem;
  }

  #map-container {
    flex: 1;
    min-height: calc(100vh - 60px);
    border-bottom: 3px solid var(--dark);
  }

  #legend {
    font-size: 0.6rem;
    padding: 0.25rem 0.4rem;
    right: 6px;
    bottom: 6px;
  }

  #mascot {
    display: none;
  }

  #mascot-featured {
    display: none;
  }

  .passport-modal-content {
    padding: 1.2rem;
    max-width: unset;
    margin: 0.5rem;
  }

  .passport-header h2 {
    font-size: 1.3rem;
  }

  .passport-stamps {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .stamp-card {
    padding: 0.5rem;
  }

  .stamp-card .stamp-name {
    font-size: 0.75rem;
  }

  .stamp-card .stamp-type {
    font-size: 0.65rem;
  }

  .passport-badges {
    margin-bottom: 1rem;
  }

  .passport-actions {
    padding-top: 1rem;
  }

  .passport-share-btn {
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  #header {
    min-height: 54px;
  }

  #header h1 {
    font-size: clamp(1.5rem, 5.1vw, 1.85rem);
    gap: 0.16rem;
  }

  .brand-burger-btn {
    font-size: clamp(1.5rem, 5.1vw, 1.85rem);
  }

  .sodermalm-separator,
  #header .sodermalm-word {
    font-size: 1.42em;
  }

  #sidebar {
    top: 54px;
  }

  #map-container {
    min-height: calc(100vh - 54px);
  }

  .place-item {
    padding: 0.45rem 0.5rem;
  }

  .place-item .name {
    font-size: 0.85rem;
  }

  .passport-modal-content {
    padding: 1rem;
  }

  .passport-header h2 {
    font-size: 1.15rem;
  }

  .passport-stamps {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
  }

  .stamp-card {
    padding: 0.4rem;
  }

  .stamp-card .stamp-name {
    font-size: 0.7rem;
  }

  .stamp-card .stamp-type {
    font-size: 0.6rem;
  }
}
