:root {
    /* === New palette (LP-aligned, dark cosmic + rose-gold) === */
    --bg-deep: #0b0b1e;
    --bg-mid: #121129;
    --ink: #e8e4d8;
    --ink-muted: rgba(232, 228, 216, 0.62);
    --ink-quiet: rgba(232, 228, 216, 0.4);
    --gold: #d4a574;
    --gold-warm: #e8b888;
    --accent: #c06a5a;
    --line: rgba(232, 228, 216, 0.14);
    --line-strong: rgba(232, 228, 216, 0.28);

    /* === Theme tokens (remapped to new palette; selectors using these continue to work) === */
    --theme-bg-primary: #0b0b1e;
    --theme-bg-secondary: #121129;
    --theme-bg-tertiary: #0b0b1e;
    --theme-accent-primary: #d4a574;
    --theme-accent-secondary: #d4a574;
    --theme-accent-tertiary: rgba(106, 76, 125, 0.6);
    --theme-highlight: #e8e4d8;
    --theme-highlight-secondary: rgba(232, 228, 216, 0.62);
    --theme-gold: #d4a574;
    --theme-gold-light: #e8b888;

    /* === Legacy aliases (kept for safety, remapped to new palette) === */
    --red-light: rgba(192, 106, 90, 0.18);
    --red-medium: #d4a574;
    --red-dark: #d4a574;
    --pink-medium: #d4a574;
    --pink-dark: #121129;
    --purple-medium: rgba(106, 76, 125, 0.6);
    --purple-dark: #0b0b1e;

    /* === Brand gradient (token kept for backwards compat) === */
    --red-pink-purple-gradient: linear-gradient(135deg, #d4a574, #e8b888, rgba(106, 76, 125, 0.6));

    /* === Bubbles (the big inversion: bot=gold translucent, user=purple translucent) === */
    --bot-bubble-bg: rgba(212, 165, 116, 0.10);
    --bot-bubble-border: rgba(212, 165, 116, 0.22);
    --bot-bubble-color: #e8e4d8;
    --user-bubble-bg: rgba(106, 76, 125, 0.45);
    --user-bubble-border: rgba(180, 150, 200, 0.35);
    --user-bubble-color: #e8e4d8;
    --bubble-gap: 0px;
    --bubble-tail-size: 8px;

    /* === Buttons === */
    --button-gradient: linear-gradient(180deg, #e8b888 0%, #d4a574 100%);
    --button-gradient-hover: linear-gradient(180deg, #f0c8a0 0%, #e0b080 100%);

    /* === Glass / surface === */
    --glass-bg: rgba(11, 11, 30, 0.85);
    --glass-border: rgba(212, 165, 116, 0.25);

    /* === Layout (unchanged from lovem.css) === */
    --base-font-size: clamp(15.4px, 4.4vw, 17.6px);
    --header-height: clamp(40px, 10vw, 44px);
    --input-height: clamp(40px, 11vw, 44px);
    --button-padding-y: clamp(10px, 3vw, 12px);
    --button-padding-x: clamp(14px, 4vw, 18px);
    --bubble-padding-y: clamp(8px, 2.4vw, 10px);
    --bubble-padding-x: clamp(12px, 3.4vw, 14px);
}

* {
    box-sizing: border-box;
}

body, html {
    background: radial-gradient(ellipse at center, var(--bg-deep) 0%, var(--bg-deep) 50%, #000 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    background-color: var(--bg-deep);
    font-size: var(--base-font-size);
    position: relative;
}

/* Subtle animated background overlay - Love theme nebula */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(212, 165, 116, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(106, 76, 125, 0.2) 0%, transparent 60%);
    pointer-events: none;
    animation: shimmer 8s ease infinite;
    z-index: 0;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced Chat Header with glassmorphism - Love theme */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6px, 2vw, 8px) clamp(12px, 4vw, 16px);
    background: linear-gradient(135deg, 
        rgba(11, 11, 30, 0.95) 0%, 
        rgba(11, 11, 30, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: var(--header-height);
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 2px 12px rgba(212, 165, 116, 0.2);
}

.header-left {
    position: absolute;
    left: clamp(12px, 4vw, 16px);
    top: 50%;
    transform: translateY(-50%);
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

#back-btn {
    all: unset;
    color: var(--gold);
    font-size: clamp(14px, 4vw, 16px);
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.2;
    transition: all 0.3s ease;
}

#back-btn:hover:not(:disabled) {
    transform: translateX(-2px);
    color: var(--gold);
}

#back-btn::before {
    content: '‹';
    font-size: 1.5em;
    font-weight: 300;
    line-height: inherit;
    vertical-align: middle;
    transform: translateY(-2px);
}

#back-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.avatar {
    width: clamp(24px, 7vw, 28px);
    height: clamp(24px, 7vw, 28px);
    border-radius: 50%;
    margin: 0;
    padding: 0;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    border: 2px solid rgba(212, 165, 116, 0.5);
}

.chat-header h1 {
    all: unset;
    font-size: clamp(13px, 3.5vw, 14px);
    font-weight: 600;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    line-height: 1;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Window */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: clamp(8px, 2.5vw, 10px);
    padding-bottom: calc(var(--input-height) + 30px);
    overflow-y: auto;
    gap: 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
}

.chat-window.location-active {
    padding-bottom: calc(var(--input-height) * 3 + 40px);
}

/* First question - minimize spacing so question stays visible */
.chat-window.first-question #messages-wrapper {
    padding-bottom: 10px;
}

/* Enhanced Bubble Styles with subtle shadows - size increased 10% */
.bubble {
    max-width: min(90%, 360px);
    padding: var(--bubble-padding-y) var(--bubble-padding-x);
    border-radius: 18px;
    font-size: var(--base-font-size);
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
    animation: bubble-appear 0.4s ease;
    transition: transform 0.2s ease;
}

@keyframes bubble-appear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Bot Bubble - Love theme */
.bot-bubble {
    background: var(--bot-bubble-bg);
    color: var(--bot-bubble-color);
    align-self: flex-start;
    border-bottom-left-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.15);
    border: 1px solid rgba(212, 165, 116, 0.38);
}

/* Enhanced User Bubble - Love theme */
.user-bubble {
    background: var(--user-bubble-bg);
    color: var(--user-bubble-color);
    align-self: flex-end;
    border: 1px solid var(--user-bubble-border);
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Options Bubble with glassmorphism - Love theme */
.options-bubble {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--ink);
    align-self: center;
    text-align: center;
    border-radius: clamp(12px, 4vw, 15px);
    padding: 10px 12px;
    box-shadow: 0 8px 32px rgba(212, 165, 116, 0.2);
}

/* Enhanced Question Label - Love theme */
.question-label-bubble,
.question-label {
    background: linear-gradient(135deg, 
        rgba(212, 165, 116, 0.2) 0%, 
        rgba(212, 165, 116, 0.2) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--gold);
    font-size: clamp(11px, 3vw, 12px);
    font-weight: bold;
    text-transform: uppercase;
    padding: clamp(4px, 1.5vw, 5px) clamp(8px, 2.5vw, 10px);
    border-radius: clamp(12px, 4vw, 15px);
    align-self: center;
    margin: clamp(10px, 3vw, 12px) 0;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.2);
    border: 1px solid rgba(212, 165, 116, 0.3);
    letter-spacing: 0.5px;
}

/* Enhanced Input Area - Love theme */
.input-area {
    display: flex;
    align-items: center;
    padding: clamp(6px, 2vw, 8px);
    background: linear-gradient(135deg, 
        rgba(11, 11, 30, 0.95) 0%, 
        rgba(11, 11, 30, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 165, 116, 0.3);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    gap: clamp(8px, 2.5vw, 10px);
    flex-wrap: wrap;
    max-width: 100%;
    min-height: var(--input-height);
    box-shadow: 0 -2px 12px rgba(212, 165, 116, 0.15);
}

/* Enhanced text input - Love theme */
#user-input {
    flex: 1;
    padding: var(--button-padding-y);
        max-width: 450px;
    border: 2px solid transparent;
    background: linear-gradient(rgba(11, 11, 30, 0.9), rgba(11, 11, 30, 0.9)) padding-box,
                linear-gradient(135deg, var(--gold), var(--gold)) border-box;
    border-radius: clamp(16px, 5vw, 20px);
    font-size: var(--base-font-size);
    min-height: var(--input-height);
    min-width: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.15);
    color: var(--ink);
}

#user-input::placeholder {
    color: rgba(212, 165, 116, 0.6);
}

#user-input:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
    transform: translateY(-1px);
}

/* Enhanced buttons with gradient and glow - Love theme */
#send-button, #submitCountryButton, #submitCityButton {
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: clamp(16px, 5vw, 20px);
    padding: var(--button-padding-y) var(--button-padding-x);
    cursor: pointer;
    min-width: clamp(70px, 20vw, 80px);
    font-size: var(--base-font-size);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
    position: relative;
    overflow: hidden;
}

#send-button::before, #submitCountryButton::before, #submitCityButton::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#send-button:hover::before, #submitCountryButton:hover::before, #submitCityButton:hover::before {
    width: 300px;
    height: 300px;
}

#send-button:hover, #submitCountryButton:hover, #submitCityButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

#send-button:active, #submitCountryButton:active, #submitCityButton:active {
    transform: translateY(0);
}

/* Enhanced Button Grids - FIXED FOR CENTERING */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(90px, 25vw, 120px), 1fr));
    gap: 8px;
    margin-top: clamp(8px, 2.5vw, 10px);
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    padding: 0 10px;
}

.options-grid button {
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: clamp(15px, 4vw, 17px);
    font-weight: 500;
    min-height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.35);
    position: relative;
    overflow: hidden;
    
    /* CRITICAL FOR CENTERING TEXT */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    white-space: normal;
}

.options-grid button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.options-grid button:hover::before {
    left: 100%;
}

.options-grid button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.45);
}

.options-grid button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.35);
}

/* ENHANCED BIRTHTIME SECTION - COMPACT DROPDOWNS - Love theme */
/* Time Input Container for better layout */
.time-input-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    padding: 8px 0;
}

.time-dial-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    background: rgba(11, 11, 30, 0.9);
    padding: 16px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.2);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.time-label {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* UNIFORM COMPACT TIME SELECTS - Love theme */
.time-select {
    width: 80px;
    height: 50px; /* Compact height for all */
    padding: 8px 4px;
    border: 2px solid transparent;
    background: linear-gradient(rgba(11, 11, 30, 0.9), rgba(11, 11, 30, 0.9)) padding-box,
                linear-gradient(135deg, var(--gold), var(--gold)) border-box;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(212, 165, 116, 0.15);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
    text-align-last: center;
    overflow: hidden;
}

.time-select.ampm-select {
    width: 80px;
    height: 50px; /* Same as hour/minute */
}

/* Add dropdown arrow */
.time-input-group::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 10px;
    pointer-events: none;
    margin-top: 12px;
}

.time-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.3),
                0 4px 12px rgba(212, 165, 116, 0.25);
    transform: translateY(-1px);
}

.time-select.disabled {
    opacity: 0.4;
    background: linear-gradient(rgba(18, 17, 41, 0.9), rgba(18, 17, 41, 0.9)) padding-box,
                linear-gradient(135deg, #555, #444) border-box;
    cursor: not-allowed;
}

.time-select option {
    padding: 8px;
    font-size: 16px;
    text-align: center;
    background: var(--bg-deep);
    color: var(--ink);
}

.time-select option:checked {
    background: linear-gradient(135deg, 
        rgba(212, 165, 116, 0.4) 0%, 
        rgba(212, 165, 116, 0.4) 100%);
}

.time-separator {
    font-size: 24px;
    font-weight: bold;
    color: var(--gold);
    margin: 0 2px;
    margin-top: 32px;
}

/* Custom scrollbar for time selects - Love theme */
.time-select::-webkit-scrollbar {
    width: 6px;
}

.time-select::-webkit-scrollbar-track {
    background: rgba(212, 165, 116, 0.1);
    border-radius: 3px;
}

.time-select::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--gold), var(--gold));
    border-radius: 3px;
}

.time-select::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold));
}

/* Enhanced checkbox container - Love theme */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(11, 11, 30, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: clamp(10px, 3vw, 12px);
    transition: all 0.3s ease;
    cursor: pointer;
    align-self: center;
    margin-top: 8px;
}

.checkbox-container:hover {
    background: rgba(11, 11, 30, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(212, 165, 116, 0.2);
}

.checkbox-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border: 2px solid var(--gold);
    background: rgba(11, 11, 30, 0.8);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked {
    background: var(--button-gradient);
    border-color: transparent;
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    animation: checkmark 0.2s ease;
}

@keyframes checkmark {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.checkbox-container label {
    cursor: pointer;
    font-size: clamp(11px, 3vw, 13px);
    color: var(--gold);
    font-weight: 500;
    user-select: none;
    white-space: nowrap;
}

/* Enhanced Date Selection Container */
.date-selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: clamp(4px, 1.5vw, 5px);
    padding: 0;
}

#end-month-label, #start-month-label {
    font-size: clamp(12px, 3.5vw, 13px);
    background: linear-gradient(135deg, var(--gold), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    margin: clamp(4px, 1.5vw, 5px) 0 clamp(2px, 1vw, 3px) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enhanced Date Grid - Love theme */
.date-grid {
    display: grid;
    grid-template-columns: repeat(
        clamp(4, calc(100vw / 80), 5),
        1fr
    );
    gap: clamp(4px, 1.5vw, 6px);
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(3px, 1vw, 5px);
}

.date-grid button, .decade-grid button, .year-grid button {
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: clamp(8px, 2.5vw, 10px);
    padding: clamp(6px, 2vw, 8px) clamp(2px, 0.5vw, 2px);
    cursor: pointer;
    font-size: clamp(11px, 3vw, 13px);
    min-height: clamp(30px, 9vw, 35px);
    height: clamp(30px, 9vw, 35px);
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1.2;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.25);
    position: relative;
    overflow: hidden;
}

.date-grid button::before, .decade-grid button::before, .year-grid button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.date-grid button:hover::before, .decade-grid button:hover::before, .year-grid button:hover::before {
    width: 100px;
    height: 100px;
}

.date-grid button:hover, .decade-grid button:hover, .year-grid button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.45);
    z-index: 1;
}

.date-grid button:active, .decade-grid button:active, .year-grid button:active {
    transform: scale(0.95);
}

/* Decade and Year Grids */
.decade-grid, .year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(55px, 16vw, 60px), 1fr));
    gap: clamp(8px, 2.5vw, 10px);
    width: 100%;
}

/* Footer Section - Love theme */
/* Hidden on mobile - body has fixed height with overflow:hidden, */
/* so users cannot scroll to see it anyway */
.footer-section {
    display: none !important;
}

.footer-section.visible {
    display: none;
}

.footer-section a {
    color: var(--gold);
}

.footer-section a:hover {
    color: var(--gold);
}

/* Enhanced Location Input - Love theme */
.input-area.location-input {
    padding: clamp(6px, 1.5vw, 8px) !important; /* Reduced padding */
    min-height: 40vh !important; /* 40% of viewport height */
    max-height: 40vh !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start; /* Align content to top */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    gap: clamp(4px, 1vw, 6px); /* Reduced gap */
    overflow: visible;
    background: linear-gradient(135deg, 
        rgba(11, 11, 30, 0.95) 0%, 
        rgba(11, 11, 30, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 165, 116, 0.3);
}

.location-input-wrapper {
    display: flex;
    gap: clamp(6px, 1.5vw, 8px);
    align-items: center;
    width: 100%;
    padding: 0 clamp(4px, 1vw, 6px); /* Small horizontal padding */
    margin-top: clamp(4px, 1vw, 6px); /* Small top margin */
}

/* Adjust chat window padding */
.chat-window.location-active {
    padding-bottom: calc(40vh - 10px) !important; /* Slightly less to reduce gap */
}


.input-area.location-input #country,
.input-area.location-input #city,
.input-area.location-input #partner-country,
.input-area.location-input #partner-city,
.input-area.location-input #user-country,
.input-area.location-input #user-city {
    flex: 1;
    padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
    font-size: clamp(14px, 3.5vw, 15px);
    border: 2px solid transparent;
    background: linear-gradient(rgba(11, 11, 30, 0.9), rgba(11, 11, 30, 0.9)) padding-box,
                linear-gradient(135deg, var(--gold), var(--gold)) border-box;
    border-radius: clamp(8px, 2vw, 10px);
    height: clamp(36px, 9vw, 42px); /* Slightly reduced height */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.15);
    color: var(--ink);
}

.input-area.location-input #country::placeholder,
.input-area.location-input #city::placeholder,
.input-area.location-input #partner-country::placeholder,
.input-area.location-input #partner-city::placeholder,
.input-area.location-input #user-country::placeholder,
.input-area.location-input #user-city::placeholder {
    color: rgba(212, 165, 116, 0.6);
}

.input-area.location-input #country:focus,
.input-area.location-input #city:focus,
.input-area.location-input #partner-country:focus,
.input-area.location-input #partner-city:focus,
.input-area.location-input #user-country:focus,
.input-area.location-input #user-city:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
    transform: translateY(-1px);
}

.input-area.location-input button {
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 14px);
    font-size: clamp(13px, 3.25vw, 14px);
    height: clamp(36px, 9vw, 42px); /* Match input height */
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
}


.pac-container {
    z-index: 2000 !important;
    max-height: calc(40vh - 60px) !important; /* More room for suggestions */
    overflow-y: auto !important;
    font-size: var(--base-font-size);
    background: rgba(11, 11, 30, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
    margin-top: 2px !important; /* Reduce gap between input and dropdown */
}

.pac-item {
    padding: clamp(8px, 2.5vw, 10px);
    font-size: var(--base-font-size);
    transition: background 0.2s ease;
    color: var(--ink);
    border-top: 1px solid rgba(212, 165, 116, 0.15);
}

.pac-item:hover {
    background: linear-gradient(135deg, 
        rgba(212, 165, 116, 0.2) 0%, 
        rgba(212, 165, 116, 0.2) 100%);
}

.pac-item-query {
    color: var(--gold);
}

.pac-matched {
    color: var(--gold);
    font-weight: 600;
}

.input-area button.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, var(--bg-mid), var(--bg-deep));
    box-shadow: none;
}

.input-area button.disabled-btn:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   COMPACT LOCATION INPUT (for revelation city inputs)
   Same size as regular text input, not full 40vh
   ======================================== */

.input-area.location-input-compact {
    padding: clamp(6px, 2vw, 8px) !important;
    min-height: auto !important;
    max-height: none !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    gap: clamp(8px, 2.5vw, 10px);
    background: linear-gradient(135deg,
        rgba(11, 11, 30, 0.95) 0%,
        rgba(11, 11, 30, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(212, 165, 116, 0.3);
}

.input-area.location-input-compact #city,
.input-area.location-input-compact #partner-city,
.input-area.location-input-compact #user-city {
    flex: 1;
    max-width: 280px;
    padding: var(--button-padding-y);
    font-size: var(--base-font-size);
    border: 2px solid transparent;
    background: linear-gradient(rgba(11, 11, 30, 0.9), rgba(11, 11, 30, 0.9)) padding-box,
                linear-gradient(135deg, var(--gold), var(--gold)) border-box;
    border-radius: clamp(16px, 5vw, 20px);
    min-height: var(--input-height);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.15);
    color: var(--ink);
}

.input-area.location-input-compact #city::placeholder,
.input-area.location-input-compact #partner-city::placeholder,
.input-area.location-input-compact #user-city::placeholder {
    color: rgba(212, 165, 116, 0.6);
}

.input-area.location-input-compact #city:focus,
.input-area.location-input-compact #partner-city:focus,
.input-area.location-input-compact #user-city:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
}

.input-area.location-input-compact button {
    padding: var(--button-padding-y) var(--button-padding-x);
    min-width: clamp(70px, 20vw, 80px);
    font-size: var(--base-font-size);
    font-weight: 600;
    flex-shrink: 0;
}

/* Autocomplete dropdown for compact input - positioned above */
.location-input-compact ~ .pac-container,
.chat-window.location-compact-active .pac-container {
    max-height: 200px !important;
}

/* Chat window padding when compact location is active */
.chat-window.location-compact-active {
    padding-bottom: calc(var(--input-height) + 30px) !important;
}

/* ========================================
   RESPONSIVE DESIGN FOR ALL MOBILE SCREENS
   ======================================== */

/* Extra Small Phones (320px - 359px) */
@media (max-width: 359px) {
    :root {
        --base-font-size: 13px;
        --header-height: 38px;
        --input-height: 38px;
        --button-padding-y: 8px;
        --button-padding-x: 12px;
        --bubble-padding-y: 8px;
        --bubble-padding-x: 12px;
    }
    
    .chat-header h1 {
        font-size: 12px;
    }
    


    .avatar {
        width: 22px;
        height: 22px;
    }
    
    .bubble {
        max-width: 82%;
        font-size: 13px;
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 320px;
    }
    
    .options-grid button {
        min-height: 44px;
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .date-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    
    .decade-grid, .year-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .time-dial-container {
        padding: 12px 8px;
        gap: 6px;
    }
    
    .time-select {
        width: 65px;
        height: 44px;
        font-size: 15px;
    }
    
    .time-select.ampm-select {
        width: 65px;
        height: 44px;
    }
    
    .footer-section {
        display: none;
    }
}

/* Small Phones (360px - 389px) */
@media (min-width: 360px) and (max-width: 389px) {
    :root {
        --base-font-size: 14px;
        --header-height: 40px;
        --input-height: 40px;
        --button-padding-y: 9px;
        --button-padding-x: 14px;
    }
    
    .chat-header h1 {
        font-size: 13px;
    }
    
    .avatar {
        width: 24px;
        height: 24px;
    }
    
    .bubble {
        max-width: 85%;
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .options-grid button {
        min-height: 44px;
        font-size: 15px;
    }
    
    .date-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    
    .footer-section { display: none !important; }
}

/* Standard Phones (390px - 479px) - iPhone 12/13/14 territory */
@media (min-width: 390px) and (max-width: 479px) {
    :root {
        --base-font-size: 15px;
        --header-height: 42px;
        --input-height: 42px;
        --button-padding-y: 10px;
        --button-padding-x: 16px;
    }
    
    .chat-header h1 {
        font-size: 14px;
    }
    
    .avatar {
        width: 26px;
        height: 26px;
    }
    
    .bubble {
        max-width: 88%;
    }
    
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .options-grid button {
        min-height: 44px;
        font-size: 16px;
    }
    
    .date-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .decade-grid, .year-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    
    .time-dial-container {
        padding: 20px 16px;
    }
    
    .footer-section { display: none !important; }
}

/* Extra Large Phones / Small Tablets (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    :root {
        --base-font-size: 16px;
        --header-height: 48px;
        --input-height: 46px;
        --button-padding-y: 14px;
        --button-padding-x: 20px;
    }
    
    .chat-header h1 {
        font-size: 16px;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
    }
    
#input-area,
.input-area {
    max-width: 400px;
    margin: 0 auto;
}

    .bubble {
        max-width: min(85%, 400px);
        font-size: 16px;
    }
    
    .options-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .options-grid button {
        min-height: 44px;
        font-size: 15px;
    }
    
    .date-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
    }
    
    .decade-grid, .year-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
    
    .footer-section { display: none !important; }
}

/* Desktop / Tablet (768px+) - Options grid fix for varying button counts */
@media (min-width: 768px) {
    .options-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        max-width: 500px;
        margin: 10px auto;
        padding: 0 10px;
    }

    .options-grid button {
        flex: 0 1 auto;
        min-width: 200px;
        max-width: 280px;
        padding: 10px 16px;
        font-size: 15px;
    }
    
    /* For questions with only 2 buttons, make them wider */
    .options-grid button:first-child:nth-last-child(2),
    .options-grid button:first-child:nth-last-child(2) ~ button {
        min-width: 250px;
        max-width: 320px;
    }
}

/* Height-based adjustments */
@media (max-height: 600px) {
    :root {
        --header-height: 36px;
        --input-height: 36px;
    }
    
    .chat-window {
        padding-bottom: calc(var(--input-height) + 15px);
    }

    .question-label-bubble,
    .question-label {
        margin: 8px 0;
        padding: 3px 6px;
    }
    
    .footer-section { display: none !important; }
}

@media (min-height: 600px) and (max-height: 700px) {
    .chat-window {
        padding-bottom: calc(var(--input-height) + 25px);
    }
    
    .footer-section { display: none !important; }
}

@media (min-height: 700px) and (max-height: 850px) {
    .footer-section { display: none !important; }
}

@media (min-height: 850px) {
    .footer-section { display: none !important; }
    
    .chat-window {
        padding-bottom: calc(var(--input-height) + 40px);
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) {
    @media (max-height: 400px) {
        :root {
            --header-height: 32px;
            --input-height: 32px;
            --base-font-size: 13px;
        }
        
        .chat-window {
            padding-bottom: calc(var(--input-height) + 10px);
        }
        
        .bubble {
            max-width: 70%;
        }
        
        .options-grid {
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        
        .options-grid button {
            min-height: 32px;
        }
        
        .date-grid button,
        .decade-grid button,
        .year-grid button {
            min-height: 28px;
            height: 28px;
        }
        
        .footer-section { display: none !important; }
    }
    
    @media (min-height: 400px) and (max-height: 500px) {
        :root {
            --header-height: 36px;
            --input-height: 36px;
            --base-font-size: 14px;
        }
        
        .chat-window {
            padding-bottom: calc(var(--input-height) + 20px);
        }

        .options-grid {
            grid-template-columns: repeat(5, 1fr);
        }
        
        .date-grid button,
        .decade-grid button,
        .year-grid button {
            min-height: 32px;
            height: 32px;
        }
        
        .footer-section { display: none !important; }
    }
    
    @media (min-height: 500px) {
        .options-grid {
            grid-template-columns: repeat(6, 1fr);
        }
        
        .date-grid {
            grid-template-columns: repeat(8, 1fr);
        }
    }
}

/* Special handling for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
    .chat-header {
        padding-top: max(clamp(6px, 2vw, 8px), env(safe-area-inset-top));
    }
    
    .input-area {
        padding-bottom: max(clamp(6px, 2vw, 8px), env(safe-area-inset-bottom));
    }
    
    .footer-section { display: none !important; }
}

/* Dynamic font scaling for very large text settings */
@media (prefers-contrast: high) {
    .bubble {
        border: 1px solid currentColor;
    }
    
    .options-grid button,
    .date-grid button {
        border: 2px solid currentColor;
    }
}

/* Enhanced Animations */
@keyframes fade-in {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Accessibility */
@media (pointer: coarse) {
    button, input, a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevent horizontal scroll */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100vw;
    }
}

/* Google Autocomplete dropdown - Love theme */
.pac-container {
    z-index: 2000 !important;
    font-size: var(--base-font-size);
    background: rgba(11, 11, 30, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
    margin-top: 4px;
}

.pac-item {
    padding: clamp(8px, 2.5vw, 10px);
    font-size: var(--base-font-size);
    transition: background 0.2s ease;
    color: var(--ink);
}

.pac-item:hover {
    background: linear-gradient(135deg, 
        rgba(212, 165, 116, 0.2) 0%, 
        rgba(212, 165, 116, 0.2) 100%);
}

/* Ensure inputs don't zoom on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input[type="text"],
    input[type="email"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}


@media (max-height: 600px) {
    .input-area.location-input {
        min-height: 45vh !important; /* Slightly less on small screens */
        max-height: 45vh !important;
        padding: clamp(4px, 1vw, 6px) !important;
    }
    
    .chat-window.location-active {
        padding-bottom: calc(45vh - 10px) !important;
    }
    
    .pac-container {
        max-height: calc(45vh - 55px) !important;
    }
}

/* For very tall screens */
@media (min-height: 900px) {
    .input-area.location-input {
        min-height: 320px !important; /* Reduced from 360px */
        max-height: 320px !important;
        padding: 8px !important;
    }
    
    .chat-window.location-active {
        padding-bottom: 310px !important;
    }
    
    .pac-container {
        max-height: 250px !important;
    }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .input-area.location-input {
        min-height: 50vh !important;
        max-height: 50vh !important;
        padding: 4px !important;
    }
    
    .chat-window.location-active {
        padding-bottom: calc(50vh - 8px) !important;
    }
}

/* Custom scrollbar for the whole page - Love theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(11, 11, 30, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--gold), var(--gold));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold));
}

/* ========================================
   CHAT APP FEEL - Typing Indicator, Avatar, Delivered
   ======================================== */

/* Typing indicator (three bouncing dots) */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: var(--bot-bubble-bg);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    margin-bottom: 8px;
    width: fit-content;
    margin-left: 36px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(212, 165, 116, 0.7);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

/* Bot bubble row: avatar + bubble */
.bot-message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    align-self: flex-start;
    max-width: min(92%, 360px);
    margin-bottom: 3px;
}

/* Last bot message in a group gets extra bottom margin */
.bot-message-row.last-in-group {
    margin-bottom: 12px;
}

/* Avatar next to bot bubbles */
.bot-message-row .bot-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    border: 1.5px solid rgba(212, 165, 116, 0.4);
    flex-shrink: 0;
}

/* Hide avatar on non-last messages in a group (spacer keeps alignment) */
.bot-message-row .bot-avatar-spacer {
    width: 28px;
    min-width: 28px;
    flex-shrink: 0;
}

/* Bot bubble inside row takes full remaining width */
.bot-message-row .bot-bubble {
    margin-bottom: 0;
    max-width: 100%;
}

/* Consecutive bot bubbles: uniform rounded corners except the last */
.bot-message-row:not(.last-in-group) .bot-bubble {
    border-bottom-left-radius: 6px;
    border-top-left-radius: 6px;
    border-color: transparent;
}

.bot-message-row.first-in-group .bot-bubble {
    border-top-left-radius: 18px;
}

.bot-message-row.last-in-group .bot-bubble {
    border-bottom-left-radius: 8px;
    border-top-left-radius: 6px;
}

/* Single bot message (both first and last) */
.bot-message-row.first-in-group.last-in-group .bot-bubble {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 8px;
}

/* User bubble wrapper for delivered indicator */
.user-message-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: flex-end;
    max-width: min(90%, 320px);
    margin-bottom: 12px;
}

.user-message-wrapper .user-bubble {
    margin-bottom: 0;
    max-width: 100%;
}

/* Delivered / Seen indicator */
.message-status {
    font-size: 11px;
    color: rgba(212, 165, 116, 0.5);
    margin-top: 4px;
    padding-right: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.message-status .seen-check {
    color: var(--gold);
    font-size: 12px;
}

/* ========================================
   REVELATION CARDS
   ======================================== */

.revelation-card {
    align-self: center;
    width: 100%;
    max-width: min(95%, 360px);
    background: linear-gradient(145deg, rgba(106, 76, 125, 0.25), rgba(11, 11, 30, 0.25));
    border: 1px solid rgba(212, 165, 116, 0.35);
    border-radius: 16px;
    padding: clamp(16px, 4vw, 22px);
    margin: 16px 0 20px;
    box-shadow:
        0 8px 32px rgba(212, 165, 116, 0.15),
        0 0 20px rgba(212, 165, 116, 0.08);
    animation: revelationAppear 0.6s ease;
}

@keyframes revelationAppear {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.revelation-title {
    display: block;
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--gold), var(--gold-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Revelation title inside a revelation card (legacy) */
.revelation-card .revelation-title {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.25);
    font-size: clamp(14px, 3.8vw, 16px);
    letter-spacing: 1px;
}

.revelation-card .revelation-title::before {
    content: '\2728 ';
    -webkit-text-fill-color: initial;
    background: none;
}

.revelation-text {
    font-size: var(--base-font-size);
    color: var(--ink);
    line-height: 1.7;
}

/* ========================================
   ACCURACY RATING (in its own bubble)
   ======================================== */

.rating-bubble {
    padding: 14px 16px;
}

.revelation-accuracy {
    text-align: center;
}

.revelation-accuracy .rating-prompt {
    font-size: clamp(12px, 3.2vw, 14px);
    color: rgba(212, 165, 116, 0.8);
    margin-bottom: 14px;
}

.revelation-accuracy .rating-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.revelation-rating-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(212, 165, 116, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.revelation-rating-btn:hover {
    border-color: rgba(212, 165, 116, 0.8);
    color: rgba(212, 165, 116, 0.8);
    transform: scale(1.1);
}

.revelation-rating-btn.selected {
    background: linear-gradient(135deg, rgba(212, 165, 116, 1) 0%, rgba(232, 184, 136, 1) 50%, rgba(212, 165, 116, 1) 100%);
    border-color: rgba(212, 165, 116, 1);
    color: var(--bg-deep);
}

.revelation-accuracy .rating-labels {
    display: flex;
    justify-content: space-between;
    max-width: 220px;
    margin: 0 auto;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Pull-quote opener for revelations */
.rev-pull-quote {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rev-body {
    font-size: var(--base-font-size);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

.rev-body p {
    margin: 0 0 10px 0;
}

.rev-body p:last-child {
    margin-bottom: 0;
}

.rev-body strong {
    color: var(--ink);
    font-weight: 600;
}

.rev-body em {
    color: rgba(255, 255, 255, 0.72);
}

.revelation-accuracy .rating-response {
    font-size: clamp(12px, 3vw, 13px);
    color: rgba(212, 165, 116, 0.8);
    font-style: italic;
    margin-top: 12px;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.revelation-accuracy .rating-response.visible {
    opacity: 1;
}

/* ========================================
   LOCATION INPUT INLINE LAYOUT
   ======================================== */

.location-inline-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.location-inline-row input {
    flex: 1;
    min-width: 0;
}

.location-inline-row button {
    flex-shrink: 0;
}

/* Continue button inside revelation / input area */
.continue-btn.primary-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 10px auto 0;
    padding: 14px 28px;
    border-radius: 25px;
    border: none;
    background: var(--button-gradient);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.continue-btn.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

@media (max-width: 359px) {
    .revelation-rating-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .revelation-accuracy .rating-options {
        gap: 7px;
    }
    .bot-message-row .bot-avatar,
    .bot-message-row .bot-avatar-spacer {
        width: 24px;
        min-width: 24px;
        height: 24px;
    }
    .typing-indicator {
        margin-left: 32px;
    }
}

/* ========================================
   VALIDATION CHECKPOINT CARDS
   ======================================== */

.checkpoint-card {
    align-self: center;
    width: 100%;
    max-width: min(95%, 360px);
    background: linear-gradient(145deg, rgba(106, 76, 125, 0.3), rgba(11, 11, 30, 0.3));
    border: 1px solid rgba(212, 165, 116, 0.4);
    border-radius: 16px;
    padding: clamp(16px, 4vw, 22px);
    margin: 16px auto 20px;
    box-shadow:
        0 8px 32px rgba(212, 165, 116, 0.15),
        0 0 20px rgba(212, 165, 116, 0.08);
    animation: bubble-appear 0.4s ease;
}

.checkpoint-summary {
    background: rgba(11, 11, 30, 0.5);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.checkpoint-summary p {
    margin: 6px 0;
    font-size: clamp(13px, 3.5vw, 14px);
    color: var(--ink);
    line-height: 1.4;
}

.checkpoint-summary p strong {
    color: var(--gold);
}

.checkpoint-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.checkpoint-btn-confirm,
.checkpoint-btn-edit {
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: clamp(14px, 3.5vw, 15px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.checkpoint-btn-confirm {
    background: var(--button-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.checkpoint-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

.checkpoint-btn-edit {
    background: transparent;
    color: var(--gold);
    border: 2px solid rgba(212, 165, 116, 0.5);
}

.checkpoint-btn-edit:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* Side-by-side confirm/edit (~60/40) once the card reaches its 360px cap;
   stacked below that. Card hits 360px at ~400px viewport (95% of the padded
   chat column). */
@media (min-width: 400px) {
    .checkpoint-buttons {
        flex-direction: row;
    }
    .checkpoint-btn-confirm {
        width: auto;
        flex: 3;
    }
    .checkpoint-btn-edit {
        width: auto;
        flex: 2;
    }
}

/* Inline error message styling */
.inline-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    animation: bubble-appear 0.3s ease;
}

@media (max-width: 359px) {
    .checkpoint-card {
        padding: 14px;
    }
    .checkpoint-summary {
        padding: 10px 12px;
    }
    .checkpoint-btn-confirm,
    .checkpoint-btn-edit {
        padding: 12px 16px;
        font-size: 13px;
    }
}
