/* ═══════════════════════════════════════════
   swiftools · License Page · Premium Styles
   ═══════════════════════════════════════════ */

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

:root {
    --primary: #6d28d9;
    --primary-light: #818cf8;
    --primary-soft: rgba(129, 140, 248, 0.10);
    --primary-glow: rgba(109, 40, 217, 0.15);
    --surface: #f8f9fc;
    --panel: #ffffff;
    --ink: #0f172a;
    --ink-secondary: #334155;
    --muted: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.10);
    --error: #ef4444;
    --error-soft: rgba(239, 68, 68, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow-card: 0 8px 32px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.08);
}

html { scroll-behavior: smooth; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font);
    background: var(--surface);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Animated Mesh Background ─── */
.mesh-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    overflow: hidden;
}
.mesh-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
    animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-1 {
    width: 500px; height: 500px; top: -10%; right: -5%;
    background: radial-gradient(circle, rgba(129,140,248,0.35) 0%, transparent 70%);
    animation-delay: 0s;
}
.orb-2 {
    width: 400px; height: 400px; bottom: -5%; left: -5%;
    background: radial-gradient(circle, rgba(167,139,250,0.30) 0%, transparent 70%);
    animation-delay: -4s;
}
.orb-3 {
    width: 300px; height: 300px; top: 40%; left: 50%;
    background: radial-gradient(circle, rgba(109,40,217,0.15) 0%, transparent 70%);
    animation-delay: -8s;
}
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
    100% { transform: translate(10px, -10px) scale(1.02); }
}

/* ─── Header ─── */
#site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.6);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--ink);
    transition: opacity 0.2s;
}
.brand:hover { opacity: 0.8; }
.brand-logo { flex-shrink: 0; line-height: 0; }
.brand-name {
    font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
    color: var(--ink);
}
.brand-tools {
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; font-weight: 800;
}

/* ─── Main ─── */
#main-content {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 32px 16px; position: relative; z-index: 1;
}
.page-container { width: 100%; max-width: 460px; transition: max-width 0.3s ease; }
.page-container.wide { max-width: 560px; }
@media (min-width: 900px) {
    .page-container.wide { max-width: 900px; }
    .page-container.result-wide { max-width: 780px; }
}

/* ─── Views ─── */
.view { display: none; }
.view.active { display: block; }

/* ─── Glass Card ─── */
.glass-card {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: 32px 28px;
    transition: box-shadow 0.3s;
}
.glass-card:hover { box-shadow: var(--shadow-hover); }

.card-entrance { animation: cardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Card Header ─── */
.card-header-section {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 6px; margin-bottom: 28px;
}
.card-title {
    font-size: 22px; font-weight: 800; letter-spacing: -0.03em;
    color: var(--ink); line-height: 1.2;
}
.card-subtitle {
    font-size: 14px; color: var(--muted); max-width: 280px; line-height: 1.5;
}

/* ─── Product Pill ─── */
.product-pill {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 5px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(129, 140, 248, 0.3);
    font-size: 12px; font-weight: 700; color: var(--primary);
    max-width: 100%;
}
.product-pill .material-symbols-outlined { font-size: 15px; flex-shrink: 0; }
.product-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Icon Badges ─── */
.icon-badge {
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
}
.icon-badge-lg { width: 56px; height: 56px; margin-bottom: 4px; border-radius: 18px; }
.icon-badge-sm { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }

/* ─── Form ─── */
#license-form { display: flex; flex-direction: column; gap: 16px; }
.input-group label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--ink-secondary); margin-bottom: 6px; margin-left: 2px;
}
.input-wrapper {
    position: relative; display: flex; align-items: center;
}
.input-icon {
    position: absolute; left: 14px; font-size: 20px; color: var(--muted);
    pointer-events: none; transition: color 0.2s;
}
.input-wrapper input {
    width: 100%; padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--panel); color: var(--ink);
    font-size: 14px; font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.input-wrapper input::placeholder { color: var(--muted); }
.input-wrapper input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.input-wrapper input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon { color: var(--primary-light); }

/* ─── Buttons ─── */
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 20px;
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    color: #fff; font-size: 14px; font-weight: 600; font-family: var(--font);
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.25);
    position: relative; overflow: hidden;
}
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before { left: 120%; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(109,40,217,0.3); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-arrow { font-size: 18px; transition: transform 0.2s; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn-text {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px; margin-top: 8px;
    background: none; border: none; cursor: pointer;
    font-size: 13px; font-weight: 500; font-family: var(--font);
    color: var(--muted); transition: color 0.2s;
}
.btn-text:hover { color: var(--primary); }

.btn-back {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--line-soft); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-secondary); transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.btn-back:hover { background: var(--primary-soft); color: var(--primary); }

/* ─── Alert ─── */
.alert {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: var(--radius-xs);
    font-size: 12px; line-height: 1.5;
}
.alert-error { background: var(--error-soft); color: var(--error); }
.hidden { display: none !important; }

/* ─── Secure Badge ─── */
.secure-badge {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-top: 20px; opacity: 0.45;
    font-size: 11px; font-weight: 500; color: var(--muted);
}

/* ─── Spinner ─── */
.spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.spinner-brand {
    width: 26px; height: 26px; border-width: 3px;
    border-color: rgba(129, 140, 248, 0.28);
    border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Celebration Icon ─── */
.celebration-icon {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-bottom: 4px;
}
.celebration-ring {
    position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--success);
    opacity: 0; animation: ringPulse 2s ease-out infinite;
}
@keyframes ringPulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ─── License Key Box ─── */
.license-key-container {
    display: flex; align-items: stretch; gap: 10px; margin-bottom: 20px;
}
.license-key-box {
    flex: 1; padding: 14px 16px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1.5px solid rgba(109,40,217,0.18);
    border-radius: var(--radius-sm);
    display: flex; align-items: center;
    position: relative; overflow: hidden;
}
.license-key-box::after {
    content: ''; position: absolute; top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.7), transparent);
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0% { left: -75%; } 60%,100% { left: 125%; }
}
.license-key-box code {
    font-family: 'Inter', monospace; font-size: 14px; font-weight: 700;
    color: var(--primary); letter-spacing: 0.04em;
    word-break: break-all; position: relative; z-index: 1;
}

.btn-copy {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 8px 14px;
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 10px; font-weight: 600; font-family: var(--font);
    transition: transform 0.15s, box-shadow 0.2s;
    min-width: 56px; flex-shrink: 0;
}
.btn-copy:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(109,40,217,0.3); }
.btn-copy:active { transform: scale(0.95); }
.btn-copy.copied { background: var(--success); }

/* ─── Details Grid ─── */
.details-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px;
}
.detail-chip {
    display: flex; flex-direction: column; gap: 3px;
    padding: 12px 14px; border-radius: var(--radius-xs);
    background: var(--line-soft);
}
.detail-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--muted);
}
.detail-value {
    font-size: 13px; font-weight: 600; color: var(--ink);
}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Status Pill ─── */
.status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-active { background: var(--success-soft); color: #059669; }
.pill-active .status-dot { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.pill-inactive { background: var(--error-soft); color: #dc2626; }
.pill-inactive .status-dot { background: #ef4444; }

/* ─── Save Options ─── */
.save-options {
    margin-bottom: 20px;
}
.save-options-label {
    display: block; margin-bottom: 14px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--muted);
}
.save-actions {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.save-btn {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; padding: 12px 6px;
    background: var(--line-soft); border: 1.5px solid var(--line);
    border-radius: var(--radius-xs); cursor: pointer;
    font-size: 11px; font-weight: 600; font-family: var(--font);
    color: var(--ink-secondary);
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}
.save-btn .material-symbols-outlined { font-size: 20px; }
.save-btn:hover {
    border-color: var(--primary-light); background: var(--primary-soft);
    color: var(--primary); transform: translateY(-1px);
}
.save-btn:active { transform: scale(0.97); }
.save-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.save-btn.saved {
    border-color: rgba(16,185,129,0.45); background: var(--success-soft); color: #059669;
}
.save-btn-recommended {
    position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    padding: 2px 7px; border-radius: 999px;
    background: linear-gradient(135deg, #818cf8, #6d28d9); color: #fff;
    font-size: 8px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    white-space: nowrap;
}
.save-hint {
    margin-top: 8px; font-size: 11px; color: var(--muted); text-align: center;
}

/* Shimmer cue on the recommended button once the key is copied */
.save-btn.shimmer-cta {
    background: #fff;
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft), 0 6px 18px rgba(109, 40, 217, 0.16);
    animation: ctaBob 1.8s ease-in-out infinite;
}
.save-btn.shimmer-cta::after {
    content: ''; position: absolute; inset: 0;
    border-radius: inherit; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(109, 40, 217, 0.22) 48%, transparent 66%);
    background-size: 260% 100%;
    animation: btnShimmer 1.8s ease-in-out infinite;
}
@keyframes btnShimmer {
    0% { background-position: 160% 0; }
    100% { background-position: -60% 0; }
}
@keyframes ctaBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* ─── Save Nudge ─── */
.save-nudge {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 14px 16px 16px; margin-bottom: 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    border-left: 4px solid #f59e0b;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.18);
    color: #78350f;
    position: relative;
    animation: nudgeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1), nudgeShake 0.5s 0.45s ease-in-out;
}
.save-nudge-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 10px; background: #f59e0b; color: #fff;
    animation: nudgeIconPulse 1.8s ease-in-out infinite;
}
.save-nudge-icon .material-symbols-outlined {
    font-size: 20px; font-variation-settings: 'FILL' 1, 'wght' 600;
}
.save-nudge-body { flex: 1; min-width: 0; }
.save-nudge-title {
    font-size: 14px; font-weight: 800; letter-spacing: -0.01em;
    color: #78350f; margin-bottom: 3px;
}
.save-nudge-text {
    font-size: 12px; line-height: 1.55; color: #92400e;
}
.save-nudge-text strong { font-weight: 800; }
.save-nudge-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    margin-top: 12px; padding: 10px 16px;
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    color: #fff; font-size: 13px; font-weight: 700; font-family: var(--font);
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
    transition: transform 0.15s, box-shadow 0.2s;
}
.save-nudge-cta .material-symbols-outlined { font-size: 18px; }
.save-nudge-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(109, 40, 217, 0.38); }
.save-nudge-cta:active { transform: scale(0.98); }
.save-nudge-close {
    position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: #b45309; border-radius: 6px; opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}
.save-nudge-close .material-symbols-outlined { font-size: 16px; }
.save-nudge-close:hover { opacity: 1; background: rgba(180, 83, 9, 0.12); }
@keyframes nudgeIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
@keyframes nudgeShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
@keyframes nudgeIconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* ─── Survey (pre-unlock questions) ─── */
.survey-progress {
    height: 6px; border-radius: 999px; overflow: hidden;
    background: var(--line); margin-bottom: 8px;
}
.survey-progress-bar {
    height: 100%; width: 33.33%; border-radius: 999px;
    background: linear-gradient(90deg, #818cf8, #6d28d9);
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.survey-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; font-weight: 600; color: var(--muted);
    margin-bottom: 20px;
}
.survey-value {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; margin-bottom: 20px;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    border: 1px solid rgba(129, 140, 248, 0.28);
    font-size: 12px; line-height: 1.55; color: var(--ink-secondary);
}
.survey-value .material-symbols-outlined { font-size: 18px; color: var(--primary); flex-shrink: 0; }
.survey-value strong { font-weight: 700; color: var(--ink); }

.survey-step { display: none; }
.survey-step.active { display: block; animation: stepIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes stepIn {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: none; }
}
.survey-q {
    font-size: 16px; font-weight: 800; letter-spacing: -0.02em;
    color: var(--ink); line-height: 1.35; margin-bottom: 4px;
}
.survey-help {
    font-size: 12px; line-height: 1.5; color: var(--muted); margin-bottom: 14px;
}
.required-dot { color: var(--error); font-weight: 800; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 9px 14px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--panel);
    font-size: 12.5px; font-weight: 600; font-family: var(--font);
    color: var(--ink-secondary); cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.15s, box-shadow 0.2s;
}
.chip:hover { border-color: var(--primary-light); color: var(--primary); transform: translateY(-1px); }
.chip.selected {
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    border-color: transparent; color: #fff;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 16px 12px;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--panel); cursor: pointer;
    font-size: 13px; font-weight: 700; font-family: var(--font);
    color: var(--ink-secondary);
    transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.15s;
}
.choice-card .material-symbols-outlined { font-size: 24px; color: var(--muted); transition: color 0.18s; }
.choice-card:hover { border-color: var(--primary-light); transform: translateY(-1px); }
.choice-card.selected {
    border-color: var(--primary); background: var(--primary-soft); color: var(--primary);
}
.choice-card.selected .material-symbols-outlined { color: var(--primary); }
.choice-grid { transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.choice-grid.single { grid-template-columns: 1fr 0fr; }
.choice-card.collapsed {
    opacity: 0; padding-left: 0; padding-right: 0;
    pointer-events: none; overflow: hidden;
    border-width: 0; white-space: nowrap;
    transition: opacity 0.2s, padding 0.3s, border-width 0.3s;
}

.survey-textarea, .survey-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--panel); color: var(--ink);
    font-size: 13.5px; font-family: var(--font); line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.survey-textarea { min-height: 92px; resize: vertical; }
.survey-textarea:focus, .survey-input:focus {
    border-color: var(--primary-light); box-shadow: 0 0 0 4px var(--primary-soft);
}
.survey-textarea::placeholder, .survey-input::placeholder { color: var(--muted); }
.reveal-field { margin-top: 10px; }
.char-hint { margin-top: 6px; font-size: 11px; color: var(--muted); text-align: right; }

.survey-nav { display: flex; gap: 10px; margin-top: 22px; }
.survey-nav .btn-primary { flex: 1; }
.btn-secondary {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 14px 18px;
    background: var(--line-soft); border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: 14px; font-weight: 600; font-family: var(--font);
    color: var(--ink-secondary);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-soft); }
.survey-trust {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-top: 16px; font-size: 11px; color: var(--muted);
}
.survey-trust .material-symbols-outlined { font-size: 13px; }

/* ─── Wide-screen layouts: two columns so nothing needs scrolling ─── */
@media (min-width: 900px) {
    #main-content { padding: 24px 16px; }

    .survey-card {
        display: grid; grid-template-columns: 286px 1fr;
        column-gap: 36px; align-items: start;
        padding: 34px 32px;
    }
    .survey-head {
        align-items: flex-start; text-align: left;
        gap: 8px; margin-bottom: 18px;
    }
    .survey-head .card-subtitle { max-width: none; }
    .survey-value { margin-bottom: 0; }
    .survey-main { min-width: 0; }

    .result-card {
        display: grid; grid-template-columns: 1.1fr 0.9fr;
        column-gap: 30px; align-items: start;
        padding: 30px 30px 26px;
    }
    .result-head { grid-column: 1 / -1; margin-bottom: 22px; }
    .result-col { min-width: 0; }
    .result-col .save-options { margin-bottom: 0; }
    .result-col .details-grid { grid-template-columns: 1fr; gap: 8px; }
    .result-card > .promo-inline { grid-column: 1 / -1; margin-top: 24px; }
}

/* ─── Inline promo, shown whenever the desktop rail is not ─── */
.promo-inline {
    display: flex; align-items: center; gap: 14px;
    margin-top: 18px; padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #6d28d9 0%, #3b0f6b 100%);
    box-shadow: 0 8px 24px rgba(49, 16, 105, 0.22);
    color: #fff;
}
.promo-inline-text { flex: 1; min-width: 0; }
.promo-inline-badge {
    display: block; margin-bottom: 5px;
    font-size: 8px; font-weight: 800; letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.65);
}
.promo-inline-title {
    display: block; font-size: 14px; font-weight: 800;
    letter-spacing: -0.01em; margin-bottom: 3px;
}
.promo-inline-desc {
    display: block; font-size: 11.5px; line-height: 1.45;
    color: rgba(255, 255, 255, 0.8);
}
.promo-inline-cta {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    flex-shrink: 0; padding: 11px 16px;
    background: #fff; color: #4c1d95;
    font-size: 12px; font-weight: 700; font-family: var(--font);
    border: none; border-radius: 10px; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.promo-inline-cta .material-symbols-outlined { font-size: 15px; transition: transform 0.2s; }
.promo-inline-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2); }
.promo-inline-cta:hover .material-symbols-outlined { transform: translateX(3px); }
@media (max-width: 520px) {
    .promo-inline { flex-direction: column; align-items: stretch; gap: 12px; }
    .promo-inline-cta { width: 100%; }
}

/* Mobile puts the promo right under the key, above the status details */
@media (max-width: 899px) {
    .result-card { display: flex; flex-direction: column; }
    .result-card > .result-head { order: 1; }
    .result-card > .result-col-main { order: 2; }
    .result-card > .promo-inline { order: 3; margin-top: 4px; margin-bottom: 18px; }
    .result-card > .result-col-side { order: 4; }
}

/* ─── Desktop side promo rail ─── */
.promo-rail {
    display: none;
    position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
    z-index: 80; width: 250px; padding: 22px 20px 20px;
    border-radius: 18px;
    background: linear-gradient(160deg, #6d28d9 0%, #3b0f6b 100%);
    box-shadow: 0 18px 44px rgba(49, 16, 105, 0.32);
    color: #fff;
}
.promo-rail-badge {
    display: inline-block; margin-bottom: 12px;
    font-size: 8.5px; font-weight: 800; letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.72);
}
.promo-rail-title {
    font-size: 17px; font-weight: 800; line-height: 1.28;
    letter-spacing: -0.02em; margin-bottom: 8px;
}
.promo-rail-text {
    font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.82);
    margin-bottom: 14px;
}
.promo-rail-points { list-style: none; margin-bottom: 18px; }
.promo-rail-points li {
    display: flex; align-items: flex-start; gap: 7px;
    font-size: 11.5px; font-weight: 500; line-height: 1.45;
    color: rgba(255, 255, 255, 0.92); margin-bottom: 8px;
}
.promo-rail-points .material-symbols-outlined {
    font-size: 14px; color: #a5f3d0; flex-shrink: 0; margin-top: 1px;
    font-variation-settings: 'FILL' 1;
}
.promo-rail-cta {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 12px 14px;
    background: #fff; color: #4c1d95;
    font-size: 12.5px; font-weight: 700; font-family: var(--font);
    border: none; border-radius: 10px; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.promo-rail-cta .material-symbols-outlined { font-size: 16px; transition: transform 0.2s; }
.promo-rail-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22); }
.promo-rail-cta:hover .material-symbols-outlined { transform: translateX(3px); }
.promo-rail-note {
    display: block; margin-top: 10px; text-align: center;
    font-size: 10px; color: rgba(255, 255, 255, 0.6);
}
@media (min-width: 1360px) {
    body.show-promo-rail .promo-rail {
        display: block;
        animation: railIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
    }
    body.show-promo-rail .promo-inline { display: none; }
}
@keyframes railIn {
    from { opacity: 0; transform: translateY(-50%) translateX(20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ─── Post-download upsell modal ─── */
.promo-modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.promo-modal.visible { display: block; }
.promo-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.promo-modal-card {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100vh - 40px); overflow-y: auto;
    background: var(--panel); border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.promo-modal-strip {
    height: 6px; border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #818cf8, #6d28d9);
}
.promo-modal-close {
    position: absolute; top: 16px; right: 14px; z-index: 2;
    width: 28px; height: 28px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--line-soft); border: none; border-radius: 8px;
    color: var(--muted); cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.promo-modal-close .material-symbols-outlined { font-size: 17px; }
.promo-modal-close:hover { background: var(--line); color: var(--ink); }
.promo-modal-body { padding: 26px 26px 22px; }
.promo-modal-icon {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    color: #fff;
}
.promo-modal-icon .material-symbols-outlined { font-size: 24px; font-variation-settings: 'FILL' 1; }
.promo-modal-title {
    font-size: 19px; font-weight: 800; letter-spacing: -0.03em;
    line-height: 1.25; color: var(--ink); margin-bottom: 8px;
}
.promo-modal-text {
    font-size: 13px; line-height: 1.55; color: var(--ink-secondary); margin-bottom: 16px;
}
.promo-modal-points { list-style: none; margin-bottom: 20px; }
.promo-modal-points li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12.5px; line-height: 1.5; color: var(--ink-secondary);
    margin-bottom: 9px;
}
.promo-modal-points .material-symbols-outlined {
    font-size: 16px; color: var(--success); flex-shrink: 0; margin-top: 1px;
    font-variation-settings: 'FILL' 1;
}
.promo-modal-note {
    margin-top: 10px; text-align: center;
    font-size: 11px; color: var(--muted);
}
body.promo-modal-open { overflow: hidden; }

/* ─── Key emailed confirmation ─── */
.sent-box {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; margin-bottom: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1.5px solid rgba(109, 40, 217, 0.18);
}
.sent-box .material-symbols-outlined {
    font-size: 22px; color: var(--primary); flex-shrink: 0;
    font-variation-settings: 'FILL' 1;
}
.sent-box > div { min-width: 0; }
.sent-box-label {
    display: block; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.sent-box-email {
    display: block; font-size: 14px; font-weight: 700; color: var(--primary);
}
.sent-hint {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 0 2px; margin-bottom: 20px;
    font-size: 12px; line-height: 1.55; color: var(--muted);
}
.sent-hint .material-symbols-outlined { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

/* ─── Guide CTA Button ─── */
.guide-cta {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 14px 16px; margin-bottom: 4px;
    background: var(--line-soft); border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    font-family: var(--font);
}
.guide-cta:hover {
    border-color: var(--primary-light); background: var(--primary-soft);
    transform: translateY(-1px);
}
.guide-cta-left { display: flex; align-items: center; gap: 12px; }
.guide-cta-title { display: block; font-size: 13px; font-weight: 700; color: var(--ink); text-align: left; }
.guide-cta-desc { display: block; font-size: 11px; color: var(--muted); text-align: left; }
.guide-cta-arrow {
    font-size: 20px; color: var(--muted);
    transition: transform 0.2s, color 0.2s;
}
.guide-cta:hover .guide-cta-arrow { transform: translateX(3px); color: var(--primary); }

/* ─── Guide View (Wide Desktop Layout) ─── */
.guide-wide {
    animation: cardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.guide-topbar {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.guide-title {
    font-size: 22px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.03em;
}
.guide-subtitle {
    font-size: 13px; color: var(--muted); margin-top: 2px;
}

/* Steps: wide alternating rows */
.steps-wide {
    display: flex; flex-direction: column; gap: 0;
}
.step-row {
    display: flex; align-items: center; gap: 40px;
    padding: 28px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15,23,42,0.05);
    transition: box-shadow 0.3s, transform 0.25s;
}
.step-row:hover {
    box-shadow: 0 8px 32px rgba(109,40,217,0.08);
    transform: translateY(-2px);
}
.step-row-reversed { flex-direction: row-reverse; }

.step-text-col {
    flex: 1; min-width: 0;
}
.step-img-col {
    flex: 1.2; min-width: 0;
}

.step-badge {
    display: inline-flex; align-items: center;
    padding: 5px 14px; border-radius: 999px;
    background: linear-gradient(135deg, #818cf8, #6d28d9);
    color: #fff; font-size: 11px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    margin-bottom: 12px;
}
.step-badge-success {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.step-heading {
    font-size: 20px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1.3;
}
.step-desc {
    font-size: 14px; color: var(--ink-secondary); line-height: 1.7;
}
.step-desc strong {
    color: var(--primary); font-weight: 600;
}

.step-img-wide {
    width: 100%; border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.step-img-wide:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 36px rgba(109,40,217,0.1);
}

/* Connector between steps */
.step-connector {
    display: flex; justify-content: center; padding: 8px 0;
}
.connector-line {
    width: 2px; height: 32px;
    background: linear-gradient(180deg, var(--primary-light), transparent);
    border-radius: 2px;
}

.guide-bottom-cta {
    margin-top: 32px;
    max-width: 280px;
    margin-left: auto; margin-right: auto;
}

/* ─── Footer ─── */
#site-footer {
    text-align: center; padding: 16px 20px;
    position: relative; z-index: 1;
}
#site-footer p {
    font-size: 11px; color: var(--muted); font-weight: 500;
}

/* ─── Desktop: guide has its own width ─── */
@media (min-width: 768px) {
    #view-guide {
        width: 100%;
        max-width: 940px;
    }
    .guide-wide {
        padding: 0;
    }
    .step-heading { font-size: 22px; }
    .step-desc { font-size: 15px; }
}

/* ─── Mobile Responsive ─── */
@media (max-width: 767px) {
    #main-content { padding: 20px 12px; align-items: flex-start; }
    .glass-card { padding: 24px 20px; border-radius: 20px; }
    .card-title { font-size: 20px; }
    .mesh-orb { opacity: 0.35; }
    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
    .license-key-container { flex-direction: column; gap: 8px; }
    .btn-copy { flex-direction: row; padding: 10px 16px; }
    .details-grid { grid-template-columns: 1fr; }
    .save-btn { font-size: 10px; padding: 10px 4px; }
    .save-btn-recommended { font-size: 7px; padding: 2px 5px; }
    .survey-q { font-size: 15px; }
    .chip { font-size: 12px; padding: 8px 12px; }

    /* Guide: stacked on mobile */
    .step-row,
    .step-row-reversed {
        flex-direction: column; gap: 16px;
        padding: 20px;
    }
    .step-heading { font-size: 17px; }
    .step-desc { font-size: 13px; }
    .guide-topbar { margin-bottom: 20px; padding-bottom: 14px; }
    .guide-title { font-size: 18px; }
    .connector-line { height: 20px; }
    .guide-bottom-cta { margin-top: 20px; }
}

/* ─── Floating support chat widget ─── */
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
}

.chat-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.26);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-fab-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.chat-fab-btn svg {
    width: 22px;
    height: 22px;
}

/* Support popup card */
.support-popup {
    display: none;
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 340px;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    box-shadow: 0 22px 64px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    animation: supportPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.support-popup.visible {
    display: block;
}

@keyframes supportPopIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.support-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.support-popup-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.support-popup-title {
    flex: 1;
    min-width: 0;
}

.support-popup-title p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.support-popup-close {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.support-popup-close:hover {
    background: var(--panel-soft);
    color: var(--ink);
}

.support-popup-close svg {
    width: 16px;
    height: 16px;
}

.support-popup-back {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.support-popup-back:hover {
    background: var(--panel-soft);
    color: var(--ink);
}

.support-popup-back svg {
    width: 16px;
    height: 16px;
}

.support-popup-body {
    padding: 10px;
}

.support-issue-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 11px 12px;
    border: 1px solid transparent;
    background: #ffffff;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.support-issue-btn:hover {
    background: var(--panel-soft);
    border-color: var(--line-soft);
    transform: translateY(-1px);
}

.support-issue-btn+.support-issue-btn {
    margin-top: 4px;
}

.support-issue-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.support-issue-icon svg {
    width: 17px;
    height: 17px;
}

.support-issue-icon.red {
    background: #fef2f2;
    color: #dc2626;
}

.support-issue-icon.amber {
    background: #fffbeb;
    color: #d97706;
}

.support-issue-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.support-issue-icon.teal {
    background: #f0fdfa;
    color: #0f766e;
}

.support-issue-icon.purple {
    background: #faf5ff;
    color: #7c3aed;
}

.support-issue-text {
    flex: 1;
    display: grid;
    gap: 3px;
    min-width: 0;
}

.support-issue-title {
    display: block;
    font-size: 13px;
    font-weight: 720;
    color: var(--ink);
    line-height: 1.25;
}

.support-issue-desc {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.45;
}

.support-issue-arrow {
    width: 16px;
    height: 16px;
    color: #98a2b3;
    flex-shrink: 0;
    transition: transform 0.15s, color 0.15s;
}

.support-issue-btn:hover .support-issue-arrow {
    color: var(--accent);
    transform: translateX(2px);
}

.support-selected-issue {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--ink);
    font-size: 12px;
    line-height: 1.4;
}

.support-selected-issue svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
    flex-shrink: 0;
}

.support-selected-issue strong {
    font-weight: 760;
}

/* Channel picker step */
.support-channel-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    background: #ffffff;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    margin-bottom: 8px;
}

.support-channel-btn:last-child {
    margin-bottom: 0;
}

.support-channel-btn:hover {
    background: var(--panel-soft);
    border-color: var(--line);
    transform: translateY(-1px);
}

.support-channel-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.support-channel-icon svg {
    width: 18px;
    height: 18px;
}

.support-channel-icon.whatsapp {
    background: #25d366;
    color: #fff;
}

.support-channel-icon.email {
    background: #2563eb;
    color: #fff;
}

.support-channel-text {
    flex: 1;
    display: grid;
    gap: 3px;
    min-width: 0;
}

.support-channel-title {
    display: block;
    font-size: 13px;
    font-weight: 720;
    color: var(--ink);
    line-height: 1.25;
}

.support-channel-desc {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.45;
}

.support-step {
    display: none;
}

.support-step.visible {
    display: block;
}

@media (max-width: 520px) {
    .chat-fab {
        right: 18px;
        bottom: 18px;
    }

    .support-popup {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 84px;
        width: auto;
        max-height: min(560px, calc(100vh - 120px));
        overflow-y: auto;
        transform-origin: bottom right;
    }
}

@media (max-width: 520px) {
    body.support-popup-open {
        overflow: hidden;
    }

    .support-popup {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        overflow: hidden;
        transform-origin: center;
        animation: supportSheetIn 0.22s ease-out;
    }

    .support-popup.visible {
        display: flex;
        flex-direction: column;
    }

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

    .support-step.visible {
        display: flex;
        flex: 1;
        min-height: 0;
        flex-direction: column;
    }

    .support-popup-header {
        padding: 18px 18px 14px;
        flex-shrink: 0;
    }

    .support-popup-body {
        flex: 1;
        min-height: 0;
        padding: 14px;
        overflow-y: auto;
    }

    .support-issue-btn {
        min-height: 64px;
        padding: 12px;
        gap: 10px;
        border-radius: 12px;
    }

    .support-issue-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .chat-fab {
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .chat-fab-btn {
        width: 48px;
        height: 48px;
    }

    .chat-fab-btn {
        display: none;
    }
}

[dir="rtl"] .chat-fab {
    right: auto;
    left: 24px;
}

[dir="rtl"] .support-popup {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

[dir="rtl"] .support-issue-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .support-issue-btn:hover .support-issue-arrow {
    transform: scaleX(-1) translateX(-2px);
}

[dir="rtl"] .support-issue-btn,
[dir="rtl"] .support-channel-btn {
    text-align: right;
}

/* Header Help Button */
.header-help-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--panel);
    color: var(--ink-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.header-help-btn:hover {
    border-color: var(--primary-light);
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateY(-0.5px);
}

.header-help-btn:active {
    transform: scale(0.98);
}



