/* ============================================================
   Passville — visual system v2
   Bold / neubrutalist: thick black borders, hard offset shadows,
   cream background, punchy yellow/pink/mint accents, big
   confident type. Real data only — no invented stats.
   Fonts are loaded via <link> tags in includes/header.php (faster
   than an @import here, which blocks rendering).
   ============================================================ */

:root {
    --cream: #FDF6E8;
    --paper-2: #FFFFFF;
    --ink: #14140F;
    --ink-soft: #5B5A4E;
    --yellow: #FFD23F;
    --pink: #FF6FB0;
    --mint: #6FE3A6;
    --line: #14140F;
    --line-soft: rgba(20, 20, 15, 0.14);
    --radius: 20px;
    --radius-sm: 12px;
    --shadow-hard: 5px 5px 0 var(--ink);
    --shadow-hard-sm: 3px 3px 0 var(--ink);
    --shadow-soft: 0 8px 24px rgba(20, 20, 15, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }

h1, h2, h3, .display {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 0.4em;
}

.mono { font-family: 'IBM Plex Mono', monospace; }
a { color: inherit; transition: color 0.15s ease, opacity 0.15s ease; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Top nav ---------- */
.nav {
    background: var(--cream);
    border-bottom: 2.5px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    border: 2.5px solid var(--line);
    border-radius: 10px;
    background: var(--paper-2);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-hard-sm);
}
.nav-toggle .bar { width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform 0.15s ease, opacity 0.15s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-mark { flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; display: block; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-wordmark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.nav-tagline {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-top: 1px;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; position: relative; transition: color 0.18s ease; }
.nav-right-group { display: flex; align-items: center; gap: 8px; }
.nav-quick-link {
    display: none;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 16px;
    border: 2px solid var(--line);
    border-radius: 999px;
    transition: background 0.15s ease;
}
.nav-quick-link:hover { background: rgba(20,20,15,0.06); }
@media (min-width: 781px) {
    .show-desktop-only { display: inline-flex !important; }
}
.nav-links a:hover { color: var(--ink-soft); }

/* The nav is a hamburger dropdown at every screen width now, not just mobile */
.nav-toggle { display: flex; }
.nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 20px;
    min-width: 240px;
    background: var(--cream);
    border: 2.5px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hard);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
    z-index: 45;
}
.nav-links.open { display: flex; }
.nav-links a {
    padding: 13px 4px;
    border-bottom: 1.5px solid var(--line-soft);
    font-size: 0.95rem;
}
.nav-links a:last-of-type { border-bottom: none; }
.nav-links .btn { width: 100%; margin-top: 12px; }
.nav-section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    padding: 14px 4px 4px;
}
.nav-links a:first-of-type,
.nav-section-label:first-child + a { padding-top: 4px; }

/* Accordion sections inside the nav dropdown */
.nav-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    border-top: 1.5px solid var(--line-soft);
    cursor: pointer;
    padding: 13px 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    font-weight: 700;
}
.nav-section-toggle:first-child { border-top: none; }
.nav-section-toggle::after { content: '\25BE'; transition: transform 0.2s ease; }
.nav-section-toggle.open::after { transform: rotate(180deg); }
.nav-section-group {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.nav-section-group.open { max-height: 400px; }
.nav-section-group a { padding: 13px 4px; border-bottom: 1.5px solid var(--line-soft); font-size: 0.95rem; display: block; }
.nav-section-group a:last-of-type { border-bottom: none; }
.nav-section-group .btn { width: 100%; margin: 12px 0 4px; }
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #E8544A;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 5px;
    vertical-align: middle;
}

/* ---------- Buttons ---------- */
/* ---------- Universal tap feedback ----------
   Every clickable thing gets the browser's default tap-flash removed
   and a smooth scale-down pop instead — cards, icon buttons, nav links,
   accordion toggles, admin action buttons, all of it. .btn keeps its
   own bespoke shadow-press effect below (a class selector beats these
   plain tag selectors, so nothing needs excluding by hand). */
a, button, summary, input[type="submit"], input[type="button"] {
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s cubic-bezier(.34,1.56,.64,1);
}
a:active, button:active, summary:active, input[type="submit"]:active, input[type="button"]:active {
    transform: scale(0.97);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2.5px solid var(--line);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    background: var(--paper-2);
    color: var(--ink);
    box-shadow: var(--shadow-hard-sm);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(0, 0) scale(0.97); box-shadow: 1px 1px 0 var(--ink); }

.btn-gold { background: var(--yellow); }
.btn-outline { background: var(--paper-2); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-danger { background: var(--paper-2); color: #B3261E; border-color: #B3261E; box-shadow: 3px 3px 0 #B3261E; }
.btn-danger:hover { box-shadow: 5px 5px 0 #B3261E; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 15px; font-size: 0.85rem; box-shadow: 2px 2px 0 var(--ink); }
.btn-sm:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: var(--shadow-hard-sm); }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 90px; position: relative; overflow: hidden; }
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* One deliberate load moment: the two hero cards "stamp" into place like a
   ticket being issued, timed with the "real" highlight wiping in. Everything
   else on the page stays still on load by design. */
.hero-highlight {
    position: relative;
    overflow: hidden;
}
.hero-highlight::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left;
    animation: pv-wipe-reveal 0.4s cubic-bezier(.65,0,.35,1) 0.55s forwards;
    z-index: -1;
}
@keyframes pv-wipe-reveal {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
.float-card-dark {
    opacity: 0;
    transform: translateY(-70px) rotate(-14deg) scale(1.15);
    animation: pv-stamp-down 0.62s cubic-bezier(.2,1.4,.4,1) 0.15s forwards;
}
.float-card-light {
    opacity: 0;
    transform: translateY(-50px) rotate(10deg) scale(1.1);
    animation: pv-stamp-down 0.55s cubic-bezier(.2,1.4,.4,1) 0.55s forwards;
}
@keyframes pv-stamp-down {
    0%   { opacity: 0; transform: translateY(-70px) rotate(-14deg) scale(1.15); }
    60%  { opacity: 1; transform: translateY(6px) rotate(2deg) scale(1.02); }
    80%  { transform: translateY(-3px) rotate(-1deg) scale(1.0); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-highlight::before, .float-card-dark, .float-card-light {
        animation: none !important; opacity: 1 !important; transform: none !important;
    }
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-2);
    border: 2px solid var(--line);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 26px;
}
.hero-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--mint);
    flex-shrink: 0;
}
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.02;
    max-width: 720px;
    margin-bottom: 22px;
}
.hero-highlight {
    padding: 0 10px;
    border-radius: 8px;
    display: inline-block;
    transform: rotate(-1deg);
}
.hero p.lede {
    max-width: 480px;
    color: var(--ink-soft);
    font-size: 1.12rem;
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
    position: relative;
}
.hero-visual { position: relative; min-height: 320px; }

/* Desktop: the floating cards don't contribute to the row's height at all,
   so the shorter text column never leaves dead space beneath it. */
@media (min-width: 901px) {
    .hero-visual {
        position: absolute;
        top: 0;
        right: 0;
        width: 44%;
        min-height: 0;
    }
}

/* Floating plan preview cards on the hero */
.float-card {
    border-radius: var(--radius);
    border: 2.5px solid var(--line);
    box-shadow: var(--shadow-hard);
    padding: 20px;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.float-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.float-card-dark {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
    max-width: 360px;
}
.float-card-dark .float-tag {
    display: inline-block;
    background: rgba(253,246,232,0.14);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 11px;
    text-transform: uppercase;
}
.float-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.float-countdown { font-size: 0.8rem; font-weight: 600; opacity: 0.85; }
.float-card-dark h3 { font-size: 1.25rem; margin-bottom: 6px; color: var(--cream); }
.float-meta { font-size: 0.85rem; opacity: 0.8; margin-bottom: 14px; }
.float-avatars { display: flex; align-items: center; }
.float-avatars .mini-avatar { margin-left: -8px; }
.float-avatars .mini-avatar:first-child { margin-left: 0; }

.mini-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid var(--cream);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; color: var(--ink);
    flex-shrink: 0;
}
.mini-avatar.more { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }

.float-card-light {
    background: var(--paper-2);
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: -30px;
    margin-left: 60px;
    position: relative;
}
.float-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--mint);
    border: 2px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.float-card-light strong { font-size: 0.98rem; }
.float-card-light .sub { font-size: 0.82rem; color: var(--ink-soft); }
.float-example-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--ink-soft);
}

/* Trust row */
.trust-row { display: flex; align-items: center; gap: 14px; }
.trust-avatars { display: flex; }
.trust-avatars .mini-avatar { width: 34px; height: 34px; margin-left: -10px; }
.trust-avatars .mini-avatar:first-child { margin-left: 0; }
.trust-row .trust-text { font-size: 0.9rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Section headers ---------- */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 48px 0 22px;
    flex-wrap: wrap;
    gap: 10px;
}
.section-head h2 { font-size: 1.6rem; margin: 0; }
.section-head .sub { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Plan pass card ---------- */
.pass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}
.pass {
    background: var(--paper-2);
    border-radius: var(--radius);
    border: 2.5px solid var(--line);
    box-shadow: var(--shadow-hard);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ink);
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.pass:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }

.pass-main { padding: 20px 20px 16px; flex: 1; }
.pass-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }

.stamp {
    width: 54px; height: 54px;
    border-radius: 14px;
    border: 2.5px solid var(--line);
    background: var(--yellow);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.15;
    flex-shrink: 0;
    padding: 4px;
    color: var(--ink);
}

.pass-title { font-size: 1.15rem; margin: 0 0 4px; }
.pass-meta { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }
.pass-desc {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pass-tear { position: relative; border-top: 2.5px dashed var(--line-soft); }
.pass-tear::before, .pass-tear::after {
    content: ''; position: absolute; top: -10px;
    width: 20px; height: 20px; background: var(--cream);
    border-radius: 50%;
}
.pass-tear::before { left: -10px; }
.pass-tear::after { right: -10px; }

.pass-stub {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
    background: #FBF3E1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--ink-soft);
}
.pass-stub .expiry { font-weight: 700; }
.pass-stub .expiry.urgent { color: #B3261E; }
.pass-stub .expiry.ended { color: var(--ink-soft); }

/* ---------- Forms ---------- */
.card {
    background: var(--paper-2);
    border: 2.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 28px;
}
a.card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
a.card:active { transform: translate(0, 0); box-shadow: 3px 3px 0 var(--ink); }
.form-narrow { max-width: 440px; margin: 48px auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.field .hint { color: var(--ink-soft); font-size: 0.8rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=date], input[type=number], textarea, select {
    width: 100%;
    padding: 11px 13px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: var(--paper-2);
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(111,227,166,0.25); }

/* Custom checkbox — replaces the default browser box with one matching the
   site's bold-border look, and a smooth check-in animation instead of an
   instant snap. */
input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    width: 22px; height: 22px; flex-shrink: 0;
    border: 2.5px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2);
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
input[type=checkbox]:active { transform: scale(0.9); }
input[type=checkbox]::before {
    content: '';
    width: 12px; height: 12px;
    transform: scale(0);
    transition: transform 0.15s cubic-bezier(.34,1.56,.64,1);
    background: var(--ink);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type=checkbox]:checked { background: var(--mint); }
input[type=checkbox]:checked::before { transform: scale(1); }
input[type=checkbox]:focus-visible { box-shadow: 0 0 0 3px rgba(111,227,166,0.35); }

/* Normalize the native calendar icon so it matches the rest of the field */
/* Fix: iOS/mobile browsers render date inputs with their own native sizing
   that ignores width:100% unless appearance is explicitly reset — this was
   causing the field to overflow wider than every other input on phones. */
input[type=date], input[type=datetime-local] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    max-width: 100%;
}

input[type=date]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.1);
    padding: 4px;
    border-radius: 6px;
}
input[type=date]::-webkit-calendar-picker-indicator:hover,
input[type=datetime-local]::-webkit-calendar-picker-indicator:hover {
    background: rgba(20,20,15,0.08);
}

/* ---------- Flash messages ---------- */
.flash { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.92rem; border: 2px solid var(--line); font-weight: 600; }
.flash-error { background: #FBE0DC; color: #7A241C; }
.flash-success { background: #DFF6E8; color: #175B36; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; margin: 40px 0 10px; }
.avatar {
    width: 72px; height: 72px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.3rem;
    color: var(--ink); flex-shrink: 0;
    border: 2.5px solid var(--line);
}
.avatar-sm { width: 34px; height: 34px; font-size: 0.85rem; border-radius: 10px; }
.member-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.92rem; }

/* ---------- Empty state ---------- */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-soft);
    border: 2.5px dashed var(--line);
    border-radius: var(--radius);
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: var(--ink);
    color: rgba(253,246,232,0.7);
    text-align: center;
    padding: 34px 0;
    margin-top: 60px;
    font-size: 0.85rem;
}

/* ---------- Utility ---------- */
.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--mint);
    color: var(--ink);
    border: 2px solid var(--line);
}
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }

img.avatar { object-fit: cover; }

/* Logo heartbeat — a "lub-dub" double pulse, slow enough to be a subtle
   permanent presence rather than frantic, since this sits in the nav on
   every page. */
.nav-mark.heartbeat { animation: pv-heartbeat 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes pv-heartbeat {
    0%   { transform: scale(1); }
    10%  { transform: scale(1.14); }
    20%  { transform: scale(1); }
    30%  { transform: scale(1.09); }
    40%  { transform: scale(1); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .nav-mark.heartbeat { animation: none !important; }
}

/* ---------- Micro-interactions ---------- */

/* Custom confirm modal (replaces browser confirm()) */
.pv-modal-overlay {
    position: fixed; inset: 0; background: rgba(20,20,15,.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 200;
}
.pv-modal-overlay.open { opacity: 1; pointer-events: auto; }
.pv-modal-box {
    background: var(--paper-2); border: 3px solid var(--line); border-radius: 16px;
    box-shadow: 8px 8px 0 var(--ink); padding: 26px; max-width: 340px; margin: 20px;
    max-height: 85vh; overflow-y: auto;
    text-align: center; transform: scale(.85); transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.pv-modal-overlay.open .pv-modal-box { transform: scale(1); }
.pv-modal-title { font-size: 1.05rem; margin-bottom: 18px; }
.pv-modal-actions { display: flex; gap: 10px; justify-content: center; }

/* Notification nav badge bounce */
@keyframes pv-bell-bounce {
    0% { transform: scale(1); } 30% { transform: scale(1.5); } 50% { transform: scale(0.9); }
    70% { transform: scale(1.2); } 100% { transform: scale(1); }
}
.nav-badge.bounce { animation: pv-bell-bounce .5s cubic-bezier(.34,1.56,.64,1); }

/* Achievement badge unlock shine */
.badge-new { position: relative; overflow: hidden; }
.badge-new::after {
    content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.9), transparent);
    transform: skewX(-20deg);
}
.badge-new.shine-play::after { animation: pv-shine-sweep .7s ease; }
.badge-new.shine-play { animation: pv-badge-pop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes pv-shine-sweep { from { left: -60%; } to { left: 130%; } }
@keyframes pv-badge-pop { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* Flash message slide-in from top */
.flash { animation: pv-flash-in .35s cubic-bezier(.22,1,.36,1); }
@keyframes pv-flash-in { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Profile completion bar fill */
.progress-fill { transition: width 1.1s cubic-bezier(.22,1,.36,1); }

/* Chat message arriving */
.chat-msg-new { animation: pv-msg-in .35s ease both; }
@keyframes pv-msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Deep-linked chat message — briefly highlighted when someone arrives
   via a reply notification, so it's obvious which message they came for */
.chat-msg-highlight > div { animation: pv-chat-highlight 1.8s ease; }

/* Chat message long-press action menu — smooth scale+fade appearance */
.chat-action-popup {
    position: absolute;
    z-index: 200;
    min-width: 200px;
    max-height: 70vh;
    overflow-y: auto;
    background: #FFFFFF;
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: 4px 4px 0 rgba(20,20,15,0.2);
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s cubic-bezier(.34,1.56,.64,1);
}
.chat-action-popup.open { opacity: 1; transform: scale(1); pointer-events: auto; }
.chat-action-popup-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    border-bottom: 1.5px solid #E4DCC8;
}
.chat-action-popup-item:last-child { border-bottom: none; }
.chat-action-popup-item:hover { background: #FBF3E1; }
@keyframes pv-chat-highlight {
    0% { box-shadow: 0 0 0 4px rgba(255,210,63,0.9); }
    100% { box-shadow: 0 0 0 4px rgba(255,210,63,0); }
}

/* Reply bar slide */
.reply-bar-anim { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.reply-bar-anim.open { max-height: 60px; margin-bottom: 8px; }

/* Check-in / rating pop */
.pop-btn { transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.pop-btn.popped { transform: scale(1.12); }

/* Join-request card slide-away */
.req-row {
    transition: transform .35s ease, opacity .35s ease, max-height .35s ease, margin .35s ease, padding .35s ease;
    overflow: hidden;
}
.req-row.leaving { transform: translateX(120%); opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .flash, .badge-new.shine-play, .nav-badge.bounce, .chat-msg-new, .chat-msg-highlight > div, .chat-action-popup { animation: none !important; transition: none !important; }
}

.interest-chip {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    border: 2.5px solid var(--line);
    background: var(--paper-2);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
}
.interest-chip.selected { background: var(--yellow); transform: scale(1.08); box-shadow: 3px 3px 0 var(--ink); }

.memory-tile { animation: pv-tile-in 0.3s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pv-tile-in { from { opacity:0; transform:scale(0.7) rotate(-4deg); } to { opacity:1; transform:scale(1) rotate(0); } }
#memory-upload-tile { transition: background 0.15s ease, transform 0.15s ease; }
#memory-upload-tile:active { transform: scale(0.95); }

#near-me-btn.active, #feed-near-me-btn.active { background: var(--mint); }
.pass { transition: transform 0.45s cubic-bezier(.22,1,.36,1); }

.feed-cta-banner { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.feed-cta-banner:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }

.mobile-bottom-nav { display: none; }
@media (max-width: 780px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: var(--cream);
        border-top: 2.5px solid var(--line);
        z-index: 50;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        justify-content: space-around;
        align-items: center;
    }
    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--ink);
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 600;
        cursor: pointer;
        padding: 4px 14px;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.15s cubic-bezier(.34,1.56,.64,1);
    }
    .mobile-bottom-nav-item:active { transform: scale(0.88); }
    .mobile-bottom-nav-icon { font-size: 1.3rem; line-height: 1; transition: transform 0.15s ease; }
    .mobile-bottom-nav-create .mobile-bottom-nav-icon {
        background: var(--yellow);
        border: 2.5px solid var(--line);
        border-radius: 50%;
        width: 40px; height: 40px;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 2px 2px 0 var(--ink);
        margin-bottom: 2px;
    }
    body { padding-bottom: 70px; }
}

/* Photo gallery — hide the browser's default scrollbar (that's the ugly
   grey bar with arrows some desktop browsers show) in favor of our own
   styled arrow buttons + dot indicator */
.feed-photo-gallery { scrollbar-width: none; -ms-overflow-style: none; }
.feed-photo-gallery::-webkit-scrollbar { display: none; height: 0; }
.feed-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: rgba(253,246,232,0.9);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 0 2px;
}
.feed-gallery-arrow-left { left: 10px; }
.feed-gallery-arrow-right { right: 10px; }
.feed-gallery-dots { display: flex; justify-content: center; gap: 5px; padding: 6px 0 2px; }
.feed-gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: #D8CFB8; transition: background 0.15s ease; }
.feed-gallery-dot.active { background: var(--ink); }

.mobile-nav-overlay-backdrop { display: none; }

.nav-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2.5px solid var(--line);
    border-radius: 10px;
    background: var(--paper-2);
    box-shadow: var(--shadow-hard-sm);
    text-decoration: none;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 12px;
    transition: transform 0.12s ease;
}
.nav-bell-btn:hover { transform: translate(-1px, -1px); }
.nav-bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    margin-left: 0;
    border: 2px solid var(--cream);
}

.feed-item-highlight { animation: pv-feed-highlight 1.8s ease; }
@keyframes pv-feed-highlight {
    0%, 100% { box-shadow: var(--shadow-hard); }
    15%, 45% { box-shadow: 0 0 0 4px var(--yellow), var(--shadow-hard); }
}

/* Live Feed hero carousel — District-style large swipeable cards,
   mobile only. Desktop keeps the original compact row. */
.feed-hero-carousel { display: none; }
.feed-hero-dots { display: none; }

@media (max-width: 780px) {
    .feed-teaser-row-desktop { display: none !important; }
    .feed-hero-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 14px;
        padding: 4px 20px 8px;
        margin: 0 -20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .feed-hero-carousel::-webkit-scrollbar { display: none; }
    .feed-hero-card {
        flex-shrink: 0;
        width: 82%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        position: relative;
        border: 2.5px solid var(--line);
        border-radius: 20px;
        box-shadow: 5px 5px 0 var(--ink);
        background: var(--paper-2);
        overflow: hidden;
    }
    .feed-hero-photo-link { display: block; position: relative; }
    .feed-hero-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
    .feed-hero-badge {
        position: absolute; top: 10px; left: 10px;
        background: var(--ink); color: var(--cream);
        font-size: 0.68rem; font-weight: 700;
        padding: 5px 12px; border-radius: 999px;
        font-family: 'IBM Plex Mono', monospace; text-transform: uppercase;
    }
    .feed-hero-bookmark {
        position: absolute; top: 10px; right: 10px;
        width: 34px; height: 34px; border-radius: 50%;
        background: rgba(253,246,232,0.9); border: 2px solid var(--ink);
        display: flex; align-items: center; justify-content: center;
        font-size: 1rem; cursor: pointer; padding: 0;
        transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
    }
    .feed-hero-bookmark.saved { background: var(--yellow); transform: scale(1.1); }
    .hero-badge-plan {
        position: absolute; top: 10px; left: 10px;
        background: var(--yellow); color: var(--ink); border: 2px solid var(--ink);
        font-size: 0.68rem; font-weight: 700;
        padding: 4px 11px; border-radius: 999px;
        text-transform: uppercase;
    }
    .hero-icon-plan {
        position: absolute; top: 10px; right: 10px;
        background: rgba(253,246,232,0.92); border: 2px solid var(--ink);
        border-radius: 999px; padding: 6px 12px;
        font-size: 0.78rem; font-weight: 700;
    }
    .feed-hero-body-link { display: block; padding: 14px 16px 16px; text-decoration: none; color: var(--ink); }
    .feed-hero-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
    .feed-hero-desc { font-size: 0.83rem; color: var(--ink-soft); }

    .feed-hero-dots { display: flex; justify-content: center; gap: 6px; padding: 14px 0 6px; }
    .feed-hero-dot { width: 7px; height: 7px; border-radius: 50%; background: #E4DCC8; transition: background 0.15s ease, transform 0.15s ease; }
    .feed-hero-dot.active { background: var(--ink); transform: scale(1.3); }
}

.section-tabs {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    gap: 8px;
    background: var(--cream);
    border-bottom: 2px solid rgba(20,20,15,0.1);
    padding: 10px 0;
    margin-bottom: 14px;
}
@media (min-width: 781px) {
    .section-tabs { gap: 14px; padding: 16px 0; }
    .section-tab { max-width: 260px; padding: 12px 22px; font-size: 0.95rem; }
}
.section-tab {
    flex: 1;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 2px solid var(--line);
    background: var(--paper-2);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.section-tab.active { background: var(--ink); color: var(--cream); }
.section-tab .count { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; opacity: 0.7; }

.mention-link { color: #175B36; font-weight: 700; text-decoration: none; }
.mention-link:hover { text-decoration: underline; }

.avatar-status-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2.5px solid var(--cream);
}

.pv-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,20,15,0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.pv-loading-overlay.show { display: flex; }
.pv-loading-box {
    background: var(--paper-2);
    border: 3px solid var(--line);
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--ink);
    padding: 28px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 260px;
    text-align: center;
}
.pv-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #F0E9D8;
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: pv-spin 0.8s linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }
#pv-loading-text { margin: 0; font-weight: 700; font-size: 0.92rem; }

/* ---------- Your Plans dropdown sections ---------- */
.plan-dropdown {
    border: 2.5px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    background: var(--paper-2);
    box-shadow: var(--shadow-hard-sm);
}
.plan-dropdown summary {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 700;
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}
.plan-dropdown summary:hover { background: rgba(20,20,15,0.04); }
.plan-dropdown summary::-webkit-details-marker { display: none; }
.plan-dropdown summary::after { content: '\25BE'; font-size: 1rem; display: inline-block; transition: transform 0.25s ease; }
.plan-dropdown[open] summary::after { transform: rotate(180deg); }
.plan-dropdown .dropdown-body { padding: 4px 22px 22px; border-top: 1.5px solid var(--line-soft); }

/* ---------- Custom city/state autocomplete ---------- */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--paper-2);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hard-sm);
    max-height: 220px;
    overflow-y: auto;
    z-index: 30;
}
.autocomplete-list.open { display: block; }
.autocomplete-item { padding: 10px 14px; font-size: 0.92rem; cursor: pointer; }
.autocomplete-item:hover, .autocomplete-item.active { background: rgba(111,227,166,0.25); }
.autocomplete-empty { padding: 10px 14px; font-size: 0.85rem; color: var(--ink-soft); }
.mention-autocomplete-list { top: auto; bottom: calc(100% + 4px); z-index: 40; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { margin-top: 30px; }
}
@media (max-width: 780px) {
    .profile-grid { grid-template-columns: 1fr !important; }
    .hero { padding: 50px 0 60px; }
    .float-card-light { margin-left: 20px; }

    /* On phones, the bottom nav's "Menu" button is the only menu trigger
       — the top-right hamburger would be redundant, so it's hidden here */
    .nav-toggle { display: none !important; }

    /* The dropdown becomes a fixed overlay sliding up from just above the
       bottom nav bar, instead of an absolutely-positioned panel anchored
       to the top header (which used to require scrolling all the way up
       just to see it when opened from the bottom "Menu" button) */
    .nav-links {
        position: fixed;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        max-height: 75vh;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.25s cubic-bezier(.22,1,.36,1);
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    .nav-links.open { display: flex; transform: translateY(0); }
    .mobile-nav-overlay-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(20,20,15,0.45);
        z-index: 44;
    }
    .mobile-nav-overlay-backdrop.open { display: block; }
}
@media (max-width: 480px) {
    .hide-mobile { display: none; }
    .admin-action-row { flex-direction: column; }
    .admin-action-row .btn { width: 100%; }
}
