/* ==========================================================================
   Cafe Patron Portal & Vibe Check UI - Stylesheet (cafe.css)
   Mobile-First, Responsive Glassmorphic Design for Dim Cafe & Bar Lighting
   ========================================================================== */

:root {
    --cafe-bg-accent: rgba(79, 70, 229, 0.08);
    --cafe-shelf-badge: #d97706;
    --cafe-shelf-bg: rgba(245, 158, 11, 0.15);
    --cafe-shelf-border: rgba(245, 158, 11, 0.4);
    --cafe-teach-badge: #0284c7;
    --cafe-teach-bg: rgba(2, 132, 199, 0.15);
    --cafe-teach-border: rgba(2, 132, 199, 0.4);
    --sommelier-bubble-bg: rgba(248, 250, 252, 0.95);
    --sommelier-bubble-border: rgba(203, 213, 225, 0.7);
    --sommelier-text: #1e293b;
    --vibe-selected-ring: #4f46e5;
}

[data-theme="dark"] {
    --cafe-bg-accent: rgba(99, 102, 241, 0.15);
    --cafe-shelf-badge: #fbbf24;
    --cafe-shelf-bg: rgba(251, 191, 36, 0.18);
    --cafe-shelf-border: rgba(251, 191, 36, 0.45);
    --cafe-teach-badge: #38bdf8;
    --cafe-teach-bg: rgba(56, 189, 248, 0.18);
    --cafe-teach-border: rgba(56, 189, 248, 0.45);
    --sommelier-bubble-bg: rgba(15, 23, 42, 0.85);
    --sommelier-bubble-border: rgba(51, 65, 85, 0.8);
    --sommelier-text: #f1f5f9;
    --vibe-selected-ring: #818cf8;
}

/* ── Container Layout ── */
.cafe-portal-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 14px 80px 14px;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    box-sizing: border-box;
}

/* ── Venue Co-Branded Header Card ── */
.venue-header-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: var(--radius-lg, 16px);
    padding: 20px 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.venue-header-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #ec4899, #f59e0b);
}

.venue-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.venue-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.venue-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.venue-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.venue-brand-text {
    min-width: 0;
}

.venue-name-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.venue-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 3px 0 0 0;
    line-height: 1.3;
}

/* Table Badge in Header */
.table-badge-pill {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
    flex-shrink: 0;
}

/* Header Meta Bar (Wi-Fi & Table switcher) */
.venue-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--border, rgba(226, 232, 240, 0.8));
    font-size: 0.82rem;
}

.wifi-chip {
    background: var(--badge-bg, rgba(241, 245, 249, 0.9));
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: 8px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.wifi-chip:hover {
    border-color: var(--primary);
    background: var(--cafe-bg-accent);
}

.wifi-copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.wifi-chip:hover .wifi-copy-btn {
    opacity: 1;
}

.table-selector-trigger {
    color: var(--text-muted);
    font-size: 0.8rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 4px;
}

.table-selector-trigger:hover {
    color: var(--primary);
}

/* ── Interactive Vibe Quiz Card ── */
.vibe-quiz-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: var(--radius-lg, 16px);
    padding: 22px 18px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.quiz-headline {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-subheadline {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Quiz Steps */
.quiz-step-section {
    margin-bottom: 22px;
}

.quiz-step-title {
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-step-num {
    background: var(--primary);
    color: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 6px;
}

/* Tactile Pill Row (Single-Select) */
.pills-selector-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.pills-selector-row.time-row {
    grid-template-columns: repeat(3, 1fr);
}

.quiz-pill-btn {
    background: var(--card-bg, #ffffff);
    border: 1.5px solid var(--border, rgba(226, 232, 240, 0.9));
    color: var(--text-main);
    padding: 12px 6px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.quiz-pill-btn:hover:not(.active) {
    border-color: var(--primary);
    background: var(--cafe-bg-accent);
    transform: translateY(-1px);
}

.quiz-pill-btn:active {
    transform: scale(0.96);
}

.quiz-pill-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    transform: translateY(-2px);
}

.quiz-pill-sub {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.8;
}

/* ── Vibe Cards Grid ── */
.vibe-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.vibe-card-option {
    background: var(--card-bg, #ffffff);
    border: 1.5px solid var(--border, rgba(226, 232, 240, 0.9));
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.vibe-card-option:hover:not(.active) {
    border-color: var(--primary);
    background: var(--cafe-bg-accent);
    transform: translateY(-1px);
}

.vibe-card-option:active {
    transform: scale(0.97);
}

.vibe-card-option.active {
    border-color: var(--vibe-selected-ring);
    background: var(--cafe-bg-accent);
    box-shadow: 0 0 0 2px var(--vibe-selected-ring), 0 6px 18px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.vibe-card-option.active::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: #ffffff;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.vibe-icon-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vibe-card-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.vibe-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--text-main);
}

.vibe-card-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
    line-height: 1.3;
}

/* ── Hobbyist Accordion Toggle ── */
.hobbyist-accordion {
    border: 1px dashed var(--border, rgba(226, 232, 240, 0.9));
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.hobbyist-header-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: color 0.2s;
}

.hobbyist-header-toggle:hover {
    color: var(--text-main);
}

.hobbyist-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.hobbyist-accordion.open .hobbyist-toggle-icon {
    transform: rotate(180deg);
}

.hobbyist-body {
    padding: 0 14px 14px 14px;
    display: none;
}

.hobbyist-accordion.open .hobbyist-body {
    display: block;
}

.hobbyist-input-field {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input-bg, #ffffff);
    color: var(--text-main);
    font-size: 0.86rem;
    font-family: inherit;
    box-sizing: border-box;
}

.hobbyist-input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.hobbyist-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.3;
}

/* ── Primary Submit Button ── */
.quiz-submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
    transition: all 0.22s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.quiz-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.45);
}

.quiz-submit-btn:active {
    transform: translateY(0);
}

/* ── Results Container & Game Cards ── */
.results-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.results-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

.btn-reroll-quiz {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-reroll-quiz:hover {
    color: var(--text-main);
    border-color: var(--primary);
    background: var(--cafe-bg-accent);
}

/* ── Mobile-First Game Card ── */
.cafe-game-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: var(--radius-lg, 16px);
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeCardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cafe-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Card Top Row: Thumbnail + Info */
.cafe-card-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.cafe-card-thumb-wrap {
    width: 82px;
    height: 82px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cafe-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cafe-card-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cafe-card-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.cafe-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.2;
}

.cafe-card-title:hover {
    color: var(--primary);
}

.cafe-card-year {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Prominent Badges Row (Shelf & Teach Time) */
.cafe-prominent-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.shelf-location-badge {
    background: var(--cafe-shelf-bg);
    color: var(--cafe-shelf-badge);
    border: 1px solid var(--cafe-shelf-border);
    border-radius: 8px;
    padding: 4px 9px;
    font-weight: 800;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.01em;
}

.teach-time-badge {
    background: var(--cafe-teach-bg);
    color: var(--cafe-teach-badge);
    border: 1px solid var(--cafe-teach-border);
    border-radius: 8px;
    padding: 4px 9px;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Secondary Stats Row */
.cafe-stats-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

.cafe-stat-pill {
    background: var(--badge-bg, rgba(241, 245, 249, 0.9));
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cafe-stat-pill.complexity-light {
    color: #16a34a;
}

.cafe-stat-pill.complexity-med {
    color: #d97706;
}

.cafe-stat-pill.complexity-heavy {
    color: #dc2626;
}

/* Sommelier Guru Quote Bubble */
.sommelier-quote-bubble {
    background: var(--sommelier-bubble-bg);
    border: 1px solid var(--sommelier-bubble-border);
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--sommelier-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.sommelier-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 6px;
}

.sommelier-quote-text {
    margin: 0;
    font-style: italic;
}

/* Card Action Buttons */
.cafe-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.btn-card-action {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-card-action:hover {
    background: var(--cafe-bg-accent);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-card-action.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-card-action.primary:hover {
    background: var(--primary-hover);
}

/* ── Empty & Error States with Filter Relaxation ── */
.empty-results-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: var(--radius-lg, 16px);
    padding: 36px 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: inline-block;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.empty-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 auto 20px auto;
    line-height: 1.45;
}

.relaxation-chips-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.btn-relax-filter {
    background: var(--card-bg);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 9999px;
    padding: 8px 16px;
    font-size: 0.84rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-relax-filter:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* ── Mobile Responsive Adjustments ── */
@media (max-width: 480px) {
    .cafe-portal-container {
        padding: 12px 10px 70px 10px;
    }
    
    .venue-name-title {
        font-size: 1.2rem;
    }
    
    .table-badge-pill {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .vibe-cards-grid {
        grid-template-columns: 1fr;
    }

    .pills-selector-row {
        gap: 6px;
    }

    .quiz-pill-btn {
        padding: 10px 4px;
        font-size: 0.88rem;
    }

    .cafe-card-thumb-wrap {
        width: 72px;
        height: 72px;
    }
    
    .cafe-card-actions {
        flex-direction: column;
    }
    
    .btn-card-action {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ── Cafe Gateway / Hub View ── */
.cafe-gateway-hero {
    text-align: center;
    padding: 36px 20px 28px 20px;
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: var(--radius-lg, 16px);
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.gateway-hero-icon {
    font-size: 3.2rem;
    margin-bottom: 12px;
    display: inline-block;
}

.gateway-hero-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.gateway-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.5;
}

.gateway-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gateway-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: var(--radius-lg, 16px);
    padding: 24px 22px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gateway-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gateway-card-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.gateway-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
}

.gateway-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.gateway-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.gateway-input-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.gateway-slug-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg, #ffffff);
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: inherit;
}

.gateway-slug-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* ==========================================================================
   Collection Browser & View Switcher Styles
   ========================================================================== */

/* ── View Switcher Tabs ── */
.cafe-view-switcher {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    border-radius: 14px;
    margin-bottom: 20px;
}

[data-theme="dark"] .cafe-view-switcher {
    background: rgba(255, 255, 255, 0.05);
}

.cafe-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.cafe-tab-btn:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .cafe-tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cafe-tab-btn.active {
    background: var(--surface-bg, #ffffff);
    color: var(--text-main);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    font-weight: 800;
}

[data-theme="dark"] .cafe-tab-btn.active {
    background: rgba(30, 41, 59, 0.95);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.cafe-tab-btn .badge-count {
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--cafe-bg-accent, rgba(79, 70, 229, 0.12));
    color: #4f46e5;
    font-weight: 800;
}

[data-theme="dark"] .cafe-tab-btn .badge-count {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

/* ── Recommender Launch CTA Banner ── */
.recommender-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(236, 72, 153, 0.09) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .recommender-cta-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(236, 72, 153, 0.15) 100%);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.recommender-cta-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #4f46e5;
    margin-bottom: 4px;
}

[data-theme="dark"] .recommender-cta-badge {
    color: #a5b4fc;
}

.recommender-cta-heading {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: var(--text-main);
}

.recommender-cta-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.btn-launch-recommender {
    flex-shrink: 0;
    padding: 12px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-launch-recommender:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-launch-recommender:active {
    transform: translateY(0);
}

@media (max-width: 540px) {
    .recommender-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .btn-launch-recommender {
        width: 100%;
        justify-content: center;
    }
}

/* ── Collection Browser Toolbar ── */
.collection-browser-toolbar {
    position: sticky;
    top: 70px;
    z-index: 40;
    background: var(--header-bg, rgba(255, 255, 255, 0.92));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 14px 10px 14px;
    margin-left: -14px;
    margin-right: -14px;
    margin-top: -6px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 480px) {
    .collection-browser-toolbar {
        top: 64px;
        padding: 10px 12px 8px 12px;
        gap: 8px;
    }
}

[data-theme="dark"] .collection-browser-toolbar {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: rgba(51, 65, 85, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.collection-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.collection-search-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.cafe-search-input {
    width: 100%;
    padding: 13px 40px 13px 40px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-bg, rgba(255, 255, 255, 0.9));
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
}

[data-theme="dark"] .cafe-search-input {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cafe-search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.cafe-search-clear {
    position: absolute;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

[data-theme="dark"] .cafe-search-clear {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

.cafe-search-clear:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Quick Filter Chips */
.collection-quick-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.collection-quick-filters::-webkit-scrollbar {
    display: none;
}

.cafe-filter-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-bg, rgba(255, 255, 255, 0.8));
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: inherit;
    flex-shrink: 0;
}

[data-theme="dark"] .cafe-filter-chip {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(51, 65, 85, 0.7);
}

.cafe-filter-chip:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.cafe-filter-chip.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Status Bar */
.collection-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0 2px;
}

.collection-sort-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.collection-sort-select {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-bg, rgba(255, 255, 255, 0.9));
    color: var(--text-main);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

[data-theme="dark"] .collection-sort-select {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
}

/* ── Collection Cards Grid ── */
.cafe-collection-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cafe-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.cafe-genre-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

[data-theme="dark"] .cafe-genre-tag {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

/* ── Recommender Navigation ── */
.recommender-top-bar {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.btn-back-to-library {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-bg, rgba(255, 255, 255, 0.85));
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

[data-theme="dark"] .btn-back-to-library {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
}

.btn-back-to-library:hover {
    background: var(--cafe-bg-accent);
    border-color: #4f46e5;
    color: #4f46e5;
}

.results-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back-to-library-pill {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-bg, rgba(255, 255, 255, 0.85));
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

[data-theme="dark"] .btn-back-to-library-pill {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
}

.btn-back-to-library-pill:hover {
    background: var(--cafe-bg-accent);
    border-color: #4f46e5;
    color: #4f46e5;
}

/* ── RULES VIDEO MODAL (Milestone C6) ── */
.cafe-video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    animation: fadeInModal 0.22s ease-out;
    box-sizing: border-box;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cafe-video-modal-dialog {
    background: var(--surface, rgba(255, 255, 255, 0.95));
    border: 1px solid var(--border, rgba(226, 232, 240, 0.9));
    border-radius: var(--radius-lg, 18px);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.5);
    max-width: 680px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .cafe-video-modal-dialog {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.85);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cafe-video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border, rgba(226, 232, 240, 0.7));
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .cafe-video-modal-header {
    border-bottom-color: rgba(51, 65, 85, 0.6);
}

.cafe-video-modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cafe-video-modal-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4f46e5;
    flex-shrink: 0;
}

[data-theme="dark"] .cafe-video-modal-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.cafe-video-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .cafe-video-modal-title {
    color: #f8fafc;
}

.cafe-video-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.cafe-video-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-main, #0f172a);
}

[data-theme="dark"] .cafe-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.cafe-video-modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-fallback-notice {
    padding: 36px 20px;
    text-align: center;
    background: rgba(248, 250, 252, 0.6);
}

[data-theme="dark"] .video-fallback-notice {
    background: rgba(15, 23, 42, 0.5);
}

.video-fallback-msg {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: var(--text-muted, #64748b);
}

.btn-external-video {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: #e11d48;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-external-video:hover {
    background: #be123c;
    transform: translateY(-1px);
}

.video-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--border, rgba(226, 232, 240, 0.7));
    flex-wrap: wrap;
    gap: 10px;
}

[data-theme="dark"] .video-modal-footer {
    border-top-color: rgba(51, 65, 85, 0.6);
}

.video-meta-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-modal-bgg {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    color: var(--text-main, #334155);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.15s ease;
}

[data-theme="dark"] .btn-modal-bgg {
    border-color: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
}

.btn-modal-bgg:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

/* ── MILESTONE C7: TABLE TENT VOTING & REAL-TIME TABLE CONSENSUS ── */

/* Header Action Button */
.btn-start-table-vote {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .btn-start-table-vote {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.5);
    color: #a5b4fc;
}

.btn-start-table-vote:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Callout CTA Card */
.table-vote-cta-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(236, 72, 153, 0.06) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg, 16px);
    padding: 16px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .table-vote-cta-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.35);
}

.vote-cta-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vote-cta-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.vote-cta-heading {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 3px 0;
    color: var(--text-main);
}

.vote-cta-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.btn-launch-table-vote {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}

.btn-launch-table-vote:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

@media (max-width: 600px) {
    .table-vote-cta-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-launch-table-vote {
        width: 100%;
        text-align: center;
    }
}

/* Modal Overlay & Dialog */
.cafe-table-vote-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    animation: fadeInModal 0.22s ease-out;
    box-sizing: border-box;
}

.cafe-table-vote-modal-dialog {
    background: var(--surface, rgba(255, 255, 255, 0.96));
    border: 1px solid var(--border, rgba(226, 232, 240, 0.9));
    border-radius: var(--radius-lg, 18px);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.5);
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpModal 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .cafe-table-vote-modal-dialog {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.85);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8);
}

.cafe-vote-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border, rgba(226, 232, 240, 0.7));
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .cafe-vote-modal-header {
    border-bottom-color: rgba(51, 65, 85, 0.6);
}

.cafe-vote-modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cafe-vote-modal-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4f46e5;
}

[data-theme="dark"] .cafe-vote-modal-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.cafe-vote-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.cafe-vote-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.cafe-vote-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}

.cafe-vote-modal-body {
    padding: 16px 18px 24px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Sharing Card with QR */
.vote-share-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-bg, rgba(248, 250, 252, 0.8));
    border: 1px solid var(--border, rgba(226, 232, 240, 0.7));
}

[data-theme="dark"] .vote-share-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(51, 65, 85, 0.7);
}

.vote-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.vote-qr-img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background: #ffffff;
    padding: 4px;
    border: 1px solid var(--border);
}

.vote-qr-caption {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.vote-share-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex-grow: 1;
}

.vote-share-heading {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
}

.vote-share-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
}

.vote-share-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn-vote-copy-link,
.btn-vote-share-link,
.btn-vote-open-external {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg, #ffffff);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    font-family: inherit;
}

[data-theme="dark"] .btn-vote-copy-link,
[data-theme="dark"] .btn-vote-share-link,
[data-theme="dark"] .btn-vote-open-external {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
}

.btn-vote-copy-link:hover,
.btn-vote-share-link:hover,
.btn-vote-open-external:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.vote-copy-feedback {
    font-size: 0.78rem;
    font-weight: 700;
    color: #10b981;
    margin-top: 2px;
}

/* In-Modal Ballot Section */
.vote-ballot-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vote-voter-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vote-voter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.vote-voter-input {
    flex-grow: 1;
    min-width: 140px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-bg, #ffffff);
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
}

[data-theme="dark"] .vote-voter-input {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
}

.vote-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vote-candidate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border);
    transition: border-color 0.15s ease;
}

[data-theme="dark"] .vote-candidate-row {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(51, 65, 85, 0.7);
}

.vote-cand-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-grow: 1;
}

.vote-cand-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.vote-cand-text {
    min-width: 0;
}

.vote-cand-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.vote-cand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.vote-choice-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.vote-pill-choice {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.vote-pill-choice:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.vote-pill-choice.active.yes {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.vote-pill-choice.active.neutral {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.vote-pill-choice.active.veto {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-submit-table-vote {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    margin-top: 4px;
}

.btn-submit-table-vote:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

/* Live Consensus Standings */
.vote-consensus-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vote-winner-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.winner-trophy {
    font-size: 2rem;
}

.winner-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #d97706;
}

[data-theme="dark"] .winner-label {
    color: #fbbf24;
}

.winner-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 2px 0 0 0;
    color: var(--text-main);
}

.consensus-heading {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.vote-rankings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vote-ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border);
}

[data-theme="dark"] .vote-ranking-item {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(51, 65, 85, 0.7);
}

.vote-ranking-item.is-vetoed {
    opacity: 0.55;
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
}

.ranking-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ranking-rank {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-muted);
    width: 20px;
}

.ranking-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-score-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    background: #eef2ff;
    color: #4f46e5;
}

[data-theme="dark"] .ranking-score-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.ranking-score-badge.vetoed {
    background: #fee2e2;
    color: #ef4444;
}

[data-theme="dark"] .ranking-score-badge.vetoed {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.vote-re-cast-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.btn-revote-trigger,
.btn-refresh-tally {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-revote-trigger:hover,
.btn-refresh-tally:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

/* ── Banner Poll Launcher & Actions ── */
.recommender-cta-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-banner-poll {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-banner-poll:hover {
    background: rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-banner-poll {
    border-color: #818cf8;
    color: #818cf8;
}

[data-theme="dark"] .btn-banner-poll:hover {
    background: rgba(129, 140, 248, 0.15);
}

/* ── Cafe Poll Candidate Picker (Milestone C7 Expansion) ── */
.vote-setup-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vote-setup-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.poll-search-bar-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.poll-search-icon {
    position: absolute;
    left: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
}

.poll-search-input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg, #ffffff);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

[data-theme="dark"] .poll-search-input {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(51, 65, 85, 0.7);
}

.poll-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.poll-search-clear {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px;
}

.poll-selection-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.poll-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-poll-filter-pill {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--badge-bg, rgba(0, 0, 0, 0.04));
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-poll-filter-pill:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    background: rgba(79, 70, 229, 0.08);
}

.poll-count-chip {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 4px 10px;
    border-radius: 9999px;
}

[data-theme="dark"] .poll-count-chip {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
}

.poll-candidates-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.poll-candidate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--card-bg, #ffffff);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

[data-theme="dark"] .poll-candidate-item {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(51, 65, 85, 0.65);
}

.poll-candidate-item:hover {
    border-color: var(--primary);
}

.poll-candidate-item.is-selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

[data-theme="dark"] .poll-candidate-item.is-selected {
    background: rgba(99, 102, 241, 0.12);
    border-color: #818cf8;
}

.poll-cand-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.poll-cand-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.poll-cand-info {
    min-width: 0;
    flex-grow: 1;
}

.poll-cand-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 2px 0;
}

.poll-cand-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.poll-rec-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 1px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

[data-theme="dark"] .poll-rec-badge {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.2);
}

.poll-error-msg {
    font-size: 0.82rem;
    color: #ef4444;
    font-weight: 700;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    text-align: center;
}

.btn-launch-poll-action {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-launch-poll-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-launch-poll-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Digital Menu / F&B Ordering Button (Milestone C10) ── */
.header-menu-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.22) 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #b45309;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
    white-space: nowrap;
}

[data-theme="dark"] .header-menu-cta-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.28) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fde68a;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
}

.header-menu-cta-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

/* ── "Featured Guru Picks" / House Specials Carousel (Milestone C10) ── */
.cafe-guru-picks-section {
    margin-bottom: 24px;
    background: var(--card-bg, rgba(255, 255, 255, 0.75));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .cafe-guru-picks-section {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.guru-picks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.guru-picks-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guru-picks-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.guru-picks-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.01em;
}

.guru-picks-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.guru-picks-count-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .guru-picks-count-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.guru-picks-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

@media (max-width: 640px) {
    .guru-picks-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .guru-pick-card {
        min-width: 250px;
        scroll-snap-align: start;
        flex: 0 0 250px;
    }
}

.guru-pick-card {
    display: flex;
    flex-direction: column;
    background: var(--badge-bg, rgba(241, 245, 249, 0.8));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .guru-pick-card {
    background: rgba(15, 23, 42, 0.6);
}

.guru-pick-card:hover {
    transform: translateY(-2px);
    border-color: #f59e0b;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

.guru-pick-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.guru-pick-thumb-wrap {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guru-pick-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guru-pick-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guru-pick-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.guru-pick-shelf {
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.guru-pick-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-guru-pick-action {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-guru-pick-action.primary {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.btn-guru-pick-action.primary:hover {
    background: #4338ca;
}

.btn-guru-pick-action:hover:not(.primary) {
    border-color: var(--primary);
    color: var(--primary);
}




