/* ======================================================
   VIBRANT ENERGY — Dark Mobile-First Theme
   Culture, Travel & Fun
   ====================================================== */

/* Brand fonts (Outfit + Playfair Display) are loaded via the
   Google Fonts <link> in each page's <head>, not here. */

/* === CSS Variables === */
:root {
    --primary: #0F0F10;
    --secondary: #1A1A1D;
    --accent-primary: #FF6B35;
    --accent-secondary: #F7C948;
    --accent-gradient: linear-gradient(135deg, #FF6B35 0%, #F7C948 100%);
    --surface: #252529;
    --surface-elevated: #2D2D32;
    --text-primary: #FFFFFF;
    --text-secondary: #B4B4B8;
    --text-muted: #8F8F96;
    --background-gradient: linear-gradient(165deg, #0F0F10 0%, #1A1A1D 40%, #1F1A18 100%);
    --highlight: rgba(255, 107, 53, 0.12);

    /* Category Colors */
    --music-color: #9F86C0;
    --music-bg: rgba(159, 134, 192, 0.15);
    --sports-color: #5E548E;
    --sports-bg: rgba(94, 84, 142, 0.15);
    --family-color: #E29578;
    --family-bg: rgba(226, 149, 120, 0.15);
    --festivals-color: #81B29A;
    --festivals-bg: rgba(129, 178, 154, 0.15);
    --travel-color: #3B82F6;
    --travel-bg: rgba(59, 130, 246, 0.15);
    --wellness-color: #8ECAE6;
    --wellness-bg: rgba(142, 202, 230, 0.15);
    --church-color: #D4A373;
    --church-bg: rgba(212, 163, 115, 0.15);

    /* Shadows */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-button: 0 4px 20px rgba(255, 107, 53, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(255, 107, 53, 0.2);
}

/* === Reset === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Base === */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===============================
   HEADER / APP BAR
   =============================== */
.app-header {
    height: 64px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-btn {
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: background 0.2s ease;
    position: relative;
}

.header-btn:hover {
    background: var(--surface-elevated);
}

.header-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--primary);
}

/* ===============================
   USER BAR (Auth bar - redesigned)
   =============================== */
.user-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(15, 15, 16, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.user-bar.hidden {
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-photo, .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar {
    background: var(--accent-gradient);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-name strong {
    color: var(--text-primary);
}

.user-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
    padding: 8px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
}

.action-btn:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.sign-out-btn {
    background: var(--surface);
    color: var(--text-secondary);
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 4px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.sign-out-btn:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
}

/* ===============================
   HERO SECTION
   =============================== */
.hero {
    position: relative;
    padding: 0;
    text-align: left;
    background: none;
    color: var(--text-primary);
    border-radius: 0;
    overflow: visible;
    margin: 0;
    box-shadow: none;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    margin: 0;
}

/* Hero Card */
.hero-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border-accent);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin: 20px 16px 0;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: var(--accent-gradient);
    opacity: 0.08;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(255, 107, 53, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.year-badge {
    background: var(--accent-gradient);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0F0F10;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title-group {
    position: relative;
    z-index: 1;
}

.hero h1,
.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 40px;
    line-height: 44px;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tagline,
.hero-subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 22px;
    color: var(--text-secondary);
    opacity: 1;
    margin-bottom: 0;
}

/* Hide old hero elements */
.hero-logo, .site-logo, .hero .members-preview {
    display: none;
}

/* ===============================
   MEMBERS SECTION
   =============================== */
.members-section {
    padding: 0 16px;
    margin-top: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 30px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.see-all-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--accent-primary);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.members-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.members-scroll::-webkit-scrollbar {
    display: none;
}

.member-card {
    flex-shrink: 0;
    width: 100px;
    background: var(--surface);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.member-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0F0F10;
}

.member-card-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
}

.member-card-role {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Old member-badge styles (still used in hero) */
.member-badge {
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.member-badge:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
}

.members-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* Subtle placeholder shown in the hero until members are added */
.members-preview-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Empty-state note inside an event grid (removed by JS when a card arrives) */
.grid-empty {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 20px;
}

/* ===============================
   CATEGORIES / EXPLORE EVENTS
   =============================== */
.categories-section {
    padding: 0 16px;
    margin-top: 28px;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.category-tile {
    padding: 16px;
    border-radius: 16px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
    text-decoration: none;
}

.category-tile:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.category-tile.featured {
    background: var(--accent-gradient);
    border-color: transparent;
}

.category-tile.featured .cat-icon,
.category-tile.featured .cat-label,
.category-tile.featured .cat-count {
    color: #0F0F10;
}

.cat-icon {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

.cat-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.cat-count {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===============================
   FILTER NAV
   =============================== */
.filter-nav {
    position: sticky;
    top: 64px;
    z-index: 90;
    background: rgba(15, 15, 16, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.filter-nav .container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 16px;
}

.filter-nav .container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--border-accent);
    color: var(--text-secondary);
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: #0F0F10;
    border-color: transparent;
    font-weight: 700;
    box-shadow: var(--shadow-button);
}

/* ===============================
   STATS BAR
   =============================== */
.stats-bar {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-around;
    margin: 20px 16px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* ===============================
   YOUR EVENTS SECTION
   =============================== */
.your-events-section {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    margin: 0 16px 20px;
    border: 1px solid var(--border);
}

.your-events-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.your-events-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.your-events-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.your-events-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.your-event-chip {
    padding: 10px 16px;
    background: var(--surface-elevated);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
}

.chip-date {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 0.85rem;
}

.chip-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chip-view {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Outfit', sans-serif;
}

.no-events-message {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===============================
   VIEW TOGGLE
   =============================== */
.view-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 16px;
    margin-bottom: 20px;
}

.view-btn {
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: var(--accent-gradient);
    color: #0F0F10;
    border-color: transparent;
    font-weight: 700;
}

.add-event-btn {
    padding: 8px 18px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-accent);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-event-btn:hover {
    background: var(--highlight);
}

.export-btn {
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    border-color: var(--border-accent);
}

/* ===============================
   EVENTS GRID & CARDS
   =============================== */
.events-section {
    padding: 0 16px;
}

.category-section.hidden {
    display: none;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 32px 0 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* === Event Card === */
.event-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-accent);
}

.event-date {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Category date backgrounds (dark versions) */
.event-card.music .event-date {
    background: var(--music-bg);
    color: var(--music-color);
}
.event-card.sports .event-date {
    background: var(--sports-bg);
    color: var(--sports-color);
}
.event-card.family .event-date {
    background: var(--family-bg);
    color: var(--family-color);
}
.event-card.festivals .event-date {
    background: var(--festivals-bg);
    color: var(--festivals-color);
}
.event-card.travel .event-date {
    background: var(--travel-bg);
    color: var(--travel-color);
}
.event-card.wellness .event-date {
    background: var(--wellness-bg);
    color: var(--wellness-color);
}
.event-card.church .event-date {
    background: var(--church-bg);
    color: var(--church-color);
}

.event-date .month {
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.event-date .day {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    line-height: 1;
    font-weight: 900;
}

.event-date .year {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 2px;
    font-weight: 500;
}

.event-details {
    padding: 20px;
}

.event-details h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-primary);
}

.event-time,
.event-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--highlight);
    color: var(--accent-primary);
    margin-top: 12px;
    letter-spacing: 0.02em;
}

.event-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    background: var(--highlight);
    transition: all 0.2s ease;
}

.event-link-btn:hover {
    background: rgba(255, 107, 53, 0.2);
}

.event-rsvp {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rsvp-btn {
    border: 2px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
}

.rsvp-btn:hover {
    background: var(--accent-primary);
    color: #0F0F10;
    box-shadow: var(--shadow-button);
}

.attendee-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.attendee-count .count {
    font-weight: 700;
    color: var(--accent-primary);
}

.attendee-count .count-maybe,
.attendee-count .count-declined {
    margin-left: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Admin delete button */
.admin-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.event-card:hover .admin-delete-btn {
    opacity: 1;
}

/* ===============================
   SIGN-IN SCREEN
   =============================== */
.sign-in-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 16, 0.98);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.sign-in-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.sign-in-container {
    background: var(--surface);
    padding: 40px 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border);
}

.sign-in-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.sign-in-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sign-in-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 12px;
}

.google-sign-in-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin: 24px 0 0;
    background: var(--text-primary);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.google-sign-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* ===============================
   MODALS (RSVP, Add Event, Admin, etc.)
   =============================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 16, 0.7);
    backdrop-filter: blur(12px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    width: 92%;
    max-width: 600px;
    box-shadow: var(--shadow-card);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.modal-content h2 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.close-modal {
    font: inherit;
    padding: 0;
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* RSVP Form */
.rsvp-form h3 {
    margin: 20px 0 12px;
    font-size: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.member-rsvp {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.rsvp-select,
.rsvp-note-input,
.notes-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background: var(--surface-elevated);
    font-size: 1rem;
}

.rsvp-note-input {
    font-size: 1rem;
    padding: 8px 12px;
}

.rsvp-note-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rsvp-select:focus,
.rsvp-note-input:focus,
.notes-section textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.save-rsvp-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    color: #0F0F10;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-button);
}

.save-rsvp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
}

/* Attendee Chips */
.attendee-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 2px 4px 2px 0;
}

.attendee-chip.going {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.attendee-chip.maybe {
    background: rgba(247, 201, 72, 0.15);
    color: #F7C948;
}

.attendee-chip.not-going {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.attendee-chip-note {
    font-weight: 400;
    opacity: 0.85;
}

/* Admin: one-off guest add form inside the RSVP modal */
.admin-guest-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-guest-controls input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.admin-guest-controls input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.admin-guest-controls button {
    white-space: nowrap;
}

/* ===============================
   ADD EVENT MODAL
   =============================== */
#addEventModal .modal-content input,
#addEventModal .modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background: var(--surface-elevated);
    margin-bottom: 12px;
    font-size: 1rem;
}

#addEventModal .modal-content input:focus,
#addEventModal .modal-content select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.save-event-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    color: #0F0F10;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-button);
    transition: all 0.2s ease;
}

.save-event-btn:hover {
    transform: translateY(-2px);
}

/* ===============================
   INVITE MODAL
   =============================== */
.invite-modal-content {
    max-width: 500px;
}

.invite-link-box {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.invite-link-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.copy-link-btn {
    padding: 12px 20px;
    background: var(--accent-gradient);
    color: #0F0F10;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.copy-link-btn:hover {
    transform: translateY(-1px);
}

.invite-methods h3 {
    margin: 20px 0 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-method-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
}

.share-method-btn:hover {
    border-color: var(--border-accent);
    background: var(--highlight);
}

.invite-qr {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: var(--surface-elevated);
    border-radius: 16px;
}

.invite-qr p {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===============================
   ADMIN DASHBOARD
   =============================== */
.admin-content {
    max-width: 700px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.admin-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.admin-tab.active {
    background: var(--accent-gradient);
    color: #0F0F10;
}

.admin-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.user-request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--surface-elevated);
}

.user-request-info h4 {
    margin-bottom: 2px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.user-request-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.approve-btn {
    background: var(--accent-gradient);
    color: #0F0F10;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
}

/* ===============================
   PENDING MODAL
   =============================== */
.pending-content {
    text-align: center;
    max-width: 400px;
}

.pending-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

.sign-out-btn-pending {
    margin-top: 20px;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* ===============================
   DELETE CONFIRM MODAL
   =============================== */
.delete-confirm-modal,
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 16, 0.7);
    backdrop-filter: blur(12px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.delete-confirm-modal.active,
.confirm-dialog.active {
    opacity: 1;
}

.delete-confirm-content,
.confirm-dialog-content {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border);
}

.delete-confirm-content h3,
.confirm-dialog-content h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.delete-confirm-content p,
.confirm-dialog-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.delete-warning {
    color: #EF4444 !important;
    font-size: 0.8rem !important;
}

.delete-confirm-buttons,
.confirm-dialog-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.cancel-delete-btn {
    padding: 10px 24px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.confirm-delete-btn {
    padding: 10px 24px;
    background: #EF4444;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* ===============================
   PARTICIPANT MODAL
   =============================== */
.participant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.participant-btn {
    padding: 14px 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.participant-btn:hover {
    border-color: var(--accent-primary);
    background: var(--highlight);
}

/* ===============================
   FULLCALENDAR OVERRIDES
   =============================== */
.calendar-section.hidden {
    display: none;
}

#calendar {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.fc-header-toolbar {
    margin-bottom: 20px !important;
}

.fc-toolbar-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.fc-button {
    background: var(--surface-elevated) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    text-transform: capitalize !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 8px 14px !important;
    transition: all 0.2s ease !important;
}

.fc-button:hover,
.fc-button-active {
    background: var(--accent-primary) !important;
    color: #0F0F10 !important;
    border-color: var(--accent-primary) !important;
}

.fc-col-header-cell {
    background: none !important;
    border: none !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--border) !important;
}

.fc-col-header-cell-cushion {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

.fc-daygrid-day {
    border: 1px solid var(--border) !important;
    transition: background 0.2s;
}

.fc-daygrid-day:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fc-daygrid-day-number {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 8px 10px !important;
}

.fc-day-today {
    background: var(--highlight) !important;
}

.fc-event {
    cursor: pointer;
    border: none !important;
    border-radius: 6px !important;
    padding: 3px 6px !important;
    margin-bottom: 2px !important;
    font-size: 0.8rem !important;
    transition: transform 0.2s;
}

.fc-event:hover {
    transform: translateY(-1px);
}

.fc-event-title {
    font-weight: 600;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: var(--border) !important;
}

.fc-scrollgrid {
    border: none !important;
}

.fc-day-other .fc-daygrid-day-number {
    color: var(--text-muted);
    opacity: 0.4;
}

/* ===============================
   FIXED FOOTER / CTA
   =============================== */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 28px;
    background: linear-gradient(180deg, transparent 0%, #0F0F10 30%);
    z-index: 50;
    pointer-events: none;
}

.fixed-footer > * {
    pointer-events: auto;
}

.main-cta-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: #0F0F10;
    padding: 18px 24px;
    border: none;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: all 0.2s ease;
}

.main-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
}

.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
}

.secondary-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.secondary-action-btn:hover {
    color: var(--text-primary);
}

.secondary-action-btn .icon {
    font-size: 1.2rem;
}

/* ===============================
   FOOTER
   =============================== */
footer {
    text-align: center;
    padding: 60px 20px 140px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 5000;
    animation: toast-in 0.3s ease;
    box-shadow: var(--shadow-card);
}

.toast.success {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.toast.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===============================
   TRAVEL DETAILS
   =============================== */
.travel-details input,
.travel-details textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background: var(--surface-elevated);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.travel-details input:focus,
.travel-details textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ===============================
   CHURCH SECTIONS
   =============================== */
.church-invitation {
    background: var(--surface-elevated);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--church-bg);
}

.sunday-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    margin: 10px 0;
}

.add-church-btn {
    padding: 8px 16px;
    background: var(--church-bg);
    color: var(--church-color);
    border: 1px solid rgba(212, 163, 115, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.add-church-btn:hover {
    background: rgba(212, 163, 115, 0.25);
}

/* ===============================
   BIRTHDAY CARDS
   =============================== */
.event-card.birthday .event-date,
.birthday-date {
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.15), rgba(255, 107, 53, 0.15)) !important;
    color: var(--accent-secondary) !important;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (min-width: 768px) {
    .hero-card {
        margin: 24px auto 0;
        max-width: 700px;
    }

    .members-section,
    .categories-section {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .stats-bar {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .hero h1, .hero-title {
        font-size: 32px;
        line-height: 36px;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .user-actions .action-btn span:last-child:not(:first-child) {
        display: none;
    }

    .share-buttons {
        flex-direction: column;
    }

    .participant-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===============================
   SCROLLBAR (webkit)
   =============================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===============================
   GLOW EFFECTS
   =============================== */
.hero-glow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: radial-gradient(ellipse at top, rgba(255, 107, 53, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Body padding for fixed elements */
main.container {
    padding-bottom: 120px;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .user-bar, .fixed-footer, .filter-nav, .app-header {
        display: none !important;
    }

    .event-card {
        background: white !important;
        border: 1px solid #ddd !important;
        color: black !important;
        break-inside: avoid;
    }

    .event-details h3,
    .event-time,
    .event-location {
        color: black !important;
    }
}

/* Confirmed church event styling */
.event-card.confirmed-church {
    border-left: 3px solid var(--church);
}

/* === Admin Dashboard Enhancements === */
.user-request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--surface-elevated);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.user-request-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-request-info h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-request-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-request-participant {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.user-request-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.approve-btn {
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.approve-btn:hover {
    background: rgba(34, 197, 94, 0.3);
}

.revoke-btn {
    padding: 6px 14px;
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.revoke-btn:hover {
    background: rgba(245, 158, 11, 0.3);
}

.ban-btn {
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ban-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.admin-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

/* === Members Roster Tab === */
.add-member-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.add-member-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.add-member-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.add-member-form button {
    white-space: nowrap;
}

/* === Disabled RSVP Selects (other members) === */
.rsvp-select:disabled {
    background: var(--surface) !important;
    cursor: not-allowed;
    opacity: 0.65;
}

/* === Past Events Dimming === */
.event-card.past-event {
    opacity: 0.5;
    filter: grayscale(30%);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.event-card.past-event:hover {
    opacity: 0.8;
    filter: grayscale(0%);
}


/* ===============================
   INLINE ICON SUPPORT (emoji -> stroked SVG migration)
   =============================== */
.action-btn svg,
.save-event-btn svg,
.edit-event-btn svg,
.invite-option svg,
h2 svg,
h3.section-title svg,
.cost-item label svg {
    vertical-align: -0.15em;
    flex-shrink: 0;
}

.church-icon svg {
    vertical-align: middle;
    color: var(--church-color);
}

.pending-icon svg {
    width: 48px;
    height: 48px;
    color: var(--accent-secondary);
}

/* ============================================================
   COME THROUGH ELEVATION — 2026-07-22 redesign branch
   Real dusk photography, three type voices, staged entrance,
   scroll reveals. Appended overrides: remove this block to
   restore the previous flat look. Functionality untouched.
   ============================================================ */

/* --- The front door: sign-in screen becomes the gathering --- */
.sign-in-screen {
    background:
        linear-gradient(180deg, rgba(10, 10, 16, 0.55) 0%, rgba(10, 10, 16, 0.25) 40%, rgba(10, 10, 16, 0.72) 100%),
        url("images/hero-dusk.webp") center 70% / cover no-repeat,
        linear-gradient(165deg, #14121c 0%, #241a20 100%);
}
.sign-in-container {
    background: rgba(20, 18, 26, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.sign-in-header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    line-height: 1.12;
    text-wrap: balance;
}

/* --- Hero: full-bleed dusk gathering --- */
.hero {
    min-height: 58vh;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(180deg, rgba(10, 10, 16, 0.42) 0%, rgba(10, 10, 16, 0.05) 35%, rgba(15, 15, 16, 0.88) 96%),
        url("images/hero-dusk.webp") center 64% / cover no-repeat,
        linear-gradient(165deg, #14121c 0%, #241a20 100%);
    overflow: hidden;
}
.hero-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px 40px;
    width: 100%;
}
.hero-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
.hero-eyebrow {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #F7C948;
    margin: 18px 0 6px;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(2.6rem, 6.5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: 0;
    text-wrap: balance;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: #FFF8EC;
    text-shadow: 0 2px 26px rgba(0, 0, 0, 0.55);
    margin: 0 0 8px;
}
.hero .tagline {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255, 248, 236, 0.85);
}
.members-preview { margin-top: 18px; }
.member-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #FFF8EC;
}

/* --- Site-wide Beta pill (next to the title, sign-in gate + hero) --- */
.beta-pill {
    display: inline-block;
    vertical-align: middle;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #14121c;
    background: #F7C948;
    padding: 4px 10px;
    border-radius: 999px;
    margin-left: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* --- Staged entrance (transform/opacity only) --- */
.hero .hero-logo,
.hero .hero-eyebrow,
.hero h1,
.hero .tagline,
.hero .members-preview {
    opacity: 0;
    transform: translateY(18px);
    animation: gg-rise 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero .hero-eyebrow { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero .tagline { animation-delay: 0.32s; }
.hero .members-preview { animation-delay: 0.44s; }
@keyframes gg-rise { to { opacity: 1; transform: none; } }

/* --- Scroll reveals (classes applied by reveal.js) --- */
.gg-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.gg-reveal.gg-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .hero .hero-logo, .hero .hero-eyebrow, .hero h1, .hero .tagline,
    .hero .members-preview { animation: none; opacity: 1; transform: none; }
    .gg-reveal { transition: none; opacity: 1; transform: none; }
}

/* ============================================================
   GATHER — 2026-09 review pass
   Signed-out front door, easy-mode add, one-tap RSVP, owner
   actions, the past-events drawer and the groups strip.
   Every value below comes from the tokens at the top of this
   file; the two added here are the destructive reds, which had
   no token and were failing AA as raw hexes.
   ============================================================ */

:root {
    --danger: #FF6B6B;          /* 5.4:1 on --surface */
    --danger-solid: #B3261E;    /* 6.5:1 against white text */
    --going: #22C55E;
    --going-bg: rgba(34, 197, 94, 0.14);
}

/* --- Shared field + button vocabulary --------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    border: 0;
    padding: 0;
}

.field > label,
.field > legend {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0;
}

.field-optional {
    margin-left: 6px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.field input[type="text"],
.field input[type="url"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    margin: 0;
}

.field textarea {
    resize: vertical;
    min-height: 84px;
    line-height: 1.5;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
    border-color: var(--accent-primary);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-with-action {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.field-with-action input {
    flex: 1;
    min-width: 0;
}

.field-status {
    min-height: 1.2em;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.input-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.secondary-btn:hover {
    border-color: var(--border-accent);
    color: var(--accent-primary);
}

.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--danger);
    border-radius: 12px;
    color: var(--danger);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.danger-btn:hover {
    background: rgba(255, 107, 107, 0.12);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.form-actions .save-event-btn {
    flex: 1;
    margin: 0;
}

/* Every interactive element in this pass shows where the keyboard is. */
.secondary-btn:focus-visible,
.danger-btn:focus-visible,
.rsvp-choice:focus-visible,
.google-sign-in-btn:focus-visible,
.save-event-btn:focus-visible,
.group-chip:focus-visible,
.groups-invite:focus-visible,
.past-event-row:focus-visible,
.past-events-summary:focus-visible,
.more-details > summary:focus-visible,
.private-details > summary:focus-visible,
.segment:focus-within,
.chip-view:focus-visible,
.rsvp-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* --- Signed-out front door -------------------------------- */

.sign-in-screen {
    padding: 24px 16px;
    overflow-y: auto;
}

.sign-in-container {
    max-width: 460px;
    padding: 36px 28px;
    text-align: left;
    margin: auto;
}

.sign-in-header .site-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: block;
}

.front-door-eyebrow {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin: 18px 0 6px;
}

.sign-in-header h1 {
    text-align: left;
}

.front-door-lede {
    margin-top: 10px;
    color: rgba(255, 248, 236, 0.82);
    font-size: 1rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.front-door-glimpses {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 24px 0 4px;
    padding: 0;
}

.glimpse {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(20, 18, 26, 0.4);
}

.glimpse-icon {
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--highlight);
    color: var(--accent-primary);
}

.glimpse-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.glimpse-note {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.sign-in-note {
    text-align: center;
}

/* --- Stats row -------------------------------------------- */

.stats-bar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
}

.stats-numbers {
    display: flex;
    justify-content: center;
    gap: 48px;
    width: 100%;
}

.stat-number {
    font-variant-numeric: tabular-nums;
}

.stats-line {
    color: var(--text-secondary);
    font-size: 0.92rem;
    text-align: center;
    text-wrap: balance;
    margin: 0;
}

/* --- Your groups ------------------------------------------ */

.groups-strip {
    margin: 0 16px 20px;
}

.groups-strip-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.groups-strip-status {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.groups-strip-link {
    color: var(--accent-primary);
}

.group-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.group-chip:hover {
    border-color: var(--border-accent);
}

.group-chip-count {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-primary);
}

.groups-invite {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.groups-invite:hover {
    border-color: var(--border-accent);
}

.groups-invite-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--highlight);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.groups-invite-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.groups-invite-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.groups-invite-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Event cards ------------------------------------------ */

.event-card {
    cursor: pointer;
}

/* The title is a real button whose ::after covers the card, so the whole
   card is clickable without nesting interactive elements. */
.event-card-open {
    all: unset;
    cursor: pointer;
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    text-wrap: balance;
}

.event-card-open::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 20px;
}

.event-card-open:focus-visible::after {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

.event-card .event-rsvp,
.event-card .event-link-btn {
    position: relative;
    z-index: 2;
}

.event-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 12px;
}

.event-chips .event-tag {
    margin-top: 0;
}

.audience-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-secondary);
}

/* --- Past events drawer ----------------------------------- */

.past-events {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.past-events-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 4px;
    cursor: pointer;
    list-style: none;
    color: var(--text-muted);
}

.past-events-summary::-webkit-details-marker {
    display: none;
}

.past-events-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.past-events-chevron {
    transition: transform 0.2s ease;
}

.past-events[open] .past-events-chevron {
    transform: rotate(180deg);
}

.past-events-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 16px;
}

.past-event-row {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: baseline;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0 8px 8px 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.past-event-row:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.past-event-row.music { border-left-color: var(--music-color); }
.past-event-row.sports { border-left-color: var(--sports-color); }
.past-event-row.family { border-left-color: var(--family-color); }
.past-event-row.festivals { border-left-color: var(--festivals-color); }
.past-event-row.travel { border-left-color: var(--travel-color); }
.past-event-row.wellness { border-left-color: var(--wellness-color); }
.past-event-row.church { border-left-color: var(--church-color); }

.past-event-date {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* --- Add / edit event modal ------------------------------- */

.add-event-content .modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 24px;
}

.audience-field .segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-elevated);
}

.segment {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.segment input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.segment:has(input:checked) {
    background: var(--highlight);
    color: var(--accent-primary);
}

.more-details,
.private-details {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-elevated);
    margin-bottom: 20px;
}

.more-details > summary,
.private-details > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.more-details > summary::-webkit-details-marker,
.private-details > summary::-webkit-details-marker {
    display: none;
}

.summary-note {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.summary-chevron {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.more-details[open] .summary-chevron {
    transform: rotate(180deg);
}

.more-details-body,
.private-details-body {
    padding: 4px 16px 16px;
    border-top: 1px solid var(--border);
}

.private-details-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 12px 0 16px;
}

.cost-block {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.cost-block-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.cost-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cost-item label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.cost-input-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.cost-input-wrap .currency {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cost-input-wrap input {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.cost-input-wrap:focus-within {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
}

.cost-input-wrap input:focus {
    outline: none;
}

.cost-total {
    justify-content: flex-end;
}

.cost-total-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.cost-total-value {
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-primary);
}

/* --- RSVP modal ------------------------------------------- */

.rsvp-content .rsvp-when {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: 6px;
}

.rsvp-content h2 {
    text-wrap: balance;
    margin-bottom: 8px;
    padding-right: 44px;
}

.rsvp-content .modal-details {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.event-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: 12px;
}

.event-extra-link {
    color: var(--accent-primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.event-extra-notes,
.event-extra-costs {
    flex-basis: 100%;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.event-extra-costs {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.rsvp-answer {
    margin: 28px 0 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.rsvp-answer h3 {
    font-size: 1.05rem;
    margin-bottom: 14px;
    text-wrap: balance;
}

.rsvp-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.rsvp-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 84px;
    padding: 14px 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.rsvp-choice:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.rsvp-choice.selected {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--highlight);
}

.rsvp-confirm {
    min-height: 1.3em;
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.rsvp-who {
    margin-bottom: 24px;
}

.rsvp-who h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.rsvp-counts {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 12px;
}

.rsvp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.who-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 100%;
}

.who-chip-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.who-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.who-chip-note {
    font-weight: 400;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14ch;
}

.who-chip.going {
    border-color: rgba(34, 197, 94, 0.4);
    background: var(--going-bg);
    color: var(--going);
}

.who-chip.going .who-chip-initial {
    color: var(--primary);
    background: var(--going);
}

.who-chip.maybe {
    border-color: var(--border-accent);
    color: var(--text-primary);
}

/* Three readable states at a glance: green = in, outline = maybe,
   dimmed dashed = no answer yet. A decline sits between the last two. */
.who-chip.declined {
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--text-muted);
}

.who-chip.no-answer {
    border-style: dashed;
    color: var(--text-muted);
    opacity: 0.65;
}

.who-chip.is-you {
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.event-owner-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 20px 0 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.event-owner-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-wrap: pretty;
}

.rsvp-actions {
    display: flex;
    gap: 10px;
}

/* --- Delete dialog ---------------------------------------- */

.delete-confirm-content p {
    text-wrap: pretty;
}

.delete-warning {
    color: var(--danger) !important;
    font-size: 0.8rem !important;
}

.confirm-delete-btn {
    background: var(--danger-solid);
    border: 1px solid var(--danger);
    color: #FFFFFF;
}

.cancel-delete-btn:focus-visible,
.confirm-delete-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* --- Small screens ---------------------------------------- */

@media (max-width: 480px) {
    /* The two long modals become bottom sheets on a phone so the thumb
       reaches the controls and the content scrolls inside. */
    #rsvpModal,
    #addEventModal {
        align-items: flex-end;
    }

    #rsvpModal .modal-content,
    #addEventModal .modal-content {
        width: 100%;
        max-height: 92dvh;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px 32px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .rsvp-choices {
        grid-template-columns: 1fr;
    }

    .rsvp-choice {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        min-height: 56px;
        text-align: left;
    }

    .stats-numbers {
        gap: 32px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .secondary-btn {
        width: 100%;
    }

    .past-event-row {
        grid-template-columns: 56px 1fr;
    }

    .sign-in-container {
        padding: 28px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .past-events-chevron,
    .summary-chevron,
    .secondary-btn,
    .danger-btn,
    .rsvp-choice,
    .group-chip,
    .groups-invite,
    .past-event-row,
    .event-card {
        transition: none;
    }

    .event-card:hover {
        transform: none;
    }
}

/* Footer wordmark */
.footer-wordmark {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.footer-tagline {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Google Places suggestions. The library appends this to <body> with its own
   light styling, which flashed white over the dark Add-an-event sheet. */
.pac-container {
    z-index: 3500;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
    box-shadow: var(--shadow-card);
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

.pac-container:empty {
    display: none;
}

/* Google's attribution strip stays — it is required by the Maps terms.
   It just gets a surface it can sit on without flashing white. */
.pac-container::after {
    background-color: #FFFFFF;
    border-radius: 0 0 12px 12px;
}

.pac-item {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.pac-item:first-child {
    border-top: 0;
}

.pac-item:hover,
.pac-item-selected {
    background: var(--highlight);
}

.pac-item-query,
.pac-matched {
    color: var(--text-primary);
}

.pac-icon {
    filter: invert(1) opacity(0.5);
}

/* ============================================================
   GATHER — people & profiles
   The welcome button in the header, Your profile, and Kim's
   People panel. Colours, radii and type all come from the
   tokens at the top of this file; the one raw value is the
   focus ring, which reuses --accent-primary.
   ============================================================ */

/* Screen-reader-only label text (the header button's purpose,
   the inline rename field's label). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- The welcome area is a real button ------------------- */

.user-bar .user-info {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 4px 10px 4px 4px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.user-bar .user-info:hover {
    background: var(--surface);
    border-color: var(--border);
}

.user-bar .user-info:hover .user-info-edit {
    color: var(--accent-primary);
}

.user-bar .user-info:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.user-info-edit {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

/* --- People / Your circle button badges ------------------- */

.people-btn,
.keeper-btn {
    position: relative;
}

.people-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent-primary);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

/* --- Shared: inline errors, empty states, link buttons ---- */

.field-error {
    margin: 0;
    font-size: 0.82rem;
    color: var(--danger);
}

.field input.input-invalid {
    border-color: var(--danger);
}

.empty-state {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.link-btn {
    align-self: flex-start;
    padding: 0;
    background: none;
    border: 0;
    color: var(--accent-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.link-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Your profile ---------------------------------------- */

.profile-content {
    max-width: 440px;
}

.profile-subtitle {
    margin: -8px 0 22px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
}

.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.profile-photo-preview {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.profile-pending {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    background: var(--highlight);
    color: var(--accent-secondary);
}

.profile-pending svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-pending-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-pending-text {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.5;
}

#profileStatus {
    margin-top: 10px;
}

/* --- People panel ---------------------------------------- */

.people-content {
    max-width: 560px;
}

.people-section {
    margin-top: 26px;
}

.people-section:first-of-type {
    margin-top: 18px;
}

.people-section-title {
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.people-list {
    display: flex;
    flex-direction: column;
}

.people-section .field-with-action input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.people-section .field-with-action input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
    border-color: var(--accent-primary);
}

.people-section .input-hint {
    display: block;
    margin-top: 8px;
}

.people-arrow {
    color: var(--text-muted);
    padding: 0 2px;
}

/* --- Raise the walls (Constellation Phase 1 migration) ----
 * Admin-only card in the People panel. Same tokens as every other panel
 * section; the progress and report areas stay empty until the run starts. */

.walls-card {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
}

.walls-copy {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.walls-card .walls-btn {
    width: 100%;
}

.walls-card .walls-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.walls-card .input-hint {
    display: block;
    margin-top: 8px;
}

.walls-progress:not(:empty),
.walls-report:not(:empty) {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.walls-progress:not(:empty) {
    font-variant-numeric: tabular-nums;
}

.walls-line {
    display: block;
}

.walls-line.is-done {
    color: var(--text-primary);
}

.walls-line.is-error {
    color: var(--danger);
}

.walls-total {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.people-new-name {
    color: var(--accent-primary);
}

.people-row-email {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.people-row-email-none {
    font-style: italic;
}

/* --- New circles: a request to start a group or book club --- */

.people-circle-row {
    gap: 12px;
}

.people-circle-row .user-request-info {
    flex: 1;
    min-width: 0;
}

.people-circle-row .user-request-info h4 {
    overflow-wrap: anywhere;
}

.people-circle-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent-primary);
}

.people-circle-kind {
    margin: 2px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}

/* --- Phase 2: the keeper's desk ----------------------------
   Same card, border, radius and type scale as the People panel's
   own cards — this panel is the People panel for a house that is
   not circle-one, so it must not read as a different product. --- */

.house-card {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
}

.house-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.house-name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.house-rename-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.house-rename-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.house-card-sub {
    margin: 6px 0 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.house-code-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.house-code-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.house-code {
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-primary);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.16em;
}

.house-code-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.house-code-copy:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.house-card-actions {
    margin-top: 12px;
}

.house-card .house-newcode-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.house-card .input-hint {
    display: block;
    margin-top: 8px;
}

.house-rename {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.house-rename-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.house-rename input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.house-rename input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
    border-color: var(--accent-primary);
}

.house-rename-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.house-rename-actions .secondary-btn,
.house-rename-actions .approve-btn {
    padding: 8px 18px;
}

.house-rename-actions .approve-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.house-rename-btn:focus-visible,
.house-code-copy:focus-visible,
.house-card .house-newcode-btn:focus-visible,
.house-rename-actions button:focus-visible,
#keeperModal .close-modal:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* The card a founding approval leaves in the Admin's panel: the house is
   real, and the invite code stays readable after the request row is gone. */
.people-founded-row .house-code-line {
    margin-top: 8px;
}

.people-founded-row {
    border-color: var(--accent-primary);
}

@media (prefers-reduced-motion: reduce) {
    .house-rename-btn,
    .house-code-copy {
        transition: none;
    }
}

.people-row-editing {
    display: block;
}

.people-rename {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.people-rename-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.people-rename input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.people-rename input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
    border-color: var(--accent-primary);
}

.people-rename-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.people-rename-actions .secondary-btn,
.people-rename-actions .approve-btn {
    padding: 8px 18px;
}

.people-rename-actions .approve-btn:disabled,
.people-rename-actions .secondary-btn:disabled,
.user-request-actions button:disabled {
    opacity: 0.6;
    cursor: default;
}

.people-row .user-request-actions button:focus-visible,
.people-rename-actions button:focus-visible,
.user-request-actions button:focus-visible,
.close-modal:focus-visible,
.cancel-delete-btn:focus-visible,
.confirm-delete-btn:focus-visible,
.link-btn:focus-visible,
.walls-card .walls-btn:focus-visible,
.field-with-action .secondary-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* --- Phone: the panels read as bottom sheets -------------- */

@media (max-width: 480px) {
    #profileModal,
    #peopleModal,
    #keeperModal {
        align-items: flex-end;
    }

    #profileModal .modal-content,
    #peopleModal .modal-content,
    #keeperModal .modal-content {
        width: 100%;
        max-height: 92dvh;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px 32px;
    }

    .people-row,
    #peopleRequests .user-request-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .people-row .user-request-actions,
    #peopleRequests .user-request-actions,
    #peopleCircleRequests .user-request-actions,
    #keeperDoorList .user-request-actions,
    #keeperAskList .user-request-actions {
        width: 100%;
    }

    .people-row .user-request-actions button,
    #peopleRequests .user-request-actions button,
    #peopleCircleRequests .user-request-actions button,
    #keeperDoorList .user-request-actions button,
    #keeperAskList .user-request-actions button {
        flex: 1;
    }

    /* The icon stays beside the name; only the buttons drop to their own row. */
    #peopleCircleRequests .user-request-card,
    #keeperDoorList .user-request-card,
    #keeperAskList .user-request-card {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 10px;
    }

    .house-card-head {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .user-bar .user-info .user-name {
        max-width: 38vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .user-bar .user-info,
    .user-info-edit,
    .confirm-dialog {
        transition: none;
    }
}

/* ============================================================
   CONSTELLATION PHASE 2 — the arrival
   Two quiet doors beside the Google button (invite code, found
   your own), and the waiting room those doors lead to. The
   primary button keeps the only solid fill on the card; these
   sit under a hairline divider, text-weight, in muted type.
   See specs/GATHER-CONSTELLATION-BLUEPRINT.md, Part 5, Phase 2.
   ============================================================ */

.arrival-doors {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 2px;
}

.arrival-door {
    display: grid;
    grid-template-columns: 22px 1fr 16px;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 4px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.arrival-door:hover {
    color: var(--text-primary);
}

.arrival-door-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-secondary);
}

.arrival-door-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.arrival-door[aria-expanded="true"] {
    color: var(--text-primary);
}

.arrival-door[aria-expanded="true"] .arrival-door-chevron {
    transform: rotate(180deg);
}

.arrival-panel {
    padding: 4px 4px 14px 36px;
    display: grid;
    gap: 8px;
}

.arrival-panel.hidden {
    display: none;
}

.arrival-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.arrival-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(10, 10, 16, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 1rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.arrival-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: none;
}

.arrival-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.arrival-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.arrival-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.28);
    color: var(--danger);
    font-size: 0.8rem;
    line-height: 1.45;
}

.arrival-error.hidden {
    display: none;
}

.arrival-go {
    justify-self: start;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.arrival-go:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.34);
}

.arrival-door:focus-visible,
.arrival-go:focus-visible,
.arrival-input:focus-visible,
.pending-lane button:focus-visible,
.pending-lane input:focus-visible,
.sign-out-btn-pending:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* --- The waiting room ------------------------------------- */

.pending-content {
    text-align: left;
    max-width: 440px;
}

.pending-content .pending-icon {
    text-align: left;
}

.pending-content h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    text-align: left;
}

.pending-lede {
    margin-top: 10px;
    color: rgba(255, 248, 236, 0.84);
    font-size: 0.96rem;
    line-height: 1.55;
    text-wrap: pretty;
}

.pending-content .pending-note {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pending-lane {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 10px;
}

.pending-lane:empty {
    display: none;
}

/* The quiet "start your own circle instead" link on the waiting screen —
   the same register as the front door's doors, never a second CTA. */
.pending-lane .arrival-door {
    padding: 8px 4px;
}

.founding-form {
    display: grid;
    gap: 10px;
}

.founding-form label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.founding-form input,
.founding-form textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(10, 10, 16, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.94rem;
    resize: vertical;
}

.founding-form input:focus,
.founding-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.founding-form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.founding-form-actions .arrival-go {
    justify-self: auto;
}

.founding-primary {
    background: var(--accent-gradient);
    border: none;
    color: var(--primary);
    font-weight: 700;
}

.founding-primary:hover {
    background: var(--accent-gradient);
    filter: brightness(1.06);
}

.founding-primary[disabled] {
    opacity: 0.6;
    cursor: default;
    filter: none;
}

.founding-card {
    display: grid;
    grid-template-columns: 30px 1fr;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(20, 18, 26, 0.45);
}

.founding-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--highlight);
    color: var(--accent-primary);
}

.founding-card-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
}

.founding-card-note {
    grid-column: 2;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.founding-card-actions {
    grid-column: 2;
}

.founding-withdraw {
    padding: 7px 14px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.founding-withdraw:hover {
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.4);
}

.sign-out-btn-pending {
    margin-top: 22px;
}

@media (max-width: 420px) {
    .arrival-panel {
        padding-left: 4px;
    }

    .founding-form-actions .arrival-go,
    .founding-form-actions .founding-primary {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arrival-door,
    .arrival-door-chevron,
    .arrival-go,
    .founding-withdraw,
    .pending-icon {
        transition: none;
        animation: none;
    }
}

/* Branded circle names: the fixed "Gather ·" chip before the editable part */
.brand-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-name-prefix {
    font-weight: 700;
    color: var(--accent-secondary, #F7C948);
    white-space: nowrap;
}
.brand-name-row input {
    flex: 1;
    min-width: 0;
}

/* ==========================================================
   Beyond your circle — the cross-circle card (Phase 3)
   Lives at the foot of the profile modal, walled off from the
   in-circle fields above by a rule and its own heading. Every
   control here is ≥40px tall so it works with a thumb.
   ========================================================== */

.beyond-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.beyond-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: 12px;
}

.beyond-loading {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.beyond-panel {
    display: flex;
    flex-direction: column;
}

.beyond-lede {
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* --- The interest chips ----------------------------------- */

.beyond-interests-field {
    margin-bottom: 12px;
}

.beyond-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.beyond-chip {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.beyond-chip:hover:not(:disabled) {
    border-color: var(--border-accent);
    color: var(--accent-primary);
}

.beyond-chip[aria-pressed="true"] {
    border-color: var(--accent-primary);
    background: var(--highlight);
    color: var(--accent-primary);
}

.beyond-chip:disabled {
    opacity: 0.4;
    cursor: default;
}

.beyond-chip:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* --- Claiming / saving ------------------------------------ */

.beyond-claim-btn {
    align-self: stretch;
    margin: 6px 0 0;
}

.beyond-save-interests {
    align-self: flex-start;
    margin-top: 2px;
}

/* --- The fixed identity line ------------------------------ */

.beyond-identity {
    padding: 14px 16px;
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    background: var(--highlight);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.beyond-identity strong {
    display: block;
    margin-top: 4px;
    color: var(--accent-secondary);
    font-size: 1.15rem;
    font-weight: 700;
}

.beyond-permanent {
    margin: 8px 0 20px;
}

/* --- The opt-in switch ------------------------------------ */

.beyond-switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.beyond-switch-copy {
    flex: 1;
    min-width: 0;
}

.beyond-switch-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.beyond-switch {
    flex-shrink: 0;
    width: 60px;
    height: 34px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-elevated);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.beyond-switch[aria-checked="true"] {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.beyond-switch:disabled {
    opacity: 0.5;
    cursor: default;
}

.beyond-switch:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.beyond-switch-knob {
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--text-secondary);
    transform: translateX(0);
    transition: transform 0.2s ease, background 0.2s ease;
}

.beyond-switch[aria-checked="true"] .beyond-switch-knob {
    background: var(--primary);
    transform: translateX(26px);
}

.beyond-invites-link {
    align-self: flex-start;
    margin-top: 10px;
    padding: 10px 0;
    color: var(--accent-primary);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- The ethics gate -------------------------------------- */

.beyond-ethics {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    background: var(--surface-elevated);
}

.beyond-ethics-title {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.beyond-ethics-list {
    margin: 0 0 16px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

.beyond-warning {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--danger);
    border-left-width: 4px;
    border-radius: 12px;
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    font-size: 0.86rem;
    line-height: 1.55;
    font-weight: 600;
}

.beyond-ethics-actions {
    flex-wrap: wrap;
}

.beyond-ethics-actions .save-event-btn {
    flex: 1;
    margin: 0;
}

@media (max-width: 420px) {
    .beyond-ethics-actions .secondary-btn,
    .beyond-ethics-actions .save-event-btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .beyond-chip,
    .beyond-switch,
    .beyond-switch-knob {
        transition: none;
    }
}

/* Founding form: optional-field tag + the "have a code instead" escape (Fix 2/3) */
.founding-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.6;
}
.founding-alt-link {
    display: block;
    margin: 4px auto 0;
    padding: 6px 4px;
    background: none;
    border: none;
    color: var(--gold, #F5B841);
    font: inherit;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.founding-alt-link:hover { opacity: 0.85; }

/* Admin: share/resend an invite to Gather */
.admin-invite-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin: 4px 0 14px;
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    border-radius: 12px;
    background: var(--surface-2, rgba(255,255,255,0.04));
}
.admin-invite-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.admin-invite-title { font-weight: 700; }
.admin-invite-note {
    font-size: 0.82rem;
    opacity: 0.7;
}
.admin-invite-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: none;
    border-radius: 10px;
    background: var(--gold, #F5B841);
    color: #1c1926;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.admin-invite-btn:hover { filter: brightness(1.05); }
.admin-invite-btn:active { transform: translateY(1px); }
