/* ==========================================================================
   Magic Fox — introductory site
   Visual identity: the locked mixed-media signature
     1. deep layered-paper diorama  -> layered CSS gradients + stacked
        paper-sheet shadows + real soft drop shadows
     2. hand-sculpted clay          -> warm matte palette, soft round shapes
     3. metal (brushed steel/brass) -> metallic gradient trim on the
        signature text plaque
   Light lives in the paper: lantern-gold radial glows + CSS fireflies.
   No external fonts, no external requests. A little JavaScript
   powers the map hotspots and friend hellos (progressive enhancement).
   ========================================================================== */

:root {
  /* The Hollow's colors (from the locked style guide) */
  --cream: #F7EFD8;        /* Starlight cream — paper */
  --paper: #FFFDF6;        /* fresh paper sheet */
  --paper-deep: #F1E5CB;   /* shadowed paper layer */
  --foxglove: #C97B8E;     /* brand accent */
  --fenn: #D97B3F;         /* hero color */
  --amber: #E3A94E;        /* warmth */
  --lantern: #F2C14E;      /* glow */
  --moss: #7A9B6D;         /* calm green */
  --twilight: #6E7FB5;     /* night skies */
  --bark: #6B4A35;         /* linework, trunks */
  --ink: #4A3A2E;          /* body text */

  --font-display: Georgia, "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --font-body: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
               "Hiragino Sans", "Trebuchet MS", "Segoe UI", Verdana, sans-serif;

  /* Brushed steel / brass for the plaque trim */
  --steel: linear-gradient(135deg,
      #a9aeb6 0%, #e9ecef 22%, #969ca4 45%,
      #dfe3e8 68%, #a2a8b0 100%);
  --brass: linear-gradient(135deg, #b98a3e, #f2c14e 40%, #c9973f 70%, #e8bd55);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  /* layered-paper diorama: warm light from above, faint grain, deep edges */
  background:
    radial-gradient(1100px 480px at 18% -4%, rgba(242, 193, 78, 0.16), transparent 60%),
    radial-gradient(900px 620px at 96% 8%, rgba(110, 127, 181, 0.10), transparent 62%),
    radial-gradient(1400px 900px at 50% 115%, rgba(122, 155, 109, 0.10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(107, 74, 53, 0.028) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(90deg, rgba(107, 74, 53, 0.018) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #FCF7EA 0%, var(--cream) 34%, #F4E9CF 100%);
  background-attachment: fixed;
}

img { max-width: 100%; }

/* ------------------------------------------------------------------ */
/* Top ribbon + nav                                                    */
/* ------------------------------------------------------------------ */

.ribbon {
  background: var(--bark);
  color: var(--cream);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem clamp(1.25rem, 5vw, 4rem);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--bark);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand .star { color: var(--lantern); }

.nav-links { display: flex; gap: 0.4rem; flex-wrap: wrap; list-style: none; }
.nav-links a {
  color: var(--bark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.nav-links a:hover { background: rgba(217, 123, 63, 0.14); }

/* ------------------------------------------------------------------ */
/* Hero — Fennick + the signature text plaque                          */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  padding: 3.5rem clamp(1.25rem, 6vw, 5rem) 4rem;
}

/* lantern glow washing the hero from behind the art */
.hero-glow {
  position: absolute;
  top: -140px; right: 6%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.5) 0%, rgba(242, 193, 78, 0) 65%);
  filter: blur(10px);
  pointer-events: none;
}

/* CSS fireflies — pure decoration, no data, no script */
.firefly {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6D8 0%, var(--lantern) 45%, rgba(242, 193, 78, 0) 75%);
  box-shadow: 0 0 14px 5px rgba(242, 193, 78, 0.55);
  opacity: 0;
  animation: drift 9s ease-in-out infinite;
  pointer-events: none;
}
.firefly.f1 { top: 18%; right: 12%; animation-delay: 0s; }
.firefly.f2 { top: 62%; right: 30%; animation-delay: 2.2s; }
.firefly.f3 { top: 30%; right: 42%; animation-delay: 4.1s; }
.firefly.f4 { top: 74%; right: 8%;  animation-delay: 5.6s; }
.firefly.f5 { top: 10%; right: 26%; animation-delay: 7s; }

@keyframes drift {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  25%      { opacity: 0.9; }
  50%      { opacity: 0.45; transform: translate(-26px, 34px); }
  75%      { opacity: 0.95; }
}

.hero-text { flex: 1 1 330px; position: relative; z-index: 1; }
.hero-art  { flex: 1 1 330px; text-align: center; position: relative; z-index: 1; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--foxglove);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  color: var(--bark);
  line-height: 1.05;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 0 rgba(255, 253, 246, 0.7);
}

/* The signature device: story text on a raised paper plaque
   with a thin brushed-metal edge, part of the diorama. */
.plaque {
  background: var(--steel);
  padding: 5px;
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 14px 34px rgba(107, 74, 53, 0.28);
  margin-bottom: 1.8rem;
  max-width: 34rem;
}
.plaque-inner {
  background:
    repeating-linear-gradient(0deg, rgba(107, 74, 53, 0.03) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #FFFDF6, #F8EFDB);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
  font-size: 1.12rem;
  color: var(--ink);
}
.plaque-inner strong { color: var(--bark); }

.hero-buttons { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: linear-gradient(180deg, #E08A48, var(--fenn));
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 6px 16px rgba(217, 123, 63, 0.4);
}
.btn:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  color: var(--bark);
  border: 2px solid var(--bark);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--bark); color: var(--cream); }

.hero-art img {
  width: 100%;
  max-width: 430px;
  border-radius: 22px;
  /* layered paper sheets lifting off the page */
  box-shadow:
    1px 1px 0 0 var(--paper),
    2px 2px 0 0 var(--paper-deep),
    3px 3px 0 0 #E0CDA4,
    4px 4px 0 0 #D3BC8E,
    12px 22px 44px rgba(107, 74, 53, 0.3);
  transform: rotate(1.2deg);
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section { padding: 3.75rem clamp(1.25rem, 6vw, 5rem); position: relative; }
.section.alt {
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(242, 193, 78, 0.08), transparent 65%),
    repeating-linear-gradient(0deg, rgba(107, 74, 53, 0.022) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, rgba(255, 253, 246, 0.65), rgba(255, 253, 246, 0.25));
  border-top: 1px solid rgba(107, 74, 53, 0.12);
  border-bottom: 1px solid rgba(107, 74, 53, 0.12);
}

.section h2 {
  font-family: var(--font-display);
  color: var(--bark);
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  margin-bottom: 0.4rem;
  text-align: center;
}
.section h2::after {
  content: "";
  display: block;
  width: 72px; height: 6px;
  margin: 0.55rem auto 0;
  border-radius: 999px;
  background: var(--brass);
  box-shadow: 0 2px 8px rgba(242, 193, 78, 0.5);
}

.lede {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 2.4rem;
  font-size: 1.08rem;
}

.wide-art {
  display: block;
  max-width: 980px;
  width: 100%;
  margin: 0 auto 2.5rem;
  border-radius: 20px;
  box-shadow:
    1px 1px 0 0 var(--paper),
    2px 2px 0 0 var(--paper-deep),
    3px 3px 0 0 #E0CDA4,
    4px 4px 0 0 #D3BC8E,
    14px 26px 50px rgba(107, 74, 53, 0.3);
}

/* ------------------------------------------------------------------ */
/* Galleries: friends (12), places (4), books (3)                       */
/* ------------------------------------------------------------------ */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
}

.friend-card {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  /* stacked paper sheets */
  box-shadow:
    1px 1px 0 0 #F3E8D2,
    2px 2px 0 0 #EADBBE,
    3px 3px 0 0 #DFCDA6,
    8px 16px 30px rgba(107, 74, 53, 0.16);
}
.friend-card:nth-child(odd)  { transform: rotate(-0.6deg); }
.friend-card:nth-child(even) { transform: rotate(0.6deg); }
.friend-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.friend-card h3 {
  font-family: var(--font-display);
  color: var(--bark);
  font-size: 1.12rem;
  padding: 0.85rem 0.6rem 1rem;
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
}
.place-card {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    1px 1px 0 0 #F3E8D2,
    2px 2px 0 0 #EADBBE,
    3px 3px 0 0 #DFCDA6,
    8px 16px 30px rgba(107, 74, 53, 0.16);
}
.place-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.place-card .place-body { padding: 1.2rem 1.4rem 1.5rem; }
.place-card h3 {
  font-family: var(--font-display);
  color: var(--bark);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  max-width: 1080px;
  margin: 0 auto;
}
.book-card {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    1px 1px 0 0 #F3E8D2,
    2px 2px 0 0 #EADBBE,
    3px 3px 0 0 #DFCDA6,
    10px 20px 36px rgba(107, 74, 53, 0.2);
  border-top: 6px solid var(--lantern);
}
.book-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.book-card .book-body { padding: 1.3rem 1.5rem 1.6rem; }
.book-num {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--moss);
  font-weight: 700;
  font-size: 0.82rem;
}
.retail-facts {
  color: var(--moss);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.4em 0 0;
}
.book-card h3 {
  font-family: var(--font-display);
  color: var(--bark);
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}
.soon-note {
  text-align: center;
  margin-top: 2rem;
  font-style: italic;
  color: #7d6a58;
}

/* ------------------------------------------------------------------ */
/* Grown-ups: COPPA-safe box, contact placeholder, disabled signup      */
/* ------------------------------------------------------------------ */

.grownups-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 18px;
  padding: 2.2rem;
  box-shadow:
    1px 1px 0 0 #F3E8D2,
    2px 2px 0 0 #EADBBE,
    3px 3px 0 0 #DFCDA6,
    10px 22px 40px rgba(107, 74, 53, 0.18);
}
.grownups-box h3 {
  font-family: var(--font-display);
  color: var(--bark);
  font-size: 1.35rem;
  margin: 1.6rem 0 0.6rem;
}
.grownups-box h3:first-child { margin-top: 0; }

.promise-list { list-style: none; display: grid; gap: 0.5rem; margin: 0.8rem 0 0; }
.promise-list li { padding-left: 1.9rem; position: relative; }
.promise-list li::before {
  content: "★";
  position: absolute; left: 0;
  color: var(--lantern);
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.8);
}

.contact-line {
  background: #F6EEDC;
  border: 2px dashed #CBB98F;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  margin-top: 0.8rem;
  font-weight: 700;
  color: var(--bark);
}

/* Non-functional placeholder: disabled controls, no script, no network. */
.signup { margin-top: 1rem; opacity: 0.85; }
.signup legend { font-weight: 700; margin-bottom: 0.7rem; padding: 0 0.4rem; }
.signup-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.signup input {
  flex: 1 1 240px;
  padding: 0.85rem 1.1rem;
  border: 2px solid #E4D6BE;
  border-radius: 999px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #FBF6E9;
  color: var(--ink);
}
.signup input:disabled { cursor: not-allowed; }
.btn[disabled] { cursor: not-allowed; filter: grayscale(0.35); opacity: 0.75; }
.fine { font-size: 0.86rem; color: #8a7565; margin-top: 0.7rem; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

footer {
  text-align: center;
  padding: 2.4rem 1rem;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(242, 193, 78, 0.18), transparent 70%),
    var(--bark);
  color: var(--cream);
}
footer p { margin: 0.25rem 0; }
footer .soft { opacity: 0.72; font-size: 0.92rem; }

/* ------------------------------------------------------------------ */
/* Small screens + reduced motion                                      */
/* ------------------------------------------------------------------ */

@media (max-width: 700px) {
  .hero { padding-top: 2.2rem; }
  .hero-glow { right: -120px; }
  .grownups-box { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .firefly { display: none; }
  * { animation: none !important; }
}


/* Character appearance line (appearance-only cards; species per canon rules) */
.appearance {
  font-size: 0.92rem;
  color: #5a4632;
  margin: 0.1rem 1rem 1rem;
  font-style: italic;
}

/* Book 1 feature slot — prominent placement for the launched book */
.book-feature {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: #fffdf6;
  border: 2px solid #e8b04b;
  border-radius: 18px;
  padding: 1.8rem 2rem;
  margin: 0 auto 2.5rem;
  max-width: 880px;
  box-shadow: 0 6px 24px rgba(232, 176, 75, 0.25);
}
.book-feature img {
  width: 220px;
  max-width: 40%;
  border-radius: 10px;
  flex-shrink: 0;
}
.book-feature-body { flex: 1; }
.book-feature-body h3 {
  font-size: 1.7rem;
  margin: 0.2rem 0 0.8rem;
}
.buy-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.buy-row .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Clearly-marked pending input (staging only — never ships unresolved) */
.pending-flag {
  display: inline-block;
  background: #fff3cd;
  border: 1px dashed #b98a1d;
  color: #6b4e0c;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Placeholder where location art is pending (no invented stand-ins) */
.art-pending {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f4ecdc, #f4ecdc 12px, #ece1c9 12px, #ece1c9 24px);
  border-radius: 14px 14px 0 0;
  color: #8a6f4d;
  font-style: italic;
}

/* Grown-ups contact line */
.contact-line { font-size: 1.05rem; }

@media (max-width: 640px) {
  .book-feature { flex-direction: column; text-align: center; }
  .book-feature img { max-width: 60%; }
  .buy-row { justify-content: center; }
}

/* ------------------------------------------------------------------ */
/* Interactive Hollow map: lantern-dot hotspots + parchment tips        */
/* ------------------------------------------------------------------ */

.map-wrap {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}
.map-wrap .wide-art { margin: 0; }

.map-hint {
  text-align: center;
  color: var(--bark);
  font-size: 0.92rem;
  margin: 0.9rem 0 2.5rem;
  opacity: 0.85;
}

.map-hotspot {
  position: absolute;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 2px solid rgba(255, 253, 246, 0.9);
  padding: 0;
  font: inherit;
  cursor: pointer;
  background: radial-gradient(circle at 50% 42%, #FFE9A8 0%, var(--lantern) 45%, #C98A2B 100%);
  box-shadow: 0 0 12px 4px rgba(242, 193, 78, 0.75), 0 2px 6px rgba(74, 58, 46, 0.4);
  z-index: 5;
}
.map-hotspot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(242, 193, 78, 0.8);
  animation: hotspot-ping 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes hotspot-ping {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.map-tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.92);
  width: 230px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--paper-deep);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(74, 58, 46, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 6;
}
.map-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border: 8px solid transparent;
  border-top-color: var(--paper-deep);
}
.map-hotspot.tip-below .map-tip {
  bottom: auto;
  top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-6px) scale(0.92);
}
.map-hotspot.tip-below .map-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--paper-deep);
}
.map-hotspot:hover .map-tip,
.map-hotspot:focus-visible .map-tip,
.map-hotspot[data-open="true"] .map-tip {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.map-tip strong {
  display: block;
  font-family: var(--font-display);
  color: var(--bark);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

/* Warm glow when a hotspot scrolls you to its place card */
.place-card.spotlight { animation: card-glow 1.6s ease; }
@keyframes card-glow {
  0%, 100% {
    box-shadow:
      1px 1px 0 0 #F3E8D2,
      2px 2px 0 0 #EADBBE,
      3px 3px 0 0 #DFCDA6,
      8px 16px 30px rgba(107, 74, 53, 0.16);
  }
  30% {
    box-shadow:
      0 0 0 5px var(--lantern),
      8px 16px 30px rgba(107, 74, 53, 0.16);
  }
}

/* ------------------------------------------------------------------ */
/* Friend-card hellos: gentle twirl + paper-star sparkles + hello bubble */
/* Theme-safe: the character stays upright, undistorted, and settles    */
/* exactly as before. Parchment + lantern-gold only.                   */
/* ------------------------------------------------------------------ */

.friend-card {
  position: relative;
  cursor: pointer;
}
.friend-card img { border-radius: 14px 14px 0 0; }
.friend-card.intro-open { overflow: visible; }
.friend-card:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; }

.friend-card.twirl img { animation: friend-twirl 0.85s cubic-bezier(0.34, 1.25, 0.5, 1); }
@keyframes friend-twirl {
  0%   { transform: rotate(0deg)    scale(1)    translateY(0); }
  25%  { transform: rotate(-10deg) scale(1.04) translateY(-4px); }
  60%  { transform: rotate(367deg) scale(1.07) translateY(-8px); }
  85%  { transform: rotate(356deg) scale(1.02) translateY(-2px); }
  100% { transform: rotate(360deg) scale(1)    translateY(0); }
}

.sparkle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}
.sparkle {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 50% 50%, #FFE9A8 0%, var(--lantern) 60%, rgba(242, 193, 78, 0) 100%);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  animation: sparkle-pop 0.7s ease-out forwards;
}
@keyframes sparkle-pop {
  0%   { transform: scale(0) translateY(0); opacity: 0; }
  35%  { transform: scale(1.15) translateY(-10px); opacity: 1; }
  100% { transform: scale(0.2) translateY(-22px); opacity: 0; }
}

.friend-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(8px) scale(0.85);
  transform-origin: 50% 100%;
  width: max-content;
  max-width: 230px;
  background: var(--paper);
  border: 2px solid var(--paper-deep);
  border-radius: 14px;
  padding: 0.65rem 0.9rem;
  text-align: center;
  box-shadow: 0 12px 26px rgba(74, 58, 46, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.4, 0.5, 1);
  z-index: 6;
}
.friend-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -9px;
  border: 9px solid transparent;
  border-top-color: var(--paper-deep);
}
.friend-card.intro-open .friend-bubble {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.friend-bubble strong {
  display: block;
  font-family: var(--font-display);
  color: var(--bark);
  font-size: 1rem;
}
.friend-bubble span {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Narrow screens: keep tips on-screen — left-half dots hang their tip right */
@media (max-width: 600px) {
  .map-tip { width: 180px; }
  .map-hotspot.tip-left .map-tip {
    left: -8px;
    transform: translateY(6px) scale(0.92);
  }
  .map-hotspot.tip-left .map-tip::after { left: 22px; margin-left: 0; }
  .map-hotspot.tip-below.tip-left .map-tip { transform: translateY(-6px) scale(0.92); }
  .map-hotspot.tip-left:hover .map-tip,
  .map-hotspot.tip-left:focus-visible .map-tip,
  .map-hotspot.tip-left[data-open="true"] .map-tip {
    transform: translateY(0) scale(1);
  }
  .friend-bubble { max-width: 200px; }
}

/* Calm mode: no twirls, pings, or sparkles — content still appears */
@media (prefers-reduced-motion: reduce) {
  .map-hotspot::after { animation: none; }
  .friend-card.twirl img { animation: none; }
  .sparkle { display: none; }
  .map-tip, .friend-bubble { transition: opacity 0.15s ease; }
}
