/* Dark Premium Glassmorphism */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #007aff;
    --border: rgba(255, 255, 255, 0.12);
    --glass: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    height: 100svh;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;     /* prevent all body scroll — iOS can drift pages-wrap horizontally */
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    line-height: 1.5;
    overscroll-behavior: none;
}

h1, h2, h3, h4, h5, h6, .logo, .sidebar-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 600;
}

/* ── FLOATING SHELL — replaces old <header> bar ──────────────────────────────
   Three absolute elements inside #page-chat — slide away on swipe to Zone 2.
   ─────────────────────────────────────────────────────────────────────────── */

.floating-burger {
    position: absolute;
    top: max(14px, calc(env(safe-area-inset-top) + 8px));
    left: 16px;
    z-index: 101;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.floating-burger:active {
    transform: scale(0.93);
    background: rgba(255, 255, 255, 0.14);
}

/* .btn-burger kept as alias — sidebar JS still calls openSidebar() */
.btn-burger { display: none; }

.floating-logo {
    position: absolute;
    top: max(16px, calc(env(safe-area-inset-top) + 10px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 20px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.5px;
    /* Gradient text — cyan → blue → cyan sweep */
    background: linear-gradient(135deg, #00d4ff 0%, #5eabff 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Pulsing premium glow — drop-shadow works on gradient text */
    animation: logoGlowPulse 3.2s ease-in-out infinite;
}

@keyframes logoGlowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.35))
                drop-shadow(0 0 10px rgba(0, 122, 255, 0.18));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.75))
                drop-shadow(0 0 22px rgba(0, 150, 255, 0.38));
    }
}

.floating-home {
    position: absolute;
    top: max(12px, calc(env(safe-area-inset-top) + 6px));
    right: 16px;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 22px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(0, 212, 255, 0.35);
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.14);
}

.floating-home i { font-size: 13px; }

.floating-home:hover {
    background: rgba(0, 212, 255, 0.16);
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.28);
}

.floating-home:active {
    transform: scale(0.95);
    background: rgba(0, 212, 255, 0.22);
}

/* ── FLOATING CARD BUTTON — gold, sits left of .floating-home ── */
.floating-card {
    position: absolute;
    top: max(12px, calc(env(safe-area-inset-top) + 6px));
    right: 105px;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 22px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(212, 160, 23, 0.35);
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: rgba(212, 160, 23, 0.7);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(212, 160, 23, 0.1);
}

.floating-card i { font-size: 13px; }

.floating-card:hover {
    background: rgba(212, 160, 23, 0.12);
    box-shadow: 0 0 18px rgba(212, 160, 23, 0.25);
}

.floating-card:active { transform: scale(0.95); }

/* When card exists in localStorage */
.floating-card.has-card {
    border-color: rgba(212, 160, 23, 0.65);
    color: #d4a017;
    box-shadow: 0 0 14px rgba(212, 160, 23, 0.22);
    background: rgba(212, 160, 23, 0.08);
}

/* .logo-center / .logo-glow / neonPulse removed — replaced by .floating-logo above */

.btn-header {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    z-index: 10;
}

.btn-header:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.btn-header.sos {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

/* .btn-home-round replaced by .floating-home (defined in Floating Shell section above) */

/* SIDEBAR */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--border);
    z-index: 600;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar.active {
    transform: translateX(280px);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.sidebar-close:active {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-item i {
    font-size: 16px;
    color: var(--accent);
    width: 22px;
    text-align: center;
}

.sidebar-item span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.sidebar-item.special {
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.sidebar-item.special i {
    color: var(--accent);
}

/* SOS Item in Sidebar */
.sidebar-item.sos-item {
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.sidebar-item.sos-item i {
    color: #ff3b30;
}

.sidebar-item.sos-item span {
    color: #ff6b6b;
}

/* CHAT FEED */
#chat-feed {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 96px;  /* Dock: input-shell only (mode-chip is inline) */
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(5,8,20,0.92) 0%, rgba(10,12,28,0.88) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    scroll-behavior: smooth;
}

/* ALL Chat Buttons - White text & border for visibility */
#chat-feed a,
#chat-feed button {
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

#chat-feed a:active,
#chat-feed button:active {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(0.98);
}

#chat-feed::before {
    content: 'iGuy';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
    letter-spacing: -0.05em;
    white-space: nowrap;
    color: #ffffff;
}

.card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-left: 2px solid rgba(0, 212, 255, 0.40);
    border-radius: 20px;
    padding: 16px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255,255,255,0.06);
}

.card-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.card-text strong,
.card-text b {
    color: var(--accent);
    font-weight: 600;
}

.card-text li {
    margin-bottom: 8px;
}

.user-bubble {
    align-self: flex-end;
    background: linear-gradient(135deg, #007aff 0%, #0044cc 100%);
    padding: 12px 16px;
    border-radius: 20px 20px 5px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    max-width: 82%;
    box-shadow: 0 4px 18px rgba(0, 100, 255, 0.40);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideIn 0.25s ease;
}

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

/* EXPANDABLE PANEL */
.expandable-panel {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid var(--border);
    padding: 20px;
    border-radius: 24px 24px 0 0;
    animation: slideUp 0.3s ease;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.panel-option {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-option:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.12);
}

.panel-option i {
    font-size: 18px;
    color: var(--accent);
}

/* DOCK */
#dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: none;                    /* removed — cleaner transition */
    padding: 10px 16px max(14px, env(safe-area-inset-bottom));
    z-index: 500;
    flex-shrink: 0;
}

/* ── GEMINI-STYLE INPUT SHELL ───────────────────────────────────────────────
   Single rounded container: [+]  input text  [▲]
   ─────────────────────────────────────────────────────────────────────────── */

/* Mode chip — inline inside .input-shell between [+] and the text field */
.mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    letter-spacing: -0.2px;
    background: rgba(0, 212, 255, 0.10);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: rgba(0, 212, 255, 0.85);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mode-chip:active {
    transform: scale(0.94);
    background: rgba(0, 212, 255, 0.18);
}

/* Input shell — one unified pill */
.input-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 30px;
    padding: 6px 6px 6px 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
    touch-action: manipulation;    /* reliable tap on mobile */
}

.input-shell:focus-within {
    border-color: rgba(0,212,255,0.50);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 0 22px rgba(0,212,255,0.14), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Plus button */
.btn-plus {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-plus:active {
    background: rgba(255,255,255,0.15);
    transform: scale(0.92) rotate(45deg); /* + rotates to × on tap */
    color: #ffffff;
}

/* Input — transparent, no own border (shell provides it) */
#userInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    height: 40px;
    padding: 0;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
    outline: none;
    min-width: 0; /* important for flex shrink */
}

#userInput::placeholder {
    color: rgba(255,255,255,0.35);
}

/* Keep generic input rule for any other inputs */
input {
    font-size: 16px;
    outline: none;
}

/* Send button — compact round */
.send-btn {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    touch-action: manipulation;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.send-btn:active {
    transform: scale(0.93);
    opacity: 0.88;
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: flex-end;
}

.overlay.active {
    display: flex;
}

.btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.btn-close:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

/* TOAST */
.toast {
    position: fixed;
    top: max(64px, calc(env(safe-area-inset-top) + 60px)); /* below floating shell */
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    z-index: 700;
    transition: transform 0.3s ease;
    max-width: 85%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* PWA Install Popup — kept for standalone mode; auto-prompt removed */
.pwa-popup {
    position: fixed;
    bottom: 90px;
    left: 16px;
    right: 16px;
    z-index: 200;
    animation: slideUp 0.4s ease;
}

.pwa-popup-content {
    position: relative;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.15),
        0 10px 40px rgba(0, 0, 0, 0.5);
}

.pwa-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.pwa-popup-close:hover {
    color: #fff;
}

.pwa-popup-icon {
    font-size: 40px;
    color: #00d4ff;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.pwa-popup-title {
    font-size: 20px;
    font-weight: 800;
    color: #00d4ff;
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.pwa-popup-text {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 16px;
    line-height: 1.5;
}

.pwa-popup-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
}

.pwa-popup-btn:active {
    transform: scale(0.95);
}

/* PWA Steps */
.pwa-popup-steps {
    margin: 16px 0;
}

.pwa-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #ccc;
    font-size: 15px;
}

.pwa-step-num {
    width: 28px;
    height: 28px;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #00d4ff;
}

/* Bouncing Arrow */
.pwa-arrow-container {
    margin-top: 16px;
}

.pwa-bounce-arrow {
    font-size: 28px;
    color: #00d4ff;
    animation: bounceArrow 1s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* RESPONSIVE & MOBILE FIXES */
@supports (height: 100svh) {
    html, body {
        height: 100svh;
    }
}

/* Keyboard open state */
body.keyboard-open #chat-feed {
    padding-bottom: 16px;
}

body.keyboard-open #dock {
    position: relative;
    border-top: 1px solid var(--border); /* restore separator when docked inline */
}

/* Mobile responsive */
@media (max-width: 480px) {
    /* Floating shell — slightly smaller on small screens */
    .floating-logo  { font-size: 18px; }
    .floating-home  { padding: 8px 11px; font-size: 11px; }
    .floating-home span { display: none; }  /* icon-only on very small */
    .floating-card  { padding: 8px 11px; font-size: 11px; right: 90px; }
    .floating-card span { display: none; }  /* icon-only on very small */
    .floating-burger { width: 36px; height: 36px; font-size: 15px; }

    #chat-feed {
        padding: 12px;
        padding-bottom: 96px;
        gap: 10px;
    }

    .card {
        padding: 14px;
        border-radius: 16px;
    }

    #dock {
        padding: 8px 12px max(12px, env(safe-area-inset-bottom));
    }

    .send-btn { width: 38px; height: 38px; }

    .sidebar { width: 260px; left: -260px; }
    .sidebar.active { transform: translateX(260px); }
}

/* Very small screens */
@media (max-width: 360px) {
    .floating-logo { font-size: 16px; }
    .floating-home { padding: 7px 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   ZONE 2 — VIP SHOWCASE (Horizontal Swipe Pages)
   ═══════════════════════════════════════════════════════════════ */

/* Pages wrapper — Chat & VIP side by side */
#pages-wrap {
    display: flex;
    flex-direction: row;
    width: 300vw;                                          /* 3 panels × 100vw */
    height: 100svh;
    transform: translateX(-100vw);                         /* default: center panel (Chat) */
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    overflow: hidden;
}

/* Individual page */
.app-page {
    position: relative;          /* contain absolute floating-shell children */
    width: 100vw;
    min-width: 100vw;
    height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* Page navigation dots (2 dots: Chat | VIP) */
#page-nav-dots {
    position: fixed;
    bottom: 98px;    /* clear dock (input-shell only, no mode-switcher row) */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 500;
    pointer-events: auto;
}
.pnd {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.pnd.active {
    width: 20px;
    border-radius: 3px;
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0,212,255,0.55);
}

/* Catalog header bar */
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 56px 20px 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent);
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 10;
}
.catalog-back {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.catalog-back:active { background: rgba(255,255,255,0.22); }

.catalog-title-block { text-align: center; }
.catalog-title-block .cat-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 17px;
    color: #fff;
    letter-spacing: 1px;
}
.catalog-title-block .cat-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.catalog-header-spacer { width: 38px; }

/* ── Feed Panel (page-feed) ──────────────────────────────────────────── */
#page-feed {
    background: #080b18;
    display: flex;
    flex-direction: column;
}

.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(56px, calc(env(safe-area-inset-top) + 44px)) 20px 14px;
    background: rgba(8, 11, 24, 0.96);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    z-index: 10;
}
.feed-back {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.10);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px; color: #fff;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.feed-back:active { background: rgba(255,255,255,0.20); }
.feed-title-block { text-align: center; }
.feed-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900; font-size: 16px;
    color: #fff; letter-spacing: 0.5px;
}
.feed-sub {
    font-size: 11px; color: rgba(255,255,255,0.45);
    letter-spacing: 0.4px; margin-top: 2px;
}
.feed-header-spacer { width: 38px; }

/* Scrollable post list */
.feed-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.feed-list::-webkit-scrollbar { display: none; }

/* ── Post Card ───────────────────────────────────────────────────────── */
.post-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    margin: 14px 16px 0;
    border-top: 3px solid var(--post-accent, rgba(255,255,255,0.12));
}
.post-card[data-type="weather"] { --post-accent: #74b9ff; }
.post-card[data-type="event"]   { --post-accent: #ff6b35; }
.post-card[data-type="news"]    { --post-accent: rgba(220,230,240,0.5); }
.post-card[data-type="tip"]     { --post-accent: #4ecdc4; }
.post-card[data-type="alert"]   { --post-accent: #f5c842; }

.post-image {
    width: 100%; height: 160px;
    object-fit: cover; display: block;
    background: rgba(20,24,40,0.8);
}
.post-body { padding: 13px 15px 15px; }
.post-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; color: rgba(255,255,255,0.40);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: 6px;
}
.post-type-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--post-accent, rgba(255,255,255,0.3));
    flex-shrink: 0;
}
.post-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px; font-weight: 700;
    color: rgba(255,255,255,0.92);
    line-height: 1.3; margin-bottom: 5px;
}
.post-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px; line-height: 1.55;
    color: rgba(255,255,255,0.55);
}
.post-cta {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 11px;
    font-size: 12px; font-weight: 700;
    color: var(--post-accent, #00d4ff);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px; cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* Cards track — horizontal scroll-snap */
.cards-track {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    height: 100svh;
    padding: 0 7.5vw;
    gap: 14px;
    align-items: center;
}
.cards-track::-webkit-scrollbar { display: none; }

/* Featured card */
.featured-card {
    flex: 0 0 85vw;
    max-width: 420px;
    height: 68svh;
    scroll-snap-align: center;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    transition: transform 0.3s ease;
    cursor: pointer;
}
.featured-card:active { transform: scale(0.98); }

/* Partner / Verified badge — top-right corner of card */
.partner-badge {
    position: absolute;
    top: 13px;
    right: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #c9930a 0%, #f0c340 100%);
    color: #1a0e00;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 10px 4px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(192,140,0,0.55);
    z-index: 3;
    pointer-events: auto;
    cursor: help;
}
.partner-badge i { font-size: 9px; }
.partner-badge.silver {
    background: linear-gradient(135deg, #7a7a8a 0%, #b8b8cc 100%);
    color: #0d0d14;
    box-shadow: 0 2px 10px rgba(100,100,130,0.5);
}

/* Shimmer loading state */
.featured-card.loading {
    background: linear-gradient(110deg, #111 30%, #1a1a1a 50%, #111 70%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Gradient overlay at card bottom */
.card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 0%,
        rgba(0,0,0,0.75) 35%,
        rgba(0,0,0,0.25) 65%,
        transparent 100%
    );
    padding: 28px 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Category badge */
.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,212,255,0.18);
    border: 1px solid rgba(0,212,255,0.35);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #00d4ff;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 4px;
}

/* Venue name */
.card-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* Short description */
.card-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Card action buttons row */
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* VIP Карта button */
.btn-vip-card {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, #007aff, #00d4ff);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 14px;
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 18px rgba(0,122,255,0.4);
    white-space: nowrap;
}
.btn-vip-card:active { opacity: 0.82; transform: scale(0.97); }
.btn-vip-card i { font-size: 13px; }

/* Навигирай button */
.btn-navigate {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 14px;
    cursor: pointer;
    touch-action: manipulation;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.btn-navigate:active { background: rgba(255,255,255,0.2); transform: scale(0.97); }
.btn-navigate i { font-size: 13px; }

/* Резервирай VIP button (partner cards only) — C1 */
.btn-book-vip {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, #b8860b 0%, #f0c340 45%, #ffe680 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 16px;
    color: #1a0e00;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    padding: 12px 14px;
    cursor: pointer;
    touch-action: manipulation;
    text-decoration: none;
    transition: opacity 0.18s, transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(240, 195, 64, 0.55), 0 0 0 0 rgba(240,195,64,0);
    position: relative;
    overflow: hidden;
}
.btn-book-vip::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: rgba(255,255,255,0.25);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
.btn-book-vip:hover::after { left: 120%; }
.btn-book-vip:hover { box-shadow: 0 6px 28px rgba(240, 195, 64, 0.75), 0 0 16px rgba(240,195,64,0.3); }
.btn-book-vip:active { opacity: 0.82; transform: scale(0.97); }
.btn-book-vip i { font-size: 12px; }

/* WhatsApp button (partner cards only) — C1 */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25D366;
    border: none;
    border-radius: 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 14px;
    cursor: pointer;
    touch-action: manipulation;
    text-decoration: none;
    transition: opacity 0.18s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(37,211,102,0.4);
}
.btn-whatsapp:active { opacity: 0.82; transform: scale(0.97); }
.btn-whatsapp i { font-size: 14px; }

/* Promo code badge inside card desc — C2 */
.promo-code-badge {
    display: inline-block;
    margin-top: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 11px;
    font-family: 'Montserrat', monospace;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #f0c340;
    white-space: nowrap;
}

/* Video card in chat bubbles */
.video-card {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.4);
}

/* Pagination dots */
.catalog-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.catalog-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}
.catalog-dot.active {
    width: 20px;
    border-radius: 3px;
    background: #00d4ff;
}

/* Responsive: larger phones / tablets */
@media (min-width: 430px) {
    .featured-card { height: 72vh; }
    .card-name { font-size: 24px; }
}

/* ══════════════════════════════════════════════════════════════
   iGuy GUIDE — Sequential tooltips only
   pointer-events:none everywhere — never blocks taps or logo
   Auto-removed from DOM after 10 s (4 × 2.5 s)
   ══════════════════════════════════════════════════════════════ */

@keyframes iguyStepIn {
    from { opacity: 0; transform: translateY(8px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
@keyframes iguyStepOut {
    from { opacity: 1; transform: translateY(0)    scale(1);    }
    to   { opacity: 0; transform: translateY(-6px) scale(0.94); }
}
@keyframes iguyFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Wrapper — completely transparent to all pointer events */
#iguy-guide {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}
#iguy-guide.fading { animation: iguyFadeOut 0.48s ease forwards; }

/* Individual step wrappers */
.iguy-step {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: 10000;
}
.iguy-step.show { animation: iguyStepIn  0.32s ease forwards; }
.iguy-step.hide { animation: iguyStepOut 0.28s ease forwards; }

/* Tooltip bubble */
.iguy-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.72);
    border: 1.5px solid rgba(0, 212, 255, 1);
    color: rgba(0, 212, 255, 1);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 0 12px rgba(0,212,255,0.18);
}
.iguy-label span { color: #ffffff; }
.iguy-label i    { color: rgba(0, 212, 255, 1); font-size: 12px; }

/* SOS variant */
.iguy-label-sos              { border-color: rgba(255,107,107,1); box-shadow: 0 0 12px rgba(255,107,107,0.18); }
.iguy-label-sos .iguy-label  { border-color: rgba(255,107,107,1); }
.iguy-label-sos i            { color: rgba(255,107,107,1); }

/* VIP variant */
.iguy-label-vip              { border-color: rgba(212,175,55,1); box-shadow: 0 0 12px rgba(212,175,55,0.18); }
.iguy-label-vip i            { color: rgba(212,175,55,1); }

/* Chat variant */
.iguy-label-chat             { border-color: rgba(0,122,255,1); box-shadow: 0 0 12px rgba(0,122,255,0.18); }
.iguy-label-chat i           { color: rgba(0,122,255,1); }

/* ── Tooltip positions ───────────────────────────────────────────
   s1: Home button — top right, BELOW header (never on logo)
   s2: SOS — below header, left side
   s3: Nav dots — bottom center, above dock
   s4: Input bar — bottom center, just above dock
   ─────────────────────────────────────────────────────────────── */
#iguy-s1 { top: max(60px, calc(env(safe-area-inset-top) + 54px)); right: 12px; }
#iguy-s2 { top: max(60px, calc(env(safe-area-inset-top) + 54px)); left:  12px; }
#iguy-s3 { bottom: 136px; left: 50%; transform: translateX(-50%); }
#iguy-s4 { bottom: 110px; left: 50%; transform: translateX(-50%); }

/* ══════════════════════════════════════════════════════════════════════
   VIBE SYSTEM — Persistent bar + Glassmorphism Chip HUD
   ══════════════════════════════════════════════════════════════════════ */

/* ── Stories Bar (replaces old vibe-pill bar) ─────────────────────────── */
#stories-container {
    padding-top: max(58px, calc(env(safe-area-inset-top) + 46px)); /* clear floating shell */
    background: rgba(10, 14, 26, 0.88);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    z-index: 10;
    overflow: hidden;
}

#stories-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 10px 16px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#stories-track::-webkit-scrollbar { display: none; }

/* Each story circle + label */
.story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    scroll-snap-align: start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Gradient ring wrapper */
.story-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #444 0%, #666 100%);
    transition: transform 0.15s ease;
}
.story-ring:active { transform: scale(0.93); }

/* Vibe gradient rings */
.story-bubble[data-vibe="NIGHTLIFE"] .story-ring { background: linear-gradient(135deg, #ff6b35 0%, #ff4500 50%, #c0392b 100%); }
.story-bubble[data-vibe="GASTRO"]    .story-ring { background: linear-gradient(135deg, #f5c842 0%, #d4af37 50%, #b8860b 100%); }
.story-bubble[data-vibe="ADVENTURE"] .story-ring { background: linear-gradient(135deg, #4ecdc4 0%, #00a8a8 50%, #006d6d 100%); }
.story-bubble[data-vibe="RELAX"]     .story-ring { background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #2c5f8a 100%); }

/* Seen/watched state: ring turns grey */
.story-bubble.seen .story-ring { background: linear-gradient(135deg, #3a3a3a 0%, #555 100%); }

/* Inner circle — gap + clip */
.story-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2.5px solid rgba(10, 14, 26, 0.95); /* gap between ring and thumb */
    overflow: hidden;
    background: rgba(20, 24, 40, 0.8);
}

/* Thumbnail image */
.story-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Label below bubble */
.story-label {
    font-size: 10px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.65);
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* ── Story Player (full-screen overlay) ──────────────────────────────── */
#story-player {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: #000;
    display: none;
    flex-direction: column;
    /* Hardware-accelerated — avoids repaints on video */
    will-change: opacity;
}
#story-player.active { display: flex; }

#story-video-wrap {
    position: relative;
    flex: 1;
    overflow: hidden;
    /* Constrain to 9:16 max-width on desktop — prevents over-zoom on portrait videos */
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    background: #000;
}

#story-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Segmented progress bar */
#story-progress {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 10;
}
.story-seg {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.30);
    border-radius: 1px;
    overflow: hidden;
}
.story-seg-fill {
    height: 100%;
    background: #fff;
    width: 0%;
}
.story-seg.done .story-seg-fill { width: 100%; transition: none; }

/* Story header (avatar + name) */
#story-header {
    position: absolute;
    top: max(26px, calc(env(safe-area-inset-top) + 16px));
    left: 12px;
    right: 52px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}
.story-avatar-small {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.8);
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(40,40,60,0.8);
}
.story-meta-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.story-meta-tag {
    font-size: 10px;
    color: rgba(255,255,255,0.70);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Close button */
#story-close {
    position: absolute;
    top: max(20px, calc(env(safe-area-inset-top) + 10px));
    right: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.35);
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
}

/* Bottom CTA */
#story-footer {
    position: absolute;
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
}
.story-cta-btn {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.30);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 36px;
    border-radius: 40px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.story-cta-btn:active { background: rgba(255,255,255,0.28); }

/* Tap zones: left half = prev, right half = next */
.story-tap-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42%;
    z-index: 5;
    cursor: pointer;
}
#story-tap-prev { left: 0; }
#story-tap-next { right: 0; }

/* ── Welcome Chips — Premium AI Glassmorphism ───────────────────────── */
#welcome-chips {
    background: transparent;
    border: none;
    padding: 2px 0 6px;
    animation: slideIn 0.3s ease;
}

/* iGuy avatar + greeting row */
.iguy-welcome-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.iguy-welcome-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00d4ff 0%, #0055ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 900;
    font-size: 14px;
    font-style: italic;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(0, 212, 255, 0.40), 0 0 0 1px rgba(0,212,255,0.20);
}

.iguy-welcome-meta {
    flex: 1;
    min-width: 0;
}

.welcome-greeting {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    margin: 0 0 3px;
    line-height: 1.3;
}
.welcome-greeting strong { color: #ffffff; font-weight: 700; }

.welcome-tagline {
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 212, 255, 0.65);
    letter-spacing: 0.4px;
    margin: 0;
}

/* 2-column chip grid */
.welcome-chips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.welcome-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    color: rgba(255,255,255,0.80);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 11px 13px;
    cursor: pointer;
    letter-spacing: 0.1px;
    transition: all 0.25s ease;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}
.welcome-chip:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(0,150,255,0.40);
    box-shadow: 0 0 14px rgba(0,150,255,0.22);
    color: rgba(255,255,255,0.96);
}
.welcome-chip:active {
    transform: scale(0.96);
    background: rgba(255,255,255,0.12);
}

/* Primary chip — full width, cyan tint */
.welcome-chip.chip-primary {
    grid-column: 1 / -1;
    background: rgba(0, 212, 255, 0.09);
    border-color: rgba(0, 212, 255, 0.28);
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    justify-content: center;
}
.welcome-chip.chip-primary:hover {
    background: rgba(0, 212, 255, 0.16);
    border-color: rgba(0, 212, 255, 0.50);
    box-shadow: 0 0 20px rgba(0,212,255,0.25);
}

/* Gold chip — promotions */
.welcome-chip.chip-gold {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.28);
    color: rgba(255, 215, 90, 0.90);
}
.welcome-chip.chip-gold:hover {
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.50);
    box-shadow: 0 0 14px rgba(212,175,55,0.22);
    color: rgba(255, 225, 120, 1);
}

/* ── Vibe Chips HUD ────────────────────────────────────────────────────── */
#vibe-chips-hud {
    /* Absolute overlay — sits OVER #chat-feed so chat-feed keeps full flex:1 height */
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(0, 4, 15, 0.93);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* top padding clears floating shell + #stories-container; bottom clears fixed dock */
    padding: max(180px, calc(env(safe-area-inset-top) + 168px)) 10px max(96px, calc(env(safe-area-inset-bottom) + 84px));
    overflow-y: auto;
    overflow-x: hidden;
    /* hidden by default — shown by initVibeChips() when needed */
    display: none;
}

.vibe-hud-prompt {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;           /* was 13px — now a real headline */
    font-weight: 800;
    letter-spacing: -0.3px;    /* tight, modern */
    text-transform: none;      /* remove UPPERCASE — softer */
    color: rgba(255,255,255,0.90);  /* was 0.55 */
    margin: 0 0 20px;          /* more breathing room */
    line-height: 1.2;
}

.vibe-chips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;                 /* was 10px */
}

/* Glassmorphism chip — Apple-style large card */
.vibe-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;                  /* was 4px */
    padding: 22px 14px 20px;   /* was 14px 10px 12px — much more spacious */
    border-radius: 24px;       /* was 16px — rounder = more iOS */
    border: 1px solid rgba(255,255,255,0.11);
    background: rgba(255,255,255,0.055);
    backdrop-filter: blur(24px) saturate(160%);   /* was blur(12px) */
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 132px;         /* was 88px — 50% taller */
    /* glow colour set per vibe below */
}
.vibe-chip:active { transform: scale(0.96); }

.vibe-chip[data-vibe="NIGHTLIFE"] { border-color: rgba(255,107,53,0.35);  box-shadow: 0 0 28px rgba(255,107,53,0.10),  inset 0 1px 0 rgba(255,107,53,0.07); }
.vibe-chip[data-vibe="GASTRO"]    { border-color: rgba(245,200,66,0.35);  box-shadow: 0 0 28px rgba(245,200,66,0.10),  inset 0 1px 0 rgba(245,200,66,0.07); }
.vibe-chip[data-vibe="ADVENTURE"] { border-color: rgba(78,205,196,0.35);  box-shadow: 0 0 28px rgba(78,205,196,0.10),  inset 0 1px 0 rgba(78,205,196,0.07); }
.vibe-chip[data-vibe="RELAX"]     { border-color: rgba(116,185,255,0.35); box-shadow: 0 0 28px rgba(116,185,255,0.10), inset 0 1px 0 rgba(116,185,255,0.07); }

.vibe-chip:hover[data-vibe="NIGHTLIFE"],
.vibe-chip:active[data-vibe="NIGHTLIFE"] { background: rgba(255,107,53,0.12); border-color: rgba(255,107,53,0.55); }
.vibe-chip:hover[data-vibe="GASTRO"],
.vibe-chip:active[data-vibe="GASTRO"]    { background: rgba(245,200,66,0.12); border-color: rgba(245,200,66,0.55); }
.vibe-chip:hover[data-vibe="ADVENTURE"],
.vibe-chip:active[data-vibe="ADVENTURE"] { background: rgba(78,205,196,0.12); border-color: rgba(78,205,196,0.55); }
.vibe-chip:hover[data-vibe="RELAX"],
.vibe-chip:active[data-vibe="RELAX"]     { background: rgba(116,185,255,0.12); border-color: rgba(116,185,255,0.55); }

.vibe-chip-icon  { font-size: 38px; line-height: 1; }   /* was 26px */

.vibe-chip-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;           /* was 11px */
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.92);  /* was 0.85 */
}

.vibe-chip-sub {
    font-family: 'Inter', sans-serif;
    font-size: 11px;           /* was 9.5px */
    color: rgba(255,255,255,0.52);  /* was 0.38 */
    text-align: center;
    line-height: 1.4;
}

/* Collapse animation for HUD → The Swap */
#vibe-chips-hud.collapsing {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    max-height: 100svh;  /* JS inline overrides this; kept large as fallback */
    opacity: 1;
}
#vibe-chips-hud.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

/* Input shell dimmed before vibe selected (first visit) */
#dock.vibe-pending .input-shell { opacity: 0.45; transition: opacity 0.3s ease; }
#dock.vibe-ready   .input-shell { opacity: 1.0;  transition: opacity 0.3s ease; }

/* @reduce-motion fallback */
@media (prefers-reduced-motion: reduce) {
    .vibe-chip, #vibe-chips-hud.collapsing, #dock .input-group { transition: none; }
    .vibe-chip { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(20,24,40,0.9); }
}

/* ── Google Places Autocomplete dropdown (.pac-container) ────────────────────
   The dropdown is appended to <body> by the Maps JS API and needs a very
   high z-index to appear above our overlays (z-index: 200) and guide (9999).
   ─────────────────────────────────────────────────────────────────────────── */
.pac-container {
    z-index: 10001 !important;  /* above sidebar (600), overlays (200), guide (9999) */
    background: rgba(18, 18, 18, 0.97) !important;
    border: 1px solid rgba(0, 212, 255, 0.25) !important;
    border-top: none !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif !important;
}

.pac-item {
    padding: 10px 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.80) !important;
    font-size: 14px !important;
    cursor: pointer;
    background: transparent !important;
    transition: background 0.15s ease;
}

.pac-item:hover,
.pac-item-selected {
    background: rgba(0, 212, 255, 0.08) !important;
    color: #ffffff !important;
}

.pac-item-query {
    color: #00d4ff !important;
    font-weight: 600 !important;
}

.pac-icon { display: none !important; } /* hide default Google pin icon */

.pac-matched { color: #00d4ff !important; font-weight: 700 !important; }

/* Hide Google logo (branding still in ToS; full logo shows in actual Maps) */
.pac-logo::after { display: none !important; }


/* ══════════════════════════════════════════════════════════════
   LEGAL MODALS & COOKIE BANNER
   ══════════════════════════════════════════════════════════════ */

/* Sidebar legal section */
.sidebar-legal-section {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 8px;
}
.sidebar-legal-section .sidebar-section-title {
    color: rgba(255,255,255,0.35);
    font-size: 10px;
    letter-spacing: 1.5px;
}
.sidebar-legal-section .sidebar-item {
    opacity: 0.6;
    font-size: 13px;
}
.sidebar-legal-section .sidebar-item:hover {
    opacity: 1;
}

/* Overlay backdrop */
.legal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Modal card */
.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 9001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
}

.legal-modal-header {
    width: 100%;
    max-width: 680px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    background: #111318;
    border-radius: 20px 20px 0 0;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    pointer-events: all;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.legal-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.legal-modal-close:hover { background: rgba(255,255,255,0.22); }

.legal-modal-body {
    width: 100%;
    max-width: 680px;
    max-height: 75vh;
    overflow-y: auto;
    background: #111318;
    padding: 0 20px 40px;
    pointer-events: all;
    -webkit-overflow-scrolling: touch;

    /* Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.legal-modal-body::-webkit-scrollbar { width: 4px; }
.legal-modal-body::-webkit-scrollbar-track { background: transparent; }
.legal-modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.legal-modal-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 20px 0 4px;
}
.legal-modal-body h3 {
    font-size: 13px;
    font-weight: 600;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 20px 0 6px;
}
.legal-modal-body p {
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255,255,255,0.75);
    margin-bottom: 10px;
}
.legal-modal-body ul {
    padding-left: 18px;
    margin-bottom: 10px;
}
.legal-modal-body ul li {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 4px;
}
.legal-version {
    font-size: 11px !important;
    color: rgba(255,255,255,0.35) !important;
    margin-bottom: 16px !important;
}
.legal-hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 28px 0;
}
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 12px;
}
.legal-table th {
    background: rgba(0,212,255,0.12);
    color: #00d4ff;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legal-table td {
    padding: 8px 10px;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: top;
}

/* ── Cookie Consent Banner ─────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 90px;
    left: 12px;
    right: 12px;
    z-index: 8900;
    background: rgba(17,19,24,0.97);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    max-width: 480px;
    margin: 0 auto;
}
.cookie-banner-text {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
}
.cookie-link {
    color: #00d4ff;
    text-decoration: underline;
    cursor: pointer;
}
.cookie-banner-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.cookie-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cookie-btn:hover { opacity: 0.85; }
.cookie-btn-accept {
    background: linear-gradient(135deg, #00d4ff, #007aff);
    color: #fff;
}
.cookie-btn-decline {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* ══════════════════════════════════════════════════════════════
   AGE GATE — Full-screen blocking consent overlay
   ══════════════════════════════════════════════════════════════ */
.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at top, #0d1f3c 0%, #000000 70%);
    /* Subtle animated shimmer */
    animation: ageGateFadeIn 0.5s ease both;
}

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

.age-gate-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 28px;
    padding: 40px 32px 32px;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 80px rgba(0,212,255,0.08),
        0 32px 64px rgba(0,0,0,0.6);
    animation: ageGateSlideUp 0.45s cubic-bezier(0.23,1,0.32,1) both;
}

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

.age-gate-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #00d4ff, #007aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.age-gate-tagline {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 24px;
}

.age-gate-icon {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 16px rgba(0,212,255,0.4));
}

.age-gate-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.3;
}

.age-gate-body {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255,255,255,0.65);
    margin-bottom: 28px;
}

.age-gate-body strong {
    color: #fff;
    font-weight: 700;
}

.age-gate-link {
    color: #00d4ff;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s;
}
.age-gate-link:hover { opacity: 0.75; }

.age-gate-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #00d4ff 0%, #007aff 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.25s, transform 0.2s;
    margin-bottom: 16px;
    box-shadow: 0 4px 24px rgba(0,122,255,0.35);
}
.age-gate-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.age-gate-btn:active:not(:disabled) {
    transform: translateY(0);
}
.age-gate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.age-gate-decline {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 20px;
}

.age-gate-note {
    font-size: 10.5px;
    color: rgba(255,255,255,0.2);
    line-height: 1.5;
    margin-top: 4px;
}

/* Affiliate disclosure label (FTC/EU compliance) */
.sponsored-label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.30);
    margin-top: 4px;
    letter-spacing: 0.3px;
}

/* ── TYPING INDICATOR ───────────────────────────────────────────────────────── */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    width: fit-content;
    max-width: 80px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    animation: slideIn 0.25s ease;
}
.typing-indicator span {
    width: 7px;
    height: 7px;
    background: rgba(0, 212, 255, 0.75);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%            { transform: translateY(-6px); opacity: 1; }
}

/* ── QUICK REPLY CHIPS ──────────────────────────────────────────────────────── */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.quick-reply-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 20px;
    color: rgba(0, 212, 255, 0.90);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    white-space: nowrap;
}
.quick-reply-chip:hover {
    background: rgba(0, 212, 255, 0.20);
    box-shadow: 0 2px 12px rgba(0,212,255,0.25);
}
.quick-reply-chip:active {
    transform: scale(0.94);
    background: rgba(0, 212, 255, 0.30);
}
