/* ============================================
   COMPONENTS — WIZARD PANEL (Setup Wizard)
   ============================================
   
   Wizard panel that slides down below the toolbar.
   Used for onboarding and initial setup.
   
   Structure:
   - Position: Fixed below toolbar, right-aligned
   - Width: Same as toolbar (3 tiles + gaps)
   - Animation: Slide down from above
   ============================================ */

/* ==========================================
   CSS VARIABLES
   Note: --wizard-panel-* variables defined in theme.css
   ========================================== */

/* ==========================================
   WIZARD PANEL CONTAINER
   ========================================== */

.wizard-panel {
    position: fixed;
    top: var(--wizard-panel-top);
    right: var(--space-4);
    width: var(--wizard-panel-width);
    max-height: calc(100vh - var(--wizard-panel-top) - var(--space-4));

    /* Glass Effect — using theme tokens */
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-widget);
    box-shadow: var(--glass-shadow);

    z-index: calc(var(--z-toolbar) - 1);
    /* Below toolbar, above map */

    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Hidden by default - no opacity to preserve backdrop-filter */
    visibility: hidden;
    transform: translateY(-20px) scale(0.96);
    pointer-events: none;

    transition:
        visibility var(--transition-panel),
        transform var(--transition-panel);
}

/* ==========================================
   WIZARD PANEL — Open State
   ========================================== */

.wizard-panel.open {
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ==========================================
   WIZARD PANEL — Collapsed State
   ========================================== */

.wizard-panel.collapsed {
    height: var(--toolbar-tile-height);
    max-height: var(--toolbar-tile-height);
    border-radius: var(--radius-lg);
}

.wizard-panel.collapsed .wizard-panel-content {
    display: none;
}

.wizard-panel.collapsed .wizard-collapsed-bar {
    display: flex;
}

/* ==========================================
   WIZARD DRAG HANDLE (mobile only)
   ========================================== */

.wizard-drag-handle {
    display: none; /* Hidden on desktop */
}

/* ==========================================
   WIZARD COLLAPSED BAR
   ========================================== */

.wizard-collapsed-bar {
    display: none;
    /* Hidden by default, shown when collapsed */
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    height: 100%;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.wizard-collapsed-bar:hover {
    background: var(--glass-highlight);
}

/* ==========================================
   WIZARD PANEL CONTROLS (top-right corner)
   ========================================== */

.wizard-panel-controls {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    z-index: 10;
}

/* Collapse toggle button (dash) */
.wizard-collapse-toggle {
    width: 17px;
    height: 4px;
    background: var(--text-muted);
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.wizard-collapse-toggle:hover {
    background: var(--text-primary);
}

.wizard-panel.open:not(.collapsed) .wizard-collapse-toggle {
    background: var(--accent);
}

/* Close button (×) — iOS style */
.wizard-panel-close {
    width: 17px;
    height: 17px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.wizard-panel-close:hover {
    opacity: 1;
}

/* × icon using pseudo-elements */
.wizard-panel-close::before,
.wizard-panel-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-xs);
}

.wizard-panel-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.wizard-panel-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Icon in collapsed bar */
.wizard-collapsed-icon {
    width: var(--fab-size-lg);
    height: var(--fab-size-lg);
    flex-shrink: 0;
}

.wizard-collapsed-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Text in collapsed bar */
.wizard-collapsed-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.wizard-collapsed-title {
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-collapsed-subtitle {
    font-family: var(--font-family);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-muted);
    white-space: nowrap;
}

/* CTA button in collapsed bar */
.wizard-collapsed-cta {
    padding: var(--space-2) var(--space-4);
    background: var(--btn-primary-bg);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--btn-primary-text);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        background var(--transition-fast),
        transform var(--transition-fast);
}

.wizard-collapsed-cta:hover {
    background: var(--btn-primary-bg-hover);
    transform: translateY(-1px);
}

.wizard-collapsed-cta:active {
    transform: translateY(0);
}

/* ==========================================
   WIZARD PANEL CONTENT WRAPPER
   ========================================== */

.wizard-panel-content {
    display: flex;
    flex-direction: column;
    max-height: inherit;
    overflow: hidden;
}

/* ==========================================
   WIZARD HEADER (inside panel)
   ========================================== */

.wizard-panel .wizard-header {
    position: relative;
    padding: var(--space-5) var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.wizard-panel .wizard-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    padding-right: calc(var(--space-8) + var(--space-4));
    /* Space for panel controls (collapse + close) */
}

.wizard-panel .wizard-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Progress dots */
.wizard-panel .wizard-progress {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.wizard-panel .wizard-progress-dot {
    width: var(--space-2);
    height: var(--space-2);
    border-radius: var(--radius-full);
    background: var(--surface-3);
    transition:
        background var(--transition-normal),
        box-shadow var(--transition-normal);
}

.wizard-panel .wizard-progress-dot.active {
    background: var(--accent);
    box-shadow: var(--shadow-accent);
}

.wizard-panel .wizard-progress-dot.completed {
    background: var(--color-success);
}

/* wizard-progress-text removed — dots are enough */

/* Close button — now using .wizard-panel-close in controls group */
/* Old .wizard-close styles removed — see .wizard-panel-controls */

/* ==========================================
   WIZARD CONTENT (scrollable area)
   ========================================== */

.wizard-panel .wizard-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
    min-height: 0;
}

/* Custom scrollbar */
.wizard-panel .wizard-content::-webkit-scrollbar {
    width: 6px;
}

.wizard-panel .wizard-content::-webkit-scrollbar-track {
    background: transparent;
}

.wizard-panel .wizard-content::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

.wizard-panel .wizard-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* ==========================================
   WIZARD FOOTER
   ========================================== */

.wizard-panel .wizard-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-2);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.wizard-panel .wizard-footer-left {
    display: flex;
    gap: var(--space-2);
}

.wizard-panel .wizard-footer-right {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.wizard-panel .wizard-footer-center {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* ==========================================
   WIZARD BUTTONS (panel-specific sizes)
   ========================================== */

.wizard-panel .wizard-btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    border: none;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.wizard-panel .wizard-btn-back {
    background: transparent;
    color: var(--text-muted);
}

.wizard-panel .wizard-btn-back:hover:not(:disabled) {
    color: var(--text-primary);
}

.wizard-panel .wizard-btn-back:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-panel .wizard-btn-skip {
    background: transparent;
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.wizard-panel .wizard-btn-skip:hover {
    color: var(--text-secondary);
}

.wizard-panel .wizard-btn-next {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    min-width: 80px;
    box-shadow: var(--shadow-accent);
}

.wizard-panel .wizard-btn-next:hover:not(:disabled) {
    background: var(--btn-primary-bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent-lg);
}

.wizard-panel .wizard-btn-next:active {
    transform: translateY(0);
}

.wizard-panel .wizard-btn-next:disabled {
    background: var(--surface-3);
    color: var(--text-disabled);
    box-shadow: none;
    cursor: not-allowed;
}

.wizard-panel .wizard-btn-next.complete {
    background: var(--color-success);
}

.wizard-panel .wizard-btn-next.complete:hover:not(:disabled) {
    background: var(--color-success);
    filter: brightness(1.1);
}

/* Large buttons for welcome screen */
.wizard-panel .wizard-btn-large {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
}

.wizard-panel .wizard-btn-primary {
    background: var(--accent-gradient);
}

/* ==========================================
   WELCOME STEP (panel version) — Redesigned
   ========================================== */

.wizard-panel .wizard-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4) 0;
    gap: var(--space-3);
}

/* Title "Добро пожаловать!" */
.wizard-panel .wizard-welcome-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0;
}

/* Subtitle (gray) */
.wizard-panel .wizard-welcome-subtitle {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    max-width: 280px;
    line-height: var(--leading-relaxed);
}

/* Icon wrapper with glow effect */
.wizard-panel .wizard-welcome-icon-wrapper {
    position: relative;
    width: var(--wizard-welcome-icon-size);
    height: var(--wizard-welcome-icon-size);
    margin: var(--space-4) 0;
}

.wizard-panel .wizard-welcome-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: calc(-1 * var(--wizard-welcome-glow-spread));
    background: radial-gradient(circle,
            var(--wizard-glow-purple) 0%,
            var(--wizard-glow-pink) 40%,
            var(--wizard-glow-cyan) 70%,
            transparent 100%);
    filter: blur(25px);
    z-index: 0;
    pointer-events: none;
}

.wizard-panel .wizard-welcome-icon-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: var(--wizard-welcome-icon-radius);
    object-fit: contain;
}

/* Question text */
.wizard-panel .wizard-welcome-question {
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: var(--leading-relaxed);
}

/* Hint text */
.wizard-panel .wizard-welcome-hint {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* Buttons container */
.wizard-panel .wizard-welcome-buttons {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

/* Ghost button (left) - dark glass fill */
.wizard-panel .wizard-btn-ghost {
    background: var(--glass-bg-dark);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: var(--radius-pill);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}

.wizard-panel .wizard-btn-ghost:hover {
    background: var(--glass-bg);
    border-color: var(--glass-border-subtle);
}

/* Primary button in welcome - pill shape */
.wizard-panel .wizard-welcome-buttons .wizard-btn-primary {
    border-radius: var(--radius-pill);
}

/* Hide header and footer in welcome mode */
.wizard-panel.welcome-mode .wizard-header {
    display: none;
}

.wizard-panel.welcome-mode .wizard-footer {
    display: none;
}

/* ==========================================
   CHOICE CARDS (panel version - compact)
   ========================================== */

.wizard-panel .wizard-choices {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.wizard-panel .wizard-choice-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface-3);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition:
        background var(--transition-normal),
        border-color var(--transition-normal),
        transform var(--transition-fast);
}

.wizard-panel .wizard-choice-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.wizard-panel .wizard-choice-card:active {
    transform: translateY(0);
}

.wizard-panel .wizard-choice-card.selected {
    background: var(--accent-muted);
    border-color: var(--accent);
}

.wizard-panel .wizard-choice-icon {
    font-size: var(--text-3xl);
    width: var(--fab-size);
    height: var(--fab-size);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.wizard-panel .wizard-choice-icon-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    padding: var(--space-1);
}

.wizard-panel .wizard-choice-card.selected .wizard-choice-icon {
    background: var(--accent);
}

.wizard-panel .wizard-choice-card.selected .wizard-choice-icon-img {
    filter: brightness(0) invert(1);
}

.wizard-panel .wizard-choice-text {
    flex: 1;
}

.wizard-panel .wizard-choice-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.wizard-panel .wizard-choice-description {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.wizard-panel .wizard-choice-check {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}

.wizard-panel .wizard-choice-card.selected .wizard-choice-check {
    background: var(--accent);
    border-color: var(--accent);
}

.wizard-panel .wizard-choice-card.selected .wizard-choice-check::after {
    content: '✓';
    color: var(--accent-contrast);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
}

/* ==========================================
   LOCATION STEP (panel version)
   Используются cp-* классы из cp-filters.css и chips.css (DRY):
   - cp-selected-area — выбранная локация
   - cp-search-* — поиск и результаты
   - cp-location-hints — toggle подсказок (<details>)
   - cp-location-chips, quick-area-chip — чипы локаций
   ========================================== */

.wizard-panel .wizard-location {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 380px;
    /* Достаточно для dropdown с 8 результатами поиска */
}

/* Убираем margin-bottom у cp-search-container внутри wizard */
.wizard-panel .cp-search-container {
    margin-bottom: 0;
}

/* cp-location-hints внутри wizard — стиль под input */
.wizard-panel .cp-location-hints {
    border: none;
    background: transparent;
}

.wizard-panel .cp-location-hints-toggle {
    background: var(--input-bg);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
}

.wizard-panel .cp-location-hints-toggle:hover {
    background: var(--input-bg-focus);
    color: var(--text-primary);
}

.wizard-panel .cp-location-hints[open] .cp-location-hints-toggle {
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Контент подсказок — с фоном как у input */
.wizard-panel .cp-location-hints-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--input-bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Чипы в wizard */
.wizard-panel .cp-location-chips {
    padding: 0;
}

/* Labels чипов */
.wizard-panel .cp-location-chips-label {
    color: var(--text-primary);
}

/* ==========================================
   FILTERS STEP (panel version)
   Используются cp-* классы из cp-filters.css (DRY):
   - cp-filter-group, cp-filter-title — обёртки
   - cp-filter-tag — кнопки rooms
   - cp-range-inputs, cp-range-preset — инпуты цены/площади
   ========================================== */

.wizard-panel .wizard-filters {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* ==========================================
   RESPONSIVE — Mobile (≤767px): Bottom Sheet
   ========================================== */

@media (max-width: 767px) {
    .wizard-panel {
        /* Transform to Bottom Sheet */
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: 80vh;
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        transform: translateY(100%);
        /* Above chat-drawer (z-index: 2100) */
        z-index: 2150;
        padding-bottom: var(--safe-area-bottom);

        /* Override default hidden state */
        visibility: hidden;
    }

    .wizard-panel.open {
        visibility: visible;
        transform: translateY(0);
    }

    /* Drag Handle — visual indicator (::before) + touch area (.wizard-drag-handle) */
    .wizard-panel::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(148, 163, 184, 0.4);
        border-radius: var(--radius-pill);
        z-index: 1;
        pointer-events: none; /* Touch events go to .wizard-drag-handle */
    }

    /* Drag Handle — touch target area */
    .wizard-drag-handle {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 40px; /* Touch target area */
        z-index: 2;
        touch-action: none; /* Prevent iOS pull-to-refresh */
        cursor: grab;
    }
    
    .wizard-drag-handle:active {
        cursor: grabbing;
    }

    /* Hide panel controls on mobile — use drag to dismiss */
    .wizard-panel-controls {
        display: none;
    }

    /* Header — с учётом drag handle */
    .wizard-panel .wizard-header {
        padding: calc(var(--bottom-sheet-handle-height) + 8px) var(--space-4) var(--space-4);
    }

    .wizard-panel .wizard-title {
        font-size: var(--text-base);
        padding-right: 0;
    }

    .wizard-panel .wizard-subtitle {
        font-size: var(--text-md);
    }

    /* Content */
    .wizard-panel .wizard-content {
        padding: var(--space-4);
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
    }

    /* Choice Cards */
    .wizard-panel .wizard-choice-card {
        padding: var(--space-3);
        min-height: var(--touch-target-comfortable);
    }

    .wizard-panel .wizard-choice-icon {
        width: var(--text-4xl);
        height: var(--text-4xl);
        font-size: var(--text-xl);
    }

    .wizard-panel .wizard-choice-label {
        font-size: var(--text-base-lg);
    }

    .wizard-panel .wizard-choice-description {
        font-size: var(--text-sm);
    }

    /* Footer */
    .wizard-panel .wizard-footer {
        padding: var(--space-3) var(--space-4) calc(var(--space-4) + var(--safe-area-bottom));
        flex-wrap: wrap;
    }

    .wizard-panel .wizard-btn {
        padding: 10px 16px;
        font-size: var(--text-md);
        min-height: var(--touch-target-min);
    }

    /* Location Search — 16px prevents iOS zoom, but smaller padding */
    .wizard-panel .cp-search-input {
        font-size: 16px;
        padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8);
        min-height: 40px;
    }

    /* Chips — compact but touch-friendly */
    .wizard-panel .quick-area-chip,
    .wizard-panel .cp-location-chip {
        padding: 6px 10px;
        font-size: var(--text-sm);
        font-weight: var(--font-normal);
        min-height: 32px;
    }

    /* Filter tags (rooms) — compact */
    .wizard-panel .cp-filter-tag {
        padding: 8px 6px;
        font-size: var(--text-md);
        min-height: 36px;
    }

    /* Price/Area Inputs */
    .wizard-panel .cp-range-inputs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .wizard-panel .cp-range-input {
        font-size: 16px;
        /* Prevent iOS zoom */
        min-height: 40px;
    }

    .wizard-panel .cp-range-preset {
        padding: 6px 10px;
        font-size: var(--text-sm);
        min-height: 32px;
    }

    /* Welcome step — centered */
    .wizard-panel .wizard-welcome {
        padding: var(--space-3) 0;
    }

    .wizard-panel .wizard-welcome-title {
        font-size: var(--text-lg);
    }

    .wizard-panel .wizard-welcome-icon-wrapper {
        width: 70px;
        height: 70px;
        margin: var(--space-3) 0;
    }

    .wizard-panel .wizard-welcome-buttons {
        flex-direction: column;
        width: 100%;
        gap: var(--space-2);
    }

    .wizard-panel .wizard-welcome-buttons .wizard-btn-ghost,
    .wizard-panel .wizard-welcome-buttons .wizard-btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Collapsed state — not used on mobile */
    .wizard-panel.collapsed {
        display: none;
    }
}

/* ==========================================
   RESPONSIVE — Compact Mode (≤320px)
   ========================================== */

@media (max-width: 320px) {
    .wizard-panel {
        max-height: 85vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .wizard-panel::before {
        width: 32px;
        height: 3px;
        top: 6px;
    }

    .wizard-panel .wizard-header {
        padding: 24px var(--space-3) var(--space-3);
    }

    .wizard-panel .wizard-title {
        font-size: var(--text-base-lg);
    }

    .wizard-panel .wizard-content {
        padding: var(--space-3);
    }

    .wizard-panel .wizard-choice-card {
        padding: var(--space-2);
    }

    .wizard-panel .wizard-choice-icon {
        width: 32px;
        height: 32px;
        font-size: var(--text-lg);
    }

    .wizard-panel .wizard-choice-label {
        font-size: var(--text-base);
    }

    .wizard-panel .wizard-choice-description {
        font-size: var(--text-xs);
    }

    .wizard-panel .wizard-footer {
        padding: var(--space-2) var(--space-3) calc(var(--space-3) + var(--safe-area-bottom));
    }

    .wizard-panel .wizard-btn {
        padding: 12px 16px;
        font-size: var(--text-base);
    }

    /* Welcome compact */
    .wizard-panel .wizard-welcome-icon-wrapper {
        width: 60px;
        height: 60px;
    }
}

/* ==========================================
   RESPONSIVE — Landscape Mobile
   ========================================== */

@media (max-width: 767px) and (max-height: 500px) and (orientation: landscape) {
    .wizard-panel {
        max-height: 80vh;
    }

    .wizard-panel .wizard-content {
        max-height: 50vh;
    }

    .wizard-panel .wizard-welcome-icon-wrapper {
        width: 50px;
        height: 50px;
        margin: var(--space-2) 0;
    }
}

/* ==========================================
   DRAGGING STATE (for swipe gestures)
   ========================================== */

.wizard-panel.dragging {
    transition: none !important;
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */

@media (hover: none) and (pointer: coarse) {
    .wizard-panel .wizard-choice-card:hover {
        background: var(--surface-3);
        border-color: transparent;
        transform: none;
    }

    .wizard-panel .wizard-choice-card:active {
        background: var(--surface-hover);
        transform: scale(0.98);
    }

    .wizard-panel .wizard-choice-card.selected:hover {
        background: var(--accent-muted);
        border-color: var(--accent);
    }

    .wizard-panel .wizard-btn:hover {
        transform: none;
    }

    .wizard-panel .wizard-btn:active {
        transform: scale(0.97);
    }

    .wizard-panel .quick-area-chip,
    .wizard-panel .cp-location-chip,
    .wizard-panel .cp-filter-tag,
    .wizard-panel .cp-range-preset {
        min-height: var(--touch-target-min);
    }
}