:root {
  --bg-hero: #EEEEEE;
  --border: #BBBBBB;
  --dark: #1E1E1E;
  --black: #000000;
  --white: #FFFFFF;
  --muted: #777777;
  --pf-purple: #4B3FD1;
  --pf-purple-bg: #EDEAFB;
}
* { box-sizing: border-box; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0; padding: 0;
  color: var(--dark);
  background: var(--white);
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav — two tiers: a low-priority utility strip (account/currency/cart/etc,
   the same on every page) above the primary category nav (logo + sections).
   This is the phone/tablet header now — every page still writes this same
   markup, but initDesktopHeader (auth.js) injects the newer .kh-header in
   front of it and this one hides itself above the 930px cutoff instead (see
   .kh-header's own "hide below 930px" rule further down). */
.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 931px) {
  .site-nav { display: none; }
}
.utility-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 7px 24px;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--muted);
}
.utility-strip a, .utility-strip .login-btn > * { color: var(--muted); }
.utility-strip .login-btn {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--dark);
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.main-nav .brand { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.main-nav .brand-logo { display: block; height: 46px; width: auto; }
.main-nav .links { display: flex; gap: 28px; align-items: center; }
.main-nav .links a { font-size: 15px; font-weight: 500; }
.main-nav .links a.active { color: #C0392B; }

/* Groups the currency switcher, notification bell and profile icon as one
   flex item on phones — without this wrapper, .main-nav's own
   space-between spreads them apart (evenly across the row) instead of
   clustering them together on the right, next to each other. */
.nav-actions { display: flex; align-items: center; gap: 2px; }
.nav-actions #currencySwitcher { margin-right: 4px; }

/* Mobile nav: the desktop category links just hide outright.
   Home/Organizations/Businesses/Market/Messages in the bottom tab bar (see
   .mobile-tab-bar below) cover most of what those links did; the rest
   (Events/Members/News/World Map) live behind the hamburger toggle (see
   .nav-hamburger below) instead. */
@media (max-width: 930px) {
  .utility-strip { padding: 8px 20px; flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; }
  .main-nav { padding: 0 20px; }
  .main-nav .brand { font-size: 16px; }
  .main-nav .brand-logo { height: 66px; }
  .main-nav .links { display: none; }

  /* The desktop account row (Hi/Messages/Cart/Orders/Notifications/Log out)
     moves out of here on phones: notifications become the bell below, and
     Cart/Orders/Control Panel/Log out move onto the Profile page — reached
     via the profile icon up here — instead. Only the currency switcher
     (also injected into this strip) stays visible here. */
  .utility-strip #navLoginBtn, .utility-strip #roleBadge { display: none; }

  .nav-bell.is-authed { display: inline-flex; }

  body { padding-bottom: 64px; }
}

/* Hamburger toggle — rightmost of .nav-actions on phones, always visible
   regardless of login state (same as the profile icon next to it). Opens the
   full slide-in .kh-drawer below instead of a small dropdown. Desktop never
   shows this — those pages already have their own pills in .kh-header, and
   Account settings/Edit profile live in the "Hi, {name}" caret menu instead. */
.nav-hamburger-wrap { position: relative; display: none; align-items: center; }
@media (max-width: 930px) {
  .nav-hamburger-wrap { display: inline-flex; }
}
.nav-hamburger {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--dark);
  padding: 4px 6px;
  line-height: 1;
  /* iOS HIG minimum tap target — the glyph itself is much smaller, so pad
     the actual hit area out to 44x44 without changing how it looks; a
     narrow-enough target is the likeliest reason taps next to the bell/
     profile icons were being missed on phones. */
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.08);
  position: relative;
  z-index: 1;
}

/* ---- Mobile drawer — built by initMobileNav in auth.js, opened from
   .nav-hamburger. Everything that doesn't have its own bottom tab lives
   here: profile summary, quick actions (Notifications/Saved/Messages),
   Discover (Home/Events/Members/Businesses/Marketplace/Communities/News/
   Jobs), More (World map/Learn a language/Forum), Account settings, Sign
   out. Desktop keeps its own separate header entirely — see .kh-header. ---- */
.kh-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,15,40,0.5);
  z-index: 300;
}
.kh-drawer-overlay.show { display: block; }
.kh-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 85%;
  max-width: 360px;
  background: var(--white);
  box-shadow: -10px 0 30px rgba(0,0,0,0.18);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.kh-drawer-overlay.show .kh-drawer { transform: translateX(0); }

.kh-drawer-header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 44px 16px 18px; border-bottom: 1px solid var(--border); position: relative; }
.kh-drawer-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--pf-purple-bg); flex-shrink: 0; }
.kh-drawer-id { flex: 1; min-width: 0; }
.kh-drawer-name { font-weight: 700; font-size: 16px; color: #1B1B3A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-drawer-loc { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.kh-drawer-loc:empty { display: none; }
.kh-drawer-viewprofile { font-size: 12.5px; color: var(--pf-purple); font-weight: 600; text-decoration: none; display: inline-block; margin-top: 6px; }
.kh-drawer-close { position: absolute; top: 16px; right: 12px; background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px; line-height: 1; }

.kh-drawer-quick { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 14px 18px; background: #F7F5FF; }
.kh-drawer-quick-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--white); border-radius: 10px; padding: 12px 6px; text-decoration: none; color: #1B1B3A; font-size: 11.5px; font-weight: 600; border: none; cursor: pointer; position: relative; font-family: inherit; }
.kh-drawer-quick-btn .qicon { font-size: 18px; color: var(--pf-purple); }
.kh-drawer-quick-badge { position: absolute; top: 4px; right: calc(50% - 28px); background: #E0324A; color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 5px; line-height: 1.3; }

.kh-drawer-section-label { font-size: 12px; font-weight: 700; color: var(--muted); padding: 16px 18px 6px; }
.kh-drawer-list { display: flex; flex-direction: column; }
.kh-drawer-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; text-decoration: none; color: #1B1B3A; font-size: 14.5px; font-weight: 500; border-bottom: 1px solid #F2F0FA; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.kh-drawer-item .dicon { width: 22px; text-align: center; color: var(--pf-purple); font-size: 16px; flex-shrink: 0; }
.kh-drawer-item .dlabel { flex: 1; }
.kh-drawer-item .dchev { color: #C8C4DC; font-size: 16px; }
.kh-drawer-item.muted { color: var(--muted); }
.kh-drawer-item.muted .dicon { color: var(--muted); }
.kh-drawer-divider { height: 8px; background: #FAFAFC; }

/* Notification bell — sits next to the hamburger toggle on phones; hidden
   until initNavAuthState confirms a logged-in session (see .is-authed
   above). Desktop keeps the text "Notifications" link in the utility strip
   instead. */
.nav-bell {
  display: none;
  position: relative;
  background: none;
  border: none;
  font-size: 19px;
  cursor: pointer;
  color: var(--dark);
  padding: 4px 6px;
  line-height: 1;
}
.nav-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #2E86C1;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  padding: 1px 5px;
  line-height: 1.3;
}

/* Cart icon — takes over the currency switcher's spot (before the bell) on
   phones once the cart has items; see #navCartIcon / .show, toggled from
   refreshCartBadge in auth.js. Never shows on desktop, where Cart is
   always its own link in the utility strip regardless of cart state. */
.nav-cart-icon {
  display: none;
  position: relative;
  background: none;
  border: none;
  font-size: 19px;
  cursor: pointer;
  color: var(--dark);
  padding: 4px 6px;
  line-height: 1;
  text-decoration: none;
}
@media (max-width: 930px) {
  .nav-cart-icon.show { display: inline-flex; }
}

/* Profile icon — sits just left of the hamburger toggle (see .nav-hamburger
   below, rightmost of .nav-actions) on phones; unlike the bell/cart it's
   always visible there regardless of login state (profile.html shows its
   own logged-out prompt). No caret/dropdown of its own any more — its old
   menu now lives inside the hamburger. Desktop keeps the "Hi, {name}" text
   link instead. */
.nav-profile-icon {
  display: none;
  background: none;
  border: none;
  font-size: 19px;
  cursor: pointer;
  color: var(--dark);
  padding: 4px 6px;
  line-height: 1;
  text-decoration: none;
}
@media (max-width: 930px) {
  .nav-profile-icon { display: inline-flex; }
}
/* Real profile photo, once initNavAuthState fetches it — replaces the
   generic silhouette emoji fallback above. */
.nav-profile-icon-img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; display: block; }

.nav-bell-panel {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  max-height: 70vh;
  overflow-y: auto;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 90;
  padding: 10px;
  text-align: left;
}

/* Bottom tab bar — phones only (see .mobile-tab-bar { display: block } in
   the 720px query above). Home always returns to / (the 4-tile landing
   page); the other four tabs are real links. */
.mobile-tab-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 80;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tab-bar .tab-row {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  width: 100%;
}
/* All five tabs are plain <a> links now, so it's one rule rather than
   duplicating it per element. */
.mobile-tab-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  padding: 7px 0 6px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.mobile-tab-bar a.active { color: #C0392B; }
.mobile-tab-bar .tab-icon { font-size: 20px; line-height: 1; }
.mobile-tab-bar .tab-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 24px);
  background: #2E86C1;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  padding: 1px 5px;
  line-height: 1.3;
}
@media (max-width: 930px) {
  .mobile-tab-bar { display: block; }
}

/* ---- Desktop header (930px and up) ----
   Built and injected by initDesktopHeader in auth.js, right before the
   .site-nav every page already writes — .site-nav is what phones/tablets
   see (hidden above 930px above); this is what desktop sees (hidden below
   930px below). New pages get both automatically just by including auth.js
   and this stylesheet, same as they already get the mobile tab bar. */
.kh-header { background: var(--white); }
.kh-utility { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 24px; background: #F6F5FB; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--dark); flex-wrap: wrap; }
.kh-utility-left { display: flex; align-items: center; gap: 8px; }
.kh-utility-left .heart { color: #E0455B; }
.kh-utility-right { display: flex; align-items: center; gap: 18px; color: var(--dark); }
.kh-utility-right .kh-pick { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.kh-utility-right .kh-pick .caret { font-size: 9px; color: var(--muted); }
.kh-utility-divider { width: 1px; height: 14px; background: var(--border); }
.kh-loc-wrap, .kh-lang-wrap { position: relative; }
.kh-loc-menu { top: calc(100% + 10px); right: 0; min-width: 220px; max-height: 320px; overflow-y: auto; }
.kh-loc-item.active { color: #4B3FD1; font-weight: 700; }

.kh-main { display: flex; align-items: center; gap: 28px; padding: 0 24px; max-width: 1280px; margin: 0 auto; }
.kh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.kh-logo-img { display: block; height: 88px; width: auto; }

.kh-search { flex: 1 1 auto; max-width: 640px; display: flex; align-items: center; gap: 10px; background: #F5F5F7; border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; }
.kh-search input { border: none; outline: none; background: transparent; font-size: 16px; font-family: inherit; width: 100%; color: var(--dark); }
.kh-search .icon { color: var(--muted); font-size: 14px; flex-shrink: 0; }

.kh-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; margin-left: auto; }
.kh-iconbtn { position: relative; font-size: 18px; color: var(--dark); text-decoration: none; display: inline-flex; }
.kh-iconbtn-wrap { position: relative; display: inline-flex; }
/* Real unread/notification counts are injected by auth.js via
   setInlineBadge(el, "nav-bell-badge", count) — this just restyles that
   shared badge class to match the header's look instead of the small
   mobile-bell default, and hides it entirely at count 0 (the element is
   removed from the DOM by setInlineBadge itself in that case). */
.kh-iconbtn .nav-bell-badge { position: absolute; top: -7px; right: -9px; background: #E0324A; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 999px; min-width: 16px; text-align: center; }
.kh-notif-panel { display: none; position: absolute; top: calc(100% + 14px); right: -10px; width: 380px; max-width: calc(100vw - 24px); box-sizing: border-box; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(20,10,50,0.16); z-index: 60; padding: 10px; text-align: left; }
.kh-profile-wrap { position: relative; }
.kh-profile { display: flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.kh-profile img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.kh-profile .hi { font-size: 14px; font-weight: 600; color: var(--dark); white-space: nowrap; }
.kh-profile .caret { padding: 4px; margin: -4px -4px -4px 0; border-radius: 6px; }
.kh-profile .caret:hover { background: #F5F3FC; }
/* Kabayan+ isn't ready to sell yet — hiding the nav CTA for now rather than
   ripping out auth.js's rendering of it, so it's a one-line revert once the
   subscription is ready to launch. */
.kh-upgrade { display: none !important; align-items: center; gap: 7px; background: linear-gradient(135deg, #6A5CE0, #4B3FD1); color: #fff; border: none; border-radius: 999px; padding: 10px 20px; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-decoration: none; }

/* Pill nav is pulled down over the hero below it (negative margin) but
   given a higher stacking order so it visually floats above whatever's
   below — reaching into it rather than being covered by it — with a
   deeper, purple-tinted shadow standing in for the "3D" lift. Pages
   without a hero just get a nav bar sitting flush against the header. */
.kh-pillnav { max-width: 1280px; margin: 0 auto -26px; padding: 0 24px; position: relative; z-index: 3; }
.kh-pillnav-inner { display: flex; align-items: center; gap: 2px; background: var(--white); border: 1px solid rgba(255,255,255,0.6); border-radius: 16px; padding: 8px; box-shadow: 0 18px 34px rgba(59,44,150,0.22), 0 2px 0 rgba(255,255,255,0.7) inset; flex-wrap: wrap; }
.kh-pill { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--dark); text-decoration: none; transition: transform 0.15s ease; }
.kh-pill .ic { font-size: 15px; }
.kh-pill:hover { background: #F5F3FC; transform: translateY(-1px); }
.kh-pill.active { color: #4B3FD1; background: #F0EEFC; }
.kh-pill.more { margin-left: auto; color: var(--muted); }
/* setInlineBadge(pillEl, "kh-pill-badge", count) — a plain flex child next
   to the label, same shape as the sibling/tab badges used elsewhere. */
.kh-pill-badge { background: #2E86C1; color: #fff; border-radius: 999px; padding: 2px 7px; font-size: 11px; font-weight: 700; line-height: 1.3; }

.kh-pill-more-wrap { position: relative; margin-left: auto; }
.kh-pill-more-wrap .kh-pill.more { margin-left: 0; }
.kh-more-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(20,10,50,0.16); padding: 6px; z-index: 20; }
.kh-more-menu.show { display: block; }
.kh-more-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--dark); text-decoration: none; }
.kh-more-item:hover { background: #F5F3FC; }
.kh-more-item .ic { font-size: 15px; }

@media (max-width: 980px) {
  .kh-search { display: none; }
}
@media (max-width: 700px) {
  .kh-utility-right .kh-pick.lang, .kh-utility-divider { display: none; }
  .kh-actions .kh-upgrade span.txt { display: none; }
  .kh-pillnav { overflow-x: auto; }
  .kh-pillnav-inner { flex-wrap: nowrap; }
  .kh-pill.more { margin-left: 0; }
}
@media (max-width: 930px) {
  .kh-header { display: none; }
}

/* Site-wide announcement banner — inserted by renderAnnouncementBanner
   (auth.js) right after .site-nav, which on desktop sits right after
   .kh-header. .kh-pillnav above deliberately overlaps 26px into whatever
   follows it (see its own comment) plus a shadow that bleeds a bit further,
   so on desktop this needs extra top clearance to sit visibly below that
   floating pill nav instead of having its own top edge cut into by it. */
.announcement-banner { position: relative; background: var(--dark); color: #fff; padding: 10px 40px 10px 16px; font-size: 13px; line-height: 1.5; text-align: center; box-sizing: border-box; }
.announcement-banner .announcement-banner-close { position: absolute; top: 6px; right: 10px; width: 26px; height: 26px; border: none; background: none; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; opacity: 0.8; }
@media (min-width: 931px) {
  .announcement-banner { padding-top: 36px; }
  .announcement-banner .announcement-banner-close { top: 32px; }
}

/* Hero */
.hero {
  background: var(--bg-hero);
  padding: 60px 24px 70px;
  margin-bottom: 40px;
}
.hero h1 { font-size: 40px; margin: 0 0 16px; max-width: 700px; }
.hero p.subtitle { font-size: 17px; margin: 0 0 20px; max-width: 600px; color: var(--dark); }

@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 36px 16px 40px; margin-bottom: 28px; }
  .hero h1 { font-size: 28px; }
  .hero p.subtitle { font-size: 15px; }
}

/* Search bar */
.search-bar {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px;
  background: var(--white); border: 1px solid var(--dark); border-radius: 40px;
  padding: 14px 10px 14px 24px; margin-bottom: 10px; position: relative;
  max-width: 900px;
}
.field { flex: 1 1 160px; min-width: 160px; position: relative; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 2px; }
.field input, .field select {
  border: none; font-size: 16px; font-family: inherit; width: 100%;
  padding: 2px 0; background: transparent; color: var(--dark);
}
.field input:focus, .field select:focus { outline: none; }
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center; justify-content: center;
  z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-box h3 { margin-top: 0; }
@media (max-width: 700px) {
  .modal-box { padding: 20px; width: 94%; }
}
.modal-box .close-x { float: right; cursor: pointer; font-size: 20px; color: var(--muted); line-height: 1; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 16px; color: var(--dark); box-sizing: border-box;
}
.form-row textarea { min-height: 70px; resize: vertical; }
.form-row textarea.autogrow { resize: none; overflow: hidden; }
/* Multi-field rows (e.g. Price / Options / Status side-by-side) are built as
   ad-hoc flex wrappers around .form-row children throughout the admin/business
   forms — targeting the pattern structurally here stacks all of them on
   mobile without having to touch every inline style individually. */
@media (max-width: 700px) {
  /* Both attribute patterns are needed: authored HTML uses "display:flex"
     (no space), while JS that sets el.style.cssText gets reserialized by
     the browser as "display: flex" (with a space). */
  [style*="display:flex"]:has(> .form-row), [style*="display: flex"]:has(> .form-row) {
    flex-direction: column !important;
  }
  /* Safety net: any other ad-hoc inline flex row (button/heading pairs,
     checkbox groups, etc.) wraps instead of squeezing on narrow screens.
     A no-op wherever the row already fits on one line. */
  [style*="display:flex"], [style*="display: flex"] { flex-wrap: wrap; }
}
.form-note { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.search-btn {
  background: var(--black); color: var(--white); border: none; border-radius: 999px;
  padding: 14px 28px; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; height: fit-content;
}
.search-btn:hover { opacity: 0.85; }
@media (max-width: 700px) {
  .search-bar { border-radius: 20px; padding: 16px; gap: 16px; }
  .search-btn { width: 100%; }
  .suggestions { right: 0; }
}
.suggestions {
  position: absolute; top: calc(100% + 10px); left: 0; right: -60px;
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 50; overflow: hidden; display: none;
}
.suggestions.open { display: block; }
.suggestion-item { padding: 10px 16px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover, .suggestion-item.active { background: var(--bg-hero); }
.suggestion-item .main { font-weight: 600; }
.suggestion-item .sub { font-size: 12px; color: var(--muted); }
.suggestion-empty, .suggestion-loading { padding: 10px 16px; font-size: 13px; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.attribution { font-size: 10px; color: var(--muted); margin-bottom: 10px; }
.attribution a { color: var(--muted); }

/* Sections */
h2.section-heading { font-size: 22px; margin: 40px 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-4 .card {
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-hero);
  padding: 40px 16px 16px; text-align: left;
}
.grid-4 .card .photo {
  text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
@media (max-width: 800px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }
/* Marketplace product cards stay 2-up even on phones (unlike other grid-4
   uses, e.g. kabayan-businesses.html's "How it works" steps, which read
   better as one column that narrow) — a browsing grid feels broken as a
   single column, and each card's own content (photo, title, price) is
   compact enough to hold up at ~160px wide. */
@media (max-width: 480px) { #mktGrid.grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 360px) { #mktGrid.grid-4 .card { padding: 30px 10px 10px; } }

.event-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 20px; margin-bottom: 12px; flex-wrap: wrap;
}
.event-date { font-weight: 700; min-width: 70px; }
.event-info { flex: 1; min-width: 200px; }
.event-meta { font-size: 13px; color: var(--muted); }
.distance-tag { font-size: 12px; color: var(--muted); font-style: italic; }

/* Phones: the flex-wrap layout above squeezed the title/meta into whatever
   sliver was left between the date and the Details button, wrapping every
   few words. A 2-column grid instead — date stacked above Details on the
   left, the name/place/etc. as one uninterrupted column on the right —
   reads far better at this width. .event-date/.event-info/.details-btn are
   already the three direct children buildEventRow (events.html) renders,
   so this is CSS-only: no markup change needed. */
@media (max-width: 480px) {
  .event-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "date info" "btn info";
    align-items: start;
    gap: 4px 14px;
    padding: 14px 16px;
  }
  .event-date { grid-area: date; min-width: 0; }
  .event-info { grid-area: info; min-width: 0; }
  .event-row .details-btn { grid-area: btn; justify-self: start; align-self: start; margin-top: 4px; }
}
.details-btn {
  background: var(--white); border: 1px solid var(--dark); border-radius: 999px;
  padding: 8px 20px; font-size: 13px; cursor: pointer;
}
.empty-state {
  border: 1px dashed var(--border); border-radius: 8px; padding: 20px;
  color: var(--muted); font-size: 14px;
}
.empty-state strong { color: var(--dark); }

.cta-btn {
  display: inline-block; background: var(--black); color: var(--white);
  border-radius: 999px; padding: 14px 28px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
}

/* "Get notified about new events" card */
.subscribe-card {
  display: flex; gap: 20px; align-items: flex-start;
  margin: 40px 0; padding: 28px; border-radius: 16px;
  background: var(--bg-hero); border: 1px solid var(--border);
}
.subscribe-card-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.subscribe-card-body { flex: 1; min-width: 0; }
.subscribe-card-body p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.subscribe-card-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.subscribe-card-row select, .subscribe-card-row input {
  border: 1px solid var(--border); border-radius: 8px; background: var(--white);
  font-family: inherit; font-size: 14px; color: var(--dark);
  padding: 12px 14px; height: 44px; box-sizing: border-box;
}
.subscribe-card-row select { min-width: 200px; }
.subscribe-card-row input { min-width: 220px; flex: 1; }
.subscribe-card-row .cta-btn { padding: 12px 28px; height: 44px; }
.subscribe-card .settings-msg { margin-top: 12px; font-size: 13px; }
@media (max-width: 700px) {
  .subscribe-card { padding: 20px; }
  .subscribe-card-icon { display: none; }
  .subscribe-card-row select, .subscribe-card-row input, .subscribe-card-row .cta-btn { width: 100%; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 24px;
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.site-footer .links { font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .site-footer .wrap { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Pricing card (List Your Shop page) */
.price-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 30px;
  max-width: 420px; background: var(--bg-hero);
}
.price-card .amount { font-size: 36px; font-weight: 800; margin: 8px 0; }
.price-card .amount span { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-card ul { padding-left: 20px; margin: 16px 0; }
.price-card li { margin-bottom: 8px; font-size: 14px; }

/* Grouped create-event form sections */
.event-form-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.event-form-section-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 700;
}
/* Friends grid — shared between the account owner's own profile, a public
   member profile, and the full /friends/{slug} listing */
.friend-avatar {
  border-radius: 50%; object-fit: cover; background: var(--bg-hero); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px; margin-bottom: 10px; }
.friend-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none;
  padding: 16px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--white);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.friend-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-1px); }
.friend-card-name {
  font-size: 13px; font-weight: 600; color: var(--dark); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.friends-see-all { display: inline-block; font-size: 13px; font-weight: 600; color: var(--dark); text-decoration: none; margin-bottom: 18px; }
.friends-see-all:hover { text-decoration: underline; }

.photo-dropzone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  background: repeating-linear-gradient(45deg, var(--bg-hero), var(--bg-hero) 8px, #fff 8px, #fff 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
}
.photo-dropzone.dragover {
  border-color: var(--dark);
  background: var(--white);
}
.photo-dropzone-icon { font-size: 30px; }
.photo-dropzone-title { font-size: 17px; color: var(--dark); font-weight: 600; }
.photo-dropzone-hint { font-size: 12px; color: var(--muted); }

/* ===================================================================
   Events page redesign — scoped under .events-hero / .events-* so it
   can't leak onto other pages that also load style.css.
   =================================================================== */
:root {
  --navy: #16213E;
  --accent: #F5A623;
  --cream: #FBF4E8;
  --lav: #EEF0FA;
  --lav-icon: #5B5FE0;
}

.events-hero {
  background: var(--cream);
  padding: 56px 24px 40px;
  margin-bottom: 40px;
}
/* The headline+collage row sits above the search bar, which spans the
   full hero width on its own line below — no longer squeezed to share a
   row with the collage, so its fields always fit on one line regardless
   of viewport width. A negative margin then pulls the search bar up so
   it visually sits "in front of" the collage, with the photos tucked
   partly behind it (see .events-search-bar's margin-top below). */
.events-hero-row { display: flex; gap: 40px; align-items: flex-start; }
.events-hero-text { flex: 1 1 420px; min-width: 280px; }
.events-hero-text h1 {
  font-size: 40px; line-height: 1.15; margin: 0 0 16px; color: var(--navy);
  font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.events-hero-text h1 .sun { font-size: 34px; }
.events-hero-text .subtitle { font-size: 16px; color: var(--dark); max-width: 480px; margin: 0; }

/* Photo collage — placeholder tiles standing in for real event photos.
   Swap the background images / text for real photography before launch. */
.events-hero-collage {
  flex: 1 1 380px; min-width: 280px; height: 260px; position: relative; z-index: 1;
}
.events-hero-collage .tile {
  position: absolute; border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; font-size: 13px; font-weight: 600; padding: 10px; overflow: hidden;
  background-size: cover; background-position: center;
}
.events-hero-collage .tile span {
  background: rgba(0,0,0,0.35); padding: 4px 10px; border-radius: 999px;
}
.events-hero-collage .t1 { top: 0; left: 0; width: 46%; height: 42%; transform: rotate(-4deg); background: linear-gradient(135deg,#f6c453,#e67e22); z-index: 1; }
.events-hero-collage .t2 { top: 4%; right: 0; width: 50%; height: 58%; transform: rotate(3deg); background: linear-gradient(135deg,#7f6a4d,#4a3a25); z-index: 2; }
.events-hero-collage .t3 { bottom: 0; left: 8%; width: 46%; height: 52%; transform: rotate(-2deg); background: linear-gradient(135deg,#e0546a,#c0392b); z-index: 3; }
.events-hero-collage .t4 { bottom: 2%; right: 4%; width: 44%; height: 42%; transform: rotate(4deg); background: linear-gradient(135deg,#2c2c54,#1b1b3a); z-index: 4; }

@media (max-width: 900px) {
  /* flex-direction:column makes the main axis vertical, so both items'
     row flex-basis values (420px / 380px) would otherwise apply to
     height instead of width, stretching them tall — flex:none pins each
     to its natural/explicit size instead. */
  .events-hero-row { flex-direction: column; }
  .events-hero-text { flex: none; }
  .events-hero-collage { flex: none; width: 100%; height: 260px; }
}
@media (max-width: 700px) {
  .events-hero { padding: 32px 16px 32px; }
  .events-hero-text h1 { font-size: 26px; }
  .events-hero-collage { height: 220px; }
}

/* Pill search bar with icons — a negative margin-top pulls it up so it
   visually overlaps the bottom of the collage (photos tucked behind it);
   below 900px the row stacks and the overlap is dropped in favor of
   normal spacing. */
.events-search-bar {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  background: var(--white); border: 1px solid var(--dark); border-radius: 999px;
  padding: 8px; max-width: 900px; position: relative; z-index: 2; margin-top: -56px;
}
@media (max-width: 900px) {
  .events-search-bar { margin-top: 24px; }
}
/* Anchor the location dropdown to the whole bar (not just the WHERE field) —
   at widths where the Search button wraps onto its own row, a field-relative
   dropdown would land right on top of it. */
.events-search-bar .suggestions { left: 16px; right: 16px; top: calc(100% + 10px); max-width: 340px; }
@media (max-width: 700px) {
  .events-search-bar .suggestions { left: 8px; right: 8px; max-width: none; }
}
.events-field {
  flex: 1 1 160px; min-width: 150px; display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 16px;
}
.events-field .icon { font-size: 17px; margin-top: 2px; flex-shrink: 0; color: var(--navy); }
.events-field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 2px; }
.events-field input, .events-field select {
  border: none; font-size: 14px; font-family: inherit; width: 100%;
  padding: 0; background: transparent; color: var(--dark);
}
.events-field input:focus, .events-field select:focus { outline: none; }
.events-field input::placeholder { color: var(--muted); }
.events-field-hint { font-size: 11px; color: var(--muted); }
.events-search-btn {
  background: var(--navy); color: var(--white); border: none; border-radius: 999px;
  padding: 0 26px; font-size: 14px; font-weight: 700; cursor: pointer;
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.events-search-btn:hover { opacity: 0.9; }
@media (max-width: 700px) {
  .events-search-bar { border-radius: 20px; }
  .events-field { padding: 10px 12px; }
  .events-search-btn { width: 100%; justify-content: center; padding: 14px; margin-top: 4px; }
}

/* Section heading with a short accent underline */
.events-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 8px 0 20px; flex-wrap: wrap;
}
.events-section-head h2 { font-size: 22px; font-weight: 800; margin: 0 0 8px; position: relative; }
.events-section-head h2::after {
  content: ""; display: block; width: 34px; height: 3px; background: var(--accent);
  margin-top: 8px; border-radius: 2px;
}
.events-section-head .view-all { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; }

/* Event card */
.events-card {
  display: flex; align-items: center; gap: 20px; border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 14px; flex-wrap: wrap;
}
.events-card-date {
  flex: none; text-align: center; min-width: 54px; padding-right: 18px;
  border-right: 1px solid var(--border);
}
.events-card-date .wd { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.events-card-date .day { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.events-card-date .mo { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.events-card-body { flex: 1; min-width: 220px; }
.events-card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.events-card-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); align-items: center; }
.events-card-meta .m-item { display: inline-flex; align-items: center; gap: 5px; }
.events-card-meta .flag-wrap { display: inline-flex; align-items: center; }
.events-card-btn {
  flex: none; background: var(--white); border: 1px solid var(--dark); border-radius: 999px;
  padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex;
  align-items: center; gap: 6px;
}
@media (max-width: 560px) {
  .events-card { padding: 16px; gap: 14px; }
  .events-card-date { padding-right: 14px; }
}

/* Subscribe card */
.events-subscribe {
  display: flex; gap: 20px; align-items: center;
  margin: 40px 0; padding: 24px; border-radius: 16px;
  background: var(--lav); border: 1px solid var(--border);
}
.events-subscribe-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--lav-icon); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.events-subscribe-body { flex: 1; min-width: 0; }
.events-subscribe-body h2 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.events-subscribe-body p { margin: 0; color: var(--muted); font-size: 14px; }
.events-subscribe-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: none; }
.events-subscribe-row select, .events-subscribe-row input {
  border: 1px solid var(--border); border-radius: 8px; background: var(--white);
  font-family: inherit; font-size: 14px; color: var(--dark);
  padding: 12px 14px; height: 44px; box-sizing: border-box;
}
.events-subscribe-row select { min-width: 160px; }
.events-subscribe-row input { min-width: 200px; }
.events-subscribe-btn {
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 0 22px; height: 44px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
@media (max-width: 900px) {
  .events-subscribe { flex-wrap: wrap; }
  .events-subscribe-row { flex: 1 1 100%; }
}
@media (max-width: 700px) {
  .events-subscribe { padding: 20px; }
  .events-subscribe-icon { display: none; }
  .events-subscribe-row select, .events-subscribe-row input, .events-subscribe-btn { width: 100%; }
}

/* Popular event types + trust badges footer band */
.events-lower-band {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding: 32px 0 8px;
}
.events-types { flex: 1 1 320px; }
.events-types-label { font-size: 15px; font-weight: 800; margin: 0 0 16px; }
.events-types-row { display: flex; gap: 22px; flex-wrap: wrap; }
.events-type-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 66px; background: none; border: none; cursor: pointer; font-family: inherit;
}
.events-type-item .circle {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--white);
}
.events-type-item .lbl { font-size: 12px; color: var(--dark); text-align: center; }
.events-type-item:hover .circle { border-color: var(--navy); }

.events-trust { flex: 1 1 420px; display: flex; gap: 28px; flex-wrap: wrap; }
.events-trust-item { display: flex; gap: 10px; max-width: 200px; }
.events-trust-item .icon { flex: none; font-size: 17px; color: var(--lav-icon); margin-top: 2px; }
.events-trust-item .t { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.events-trust-item .d { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) {
  .events-lower-band { flex-direction: column; gap: 28px; }
}

/* Profile "view mode" — shared between /profile (own profile, editable) and
   /member/{slug} (someone else's profile, read-only). Keep both pages'
   markup using these same classes/ids so a layout tweak here doesn't need to
   be made twice; anything editable-only (bio quick-editor, hide-from-public
   toggles, the profile form itself) stays local to profile.html instead. */
.profile-wrap { max-width: 960px; margin: 0 auto; padding: 40px 24px 80px; }

.pf-hero { position: relative; overflow: hidden; background: #F5F3FC; border-radius: 18px; padding: 28px; margin-bottom: 24px; }
.pf-hero-decor { position: absolute; top: -20px; right: -20px; width: 140px; height: 140px; background-image: radial-gradient(#C9BEF0 1.5px, transparent 1.5px); background-size: 12px 12px; opacity: 0.6; pointer-events: none; }
.pf-hero-row { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; position: relative; }
.pf-avatar-wrap { position: relative; flex-shrink: 0; }
.pf-avatar, .pf-avatar-placeholder { width: 96px; height: 96px; border-radius: 50%; display: block; }
.pf-avatar { object-fit: cover; border: 3px solid var(--white); box-shadow: 0 4px 14px rgba(30,20,60,0.12); }
.pf-avatar-placeholder { background: linear-gradient(135deg, #EADFF7, #D9C9F2); border: 3px solid var(--white); box-shadow: 0 4px 14px rgba(30,20,60,0.12); }
.pf-camera-btn { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

.pf-crop-stage { width: 280px; height: 280px; max-width: 100%; margin: 0 auto; position: relative; overflow: hidden; border-radius: 50%; background: #1a1626; cursor: grab; touch-action: none; box-shadow: 0 0 0 4px var(--border) inset; }
.pf-crop-stage.dragging { cursor: grabbing; }
.pf-crop-stage img { position: absolute; top: 0; left: 0; transform-origin: top left; user-select: none; -webkit-user-drag: none; pointer-events: none; max-width: none; }
.pf-crop-hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }
.pf-crop-zoom-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.pf-crop-zoom-row span { font-size: 15px; color: var(--muted); flex-shrink: 0; }
.pf-crop-zoom-row input[type="range"] { flex: 1; }
.pf-crop-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.pf-crop-status { font-size: 12px; margin-top: 8px; text-align: right; }

.pf-modal-overlay { position: fixed; inset: 0; background: rgba(20,15,40,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.pf-modal { background: var(--white); border-radius: 16px; max-width: 480px; width: 100%; max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; }
.pf-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.pf-modal-head h2 { margin: 0; font-size: 18px; }
.pf-modal-close { border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }
.pf-modal-close:hover { color: var(--dark); }
.pf-modal-body { padding: 18px 20px 20px; overflow-y: auto; }

.pf-passport-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pf-passport-stamp { position: relative; border: 1px dashed #C9BEF0; border-radius: 10px; padding: 10px 8px; text-align: center; background: #FAF9FE; }
.pf-passport-stamp img { width: 32px; height: 22px; object-fit: cover; border-radius: 3px; margin-bottom: 6px; }
.pf-passport-stamp-name { font-size: 11px; font-weight: 600; color: #1B1B3A; line-height: 1.2; }
.pf-passport-stamp-remove { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--muted); font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pf-passport-stamp-remove:hover { color: #C0392B; border-color: #C0392B; }
.pf-passport-empty { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.pf-passport-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pf-passport-toolbar select { font-size: 12.5px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--white); font-family: inherit; color: var(--dark); }
.pf-passport-toolbar-left, .pf-passport-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-passport-toolbar-btn { font-size: 12px; padding: 7px 12px; white-space: nowrap; }
.pf-passport-visibility { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

.pf-passport-date { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.pf-passport-date-link { font-size: 10.5px; color: var(--pf-purple); cursor: pointer; margin-top: 3px; display: inline-block; background: none; border: none; padding: 0; font-family: inherit; }
.pf-passport-date-link:hover { text-decoration: underline; }
.pf-passport-date-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.pf-passport-date-edit select { font-size: 11px; padding: 3px; border-radius: 5px; border: 1px solid var(--border); width: 100%; }
.pf-passport-date-edit-actions { display: flex; gap: 4px; justify-content: center; margin-top: 2px; }
.pf-passport-date-edit-actions button { font-size: 11px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--white); cursor: pointer; }
.pf-passport-date-edit-actions button.save { background: var(--pf-purple); color: #fff; border-color: var(--pf-purple); }
.pf-passport-restricted { text-align: center; padding: 24px 10px; color: var(--muted); font-size: 13.5px; margin: 0; }
.pf-passport-mode-toggle { font-size: 12px; padding: 7px 14px; }

/* Read-only passport cover (member.php) — the actual Philippine passport
   booklet artwork instead of the plain badge the owner sees on their own
   profile (/passport-assets/passport-cover.svg). */
.pf-passport-cover-btn {
  width: 84px; height: 108px; flex-shrink: 0; border: none; padding: 0;
  border-radius: 6px; cursor: pointer; position: relative; overflow: hidden;
  background: #6B2C3E url('/passport-assets/passport-cover.svg') center/cover no-repeat;
  box-shadow: 0 6px 16px rgba(30,20,60,0.18);
}
.pf-passport-cover-count {
  position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 10.5px; font-weight: 700; text-align: center; padding: 4px 2px; line-height: 1.3;
}

/* The "flip through" book view — a full-bleed scan of an actual (blank)
   passport inner page (set inline per page from PASSPORT_PAGE_BACKGROUNDS in
   passport.js) filling the whole modal, with flag stickers laid over it and
   floating circular Prev/Next arrows instead of a button bar below. The
   modal widens (.pf-modal--wide) and the toolbar floats over the artwork
   (.pf-passport-toolbar--overlay) only while a book page is showing —
   restored to the normal narrow list look for the manage grid. */
.pf-modal.pf-modal--wide { max-width: 720px; }
.pf-modal-body.pf-book-active { padding: 0; position: relative; }

.pf-passport-toolbar--overlay {
  position: absolute; top: 14px; left: 14px; right: 14px; z-index: 5;
  margin-bottom: 0; pointer-events: none;
}
.pf-passport-toolbar--overlay > * { pointer-events: auto; }
.pf-passport-toolbar--overlay select,
.pf-passport-toolbar--overlay .pf-passport-mode-toggle {
  background: rgba(255,255,255,0.92); border: none; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18); padding: 7px 14px;
}

.pf-passport-book-frame {
  position: relative; width: 100%; overflow: hidden;
  background-repeat: no-repeat; background-position: center; background-size: cover;
}
/* A single physical page is portrait — full modal width would stretch it
   absurdly tall, so cap it and center it instead of spanning edge to edge. */
.pf-passport-book-frame--single { max-width: 320px; margin: 0 auto; }
.pf-passport-page-halves {
  position: absolute; inset: 64px 56px 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.pf-passport-page-halves.single { grid-template-columns: 1fr; justify-items: center; }
.pf-passport-page-halves .pf-passport-empty { grid-column: 1 / -1; align-self: center; text-align: center; background: rgba(255,255,255,0.85); border-radius: 10px; padding: 14px; }
.pf-passport-page-half {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: start; max-width: 260px;
}
.pf-passport-page-half.single { max-width: 300px; }

.pf-passport-sticker { background: #fff; border-radius: 10px; padding: 10px 6px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,0.2); }
.pf-passport-sticker img { width: 40px; height: 27px; object-fit: cover; border-radius: 4px; margin-bottom: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.pf-passport-sticker-name { font-size: 11px; font-weight: 700; color: #1B1B3A; line-height: 1.2; }
.pf-passport-sticker-date { font-size: 9.5px; color: var(--muted); margin-top: 2px; }

.pf-passport-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 3;
}
.pf-passport-nav-btn:disabled { opacity: 0.35; cursor: default; }
.pf-passport-nav-btn.prev { left: 14px; }
.pf-passport-nav-btn.next { right: 14px; }
.pf-passport-book-indicator {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3;
  background: rgba(255,255,255,0.88); border-radius: 999px; padding: 4px 14px; font-size: 11.5px; color: var(--dark);
}
@media (max-width: 480px) {
  .pf-passport-page-halves { inset: 58px 20px 40px; gap: 10px; }
  .pf-passport-page-half { max-width: none; gap: 8px; }
  .pf-passport-sticker { padding: 6px 4px; }
  .pf-passport-sticker img { width: 30px; height: 20px; }
}

.pf-passport-add input { width: 100%; box-sizing: border-box; }
.pf-passport-suggestions { border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; max-height: 220px; overflow-y: auto; display: none; }
.pf-passport-suggestions.open { display: block; }
.pf-passport-suggestion-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.pf-passport-suggestion-item:hover { background: #F5F3FC; }
.pf-passport-suggestion-item img { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }
.pf-passport-suggestion-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.pf-passport-map-link { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--pf-purple); text-decoration: none; }
.pf-passport-map-link:hover { text-decoration: underline; }

.pf-passport-checkin-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; margin-left: 14px; font-size: 12.5px; font-weight: 600; color: var(--pf-purple); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.pf-passport-checkin-btn:hover { text-decoration: underline; }

/* ---- Check-in ("add selfie location") modal ---- */
.ci-modal { max-width: 420px; }
.ci-stage { position: relative; width: 100%; aspect-ratio: 3/4; background: #111; border-radius: 12px; overflow: hidden; }
.ci-stage video, .ci-stage img { width: 100%; height: 100%; object-fit: cover; }
.ci-stage video { transform: scaleX(-1); } /* mirror the live preview to match a selfie framing */
.ci-gps-status { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.ci-gps-status.ci-gps-ok { color: #2E7D32; font-weight: 600; }
.ci-status { font-size: 13px; margin-top: 6px; min-height: 16px; }
.ci-status.ci-error { color: #C0392B; }
.ci-tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ci-tag-chips:not(:empty) { margin-bottom: 8px; }
.ci-tag-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--pf-purple-bg); color: var(--pf-purple); font-size: 13px; font-weight: 600; padding: 4px 6px 4px 10px; border-radius: 999px; }
.ci-tag-chip button { background: none; border: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; font-family: inherit; }
.ci-saved-modal { max-width: 340px; }
.ci-saved-body { text-align: center; padding-bottom: 24px; }
.ci-saved-check { width: 52px; height: 52px; margin: 4px auto 12px; border-radius: 50%; background: #2E7D32; color: #fff; font-size: 28px; line-height: 52px; font-weight: 700; }
.ci-saved-text { margin: 0; font-size: 16px; font-weight: 600; color: #1B1B3A; }
.ci-saved-sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.ci-actions { display: flex; gap: 10px; margin-top: 14px; }
.ci-actions .pf-btn-primary, .ci-actions .pf-btn-outline { flex: 1; justify-content: center; }

/* ---- World-map check-in clusters ---- */
/* Just a number, no text — stays compact regardless of cluster size. Sizing
   tiers (not just color) so a cluster of hundreds visually reads as
   "bigger" than one of a handful. !important here for the same reason as
   the chip images below: Leaflet.markercluster's own default CSS
   (MarkerCluster.Default.css) styles .marker-cluster-* with its own
   background/sizing, which this replaces rather than layers on top of. */
.wm-cluster-badge { display: flex !important; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--pf-purple); color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.35); border: 3px solid var(--white); }
.wm-cluster-badge--small { font-size: 13px; }
.wm-cluster-badge--medium { font-size: 15px; }
.wm-cluster-badge--large { font-size: 17px; }

/* ---- World-map check-in pins ---- */
/* Same left-to-right identity row as the popup's top line (flag, photo,
   name) — this IS the pin, centered on the check-in's coordinate rather
   than a traditional teardrop marker. */
.wm-checkin-chip-wrap { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.wm-checkin-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--white); border: 2px solid var(--pf-purple); border-radius: 999px; padding: 3px 10px 3px 3px; box-shadow: 0 2px 6px rgba(0,0,0,0.3); max-width: 165px; }
.wm-checkin-chip--manual { border-color: #B8860B; border-style: dashed; }
/* !important on width/height is load-bearing here, not decoration: Leaflet's
   own CSS ships ".leaflet-container .leaflet-marker-pane img { width: auto; }"
   — a broad rule (every img inside any marker) with higher specificity than
   a single-class selector, so without this Leaflet's width:auto wins and
   these images fall back to their natural aspect ratio instead of the
   16x11 / 22x22 box (confirmed via fetching leaflet.css directly and
   computed-style inspection: was rendering ~22px/44px instead). Leaflet's
   own rule doesn't use !important, so this is a clean, deliberate override
   rather than a specificity fight with our own code. */
.wm-checkin-chip-flag { width: 16px !important; height: 11px !important; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.wm-checkin-chip-avatar { width: 22px !important; height: 22px !important; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.wm-checkin-chip-avatar.wm-checkin-chip-avatar--fallback { display: flex; align-items: center; justify-content: center; background: var(--pf-purple-bg); color: var(--pf-purple); font-weight: 700; font-size: 11px; }
.wm-checkin-chip-name { font-size: 12px; font-weight: 700; color: #1B1B3A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-checkin-chip-others { font-size: 11px; font-weight: 700; color: var(--pf-purple); flex-shrink: 0; }
.wm-checkin-source { font-size: 11px; font-weight: 600; margin-top: 6px; padding: 4px 8px; border-radius: 6px; }
.wm-checkin-source--verified { background: #E8F5E9; color: #2E7D32; }
.wm-checkin-source--manual { background: #FBF3DC; color: #8A6300; }
.wm-checkin-popup { text-align: center; font-size: 13px; }
.wm-checkin-identity { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.wm-checkin-flag { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.wm-checkin-popup-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.wm-checkin-popup-avatar--fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--pf-purple-bg); color: var(--pf-purple); font-weight: 700; font-size: 12px; }
.wm-checkin-popup .wm-checkin-name { font-weight: 700; color: #1B1B3A; }
.wm-checkin-popup-selfie { width: 140px; height: 140px; border-radius: 10px; object-fit: cover; margin-bottom: 8px; cursor: zoom-in; }
.wm-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 24px; cursor: zoom-out; }
.wm-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; cursor: default; }
.wm-lightbox-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.wm-checkin-popup .wm-checkin-date { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.wm-checkin-links { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.wm-checkin-popup a { color: var(--pf-purple); text-decoration: none; font-weight: 600; }
.wm-checkin-popup a:hover { text-decoration: underline; }
.wm-checkin-other-locations { background: none; border: none; color: var(--pf-purple); font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; font-family: inherit; }
.wm-checkin-other-locations:hover { text-decoration: underline; }
.wm-scope-back-btn { font-size: 12px; padding: 5px 10px; }
.wm-checkin-delete { display: block; width: 100%; margin-top: 8px; background: none; border: none; color: #C0392B; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 0; font-family: inherit; }
.wm-checkin-delete:hover { text-decoration: underline; }

/* "+ N others" toggle next to the identity name, and the tagged-people list
   it expands — see wmAddCheckinPin's people[] / wmOpenTagModal. Toggling
   sets the list's `hidden` attribute directly (no Leaflet popup.update()
   call — see the click handler in wmAddCheckinPin for why). */
.wm-checkin-others-toggle { background: none; border: none; color: var(--pf-purple); font-weight: 600; font-size: 12px; cursor: pointer; padding: 0; font-family: inherit; }
.wm-checkin-others-toggle:hover { text-decoration: underline; }
.wm-checkin-people-list { text-align: left; margin: 0 0 8px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; max-height: 140px; overflow-y: auto; }
.wm-checkin-person-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.wm-checkin-person-link { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; color: #1B1B3A !important; font-weight: 600 !important; }
.wm-checkin-person-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-checkin-person-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.wm-checkin-person-avatar--fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--pf-purple-bg); color: var(--pf-purple); font-weight: 700; font-size: 10.5px; }
.wm-checkin-untag-btn { background: none; border: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; flex-shrink: 0; }
.wm-checkin-untag-btn:hover { color: #C0392B; }

.wm-checkin-edit-date { background: none; border: none; color: var(--pf-purple); font-size: 11px; font-weight: 600; cursor: pointer; padding: 0; margin-left: 6px; font-family: inherit; }
.wm-checkin-edit-date:hover { text-decoration: underline; }

.wm-checkin-tag-btn { background: none; border: none; color: var(--pf-purple); font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; text-align: center; font-family: inherit; }
.wm-checkin-tag-btn:hover { text-decoration: underline; }

/* "Tag people" modal (opened from .wm-checkin-tag-btn) — "Tag new" /
   "Manage tagged" tabs sharing one running list, see wmOpenTagModal. */
.wm-tag-tabs { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.wm-tag-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; margin-bottom: -1px; }
.wm-tag-tab--active { color: var(--pf-purple); border-bottom-color: var(--pf-purple); }
.wm-tag-search { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; margin-bottom: 10px; }
.wm-tag-results, .wm-tag-manage-list { max-height: 320px; overflow-y: auto; }
.wm-tag-result-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; border-radius: 8px; }
.wm-tag-result-row:hover { background: var(--pf-purple-bg); }
.wm-tag-manage-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.wm-tag-result-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.wm-tag-result-avatar--fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--pf-purple-bg); color: var(--pf-purple); font-weight: 700; font-size: 13px; }
.wm-tag-result-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: #1B1B3A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-tag-remove-btn { background: none; border: 1px solid #E0B4B4; color: #C0392B; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 5px 10px; border-radius: 6px; font-family: inherit; flex-shrink: 0; }
.wm-tag-remove-btn:hover { background: #FBEAEA; }
.wm-tag-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; text-align: center; }

.wm-checkin-btn-group { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 8px; }
.wm-btn-on-map { background: var(--white); }
/* left is pushed past Leaflet's own zoom (+/-) and locate-me controls,
   which stack in the same top-left corner (see wmAddLocateControl) — at
   plain left:10px this bar sat right on top of them on desktop. Mobile
   overrides back to position:static below, so this offset is desktop-only. */
.wm-filter-bar { position: absolute; top: 10px; left: 60px; z-index: 500; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 1px 5px rgba(0,0,0,0.2); }
.wm-filter-bar label { display: flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
@media (max-width: 640px) {
  .wm-checkin-btn-group { position: static; margin-bottom: 8px; flex-wrap: wrap; }
  .wm-filter-bar { position: static; margin-bottom: 8px; width: fit-content; }
}

/* ---- "Add from gallery" (manual check-in) modal ---- */
.ci-manual-stage { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ci-manual-stage:focus-visible { outline: 2px solid var(--primary, #4f46e5); outline-offset: 2px; }
.ci-manual-stage img { width: 100%; height: 100%; object-fit: cover; }
.ci-manual-placeholder { color: var(--muted); font-size: 13px; }
.ci-manual-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--dark); margin: 14px 0 6px; }
.ci-manual-date { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit; }
.ci-location-search-wrap { position: relative; }
.ci-location-search-wrap input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit; }
.ci-manual-suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.14); z-index: 1300; overflow: hidden; display: none; max-height: 220px; overflow-y: auto; }
.ci-manual-suggestions.open { display: block; }
.ci-manual-map-hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
#ci_manual_map { width: 100%; height: 220px; border-radius: 10px; margin-top: 6px; background: #EAF3FB; }
.ci-manual-location-confirm { font-size: 12px; color: #2E7D32; font-weight: 600; margin-top: 6px; min-height: 15px; }

.pf-name { font-size: 26px; font-weight: 700; margin: 2px 0 8px; color: #1B1B3A; }
.pf-role-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--pf-purple-bg); color: var(--pf-purple); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.pf-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pf-btn-primary, .pf-btn-outline { border-radius: 999px; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border: none; }
.pf-btn-primary { background: var(--pf-purple); color: #fff; }
.pf-btn-primary:hover { opacity: 0.9; }
.pf-btn-outline { background: var(--white); border: 1px solid var(--border); color: var(--dark); }
.pf-btn-outline:hover { border-color: var(--dark); }
@media (max-width: 480px) { .pf-hero-actions { width: 100%; } .pf-hero-actions > * { flex: 1; justify-content: center; } }

.pf-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: 1fr; } }
.pf-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.pf-card { border: 1px solid var(--border); border-radius: 14px; background: var(--white); padding: 20px; }
.pf-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pf-card-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.pf-card-title { font-size: 15px; font-weight: 700; color: #1B1B3A; flex: 1; min-width: 0; }
.pf-card-link { font-size: 12.5px; font-weight: 600; color: var(--pf-purple); text-decoration: none; white-space: nowrap; }
.pf-card-link:hover { text-decoration: underline; }

/* On phones, the whole About me / Roots & Location card headers act as a
   shortcut into edit mode, landing on that exact field (see
   goEditProfileField in profile-form.js) — desktop already has the inline
   "Edit bio" button and a full sidebar form, so this stays phone-only. */
.pf-card-edit-chevron { display: none; color: var(--muted); font-size: 20px; font-weight: 700; flex-shrink: 0; }
@media (max-width: 700px) {
  .pf-card-head-editable { cursor: pointer; }
  .pf-card-head-editable .pf-card-edit-chevron { display: block; }
}
@keyframes pfFieldHighlight {
  0%, 100% { background: transparent; }
  30% { background: var(--pf-purple-bg); }
}
.pf-field-highlight { animation: pfFieldHighlight 1.6s ease; border-radius: 8px; }

.pf-friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }

.pf-about-text { font-size: 13.5px; color: var(--dark); line-height: 1.5; margin: 0 0 12px; white-space: pre-wrap; }
.pf-about-empty { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

.pf-info-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid #F0EDF7; font-size: 13.5px; }
.pf-info-row:last-child { border-bottom: none; }
.pf-info-icon { width: 22px; text-align: center; flex-shrink: 0; color: var(--muted); font-size: 13px; }
.pf-info-label { flex: 1; color: var(--dark); min-width: 0; }
.pf-info-value { font-weight: 600; color: #1B1B3A; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-align: right; justify-content: flex-end; max-width: 100%; }
/* Long comma-separated values (occupation/skillsToShare) don't fit on one
   line next to the label at narrow widths — let them drop to their own full
   line under the icon+label instead of overflowing past the card edge. */
@media (max-width: 480px) {
  .pf-info-value { flex-basis: 100%; justify-content: flex-start; padding-left: 32px; box-sizing: border-box; text-align: left; }
}

.pf-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 640px) { .pf-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.pf-stat-tile { border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: block; text-decoration: none; color: inherit; transition: box-shadow 0.15s, transform 0.15s; }
.pf-stat-tile:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-1px); border-color: var(--dark); }
.pf-stat-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-bottom: 10px; }
.pf-stat-num { font-size: 20px; font-weight: 800; color: #1B1B3A; }
.pf-stat-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---- Offline banner (auth.js toggles this on window "offline"/"online") ---- */
.offline-banner {
  position: sticky; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--dark); color: var(--white);
  font-size: 13px; font-weight: 600; text-align: center;
  padding: 8px 16px;
}
