/* ============================================================
   Milly Roams — design system
   Warm, playful photography-adventure brand. Mobile-first.
   Fonts are system stacks only so everything works offline.

   Reusable class reference (Dawnna: use these in your pages):
     .container    — centered content column, max 1100px, side padding
     .site-header  — sticky purple header bar (injected by js/nav.js)
     .site-nav     — nav links; horizontal scroll row on small screens
     .hero         — big rounded welcome banner
     .btn          — base button
     .btn-primary  — amber button (main actions)
     .btn-ghost    — subtle outline button (secondary actions)
     .card-grid    — responsive grid of cards
     .card         — white rounded card with soft shadow
     .badge/.chip  — small labeled pills (regions, tags)
     .input/.select — form controls (search, filters, game forms)
     .section-title — big section heading style
     .site-footer  — footer bar (injected by js/nav.js)
     .game-area    — playful container for games
     .alert-note   — friendly info/warning box
   ============================================================ */

/* ---- Palette (CSS variables) ---- */
:root {
  --plum: #7C3AED;        /* primary purple — vivid on black */
  --grape: #A78BFA;      /* secondary purple */
  --amber: #E8A93D;       /* accent */
  --amber-dark: #F0B95A;  /* accent hover on dark */
  --cream: #08050F;       /* page background — black */
  --ink: #F1EBFF;         /* body text */
  --white: #1D1332;       /* surfaces/cards — deep purple */
  --line: #453070;        /* borders on dark */
  --surface-2: #150E2B;   /* deeper surface: chat popup body */
  --bubble: #2A1B4E;      /* incoming chat bubble */
  --radius: 14px;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.50);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.40);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Display headings: warm serif */
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--plum);
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--grape); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--plum); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.1rem;
}

main.container { padding-top: 1.5rem; padding-bottom: 3rem; }

/* ---- Header (markup injected by js/nav.js) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--plum);
  color: #fff;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.brand:hover { color: var(--amber); }
.site-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;              /* horizontal scroll row on mobile */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.95rem;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a.active { background: var(--amber); color: #2A1B4A; font-weight: 600; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--plum) 0%, var(--grape) 100%);
  color: #fff;
  border-radius: 22px;
  padding: 2.4rem 1.6rem;
  margin: 0 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* playful sun accent in the corner */
.hero::after {
  content: "";
  position: absolute;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,169,61,0.9) 0%, rgba(232,169,61,0) 70%);
  top: -70px; right: -50px;
  pointer-events: none;
}
.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  margin-bottom: 0.35em;
}
.hero-milly {
  width: 120px; height: 120px; object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--amber);
  margin: 0 auto 1rem;
  box-shadow: var(--shadow);
  position: relative; z-index: 1;
}
/* playful section illustrations */
.card-thumb {
  width: 100%; height: 150px; object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}
.page-banner {
  display: block;
  width: auto; max-width: 100%;
  height: auto; max-height: 380px; /* v41: was max-height:230px + object-fit:cover, which cropped the photos */
  border-radius: 18px;
  margin: 0 auto 1.2rem;
  box-shadow: var(--shadow-soft);
}
.hero .tagline {
  font-size: 1.2rem;
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 1.4rem;
}
.hero .cta-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  transition: transform 0.08s ease, background 0.15s ease;
}
/* v155: posting feedback — the wall Post button visibly locks while sending. */
/* v160: one-tap install banner on the Get the App page. */
.install-cta { text-align: center; margin: 1rem 0; }
.install-cta p { margin: 0.4rem 0; }
.install-cta .btn { font-size: 1.1rem; padding: 0.8rem 1.8rem; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--amber);
  color: #2A1B4A;
  border-color: var(--amber);
}
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: #2A1B4A; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
/* ghost button on light backgrounds */
.on-light .btn-ghost, .btn-ghost.on-light {
  color: var(--plum);
  border-color: var(--plum);
}
.on-light .btn-ghost:hover, .btn-ghost.on-light:hover { background: rgba(15,61,62,0.08); }

/* ---- Section titles ---- */
.section-title {
  font-size: 1.7rem;
  margin: 2.2rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-sub { color: var(--grape); margin-bottom: 1.2rem; }

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.2em; }
.card p { font-size: 0.97rem; color: var(--ink); }
.card .card-link { margin-top: auto; font-weight: 600; }
.card .meta { font-size: 0.85rem; color: var(--grape); }

/* ---- Discover place cards: live map + facts ---- */
.place-map {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: calc(var(--radius) - 4px);
  margin: 0.25rem 0;
  background: #2C1B52;
}
.place-facts {
  list-style: none;
  margin: 0.25rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.place-facts li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--ink);
  background: #2C1B52;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}
.place-facts .fact-icon {
  flex: 0 0 auto;
  font-size: 1.05rem;
  line-height: 1.4;
}
.place-facts strong { color: var(--ink); }

.weather-line {
  font-size: 0.92rem;
  color: var(--grape);
  font-weight: 600;
  background: #2C1B52;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 0.15rem 0;
}



/* ---- Badges / chips ---- */
.badge, .chip {
  display: inline-block;
  background: var(--grape);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  width: fit-content;
}
.chip { background: var(--plum); }
.badge.amber, .chip.amber { background: var(--amber); color: #2A1B4A; }

/* ---- Form controls ---- */
.input, .select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--grape);
  box-shadow: 0 0 0 3px rgba(106,76,147,0.18);
}
label { font-weight: 600; color: var(--plum); display: block; margin-bottom: 0.3rem; }

/* ---- Game area ---- */
.game-area {
  background: var(--white);
  border: 2px dashed var(--amber);
  border-radius: 18px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

/* ---- Alert note ---- */
.alert-note {
  background: #2A1E42;
  border-left: 5px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: 0.97rem;
}

/* ---- Footer (markup injected by js/nav.js) ---- */
.site-footer {
  background: var(--plum);
  color: #fff;
  margin-top: 3rem;
  padding: 2rem 0 1.5rem;
}
.site-footer .tagline { font-family: Georgia, serif; font-style: italic; margin-bottom: 0.3rem; }
.site-footer .made { font-size: 0.9rem; opacity: 0.85; }
.site-footer nav { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.site-footer nav a { color: var(--amber); font-size: 0.9rem; }

/* ---- Two-column helper ---- */
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }

/* ---- Lists on cream ---- */
ul.clean, ol.clean { padding-left: 1.3rem; }
ol.steps { padding-left: 1.4rem; }
ol.steps li { margin-bottom: 0.7rem; }

/* ---- Larger screens ---- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.6rem; }
  .hero h1 { font-size: 3.1rem; }
  .two-col { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .site-header .container { gap: 1.6rem; }
}

/* ---- Companion-pack additions (integration pass) ---- */

/* Back-to-main-site link */
.back-link { display: inline-block; margin: 0 0 1rem; font-weight: 600; color: var(--plum); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* Lede paragraphs + filter rows used by section pages */
.lede { font-size: 1.1rem; color: var(--ink); max-width: 42rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0.4rem; }
.filters .input { flex: 2 1 220px; }
.filters .select { flex: 1 1 150px; }
.count { color: #B9A8DC; font-size: 0.95rem; }

/* Filter chips */
.chip { display: inline-block; padding: 0.45rem 0.95rem; border-radius: 999px;
  border: 2px solid var(--line); background: var(--white); color: var(--ink);
  font-weight: 600; cursor: pointer; }
.chip.is-active { background: var(--plum); border-color: var(--plum); color: #fff; }

/* Learn page */
.learn-intro { font-size: 1.1rem; color: var(--ink); max-width: 42rem; }
.learn-progress { font-weight: 700; color: var(--plum); }
.learn-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.learn-search { margin: 0 0 1.2rem; max-width: 28rem; }
.learn-card .learn-badge { margin-bottom: 0.4rem; }
.learn-tryit { background: #2C1B52; border-left: 4px solid var(--amber);
  border-radius: 0 10px 10px 0; padding: 0.7rem 1rem; margin-top: 0.9rem; }
.learn-tryit strong { color: #8a5f14; }
.learn-read-btn { margin-top: 0.9rem; }
.learn-empty { color: #B9A8DC; font-style: italic; }

/* Game page helpers */
.game-scene { max-width: 100%; border-radius: var(--radius); cursor: crosshair; display: block; }
.game-status { font-weight: 700; color: var(--plum); }
.challenge-card { text-align: center; padding: 2rem 1.5rem; }
.challenge-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.progress-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--amber); border-radius: 999px; }

/* ---- Tracker page ---- */
.privacy-note { border-left: 5px solid var(--plum); background: #2C1B52; }
.privacy-note h3 { margin-top: 0; }
#milly-map { width: 100%; height: auto; display: block; }

/* ---- Discover / Road-trips ad-hoc classes ---- */
.empty-state { color: #B9A8DC; font-style: italic; padding: 1rem 0; }
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.photo-why { font-size: 0.98rem; }
.photo-why strong { color: var(--plum); }
.best-line { font-size: 0.92rem; color: #B9A8DC; }
.route-card { margin-bottom: 1rem; }
.route-card summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; color: var(--plum); }
.route-card summary::-webkit-details-marker { color: var(--amber); }
.stop-list { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: stop; }
.stop { position: relative; padding: 0 0 1.1rem 2.6rem; border-left: 3px solid var(--line); margin-left: 0.6rem; }
.stop:last-child { border-left-color: transparent; padding-bottom: 0.2rem; }
.stop::before { counter-increment: stop; content: counter(stop); position: absolute; left: -1.05rem; top: -0.15rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--amber); color: #fff;
  font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
.stop-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.stop-name { font-weight: 700; }
.photo-tip { font-style: italic; color: var(--ink); background: #2C1B52; border-radius: 8px; padding: 0.5rem 0.8rem; margin-top: 0.4rem; }

/* ---- Blog ---- */
.post { max-width: 42rem; }
.post h1 { margin-bottom: 0.25rem; }
.post-meta { color: #B9A8DC; font-size: 0.92rem; margin-bottom: 1.2rem; }
.post-body p { line-height: 1.75; margin-bottom: 1.1rem; }
.post-body strong { color: var(--plum); }

/* ---- Community wall ---- */
.composer-top { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 0.8rem; }
.composer-top textarea { flex: 1; font: inherit; border: 2px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; resize: vertical; min-height: 3.5rem; }
.composer-top textarea:focus { outline: none; border-color: var(--plum); }
.composer-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
/* v157: audience picker in the wall composer. */
.composer-visibility {
  font: inherit; font-size: 0.9rem; color: var(--plum);
  border: 2px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.7rem; background: #fff; cursor: pointer;
}
/* v158: "hide from" friend picker. */
.composer-hide-panel { flex-basis: 100%; margin-top: 0.2rem; }
.composer-hide-panel > p { margin: 0 0 0.3rem; font-size: 0.85rem; }
.composer-hide-list {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  max-height: 7.5rem; overflow-y: auto;
}
.composer-hide-item {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.7rem 0.25rem 0.45rem;
  font-size: 0.85rem; cursor: pointer; background: #fff;
}
.composer-hide-item input { accent-color: var(--plum); }
.composer-row input[type="text"] { font: inherit; border: 2px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; flex: 1; min-width: 10rem; }
.composer-photo-btn { cursor: pointer; }
.composer-preview { margin-bottom: 0.8rem; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.composer-preview img { max-width: 220px; border-radius: 12px; }
.composer-hint { color: #B9A8DC; font-size: 0.9rem; margin-top: 0.6rem; min-height: 1.2em; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--line); }
.avatar-initial, .avatar-you { display: flex; align-items: center; justify-content: center; background: var(--plum); color: #fff; font-weight: 700; font-size: 1.2rem; }
.feed-post { margin-bottom: 1rem; }
.post-head { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.6rem; }
.post-name { font-weight: 700; }
.post-time { font-size: 0.85rem; color: #B9A8DC; }
.post-text { line-height: 1.65; margin-bottom: 0.6rem; white-space: pre-wrap; }
.post-photo { width: 100%; border-radius: 12px; margin-bottom: 0.6rem; display: block; }
.post-actions { display: flex; gap: 0.8rem; align-items: center; }
.like-btn { border: 2px solid var(--line); background: var(--white); border-radius: 999px; padding: 0.3rem 0.9rem; font: inherit; cursor: pointer; }
.like-btn.liked { border-color: var(--plum); color: var(--plum); font-weight: 700; }
.link-btn { background: none; border: none; color: #B9A8DC; font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: underline; }

/* ---- Post interactions (v66): like / comment / share ---- */
.post-stats { display: flex; gap: 1rem; font-size: 0.85rem; color: #B9A8DC; margin-bottom: 0.5rem; flex-wrap: wrap; }
.abtn { border: 2px solid var(--line); background: var(--white); border-radius: 999px; padding: 0.3rem 0.9rem; font: inherit; cursor: pointer; color: inherit; }
.abtn:hover { border-color: var(--plum); }
.post-comments { margin-top: 0.7rem; border-top: 1px solid var(--line); padding-top: 0.7rem; }
.comments-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.7rem; }
.comment { background: rgba(124, 58, 237, 0.10); border-radius: 12px; padding: 0.5rem 0.8rem; }
.comment-name { font-weight: 700; font-size: 0.9rem; }
.comment-text { line-height: 1.5; white-space: pre-wrap; }
.comment-time { font-size: 0.78rem; color: #B9A8DC; margin-top: 0.15rem; }
.comment-form { display: flex; gap: 0.5rem; }
.comment-form input { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem; font: inherit; background: var(--white); color: var(--ink); }
.post-flash { animation: postflash 2.4s ease; }
@keyframes postflash {
  0%, 60% { box-shadow: 0 0 0 3px var(--plum); }
  100% { box-shadow: none; }
}

/* Dawnna & Milly gallery */
.duo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 1rem; }
.duo-card { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.45); }
.duo-card img { width: 100%; height: auto; display: block; }
.duo-card figcaption { padding: .7rem .9rem; font-size: .92rem; color: var(--ink); }

/* ============================================================
   Homepage v2 — Facebook-style, community-first layout
   (additive; nothing above this line was changed)
   ============================================================ */

/* ---- Slim top bar with brand, links, and sign-in ---- */
.fb-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--plum);
  color: #fff;
  box-shadow: var(--shadow);
}
.fb-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.6rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.fb-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  white-space: nowrap;
}
.fb-brand:hover { color: var(--amber); }
.fb-brand img {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  object-fit: cover;
}
.fb-links {
  display: none;
  gap: 0.15rem;
  margin-left: auto;
  overflow: visible;
  scrollbar-width: none;
}
.fb-links::-webkit-scrollbar { display: none; }
.fb-links a {
  color: #fff;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.92rem;
}
.fb-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
/* v81: standalone Milly Events link sits first in the topbar */
.fb-nav-standalone { font-weight: 700; white-space: nowrap; }
/* v81: Milly Events leads the side menu on its own */
.fb-menu-featured { border: 2px solid var(--grape); background: #F4EEFF; font-weight: 700; }
.fb-auth { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.fb-links + .fb-auth { margin-left: 0; }
.fb-user {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* v153: two-row topbar on tablet/desktop — the tab list outgrew a single row
   and was clipping the "Hi, name" greeting. Brand + sign-in keep row one;
   the tabs get their own full-width row. No overflow hacks, so the
   dropdown menus keep working. */
@media (min-width: 700px) {
  .fb-topbar-inner { flex-wrap: wrap; row-gap: 0.15rem; }
  .fb-links { order: 3; flex: 1 1 100%; margin-left: 0; }
  .fb-links + .fb-auth, .fb-auth { margin-left: auto; flex-shrink: 0; }
}
.btn-signin {
  background: var(--amber);
  color: var(--plum);
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-signin:hover { background: var(--amber-dark); }
.btn-signout {
  background: transparent;
  color: #fff;
  border: 2px solid var(--cream);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.btn-signout:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---- Three-column layout ---- */
.fb-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.2rem 1.1rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: start;
}
.fb-feed { min-width: 0; order: 2; }
.fb-left { order: 1; }
.fb-right { order: 3; display: flex; flex-direction: column; gap: 1.1rem; }

/* ---- Left: section menu ---- */
.fb-menu-title {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  padding: 0 0.2rem;
}
.fb-menu {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fb-menu::-webkit-scrollbar { display: none; }
.fb-menu-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}
.fb-menu-item:hover { box-shadow: var(--shadow); color: var(--plum); }
.fb-menu-item img {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Center: welcome hero (slim) + composer + feed ---- */
.fb-hero {
  background: linear-gradient(135deg, var(--plum) 0%, var(--grape) 100%);
  color: #fff;
  border-radius: 20px;
  padding: 1.6rem 1.4rem;
  margin-bottom: 1.2rem;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.fb-hero::after {
  content: "";
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,169,61,0.85) 0%, rgba(232,169,61,0) 70%);
  top: -60px; right: -40px;
  pointer-events: none;
}
.fb-hero img {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 3px solid var(--amber);
  object-fit: cover;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.fb-hero h1 { color: #fff; font-size: 1.7rem; margin: 0 0 0.2em; }
.fb-hero .tagline { font-style: italic; opacity: 0.95; margin: 0 0 0.5rem; font-size: 1rem; }
.fb-hero p { font-size: 0.93rem; margin: 0 0 0.8rem; }
.fb-hero .cta-row { display: flex; gap: 0.6rem; flex-wrap: wrap; position: relative; z-index: 1; }
.fb-hero .btn { padding: 0.55rem 1.1rem; font-size: 0.92rem; }

.composer-locked {
  text-align: center;
  padding: 1.6rem 1.2rem;
}
.composer-locked p { margin: 0 0 0.9rem; color: var(--ink); font-size: 1rem; }

/* ---- Right rail cards ---- */
.rail-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.rail-card p, .rail-card li { font-size: 0.93rem; color: var(--ink); }
.rail-steps { padding-left: 1.3rem; margin: 0; }
.rail-steps li { margin-bottom: 0.5rem; }
.tip-card {
  background: linear-gradient(135deg, #2A1E42 0%, #241640 100%);
  border: 1px solid var(--amber);
}
.games-promo { text-align: center; }
.games-promo img {
  width: 100%; height: auto;
  border-radius: 10px; margin-bottom: 0.5rem;
}
.about-portrait {
  width: 100%; max-width: 520px; height: auto;
  border-radius: 14px; display: block; margin: 1rem auto;
}
.about-figure {
  margin: 1.5rem auto; max-width: 720px; text-align: center;
}
.about-figure img {
  width: 100%; height: auto; border-radius: 14px; display: block;
}
.about-figure figcaption {
  margin-top: 0.5rem; font-size: 0.95rem; opacity: 0.85;
}

/* ---- Sign-in modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 32, 64, 0.6);
  z-index: 100;
  display: flex;
  padding: 1rem;
  overflow-y: auto; /* v79: lets the modal scroll when the phone keyboard is open */
}
.modal-backdrop > .modal { margin: auto; } /* safe centering: centered when it fits, scrollable when it doesn't */
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 26rem;
  width: 100%;
  padding: 1.8rem 1.6rem;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { margin-bottom: 0.3rem; }
.modal .modal-sub { color: #B9A8DC; font-size: 0.95rem; margin-bottom: 1.2rem; }
.modal-close {
  position: absolute;
  top: 0.7rem; right: 0.9rem;
  background: none; border: none;
  font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: #B9A8DC;
  padding: 0.3rem;
}
.auth-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 0.7rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
}
.auth-option:hover { border-color: var(--grape); box-shadow: var(--shadow-soft); }
.auth-option .auth-glyph {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: #fff;
  flex-shrink: 0;
}
.auth-google .auth-glyph { background: #DB4437; }
.auth-facebook .auth-glyph { background: #1877F2; }
.auth-email .auth-glyph { background: var(--grape); }
.auth-divider {
  display: flex; align-items: center; gap: 0.8rem;
  color: #B9A8DC; font-size: 0.85rem;
  margin: 1rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-email-form { text-align: left; }
.auth-email-form input { margin-bottom: 0.7rem; }
.auth-email-form .btn-primary { width: 100%; }
.auth-note {
  background: #2C1B52;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  color: var(--plum);
  margin-top: 0.8rem;
}
.auth-error {
  background: #3A1A1E;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  color: #ffb4ab;
  margin-bottom: 0.8rem;
}

/* ---- Larger screens: real three-column feed layout ---- */
@media (min-width: 700px) {
  .fb-links { display: flex; }
  .fb-auth { margin-left: 0; }
}
@media (min-width: 1024px) {
  .fb-layout { grid-template-columns: 250px minmax(0, 1fr) 310px; }
  .fb-left { order: 1; position: sticky; top: 76px; }
  .fb-feed { order: 2; }
  .fb-right { order: 3; position: sticky; top: 76px; }
  /* v83: each side column scrolls on its own — no more scrolling the whole page to reach sidebar items */
  .fb-left, .fb-right {
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-bottom: 1rem;
  }
  .fb-left::-webkit-scrollbar, .fb-right::-webkit-scrollbar { width: 8px; }
  .fb-left::-webkit-scrollbar-thumb, .fb-right::-webkit-scrollbar-thumb {
    background: rgba(124,58,237,.35); border-radius: 8px;
  }
  .fb-menu { flex-direction: column; overflow: visible; padding-bottom: 0; }
  .fb-menu-item { border-radius: 14px; padding: 0.5rem; }
  .fb-menu-item img { width: 44px; height: 44px; }
  .fb-menu-text small { display: block; font-weight: 400; color: #B9A8DC; font-size: 0.8rem; }
  .fb-menu-title { padding: 0; }
}

/* ---- Phone fit (v9): the page must never be wider than the screen ----
   Mobile browsers zoom out to fit overflowing content; these guards make
   sure everything fits a 360px phone with no pinch-zooming needed. */
html, body { overflow-x: hidden; overflow-x: clip; }
.fb-left, .fb-right { min-width: 0; }
.fb-hero > div { min-width: 0; flex: 1 1 0%; }
.composer-top textarea { min-width: 0; }

/* Slim the top bar on phones so brand + name + sign-out fit one row. */
@media (max-width: 699px) {
  .fb-topbar-inner { padding: 0.55rem 0.6rem; gap: 0.5rem; }
  .fb-brand { font-size: 1.12rem; }
  .fb-brand img { width: 32px; height: 32px; }
  .fb-auth { gap: 0.5rem; min-width: 0; }
  .fb-user { max-width: 4.5rem; font-size: 0.88rem; }
  .btn-signout { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
  /* Creator badge shrinks to just the paw on phones so the topbar
     (brand + badge + name + sign-out) still fits a 360px screen. */
  .creator-badge { padding: 0.2rem 0.45rem; }
  .creator-badge .cb-text { display: none; }
}

/* ---- Creator badge (topbar) ---- */
.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #FFD84D;
  color: var(--plum);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.creator-badge:hover { background: #ffe37a; }

/* ============ v15: trip planner, watches, chooser ============ */

.btn-secondary {
  background: var(--white);
  color: var(--plum);
  border-color: var(--plum);
}
.btn-secondary:hover { background: var(--plum); color: #fff; }
.btn-danger {
  background: transparent;
  color: #b3261e;
  border-color: #b3261e;
}
.btn-danger:hover { background: #b3261e; color: #fff; }
.btn.is-disabled, a.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.card-actions .btn { margin: 0; }

.muted { color: #B9A8DC; }
.small { font-size: 0.85rem; }

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.form-row > label { flex: 1 1 140px; min-width: 0; }
.form-error {
  color: #b3261e;
  font-weight: 600;
  margin-top: 0.75rem;
}

.empty-state { text-align: center; padding: 2rem 1rem; }
.empty-milly { font-size: 2.5rem; margin: 0 0 0.5rem; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--plum);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 200;
  max-width: calc(100vw - 2rem);
  text-align: center;
  font-weight: 600;
}
.toast[hidden] { display: none; }

/* Trip chooser dialog */
.chooser-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
  max-height: 40vh;
  overflow-y: auto;
}
.chooser-trip {
  text-align: left;
  padding: 0.8rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
}
.chooser-trip:hover { border-color: var(--plum); }
.chooser-new { border-top: 1px solid var(--line); padding-top: 1rem; }
.chooser-new-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.chooser-new-row .input { flex: 1; min-width: 0; }

/* "Coming soon" tag on provider buttons */
.soon-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--amber);
  color: var(--plum);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* Planner */
.trip-bar-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.trip-bar-row:last-child { margin-bottom: 0; }
.trip-bar-row label { font-weight: 600; }
.trip-bar-row select { flex: 1; min-width: 0; }

.itinerary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  counter-reset: stop;
}
.itinerary-item {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  background: var(--white);
  position: relative;
  padding-left: 2.6rem;
}
.itinerary-item::before {
  counter-increment: stop;
  content: counter(stop);
  position: absolute;
  left: 0.7rem;
  top: 0.85rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--plum);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.it-top { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.25rem; }
.itinerary-item p { margin: 0.2rem 0; }
.it-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }
.mini-btn {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
}
.mini-btn:hover:not(:disabled) { border-color: var(--plum); color: var(--plum); }
.mini-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.trip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Watches */
.wx-result { margin-top: 1rem; }
.wx-main { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.wx-main strong { font-size: 1.6rem; }
.wx-icon { font-size: 2.5rem; }
.wx-facts {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.4rem;
}
.wx-facts li {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
.wx-photo {
  background: var(--cream);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.75rem 1rem;
}
.verify-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: #2A1E42;
  color: #7a5c00;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}
.flower-section { margin-bottom: 1.25rem; }
.flower-section h3 { margin-top: 0; }

/* Print: clean itinerary */
@media print {
  #nav-slot, #footer-slot, .back-link, .trip-bar, .trip-actions,
  #item-form, .it-actions, #trip-form-wrap, #planner-guest,
  .toast, .modal-backdrop, form { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .itinerary-item::before { background: #000; }
}

/* ---- v19: password auth ---- */
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.auth-tab {
  flex: 1; padding: 0.55rem; border: 2px solid var(--line); background: var(--white);
  border-radius: 12px; font-weight: 700; cursor: pointer; color: #B9A8DC; font-size: 0.95rem;
}
.auth-tab.active { border-color: var(--grape); color: var(--grape); background: #2C1B52; }
.auth-email-form label { display: block; font-weight: 600; margin: 0.7rem 0 0.3rem; font-size: 0.9rem; }
.auth-email-form input { margin-bottom: 0.2rem; }
.auth-email-form .btn-primary { margin-top: 0.9rem; }
.btn-password {
  background: none; border: none; color: var(--grape); font-weight: 600;
  cursor: pointer; margin-right: 0.7rem; font-size: 0.9rem; padding: 0;
}
.btn-password:hover { text-decoration: underline; }

/* ---- v20: forgot-password ---- */
.linklike {
  background: none; border: none; color: var(--grape); font-weight: 600;
  cursor: pointer; font-size: 0.9rem; padding: 0.2rem 0.4rem;
}
.linklike:hover { text-decoration: underline; }

/* ---------- v21: full-screen map ---------- */
.map-page #map-wrap { position: relative; height: calc(100dvh - 58px); min-height: 440px; }
#map { position: absolute; inset: 0; background: #241640; z-index: 1; }
#map.adding-pin, #map.adding-pin .leaflet-grab { cursor: crosshair; }
.map-ctrl { position: absolute; z-index: 1100; }
#map-searchbox { top: 12px; left: 12px; width: min(340px, calc(100% - 150px)); }
#map-q { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
#map-results { margin-top: 6px; background: var(--white); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.2); overflow: hidden; max-height: 260px; overflow-y: auto; }
#map-results button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-family: inherit; }
#map-results button:hover { background: #2A1E42; }
#map-results button span { display: block; font-size: 12px; color: #B9A8DC; }
#map-layers { top: 12px; right: 12px; }
#layers-toggle { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font-size: 15px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); font-family: inherit; }
#layers-list { margin-top: 6px; background: var(--white); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 10px 12px; width: 212px; }
#layers-list label { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; cursor: pointer; }
#layers-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.layers-note { font-size: 11px; color: #B9A8DC; margin: 6px 0 0; }
.map-fab { border: 1px solid var(--line); background: var(--white); border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: pointer; font-size: 15px; font-family: inherit; }
#addpin-btn { left: 12px; bottom: 16px; padding: 12px 18px; font-weight: 600; }
#addpin-btn.active { background: var(--plum); color: #fff; border-color: var(--plum); }
#locate-btn { right: 12px; bottom: 118px; width: 44px; height: 44px; font-size: 20px; line-height: 1; }
#map-hint { left: 50%; transform: translateX(-50%); bottom: 76px; background: rgba(30,22,45,.92); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; max-width: calc(100% - 32px); text-align: center; }
.mr-pin span { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.map-popup { font-family: inherit; min-width: 150px; }
.map-popup strong { font-size: 15px; }
.mp-sub { font-size: 12px; color: #B9A8DC; margin-top: 2px; }
.mp-note { font-size: 13px; margin-top: 6px; white-space: pre-wrap; }
.mp-links { margin-top: 6px; font-size: 13px; }
.mp-del { margin-top: 8px; background: none; border: 1px solid #e07878; color: #ff9d9d; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-family: inherit; }
.pin-form input, .pin-form textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }
.mp-row { display: flex; gap: 8px; margin-top: 8px; }
.btn-small { padding: 8px 14px; border-radius: 8px; border: 0; background: var(--plum); color: #fff; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-ghost { background: #2C1B52; color: #F1EBFF; }
@media (max-width: 480px) {
  #map-hint { bottom: 150px; border-radius: 12px; }
}

/* ---------- v22: grouped nav (dropdowns + mobile menu) ---------- */
.site-header { position: sticky; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.nav-toggle:hover { background: rgba(255,255,255,0.2); }
.nav-group { position: relative; }
.nav-group-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.nav-group-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-group-btn.active { background: var(--amber); color: #2A1B4A; font-weight: 600; }
.nav-group-btn .caret { font-size: 0.75em; opacity: 0.8; }
.nav-drop {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 270px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(40,20,60,0.28);
  padding: 0.4rem;
  z-index: 200;
}
.nav-drop a {
  display: block;
  color: var(--plum);
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  white-space: normal;
}
.nav-drop a .drop-label { font-weight: 600; font-size: 0.95rem; display: block; }
.nav-drop a small { display: block; color: #B9A8DC; font-size: 0.78rem; margin-top: 1px; }
.nav-drop a:hover { background: #2A1E42; }
.nav-drop a.active { background: var(--amber); color: #2A1B4A; }
.nav-drop a.active small { color: #2A1B4A; opacity: 0.75; }
@media (min-width: 700px) {
  .site-nav { overflow: visible; } /* v40: overflow-x:auto clipped the dropdowns (overflow-y computes to auto) */
  .nav-group:hover .nav-drop,
  .nav-group:focus-within .nav-drop,
  .nav-group.open .nav-drop { display: block; }
  /* v40: invisible hover bridge across the 10px gap below the button,
     so the menu doesn't vanish while moving the pointer down to it */
  .nav-group::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
  }
}
@media (max-width: 699px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .site-header .container { position: relative; flex-wrap: nowrap; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--plum);
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: 0.6rem 1rem 1rem;
    max-height: 72vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 16px 30px rgba(0,0,0,0.35);
    border-radius: 0 0 16px 16px;
    z-index: 150;
  }
  .site-nav.open { display: flex; }
  .site-nav > a, .nav-group-btn {
    text-align: left;
    width: 100%;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    font-size: 1rem;
  }
  .nav-group .nav-drop {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    margin: 0.15rem 0 0.35rem;
    min-width: 0;
  }
  .nav-group.open .nav-drop { display: block; }
  .nav-drop a { color: #fff; }
  .nav-drop a small { color: rgba(255,255,255,0.65); }
  .nav-drop a:hover { background: rgba(255,255,255,0.12); }
  .nav-drop a.active { background: var(--amber); color: #2A1B4A; }
}
/* v42: feedback buttons + modal */
.footer-feedback {
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
  margin: 1.4rem 0 0.2rem;
}
.footer-feedback .btn { font-size: 0.85rem; padding: 0.45rem 0.95rem; }
.feedback-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5, 2, 12, 0.78);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.feedback-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.3rem;
  width: 100%; max-width: 480px; box-shadow: var(--shadow);
}
.feedback-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.feedback-head h3 { margin: 0; font-size: 1.15rem; }
.feedback-x {
  background: none; border: none; color: var(--ink);
  font-size: 1.15rem; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: 8px;
}
.feedback-x:hover { background: rgba(255,255,255,0.1); }
.feedback-types { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
.feedback-types button {
  flex: 1; background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: 0.5rem; cursor: pointer;
  font-family: inherit; font-size: 0.9rem;
}
.feedback-types button.active {
  background: var(--amber); border-color: var(--amber);
  color: #2A1B4A; font-weight: 600;
}
.feedback-card label { display: block; font-size: 0.9rem; margin-bottom: 0.8rem; }
.feedback-optional { opacity: 0.65; font-size: 0.8rem; }
.feedback-card textarea, .feedback-card input[type="email"] {
  width: 100%; margin-top: 0.35rem; box-sizing: border-box;
  background: #08050F; border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 0.6rem;
  font-family: inherit; font-size: 0.95rem;
}
.feedback-card textarea { resize: vertical; min-height: 90px; }
.feedback-card textarea:focus, .feedback-card input[type="email"]:focus {
  outline: 2px solid var(--amber); outline-offset: 1px;
}
.feedback-page { font-size: 0.8rem; opacity: 0.65; margin: 0 0 0.9rem; }
.feedback-actions { text-align: right; }
.feedback-status { font-size: 0.9rem; margin: 0.7rem 0 0; }
.feedback-status.ok { color: var(--grape); }
.feedback-status.err { color: #ff9d9d; }

/* v43: friends + messaging */
.nav-badge {
  display: inline-block; min-width: 1.3em; text-align: center;
  background: var(--amber); color: #2A1B4A; font-weight: 700; font-size: 0.72rem;
  border-radius: 999px; padding: 0.08em 0.4em; margin-left: 0.4em; vertical-align: middle;
}
.btn-sm { font-size: 0.82rem; padding: 0.35rem 0.75rem; }
.friend-subhead { font-size: 1.02rem; margin: 1.1rem 0 0.5rem; }
.friend-search-row { margin-bottom: 0.6rem; }
.friend-search-row input {
  width: 100%; box-sizing: border-box;
  background: #08050F; border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 0.6rem; font-family: inherit; font-size: 0.95rem;
}
.friend-search-row input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.friend-row {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line);
}
.friend-row:last-child { border-bottom: none; }
.friend-meta { flex: 1; min-width: 0; }
.friend-status { font-size: 0.85rem; opacity: 0.7; }
/* v101: friendship tier picker */
.tier-select {
  background: #08050F; border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 0.4rem 0.5rem; font-family: inherit; font-size: 0.85rem;
  max-width: 9.5rem;
}
.tier-select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.tier-note {
  font-size: 0.85rem; opacity: 0.85; background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0 0 0.6rem;
}
.msg-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; align-items: start; }
.msg-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
/* v107: "message a friend" name search, Facebook-style. */
.msg-search { margin-bottom: 0.75rem; }
.msg-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.45);
  background: #150B2A;
  color: #F5F0FF;
  font-size: 14px;
  box-sizing: border-box;
}
.msg-search input::placeholder { color: #8E7BB8; }
.msg-search input:focus { outline: 2px solid #7C3AED; outline-offset: 1px; }
.msg-search-hint { padding: 0 4px; margin: 0 0 4px; }
#friend-results .conv-item { width: 100%; text-align: left; }
.conv-item {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.2rem; cursor: pointer; text-align: left;
  font-family: inherit; color: var(--ink); border-radius: 8px;
}
.conv-item:last-child { border-bottom: none; }
.conv-item:hover { background: rgba(255,255,255,0.04); }
.conv-item.active { background: rgba(232,169,61,0.12); }
.conv-meta { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; }
.conv-preview { font-size: 0.83rem; opacity: 0.65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 0.75rem; opacity: 0.55; white-space: nowrap; }
.conv-unread {
  display: inline-block; min-width: 1.3em; text-align: center;
  background: var(--amber); color: #2A1B4A; font-weight: 700; font-size: 0.72rem;
  border-radius: 999px; padding: 0.08em 0.4em;
}
.msg-thread { display: flex; flex-direction: column; min-height: 420px; max-height: 70vh; }
.msg-thread-head { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }
.msg-back { display: none; }
.msg-scroll { flex: 1; overflow-y: auto; padding: 0.4rem 0.1rem; min-height: 200px; }
.msg-bubble-row { display: flex; margin: 0.35rem 0; }
.msg-bubble-row.me { justify-content: flex-end; }
.msg-bubble-row.them { justify-content: flex-start; }
.msg-bubble {
  max-width: 78%; padding: 0.55rem 0.8rem; border-radius: 16px;
  font-size: 0.93rem; line-height: 1.4; overflow-wrap: anywhere;
}
.msg-bubble-row.me .msg-bubble { background: var(--plum); color: #fff; border-bottom-right-radius: 5px; }
.msg-bubble-row.them .msg-bubble { background: #2A1B4A; color: var(--ink); border-bottom-left-radius: 5px; }
.msg-time { font-size: 0.7rem; opacity: 0.6; margin-top: 0.25rem; text-align: right; }
.msg-form { display: flex; gap: 0.5rem; padding-top: 0.7rem; border-top: 1px solid var(--line); margin-top: 0.4rem; }
.msg-form input {
  flex: 1; background: #08050F; border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: 0.6rem 1rem; font-family: inherit; font-size: 0.95rem;
}
.msg-form input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
/* v182: [hidden] must beat display:flex — the thread pane was visible when it should be hidden */
[hidden] { display: none !important; }
.msg-empty { display: none !important; } /* v181: removed the confusing blank placeholder — list takes the stage until you tap a chat */
/* v181: when no thread is open, the chat list spans full width (no empty right pane) */
.msg-layout:has(#msg-thread[hidden]) { grid-template-columns: 1fr; }
@media (max-width: 700px) {
  .msg-layout { grid-template-columns: 1fr; }
  .msg-back { display: inline-block; }
  /* v188: on phones, when a thread is open, hide the chat list — thread goes full-screen. */
  .msg-layout:not(:has(#msg-thread[hidden])) .msg-list { display: none; }
  .msg-layout:not(:has(#msg-thread[hidden])) { gap: 0; }
}

/* grouped footer */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.4rem;
  text-align: left;
}
.footer-group h3 { font-size: 0.95rem; margin: 0 0 0.5rem; color: var(--amber); }
.footer-group nav { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-group nav a { color: #fff; text-decoration: none; font-size: 0.9rem; opacity: 0.9; }
.footer-group nav a:hover { opacity: 1; text-decoration: underline; }

/* ---------- v22: homepage sidebar groups ---------- */
.fb-group-title { display: none; }
@media (max-width: 1023px) {
  .fb-menu-group { display: contents; }
}
@media (min-width: 1024px) {
  .fb-menu-group { display: block; }
  .fb-group-title {
    display: block;
    font-size: 0.88rem;
    color: var(--grape);
    margin: 0.9rem 0 0.35rem;
    padding: 0 0.2rem;
  }
  .fb-menu-group:first-child .fb-group-title { margin-top: 0; }
}

/* ---- Discover embedded map (v27) ---- */
.discover-map-wrap { margin: 0 0 1.2rem; }
#discover-map {
  height: 420px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: #1D1332;
  z-index: 1;
}
#discover-map .map-offline { padding: 3rem 1.5rem; text-align: center; color: #B9A8DC; }
.map-note { font-size: 0.85rem; color: #B9A8DC; margin: 0.5rem 0.2rem 0; }
@media (max-width: 699px) {
  #discover-map { height: 320px; border-radius: 14px; }
}

/* ---- Suggest-a-place (v28) ---- */
.suggest-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin: 0 0 1rem; }
.suggest-hint { font-size: 0.9rem; color: #B9A8DC; }
.suggest-modal { max-width: 34rem; text-align: left; }
.suggest-modal h2, .suggest-modal .modal-sub { text-align: center; }
.suggest-modal .form-row > label { font-size: 0.92rem; font-weight: 600; }
.suggest-modal textarea.input { resize: vertical; min-height: 3.2rem; width: 100%; box-sizing: border-box; }
.suggest-modal .form-row .input, .suggest-modal .form-row .select { width: 100%; box-sizing: border-box; margin-top: 4px; font-weight: 400; }
#suggest-minimap { height: 240px; border-radius: 12px; border: 2px solid var(--line); background: #1D1332; z-index: 1; }
.mini-hint { font-size: 0.85rem; color: #B9A8DC; margin: 0.4rem 0 0.8rem; }
#suggest-submit { width: 100%; }
.badge-community { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
.mp-badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: #2e7d32;
  background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 20px;
  padding: 1px 8px; margin: 3px 0;
}

.app-hero { display: flex; gap: 1.2rem; align-items: center; }
.app-hero img { border-radius: 22px; flex-shrink: 0; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.steps { line-height: 1.9; padding-left: 1.4rem; }
.steps li { margin-bottom: .35rem; }

/* ============ Profile (v44) ============ */
.pf-head { display: flex; gap: 18px; align-items: flex-start; }
.pf-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 3px solid #7C3AED; }
.pf-avatar-sm { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #7C3AED; vertical-align: middle; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: #7C3AED; color: #fff; font-weight: 700; }
.pf-avatar.avatar-initial { font-size: 44px; }
.pf-avatar-sm.avatar-initial { font-size: 26px; }
.pf-id { flex: 1; min-width: 0; }
.pf-name { margin: 0 0 4px; font-size: 1.5rem; color: #F5F0FF; }
/* v138: skill rank pill next to your name on your own profile. */
.pf-rank {
  display: inline-block; font-size: .85rem; font-weight: 700; color: #E8A93D;
  background: rgba(232,169,61,.12); border: 1px solid #E8A93D; border-radius: 999px;
  padding: .15rem .65rem; margin-left: .5rem; vertical-align: middle; white-space: nowrap;
}
/* v117: Real-world adventure games. */
.rw-game-card { margin-bottom: 1.5rem; }
.rw-game-card h3 { margin-bottom: 0.6rem; }
.rw-progress { font-weight: 600; opacity: 0.85; margin: 0.8rem 0; }
.rw-switcher { display: flex; align-items: center; gap: 0.6rem; margin: 1rem 0; }
.rw-switcher label { font-weight: 600; }
.rw-select { padding: 0.5rem 0.7rem; border-radius: 8px; font-size: 1rem; background: #2A1F45; color: #fff; border: 1px solid #4A3670; }
.gc-list { display: flex; flex-direction: column; gap: 0.4rem; }
.gc-row { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; }
.gc-row-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.8rem; background: none; border: none; color: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-align: left; }
.gc-row-toggle .gc-caret { opacity: 0.6; }
.gc-row-body { padding: 0 0.8rem 0.8rem; }
.gc-riddle { font-style: italic; margin: 0 0 0.6rem; font-size: 0.92rem; }
.gc-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gc-choice.gc-wrong { opacity: 0.45; text-decoration: line-through; }
.gc-found { color: #9f9; margin: 0; font-size: 0.92rem; }
.gc-row.gc-done { opacity: 0.9; }
.pk-list { display: flex; flex-direction: column; gap: 0.4rem; }
.pk-row { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem 0.7rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; cursor: pointer; font-size: 0.92rem; }
.pk-row input[type=checkbox] { width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; flex-shrink: 0; }
.pk-text { display: flex; flex-direction: column; gap: 0.15rem; }
.pk-detail { opacity: 0.65; font-size: 0.82rem; }
.pk-row.pk-done { opacity: 0.7; }
.pk-row.pk-done strong { text-decoration: line-through; }
#gh-view-basics p, #gh-view-progress p { margin-bottom: 0.8rem; }
/* v116: Ghost Hunting game. */
.gh-subhead { margin-top: 1.5rem; }
.gh-place .gh-region { opacity: 0.65; font-size: 0.85rem; margin-bottom: 0.5rem; }
.gh-place.gh-done { opacity: 0.85; }
.gh-case { margin-top: 1.5rem; border: 2px solid var(--accent, #7C3AED); }
.gh-case-desc { font-style: italic; opacity: 0.9; }
.gh-case-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.gh-evp-status { font-weight: 600; margin-top: 1rem; }
.gh-evp-timer { font-size: 2.2rem; font-weight: 800; text-align: center; margin: 0.5rem 0; }
.gh-evp-msg { font-style: italic; opacity: 0.85; min-height: 1.5em; }
.gh-complete { margin-top: 1.5rem; border: 2px solid gold; text-align: center; }
/* v114: Find Milly difficulty picker. */
.fm-difficulty { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 1rem 0; flex-wrap: wrap; }
.fm-diff-label { font-weight: 600; opacity: 0.85; }
.fm-diff-btn.fm-diff-active { border-color: var(--accent, #7C3AED); background: rgba(124, 58, 237, 0.18); font-weight: 700; }
/* v113: My Profile quick link at top of the feed (hero removed). */
.feed-top-actions { margin-bottom: 1rem; }
/* v109: full-area tappable file picker (reliable on phones). */
.pf-filewrap { position: relative; display: inline-block; margin-bottom: 0.8rem; }
.pf-filewrap .btn { pointer-events: none; }
.pf-filewrap .pf-fileinput {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  font-size: 16px; /* iOS: prevents zoom on tap */
}
.pf-avatar-preview { margin-bottom: 0.5rem; }
/* v105: Facebook-style profile — cover banner, big avatar, tab bar, two-column body. */
.pf-fbhead { display: block; padding: 0 0 0; overflow: hidden; }
.pf-cover {
  height: 170px;
  margin: 0;
  background:
    radial-gradient(1200px 300px at 20% 0%, rgba(245, 158, 11, 0.35), transparent 60%),
    linear-gradient(135deg, #2A1650 0%, #7C3AED 60%, #4C1D95 100%);
}
.pf-head-main {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  margin-top: -46px;
  padding: 0 1.25rem;
}
.pf-avatar-lg { width: 132px; height: 132px; border-width: 4px; }
.pf-avatar-lg.avatar-initial { font-size: 52px; }
.pf-fbhead .pf-id { padding-bottom: 4px; min-width: 0; }
.pf-tabs {
  display: flex;
  gap: 2px;
  margin: 12px 1.25rem 0;
  border-top: 1px solid var(--line);
  padding-top: 2px;
  overflow-x: auto;
}
.pf-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #B9A8E8;
  padding: 12px 18px 9px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pf-tab:hover { color: #F5F0FF; }
.pf-tab.on { color: #fff; border-bottom-color: #7C3AED; }
.pf-tab:focus-visible { outline: 2px solid #7C3AED; outline-offset: -2px; }
#pf-tabbody { margin-top: 16px; }
.pf-cols {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pf-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pf-side .card, .pf-main .card { margin: 0; }
.pf-main { min-width: 0; }
@media (max-width: 900px) {
  .pf-cols { grid-template-columns: 1fr; }
  .pf-cover { height: 120px; }
  .pf-head-main { margin-top: -36px; gap: 12px; }
  .pf-avatar-lg { width: 92px; height: 92px; }
  .pf-avatar-lg.avatar-initial { font-size: 36px; }
}
.pf-bio { margin: 0 0 6px; color: #D9CCF5; }
.pf-meta { margin: 0 0 10px; color: #A78BFA; font-size: 0.9rem; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.friend-status { color: #A78BFA; font-size: 0.9rem; }
.pf-story { white-space: pre-wrap; color: #EDE7FB; line-height: 1.6; }
.pf-photos-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pf-photo { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #140C28; }
.pf-photo img { width: 100%; height: 140px; object-fit: cover; display: block; }
.pf-photo figcaption { padding: 6px 8px; font-size: 0.8rem; color: #D9CCF5; }
.pf-photo-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.65); color: #fff; font-size: 14px; cursor: pointer; }
/* v162: shop — tabs + sell button on portfolio photos. */
.pf-tabs { display: flex; gap: 0.5rem; margin: 0.8rem 0; }
.pf-tab { flex: 1; padding: 0.6rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: inherit; font-size: 1rem; cursor: pointer; }
.pf-tab.active { background: #7C3AED; border-color: #7C3AED; color: #fff; font-weight: 700; }
.pf-photo-sell { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.65); color: #fff; font-size: 14px; cursor: pointer; }
/* v164: in-app browser hint (Facebook/Instagram webview). */
#milly-iab-hint { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0.9rem; background: #1D1332; border-bottom: 1px solid rgba(124,58,237,0.5); font-size: 0.85rem; }
#milly-iab-hint button { background: none; border: 0; color: inherit; font-size: 1rem; cursor: pointer; padding: 0.2rem 0.5rem; }
/* v163: order progress tracker. */
.order-track { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0.5rem 0; }
.ot-step { font-size: 0.8rem; padding: 0.25rem 0.6rem; border-radius: 20px; border: 1px solid rgba(255,255,255,0.14); white-space: nowrap; }
.ot-done { background: rgba(124,58,237,0.25); border-color: #7C3AED; }
.ot-now { background: #7C3AED; border-color: #7C3AED; color: #fff; font-weight: 700; }
.ot-todo { opacity: 0.55; }
.ot-sep { opacity: 0.4; font-size: 0.8rem; }
.live-card { border: 2px solid #EF4444; }
.live-badge { display: inline-block; background: #EF4444; color: #fff; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.live-embed { position: relative; padding-bottom: 56.25%; height: 0; }
.live-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.pf-golive-help { color: #D9CCF5; line-height: 1.5; }
.pf-avatar-preview { margin: 6px 0 10px; display: flex; align-items: center; gap: 10px; }
.post-name a { color: inherit; text-decoration: none; }
.post-name a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .pf-head { flex-direction: column; align-items: center; text-align: center; }
  .pf-actions { justify-content: center; }
}

/* ============ Profile posts + friends (v45) ============ */
a.fb-user { text-decoration: none; }
a.fb-user:hover { text-decoration: underline; }
.pf-avatar-xs { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pf-avatar-xs.avatar-initial { font-size: 18px; }
.pf-composer textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid #3B2A63; background: #140C28; color: #F5F0FF; padding: 10px 12px; font: inherit; resize: vertical; }
.pf-composer-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.pf-filebtn { cursor: pointer; }
.pf-post { border-top: 1px solid #2A1B4E; padding: 14px 0; }
.pf-post:first-of-type { border-top: 0; }
.pf-post-head { display: flex; gap: 10px; align-items: center; position: relative; margin-bottom: 8px; }
.pf-post-head .pf-photo-del { position: static; margin-left: auto; }
.pf-post-time { font-size: 0.8rem; color: #A78BFA; }
.pf-post-text { white-space: pre-wrap; color: #EDE7FB; line-height: 1.55; margin: 0 0 8px; }
.pf-post-photo { width: 100%; border-radius: 10px; display: block; }

/* ============ Friends' posts feed (v46) ============ */
.fp-post { margin-bottom: 12px; }

/* ============ Notification bell (v46) ============ */
.notif-wrap { position: relative; display: inline-block; }
.notif-bell { background: none; border: 0; font-size: 1.3rem; cursor: pointer; position: relative; padding: 4px 8px; line-height: 1; }
.notif-badge { position: absolute; top: 0; right: 2px; background: #E5484D; color: #fff; font-size: 0.65rem; font-weight: 700; min-width: 1.1rem; height: 1.1rem; line-height: 1.1rem; text-align: center; border-radius: 999px; padding: 0 3px; }
.notif-panel { position: absolute; right: 0; top: 2.4rem; width: min(22rem, 82vw); max-height: 26rem; overflow-y: auto; background: #1D1332; border: 1px solid #3B2A63; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.55); z-index: 300; text-align: left; }
.notif-panel-head { padding: 10px 14px; font-weight: 700; color: #F5F0FF; border-bottom: 1px solid #2A1B4E; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid #2A1B4E; align-items: center; }
.notif-item:last-child { border-bottom: 0; }
.notif-unread { background: #2A1B4E; }
.notif-body { display: flex; flex-direction: column; gap: 2px; }
.notif-text { font-size: 0.9rem; color: #EDE7FB; line-height: 1.4; }

/* ============ Post as Milly (v47) ============ */
.pf-milly-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: #C4B5FD; cursor: pointer; margin-right: auto; }
.pf-milly-toggle input { accent-color: #7C3AED; width: 1rem; height: 1rem; }

/* ============ Milly's friendships (v49) ============ */
.pf-milly-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #3B2A63; }

/* ============ Chat popup + message toasts (v50) ============ */
#chat-popup { position: fixed; right: 16px; bottom: 0; width: 340px; max-width: calc(100vw - 32px); height: 440px; max-height: 72vh; z-index: 1200; display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--line); border-bottom: none; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 32px rgba(0,0,0,.5); overflow: hidden; }
#chat-popup[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--white); border-bottom: 1px solid var(--line); }
.chat-head-id { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.chat-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-tools { display: flex; gap: 2px; margin-left: auto; }
.chat-tool { background: none; border: none; color: var(--grape); font-size: 1rem; cursor: pointer; padding: 4px 6px; border-radius: 6px; text-decoration: none; }
.chat-tool:hover { background: var(--bubble); color: var(--ink); }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-body[hidden] { display: none; }
.chat-msg { display: flex; }
.chat-msg.me { justify-content: flex-end; }
.chat-bubble { max-width: 80%; padding: 8px 12px; border-radius: 16px; background: var(--bubble); color: var(--ink); font-size: .92rem; line-height: 1.35; word-wrap: break-word; }
.chat-msg.me .chat-bubble { background: var(--plum); color: #fff; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--white); }
.chat-form[hidden] { display: none; }
.chat-form input { flex: 1; min-width: 0; background: var(--cream); border: 1px solid var(--line); border-radius: 20px; padding: 8px 14px; color: var(--ink); font-size: .92rem; }
.chat-form input:focus { outline: none; border-color: var(--plum); }
#chat-toasts { position: fixed; left: 16px; bottom: 16px; z-index: 1300; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.chat-toast { display: flex; align-items: center; gap: 10px; width: 320px; max-width: 100%; background: var(--white); border: 1px solid var(--plum); border-radius: 12px; padding: 10px 12px; box-shadow: 0 8px 28px rgba(0,0,0,.5); cursor: pointer; animation: toast-in .25s ease-out; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-toast-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-toast-name { font-weight: 700; color: var(--ink); font-size: .9rem; }
.chat-toast-text { color: var(--grape); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-time { display: block; font-size: .68rem; opacity: .65; margin-top: 3px; }

/* ============ Topbar message button + dropdown (v51) ============ */
.msg-bell { background: none; border: none; font-size: 1.25rem; cursor: pointer; padding: 6px 8px; border-radius: 8px; position: relative; }
.msg-bell:hover { background: var(--bubble); }
.msg-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--bubble); padding: 10px 12px; cursor: pointer; color: var(--ink); }
.msg-item:hover { background: var(--bubble); }
.msg-item:last-child { border-bottom: none; }
.msg-unread-n { color: #F0ABFC; font-weight: 700; }
.notif-seeall { display: block; text-align: center; padding: 10px; color: var(--grape); font-weight: 600; text-decoration: none; border-top: 1px solid var(--bubble); }
.notif-seeall:hover { color: var(--ink); }
#msg-sound-toggle { margin-left: auto; }

/* Read receipts (v52) */
.msg-receipt { font-size: .72rem; color: var(--grape); text-align: right; margin-top: 2px; }
.chat-receipt { display: block; font-size: .68rem; color: var(--grape); text-align: right; margin-top: 2px; }

/* ============ Settings page (v52) ============ */
.set-card { margin-bottom: 1.2rem; }
.set-label { font-weight: 700; margin: 1rem 0 .5rem; color: var(--ink); }
.set-seg { display: flex; gap: 8px; }
.set-seg-btn { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1rem; cursor: pointer; }
.set-seg-btn.active { border-color: var(--plum); background: var(--plum); color: #fff; font-weight: 700; }
.set-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.set-swatch { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: .9rem; }
.set-swatch.active { border-color: var(--plum); font-weight: 700; box-shadow: 0 0 0 2px var(--plum); }
.set-swatch-dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-row:last-child { border-bottom: none; }
.set-row-text { display: flex; flex-direction: column; }
.set-row-label { font-weight: 600; color: var(--ink); }
.set-row-sub { font-size: .85rem; color: var(--grape); }
.set-switch { position: relative; width: 52px; height: 30px; border-radius: 15px; border: none; background: #4A3A6E; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.set-switch.on { background: var(--plum); }
.set-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.set-switch.on .set-knob { left: 25px; }
.topbar-gear { font-size: 1.2rem; text-decoration: none; padding: 4px 6px; border-radius: 8px; }
.topbar-gear:hover { background: rgba(255,255,255,.15); }

/* ================= v55: Facebook-style mobile chrome ================= */
#m-appbar, #m-tabbar, #m-menusheet { display: none; }
#m-menusheet[hidden] { display: none; }

.topbar-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--plum); color: #fff; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 2px solid rgba(255,255,255,.35);
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  /* --- slim app bar: brand + icon buttons only --- */
  #m-appbar { display: block; position: sticky; top: 0; z-index: 60; background: var(--plum); }
  .m-appbar-inner { display: flex; align-items: center; gap: .4rem; padding: .45rem .7rem; }
  #m-appbar .fb-brand { display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
  #m-appbar .fb-brand img { width: 30px; height: 30px; border-radius: 50%; }
  #m-appbar .fb-auth { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
  #m-appbar .fb-user, #m-appbar .topbar-gear, #m-appbar .btn-password,
  #m-appbar .btn-signout, #m-appbar .creator-badge { display: none !important; }

  /* same slimming for the hardcoded topbar on index.html / reset.html */
  .fb-topbar .fb-links { display: none !important; }
  .fb-topbar .fb-user, .fb-topbar .topbar-gear, .fb-topbar .btn-password,
  .fb-topbar .btn-signout, .fb-topbar .creator-badge { display: none !important; }
  .fb-topbar-inner { gap: .4rem !important; padding: .45rem .7rem !important; }
  .fb-topbar .fb-auth { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
  .fb-topbar .fb-brand { white-space: nowrap; }

  /* hamburger header replaced by the bottom tab bar */
  .site-header { display: none !important; }

  /* --- bottom tab bar --- */
  #m-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--white); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .m-tab {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: .5rem 0 .4rem; color: var(--grape); text-decoration: none;
    background: none; border: 0; font: inherit; cursor: pointer;
  }
  .m-tab-icon { font-size: 1.4rem; line-height: 1; position: relative; }
  .m-tab-label { font-size: .66rem; }
  .m-tab.active { color: var(--plum); }
  .m-tab.active .m-tab-label { font-weight: 700; }
  .m-tab-badge {
    position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px;
    padding: 0 4px; border-radius: 999px; background: #e0245e; color: #fff;
    font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  }
  .m-tab-badge[hidden] { display: none; }

  /* keep page content clear of the fixed tab bar */
  body { padding-bottom: 66px; }

  /* --- slide-up menu sheet --- */
  #m-menusheet { display: block; position: fixed; inset: 0; z-index: 2000; }
  .m-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
  .m-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 84vh; overflow-y: auto;
    background: var(--white); border-radius: 18px 18px 0 0;
    padding: .9rem 1rem calc(1.2rem + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -8px 32px rgba(0,0,0,.5);
  }
  .m-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; font-size: 1.05rem; }
  .m-sheet-head button { background: none; border: 0; font-size: 1.1rem; color: var(--grape); cursor: pointer; padding: .3rem .5rem; }
  .m-sheet-profile { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); padding: .4rem 0; }
  .m-sheet-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--plum); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; flex: 0 0 auto; }
  .m-sheet-who { display: flex; flex-direction: column; }
  .m-sheet-who small { color: var(--grape); }
  .m-sheet-signout { display: inline-block; margin: .1rem 0 .4rem; color: var(--grape); font-size: .85rem; }
  .m-sheet-group { margin-top: .9rem; }
  .m-sheet-group h4 { margin: 0 0 .35rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grape); }
  .m-sheet-links { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
  .m-sheet-links a { display: block; padding: .55rem .6rem; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .92rem; }

  /* chat floats above the tab bar */
  #chat-popup { bottom: 70px !important; }
  #chat-toasts { bottom: 78px !important; }
}

/* ---------- real live video (v57) ---------- */
.live-studio { display: grid; gap: 1rem; max-width: 720px; }
.live-stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.live-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-badge { position: absolute; top: 10px; left: 10px; background: #c00; color: #fff; font-weight: 700; padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; }
.live-controls { display: grid; gap: 0.6rem; }
.live-title-label { display: grid; gap: 0.3rem; font-weight: 600; }
.live-title-label input { width: 100%; }
.live-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.live-hint { font-size: 0.85rem; opacity: 0.75; margin: 0; }
.live-watch { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; margin-top: 0.6rem; }
.live-watch video { width: 100%; height: 100%; object-fit: contain; display: block; }
.live-watch .live-badge { top: 10px; left: 10px; }
.live-watch-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,0.55); text-align: center; padding: 1rem; }
.live-unmute { position: absolute; bottom: 10px; right: 10px; }

/* ---------- in-app camera (v57) ---------- */
.cam-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cam-box { background: var(--surface, #1D1332); border-radius: 14px; padding: 1rem; max-width: 560px; width: 100%; display: grid; gap: 0.8rem; }
.cam-video { width: 100%; border-radius: 10px; background: #000; max-height: 60vh; object-fit: cover; }
.cam-bar { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.cam-shutter { font-size: 1.05rem; }
.cam-error { color: #ff9d9d; margin: 0; font-size: 0.9rem; }
.cam-attach-btn { margin-top: 0.4rem; }

/* ---------- Milly Live (v58) ---------- */
.live-badge-milly { background: linear-gradient(135deg, #7C3AED, #A855F7); animation: milly-pulse 1.6s ease-in-out infinite; }
@keyframes milly-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.live-card-milly { border: 2px solid #7C3AED; box-shadow: 0 0 18px rgba(124,58,237,0.35); }
.live-milly-toggle { display: flex; gap: 0.5rem; align-items: center; background: rgba(124,58,237,0.12); border: 1px solid #7C3AED; border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.92rem; cursor: pointer; }
.live-milly-toggle input { width: auto; }
#milly-live-banner { margin-bottom: 1rem; }
.milly-live-link { display: flex; align-items: center; gap: 0.8rem; background: linear-gradient(135deg, #2A1650, #3B1F6E); border: 2px solid #7C3AED; border-radius: 14px; padding: 0.8rem 1rem; text-decoration: none; color: inherit; box-shadow: 0 0 22px rgba(124,58,237,0.45); animation: milly-pulse 1.6s ease-in-out infinite; }
.milly-live-link:hover { text-decoration: none; }
#milly-live-title { font-weight: 700; flex: 1; }
.milly-live-cta { background: #7C3AED; color: #fff; font-weight: 700; border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.9rem; }
.pf-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.pf-preview-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #1D1332; }
.pf-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.pf-post-grid-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #1D1332; }
.hashtag { color: #B794F6; font-weight: 600; text-decoration: none; }
.hashtag:hover { text-decoration: underline; }
.tag-header { text-align: center; margin: 1.2rem 0; }
.tag-header h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }

/* v74: tappable like/share counts + likers/sharers modal */
.pstat-link, .wstat-link { cursor: pointer; }
.pstat-link:hover, .wstat-link:hover { text-decoration: underline; }
.eng-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 1rem; }
.eng-overlay[hidden] { display: none; }
.eng-modal { background: #1D1332; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; width: 100%; max-width: 340px; max-height: 70vh; display: flex; flex-direction: column; color: #fff; }
.eng-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.eng-close { background: none; border: none; color: #B9A8DC; font-size: 1.1rem; cursor: pointer; }
.eng-list { overflow-y: auto; padding: .5rem 1rem 1rem; }
.eng-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; }
.eng-row .avatar { width: 32px; height: 32px; font-size: .9rem; }
.eng-note { color: #9a8fb5; font-size: .85rem; padding: .4rem 0; }

/* v75: Milly events + profile calendar */
.event-card { display: flex; gap: 1rem; background: #1D1332; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 1rem; margin-bottom: .8rem; }
.event-when { text-align: center; min-width: 92px; }
.event-count { font-weight: 800; font-size: 1.05rem; color: #F5B301; }
.event-date { font-size: .8rem; color: #B9A8DC; margin-top: .2rem; }
.event-title { margin: 0 0 .3rem; font-size: 1.1rem; }
.event-loc { margin: .2rem 0; color: #B9A8DC; }
.event-notes { margin: .4rem 0 0; }
.svc-badge { display: inline-block; font-size: .8rem; background: rgba(255,255,255,.08); border-radius: 999px; padding: .15rem .6rem; margin: .2rem 0; }
.svc-none { background: rgba(255,80,80,.15); }
.event-past-row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.ev-form { display: grid; gap: .6rem; }
.ev-form input, .ev-form select { width: 100%; padding: .55rem .7rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: #0d0918; color: #fff; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: .75rem; color: #9a8fb5; padding: .2rem 0; }
.cal-day { min-height: 44px; background: rgba(255,255,255,.04); border-radius: 8px; padding: 2px 4px; font-size: .8rem; }
.cal-blank { background: transparent; }
.cal-today { outline: 2px solid #7C3AED; }
.cal-num { font-weight: 700; font-size: .75rem; color: #B9A8DC; }
.cal-ev { display: block; font-size: .68rem; background: #7C3AED; color: #fff; border-radius: 4px; padding: 0 3px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: .68rem; color: #9a8fb5; }
.cal-upcoming { list-style: none; padding: 0; margin: .4rem 0; }
.cal-upcoming li { padding: .45rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.cal-del { background: none; border: none; color: #B9A8DC; cursor: pointer; }
.cal-form { display: grid; gap: .5rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.08); }
.cal-form input { padding: .55rem .7rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: #0d0918; color: #fff; }

/* v77: one-tap update banner (auto-updater in mainnav.js). */
.update-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #2A1B4E; border: 1px solid #7C3AED; color: #F5F0FF;
  border-radius: 14px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  font-size: .9rem; }
.update-banner button { background: #7C3AED; color: #fff; border: 0; border-radius: 10px;
  padding: 8px 14px; font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* ---- v85: Milly Events calendar + safety tiers + photo-walk RSVPs ---- */
.evcal-wrap { margin-bottom: 1rem; }
.evcal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.evcal-title { font-size: 1.05rem; margin: 0; }
.evcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.evcal-dow { text-align: center; font-size: .72rem; color: #9a8fb5; padding: .25rem 0; }
.evcal-day { min-height: 46px; background: rgba(255,255,255,.045); border: 1px solid transparent; border-radius: 10px;
  padding: 3px 4px; font-size: .8rem; color: var(--ink, #F5F0FF); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; }
.evcal-day:hover { border-color: rgba(124,58,237,.5); }
.evcal-dim { background: transparent; cursor: default; }
.evcal-num { font-weight: 700; font-size: .78rem; color: #B9A8DC; }
.evcal-today .evcal-num { color: #fff; background: #7C3AED; border-radius: 50%; width: 1.5em; height: 1.5em;
  display: inline-flex; align-items: center; justify-content: center; }
.evcal-sel { border-color: #7C3AED; background: rgba(124,58,237,.14); }
/* v93/v94: range endpoints in the event calendar get an amber ring */
.evcal-rs .evcal-num, .evcal-re .evcal-num { outline: 2px solid #F5B942; outline-offset: 2px; border-radius: 50%; }
.evcal-dots { display: flex; gap: 3px; min-height: 8px; }
.evcal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-walk { background: #7C3AED; box-shadow: 0 0 4px rgba(124,58,237,.8); }
.dot-roam { background: #E8A33D; }
.evcal-legend { font-size: .75rem; color: #9a8fb5; margin: .6rem 0 0; display: flex; gap: .35rem; align-items: center; }
.event-badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.kind-badge { font-size: .72rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; }
.kind-walk { background: rgba(124,58,237,.2); color: #C9B3F5; border: 1px solid rgba(124,58,237,.5); }
.kind-roam { background: rgba(232,163,61,.14); color: #F0C078; border: 1px solid rgba(232,163,61,.4); }
/* v142: canceled events */
.kind-canceled { background: rgba(220,60,60,.14); color: #F09393; border: 1px solid rgba(220,60,60,.45); }
.event-card.is-canceled { opacity: .62; }
.event-card.is-canceled .event-title { text-decoration: line-through; }
.dot-canceled { background: #777; box-shadow: none; }
.ev-check { display: flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.ev-check input { width: auto; margin: 0; }
.vis-note { font-size: .72rem; color: #9a8fb5; }
.event-meetup { font-size: .9rem; margin: .4rem 0; background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.3); border-radius: 10px; padding: .5rem .7rem; }
.event-locked { font-size: .82rem; color: #9a8fb5; font-style: italic; margin: .4rem 0; }
.rsvp-btn { display: inline-block; margin-top: .5rem; background: #7C3AED; color: #fff; border: 0;
  border-radius: 999px; padding: .5rem 1.1rem; font-weight: 700; font-size: .88rem; cursor: pointer; }
.rsvp-btn:disabled { opacity: .6; }
.rsvp-btn.rsvp-on { background: rgba(124,58,237,.18); color: #C9B3F5; border: 1px solid #7C3AED; }
.rsvp-btn.rsvp-signin { background: rgba(255,255,255,.08); color: #EDE6FA; border: 1px solid rgba(255,255,255,.2); }
.rsvp-count { font-weight: 400; opacity: .85; }
.linklike { background: none; border: 0; color: #B9A8DC; cursor: pointer; font-size: .82rem;
  text-decoration: underline; padding: .3rem 0; }
.ev-form textarea { width: 100%; padding: .55rem .7rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15); background: #0d0918; color: #fff; font: inherit; }
.ev-form small.feedback-optional { display: block; margin-top: -.3rem; }

/* ---- v86: event day-picker + safety card ---- */
.pk-block { margin: .2rem 0 .4rem; }
.pk-block > label { display: block; margin-bottom: .4rem; font-weight: 600; }
.pk-range { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pk-range input[type="date"] { padding: .45rem .6rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15); background: #0d0918; color: #fff; font: inherit; }
.pk-count { margin: .4rem 0 0; font-size: .82rem; }
.safety-card { border: 1px solid rgba(232,163,61,.35); background: rgba(232,163,61,.07); margin-bottom: 1rem; }
.safety-card p { font-size: .9rem; margin: .4rem 0; }
.safety-card p:last-child { margin-bottom: 0; }

/* ---- v90: creator card + friend rail ---- */
.creator-card { display: flex; gap: .9rem; align-items: center;
  border: 1px solid rgba(232,163,61,.4); background: rgba(232,163,61,.06); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; flex: none; }
.creator-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--amber); }
.creator-meta .post-name { font-size: 1.15rem; }
.creator-sub { margin: .25rem 0 .6rem; font-size: .88rem; color: #B9A8DC; }
/* v131: host card tagline — her sign-off line. */
.creator-tagline { margin: .1rem 0 .7rem; font-size: .95rem; font-style: italic; color: var(--amber); }
.friend-rail { display: flex; gap: .7rem; overflow-x: auto; padding: .4rem .1rem .8rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.rail-friend { display: flex; flex-direction: column; align-items: center; gap: .25rem;
  min-width: 64px; text-decoration: none; }
.rail-friend .avatar { width: 56px; height: 56px; border: 2px solid var(--amber); }
.rail-name { font-size: .72rem; color: #EDE9FE; max-width: 64px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- v92: emoji + GIF pickers ---- */
.mp-btn { flex: none; }
.mp-pop { position: fixed; z-index: 9999; }
.mp-emoji { width: 264px; max-height: 220px; overflow-y: auto; background: #1D1332;
  border: 1px solid #3B2A63; border-radius: 12px; padding: .5rem;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.mp-emoji-btn { font-size: 1.35rem; background: none; border: 0; border-radius: 8px;
  padding: .25rem; cursor: pointer; line-height: 1.2; }
.mp-emoji-btn:hover { background: #2C1E4D; }
.mp-gif-ov { inset: 0; background: rgba(4,2,10,.72); display: flex;
  align-items: center; justify-content: center; padding: 1rem; }
.mp-gif-box { background: #1D1332; border: 1px solid #3B2A63; border-radius: 14px;
  width: min(480px, 100%); max-height: 80vh; display: flex; flex-direction: column;
  padding: .9rem; }
.mp-gif-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.mp-gif-search { width: 100%; margin-bottom: .6rem; }
.mp-gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem;
  overflow-y: auto; min-height: 120px; }
.mp-gif { border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #2C1E4D; }
.mp-gif img { width: 100%; height: 90px; object-fit: cover; display: block; }
.mp-gif-note { font-size: .72rem; color: #8E7BB5; margin: .6rem 0 0; text-align: right; }
.mp-gif-img { max-width: 200px; border-radius: 10px; display: block; margin-top: .3rem; }

/* v97: per-day locations */
.evp-day { margin-bottom: .5rem; padding: .55rem; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; }
.evp-date { font-weight: 700; font-size: .82rem; color: #B9A8DC; margin-bottom: .35rem; }
.evp-row { display: flex; gap: .4rem; margin-bottom: .3rem; }
.evp-row input { flex: 1; min-width: 0; }
.event-places { margin: .4rem 0; }
.event-place-row { display: flex; gap: .5rem; font-size: .85rem; padding: .15rem 0; color: #D9D2EC; }
.event-place-date { font-weight: 700; color: #B9A8DC; min-width: 3.4rem; flex-shrink: 0; }

/* v98: visited check-off trail on event cards */
.evp-dayview { margin-bottom: .5rem; }
.evp-check { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; font-size: .85rem; color: #D9D2EC; cursor: pointer; }
.evp-check input { width: 1.05rem; height: 1.05rem; accent-color: #7C3AED; flex-shrink: 0; }
.evp-done { text-decoration: line-through; opacity: .65; }
.evp-pub { font-size: .72rem; color: #9FE8B8; }
.evp-rowview { display: flex; gap: .5rem; font-size: .85rem; padding: .15rem 0; color: #D9D2EC; }

/* v123: Learn page — lesson card images + cheat sheets. */
.learn-card-img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 0.7rem; }
.cheat-card { margin-bottom: 1.5rem; }
.cheat-card h2 { margin-bottom: 0.5rem; }
.cheat-sheet h3 { margin: 0.8rem 0 0.2rem; }
.cheat-modeline { font-weight: 700; opacity: 0.85; margin-bottom: 0.5rem; }
.cheat-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cheat-table th { text-align: left; padding: 0.45rem 0.6rem; width: 34%; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.08); }
.cheat-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cheat-tip { margin-top: 0.8rem; font-style: italic; opacity: 0.9; }

/* v127: copyright protection. */
.pf-copyright { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.pf-copyright h3 { margin-bottom: 0.6rem; font-size: 1rem; }
.pf-check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.7rem; cursor: pointer; }
.pf-check input { width: 1.2rem; height: 1.2rem; accent-color: #7C3AED; flex-shrink: 0; margin-top: 0.15rem; }
.pf-copyright-note { margin-top: 0.5rem; font-size: 0.82rem; }
.protected-img { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.protected-img img { -webkit-user-drag: none; }
.copyright-note { font-size: 0.78rem; opacity: 0.65; max-width: 600px; margin: 0.6rem auto 0; line-height: 1.5; }

/* v135: skill ranks + badges. */
.rank-bar { height: 10px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: .6rem 0; }
.rank-fill { height: 100%; background: linear-gradient(90deg, #7C3AED, #F59E0B); border-radius: 99px; transition: width .4s ease; }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-top: .8rem; }
.badge-tile { text-align: center; padding: .7rem .4rem; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); position: relative; }
.badge-tile.earned { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.08); }
.badge-tile.locked { opacity: .45; filter: grayscale(.8); }
.badge-emoji { font-size: 1.8rem; }
.badge-name { font-size: .72rem; font-weight: 600; margin-top: .3rem; }
.badge-lock { position: absolute; top: 4px; right: 6px; font-size: .8rem; }

/* v187: Facebook-style reaction picker. */
.react-wrap { position: relative; display: inline-block; }
.react-btn { background: none; border: none; color: inherit; cursor: pointer; padding: 6px 10px; font-size: .9rem; border-radius: 6px; }
.react-btn:hover { background: rgba(255,255,255,.08); }
.react-btn.reacted { color: #7C3AED; font-weight: 600; }
.react-picker { position: absolute; bottom: 100%; left: 0; margin-bottom: 6px; background: #1D1332; border: 1px solid rgba(124,58,237,.4); border-radius: 24px; padding: 6px 8px; display: flex; gap: 4px; z-index: 50; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.react-picker[hidden] { display: none; }
.react-opt { background: none; border: none; font-size: 1.6rem; cursor: pointer; padding: 4px; border-radius: 50%; transition: transform .15s; }
.react-opt:hover { transform: scale(1.3); }
.react-opt.selected { background: rgba(124,58,237,.3); }
.reaction-summary { font-size: .85rem; color: #a78bfa; }
.post-stats { padding: 4px 12px; font-size: .85rem; }

/* v190: photo access help modal. */
#milly-photo-help { position: fixed; inset: 0; z-index: 3000; }
#milly-photo-help[hidden] { display: none; }
.mph-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.mph-sheet { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); max-height: 84vh; overflow-y: auto; background: #1D1332; border: 1px solid rgba(124,58,237,.5); border-radius: 16px; padding: 1.1rem 1.2rem; color: #fff; }
.mph-head { display: flex; align-items: center; justify-content: space-between; font-size: 1.1rem; margin-bottom: .5rem; }
.mph-head button { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
.mph-sheet h4 { margin: .9rem 0 .3rem; color: #c4b5fd; }
.mph-sheet ol { margin: 0 0 .5rem 1.2rem; padding: 0; }
.mph-sheet li { margin-bottom: .4rem; line-height: 1.45; }
.mph-note { font-size: .85rem; opacity: .75; }
.mph-help-link { background: none; border: none; color: #a78bfa; font-size: .8rem; cursor: pointer; text-decoration: underline; padding: 2px 4px; }

/* v192: photo lightbox — tap to enlarge. */
#milly-lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
#milly-lightbox[hidden] { display: none; }
.mlb-backdrop { position: absolute; inset: 0; }
.mlb-img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 8px; position: relative; z-index: 1; }
.mlb-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0)); right: 14px; z-index: 2; background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.4rem; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; }
.mlb-close:hover { background: rgba(255,255,255,.3); }
.post-photo[data-full], .pf-post-grid-img[data-full] { cursor: zoom-in; }

/* v192 gallery: prev/next arrows and counter. */
.mlb-prev, .mlb-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 2rem; width: 48px; height: 64px; border-radius: 8px; cursor: pointer; line-height: 1; }
.mlb-prev:hover, .mlb-next:hover { background: rgba(255,255,255,.3); }
.mlb-prev { left: 10px; }
.mlb-next { right: 10px; }
.mlb-count { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0)); left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-size: .9rem; background: rgba(0,0,0,.5); padding: 4px 12px; border-radius: 12px; }

/* v197: chat photo sharing. */
.msg-photo-btn { cursor: pointer; padding: 8px 10px; font-size: 1.2rem; }
.msg-photo { max-width: 220px; max-height: 220px; border-radius: 10px; cursor: zoom-in; display: block; margin-bottom: 4px; }
