/* PLATplus Signup Wizard */

:root,
html[data-sg-theme="light"] {
    --sg-primary: #7B61FF;
    --sg-blue: #00A3FF;
    --sg-dark: #0F172A;
    --sg-text: #334155;
    --sg-muted: #64748B;
    --sg-border: #E2E8F0;
    --sg-bg: #F8FAFC;
    --sg-surface: #ffffff;
    --sg-surface-2: #F1F5F9;
    --sg-gradient: linear-gradient(135deg, #00A3FF 0%, #7B61FF 55%, #6366F1 100%);
    --sg-radius: 18px;
    --sg-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
    --sg-glow-a: rgba(0, 163, 255, 0.12);
    --sg-glow-b: rgba(123, 97, 255, 0.14);
    --sg-grid-line: rgba(123, 97, 255, 0.04);
    --sg-input-bg: #ffffff;
    --sg-top-link: #64748B;
}

html[data-sg-theme="dark"] {
    --sg-primary: #A78BFA;
    --sg-blue: #38BDF8;
    --sg-dark: #F8FAFC;
    --sg-text: #CBD5E1;
    --sg-muted: #94A3B8;
    --sg-border: #334155;
    --sg-bg: #0B1220;
    --sg-surface: #111827;
    --sg-surface-2: #1E293B;
    --sg-gradient: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 55%, #6366F1 100%);
    --sg-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    --sg-glow-a: rgba(56, 189, 248, 0.12);
    --sg-glow-b: rgba(167, 139, 250, 0.16);
    --sg-grid-line: rgba(148, 163, 184, 0.06);
    --sg-input-bg: #0F172A;
    --sg-top-link: #94A3B8;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

body.sg-body {
    margin: 0;
    font-family: Vazirmatn, Tahoma, 'Segoe UI', sans-serif;
    color: var(--sg-text);
    background: var(--sg-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

.sg-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, var(--sg-glow-a), transparent),
        radial-gradient(ellipse 70% 50% at 90% 10%, var(--sg-glow-b), transparent),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(99, 102, 241, 0.08), transparent);
}

.sg-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--sg-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--sg-grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
}

.sg-wrap {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.sg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sg-logo img { height: 34px; width: auto; }

.sg-top__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sg-top a {
    color: var(--sg-top-link);
    text-decoration: none;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sg-top a:hover { color: var(--sg-primary); }

.sg-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid var(--sg-border);
    background: var(--sg-surface);
    color: var(--sg-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.05rem;
}

.sg-theme-toggle:hover {
    border-color: var(--sg-primary);
    transform: translateY(-1px);
}

.sg-theme-toggle__sun { display: none; }
html[data-sg-theme="dark"] .sg-theme-toggle__moon { display: none; }
html[data-sg-theme="dark"] .sg-theme-toggle__sun { display: inline; color: #FBBF24; }

.sg-logo__dark { display: none; }
html[data-sg-theme="dark"] .sg-logo__light { display: none; }
html[data-sg-theme="dark"] .sg-logo__dark {
    display: block;
    filter: brightness(1.15) saturate(1.05);
}

.sg-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

.sg-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(123, 97, 255, 0.1);
    color: var(--sg-primary);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.sg-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    color: var(--sg-dark);
    font-weight: 800;
}

.sg-hero p {
    margin: 0;
    color: var(--sg-muted);
    font-size: 0.95rem;
}

.sg-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--sg-surface) 88%, transparent);
    border: 1px solid var(--sg-border);
    backdrop-filter: blur(8px);
}

.sg-progress__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: var(--sg-muted);
    font-weight: 500;
    transition: color 0.25s;
}

.sg-step-label {
    max-width: 72px;
    line-height: 1.25;
    text-align: center;
    font-weight: 500;
}

@media (min-width: 640px) {
    .sg-progress__item { font-size: 0.8rem; }
    .sg-step-label { max-width: none; }
}

.sg-progress__item.is-active {
    color: var(--sg-dark);
    font-weight: 700;
}

.sg-progress__item.is-done {
    color: #059669;
    font-weight: 600;
}

.sg-progress__dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    background: #fff;
    border: 2.5px solid var(--sg-border);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.35s ease;
}

.sg-progress__item.is-active .sg-progress__dot {
    border-color: transparent;
    background: var(--sg-gradient);
    color: #fff;
    box-shadow: 0 6px 18px rgba(123, 97, 255, 0.42);
    transform: scale(1.08);
}

.sg-progress__item.is-done .sg-progress__dot {
    border-color: #10B981;
    background: #10B981;
    color: #fff;
}

.sg-progress__line {
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: var(--sg-border);
    margin: 0 0.2rem;
    transition: background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: center;
}

.sg-progress__line.is-done {
    background: #10B981;
}

.sg-card {
    background: var(--sg-surface);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    border: 1px solid color-mix(in srgb, var(--sg-border) 80%, transparent);
    overflow: hidden;
}

.sg-card__body { padding: 1.5rem 1.35rem; }

@media (min-width: 640px) {
    .sg-card__body { padding: 2rem 2.25rem; }
}

.sg-pane { display: none; }
.sg-pane.is-active {
    display: block;
    animation: sgPaneIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sg-pane.is-active.is-enter-back {
    animation-name: sgPaneInBack;
}

@keyframes sgPaneIn {
    from {
        opacity: 0;
        transform: translate3d(-22px, 6px, 0) scale(0.985);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes sgPaneInBack {
    from {
        opacity: 0;
        transform: translate3d(22px, 6px, 0) scale(0.985);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes sgCardRise {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sgSelectConfirm {
    0% { transform: scale(1); }
    35% { transform: scale(1.035); }
    100% { transform: scale(1); }
}

@keyframes sgCheckPop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.sg-pane h2 {
    margin: 0 0 0.35rem;
    font-size: 1.28rem;
    color: var(--sg-dark);
    font-weight: 800;
}

.sg-pane__sub {
    margin: 0 0 1rem;
    color: var(--sg-muted);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.55;
}

.sg-step-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--sg-primary);
    text-transform: uppercase;
}

.sg-field { margin-bottom: 1rem; }

.sg-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sg-dark);
    margin-bottom: 0.4rem;
}

.sg-input, .sg-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--sg-border);
    border-radius: 12px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--sg-dark);
    background: var(--sg-input-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sg-input:focus, .sg-select:focus {
    outline: none;
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.15);
}

/* —— Step 4 hierarchy —— */
.sg-services-board {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sg-section {
    --sg-section: #7B61FF;
    padding: 0.85rem 0.9rem 0.95rem;
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sg-section) 7%, #fff), #fff 55%),
        #fff;
    border: 1px solid color-mix(in srgb, var(--sg-section) 18%, var(--sg-border));
}

.sg-section__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.sg-section__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--sg-section) 28%, transparent);
}

.sg-section__titles { flex: 1; min-width: 0; }

.sg-section__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--sg-dark);
    line-height: 1.3;
}

.sg-section__sub {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--sg-muted);
    line-height: 1.4;
}

.sg-section__count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--sg-muted);
    background: rgba(15, 23, 42, 0.04);
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.sg-group-label {
    display: none;
}

.sg-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (min-width: 640px) {
    .sg-services {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

.sg-services--single {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .sg-services--single {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    }
    .sg-services--single .sg-svc {
        grid-column: 1 / -1;
        max-width: 420px;
    }
}

.sg-svc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    cursor: pointer;
    border: 1.5px solid var(--sg-border);
    border-radius: 14px;
    padding: 0.75rem 0.7rem 0.65rem;
    background: #fff;
    transition: border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.35s ease;
    user-select: none;
    min-height: 100%;
    animation: sgCardRise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--sg-i, 0) * 28ms);
}

.sg-svc:hover {
    border-color: color-mix(in srgb, var(--sg-section) 40%, var(--sg-border));
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.sg-svc.is-selected {
    border-color: var(--sg-primary);
    background: linear-gradient(160deg, rgba(123, 97, 255, 0.12), rgba(0, 163, 255, 0.06) 60%, #fff);
    box-shadow: 0 10px 28px rgba(123, 97, 255, 0.22);
}

.sg-svc--featured {
    grid-column: span 2;
    padding: 0.95rem 0.9rem 0.8rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--sg-section) 9%, #fff), #fff);
    border-color: color-mix(in srgb, var(--sg-section) 28%, var(--sg-border));
}

@media (min-width: 640px) {
    .sg-svc--featured {
        grid-column: span 2;
    }
}

.sg-svc--featured .sg-svc__icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
}

.sg-svc--featured .sg-svc__name {
    font-size: 0.95rem;
}

.sg-svc--featured .sg-svc__desc {
    display: block;
}

.sg-svc input { position: absolute; opacity: 0; pointer-events: none; }

.sg-svc__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.sg-svc__body { flex: 1; min-width: 0; }

.sg-svc__name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--sg-dark);
    line-height: 1.35;
}

.sg-svc__desc {
    display: none;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--sg-muted);
    line-height: 1.4;
}

.sg-svc__badge {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    line-height: 1.2;
}

.sg-svc__badge--hot {
    background: #FEF3C7;
    color: #B45309;
}

.sg-svc__badge--star {
    background: #EDE9FE;
    color: #6D28D9;
}

.sg-svc__check {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--sg-border);
    background: var(--sg-surface);
    color: transparent;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    transition: all 0.2s;
}

.sg-svc.is-selected .sg-svc__check {
    border-color: transparent;
    background: var(--sg-gradient);
    color: #fff;
    box-shadow: 0 4px 10px rgba(123, 97, 255, 0.35);
}

.sg-svc__main {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.sg-svc__info-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--sg-primary);
}

.sg-svc__price {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.22rem 0.5rem;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #047857;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    line-height: 1.3;
    white-space: normal;
    max-width: 9.5rem;
}

.sg-svc__monthly {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    color: #0F766E;
    opacity: 0.9;
}

.sg-svc__price.is-free {
    color: #64748B;
    background: #F1F5F9;
    border-color: #E2E8F0;
    font-weight: 600;
}

.sg-svc__dep {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.66rem;
    color: #D97706;
    font-weight: 500;
}

.sg-group-hint {
    margin: -0.15rem 0 0.65rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: #B45309;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
}

/* Sector (step 1) */
.sg-sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.sg-sector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    text-align: right;
    padding: 1rem;
    border: 2px solid var(--sg-border);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.35s ease;
    font: inherit;
    color: inherit;
    animation: sgCardRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--sg-i, 0) * 45ms);
}

.sg-sector:hover {
    border-color: rgba(123, 97, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.sg-sector.is-selected {
    border-color: var(--sg-primary);
    background: linear-gradient(135deg, rgba(0, 163, 255, 0.05), rgba(123, 97, 255, 0.08));
    box-shadow: 0 8px 24px rgba(123, 97, 255, 0.15);
}

.sg-sector.is-confirming {
    animation: sgSelectConfirm 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-sector__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-sector.is-selected .sg-sector__icon,
.sg-sector:hover .sg-sector__icon {
    transform: scale(1.06);
}

.sg-sector__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sg-sector__body strong {
    font-size: 0.92rem;
    color: var(--sg-dark);
}

.sg-sector__body span {
    font-size: 0.75rem;
    color: var(--sg-muted);
}

.sg-sector__check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--sg-gradient);
    color: #fff;
    display: none;
    place-items: center;
    font-size: 0.7rem;
}

.sg-sector.is-selected .sg-sector__check {
    display: grid;
    animation: sgCheckPop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Profession (step 2) */
.sg-search-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.sg-search-wrap > i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sg-muted);
    pointer-events: none;
}

.sg-search-input {
    padding-right: 2.75rem !important;
}

.sg-prof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.65rem;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.15rem;
}

.sg-prof {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
    text-align: right;
    padding: 0.85rem;
    border: 2px solid var(--sg-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.35s ease;
    font: inherit;
    color: inherit;
    animation: sgCardRise 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--sg-i, 0) * 35ms);
}

.sg-prof:hover {
    border-color: rgba(123, 97, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.sg-prof.is-selected {
    border-color: var(--sg-primary);
    background: linear-gradient(135deg, rgba(0, 163, 255, 0.05), rgba(123, 97, 255, 0.08));
}

.sg-prof.is-confirming {
    animation: sgSelectConfirm 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-prof__icon { font-size: 1.35rem; }

.sg-prof__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sg-prof__body strong {
    font-size: 0.82rem;
    color: var(--sg-dark);
    line-height: 1.35;
}

.sg-prof__body span {
    font-size: 0.72rem;
    color: var(--sg-muted);
    line-height: 1.4;
}

.sg-prof__check {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sg-gradient);
    color: #fff;
    display: none;
    place-items: center;
    font-size: 0.6rem;
}

.sg-prof.is-selected .sg-prof__check {
    display: grid;
    animation: sgCheckPop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Selected chip (step 3) */
.sg-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(123, 97, 255, 0.1);
    color: var(--sg-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sg-selected-chip i { font-size: 1rem; }

.sg-bundle-total {
    margin-top: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 163, 255, 0.08), rgba(123, 97, 255, 0.12));
    border: 1.5px solid rgba(123, 97, 255, 0.25);
}

.sg-bundle-total__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--sg-muted);
    margin-bottom: 0.35rem;
}

.sg-bundle-total__row strong {
    color: var(--sg-dark);
    font-size: 1.15rem;
}

.sg-bundle-total__hint {
    font-size: 0.78rem;
    color: #10B981;
    margin-top: 0.5rem;
}

.sg-bundle-lines {
    border: 1px solid var(--sg-border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
}

.sg-bundle-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--sg-border);
    align-items: center;
}

.sg-bundle-line:last-child { border-bottom: none; }

.sg-bundle-line--plan {
    background: rgba(123, 97, 255, 0.06);
    font-weight: 600;
}

.sg-bundle-line--implied {
    background: rgba(245, 158, 11, 0.06);
}

.sg-bundle-line--explicit {
    background: rgba(99, 102, 241, 0.04);
}

.sg-bundle-line--included {
    background: rgba(16, 185, 129, 0.05);
}

.sg-bundle-line--addon .sg-bundle-line__price {
    color: var(--sg-primary);
    font-weight: 700;
}

.sg-bundle-line__name {
    color: var(--sg-dark);
    line-height: 1.4;
}

.sg-bundle-line__note {
    display: block;
    font-size: 0.72rem;
    color: var(--sg-muted);
    font-weight: 400;
}

.sg-bundle-line__price {
    white-space: nowrap;
    font-size: 0.82rem;
    text-align: left;
}

.sg-bundle-line__price.is-free {
    color: #10B981;
    font-weight: 600;
}

.sg-bundle-line__price.is-implied {
    color: #D97706;
    font-weight: 600;
    font-size: 0.78rem;
}

.sg-bundle-line__price.is-muted {
    color: var(--sg-muted);
}

.sg-bundle-line__price small {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--sg-muted);
}

.sg-bundle-line__monthly {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 600;
    color: #0F766E;
    white-space: normal;
    max-width: 11rem;
}

.sg-bundle__explicit {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--sg-dark);
}

.sg-bundle-total__row--grand {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(123, 97, 255, 0.25);
}

.sg-bundle-total__note {
    font-size: 0.76rem;
    color: #D97706;
    margin: 0.25rem 0 0.5rem;
}

.sg-plan-card__reason {
    margin: 0.65rem 0 0;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
    line-height: 1.5;
}

.sg-bundle {
    margin-top: 0.5rem;
}

.sg-bundle h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: var(--sg-dark);
}

.sg-bundle p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--sg-muted);
}

.sg-plan-card {
    border-radius: 16px;
    padding: 1.25rem;
    background: var(--sg-gradient);
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.sg-plan-card h3 { margin: 0 0 0.25rem; font-size: 1.35rem; position: relative; }

.sg-plan-card__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
}

.sg-plan-card__price {
    font-size: 1.5rem;
    font-weight: 800;
    position: relative;
}

.sg-plan-card__price small { font-size: 0.75rem; font-weight: 500; opacity: 0.85; }

.sg-plan-card p {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    opacity: 0.92;
    position: relative;
}

.sg-shelves-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--sg-dark);
    margin-bottom: 0.85rem;
}

.sg-shelves { display: grid; gap: 0.75rem; }

.sg-shelf {
    border: 1.5px solid var(--sg-border);
    border-radius: 14px;
    padding: 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: start;
    cursor: pointer;
    transition: all 0.2s;
}

.sg-shelf:hover { border-color: rgba(123, 97, 255, 0.4); }

.sg-shelf.is-selected {
    border-color: var(--sg-primary);
    background: rgba(123, 97, 255, 0.04);
}

.sg-shelf__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sg-bg);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: var(--sg-primary);
}

.sg-shelf__body h4 { margin: 0 0 0.2rem; font-size: 0.92rem; color: var(--sg-dark); }
.sg-shelf__body p { margin: 0; font-size: 0.8rem; color: var(--sg-muted); line-height: 1.45; }

.sg-shelf__meta { text-align: left; min-width: 90px; }
.sg-shelf__price { font-weight: 800; font-size: 0.9rem; color: var(--sg-dark); }
.sg-shelf__save { font-size: 0.72rem; color: #10B981; }

.sg-shelf__badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(123, 97, 255, 0.12);
    color: var(--sg-primary);
    font-size: 0.68rem;
    font-weight: 600;
}

.sg-summary {
    background: var(--sg-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--sg-muted);
    line-height: 1.6;
}

.sg-summary strong { color: var(--sg-dark); }

.sg-hint { font-size: 0.8rem; color: var(--sg-muted); margin-top: 0.35rem; }

.sg-test-code {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: #FEF3C7;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #92400E;
}

.sg-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sg-alert--error {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.sg-alert--info {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

.sg-alert--warn {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
    align-items: flex-start;
}

.sg-alert--warn ul {
    margin: 0.35rem 0 0;
    padding-right: 1.1rem;
    font-size: 0.82rem;
}

.sg-alert--warn p {
    margin: 0.15rem 0;
}

.sg-alert--warn strong {
    display: block;
    margin-bottom: 0.15rem;
}

.sg-actions {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.1rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.sg-pane--services .sg-actions {
    margin-top: 0.85rem;
}

.sg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 1.35rem;
    border-radius: 12px;
    border: none;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.25s ease,
                filter 0.25s ease;
}

.sg-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.sg-btn--primary {
    background: var(--sg-gradient);
    color: #fff;
    box-shadow: 0 6px 20px rgba(123, 97, 255, 0.3);
}

.sg-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(123, 97, 255, 0.4);
}

.sg-btn--cta {
    flex: 1;
    min-height: 52px;
    padding: 0.95rem 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(123, 97, 255, 0.42);
    letter-spacing: -0.01em;
}

.sg-btn--cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(123, 97, 255, 0.5);
}

.sg-btn--ghost {
    background: #fff;
    color: var(--sg-muted);
    border: 1.5px solid var(--sg-border);
}

.sg-btn--ghost:hover:not(:disabled) {
    border-color: var(--sg-primary);
    color: var(--sg-primary);
}

.sg-btn__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sgSpin 0.7s linear infinite;
}

@keyframes sgSpin { to { transform: rotate(360deg); } }

/* Step 5 — smart offer */
.sg-smart-offer {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(0, 163, 255, 0.08));
    border: 1.5px solid rgba(16, 185, 129, 0.28);
}

.sg-smart-offer__head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.sg-smart-offer__head > i {
    font-size: 1.35rem;
    color: #10B981;
    margin-top: 0.1rem;
}

.sg-smart-offer__head strong {
    display: block;
    font-size: 0.95rem;
    color: var(--sg-dark);
}

.sg-smart-offer__head span {
    display: block;
    font-size: 0.78rem;
    color: var(--sg-muted);
    margin-top: 0.15rem;
}

.sg-smart-offer__match {
    margin: 0 0 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    font-size: 0.82rem;
}

.sg-smart-offer__match i {
    margin-left: 0.25rem;
}

.sg-smart-offer__card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--sg-border);
    margin-bottom: 0.55rem;
}

.sg-smart-offer__card:last-child {
    margin-bottom: 0;
}

.sg-smart-offer__card--save {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.04);
}

.sg-smart-offer__card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.sg-smart-offer__card-body strong {
    display: block;
    font-size: 0.86rem;
    color: var(--sg-dark);
    margin-bottom: 0.2rem;
}

.sg-smart-offer__card-body p {
    margin: 0;
    font-size: 0.76rem;
    color: var(--sg-muted);
    line-height: 1.5;
}

.sg-smart-offer__plain {
    margin: 0;
    font-size: 0.8rem;
    color: var(--sg-muted);
}

.sg-loading { text-align: center; padding: 2rem; color: var(--sg-muted); }

.sg-loading i {
    font-size: 1.5rem;
    animation: sgSpin 1s linear infinite;
    display: block;
    margin-bottom: 0.5rem;
}

.sg-success { text-align: center; padding: 2rem 1rem; }
.sg-success i { font-size: 3rem; color: #10B981; margin-bottom: 0.75rem; }
.sg-success h3 { margin: 0 0 0.5rem; color: var(--sg-dark); }

.sg-footer-note {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--sg-muted);
}

.sg-footer-note a { color: var(--sg-primary); text-decoration: none; }

/* —— Gift welcome modal —— */
body.sg-gift-open { overflow: hidden; }

.sg-gift {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.sg-gift__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

html[data-sg-theme="dark"] .sg-gift__backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.sg-gift__card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 1.75rem 1.4rem 1.4rem;
    border-radius: 22px;
    background: var(--sg-surface);
    border: 1px solid var(--sg-border);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    text-align: center;
    animation: sgGiftIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sgGiftIn {
    from { opacity: 0; transform: translateY(22px) scale(0.94); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: none; }
}

.sg-gift__ribbon {
    width: 64px;
    height: 64px;
    margin: -2.6rem auto 0.85rem;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    color: #fff;
    background: linear-gradient(135deg, #F59E0B, #EF4444 55%, #EC4899);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
}

.sg-gift__eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #D97706;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

html[data-sg-theme="dark"] .sg-gift__eyebrow { color: #FBBF24; }

.sg-gift__card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--sg-dark);
    line-height: 1.45;
}

.sg-gift__text {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--sg-text);
    line-height: 1.75;
}

.sg-gift__text strong { color: var(--sg-dark); font-weight: 700; }
.sg-gift__text em {
    font-style: normal;
    font-weight: 700;
    color: var(--sg-primary);
}

.sg-gift__hint {
    margin: 0 0 1.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--sg-primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--sg-primary) 22%, transparent);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--sg-muted);
    line-height: 1.55;
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    text-align: right;
}

.sg-gift__hint i { color: var(--sg-primary); margin-top: 0.1rem; }

.sg-gift__card .sg-btn--cta {
    width: 100%;
    flex: 0 0 auto;
    max-width: 100%;
    white-space: normal;
    box-sizing: border-box;
}

/* —— Dark theme surface polish —— */
html[data-sg-theme="dark"] .sg-progress {
    background: rgba(17, 24, 39, 0.85);
    border-color: var(--sg-border);
}

html[data-sg-theme="dark"] .sg-progress__dot {
    background: var(--sg-surface-2);
}

html[data-sg-theme="dark"] .sg-svc,
html[data-sg-theme="dark"] .sg-sector,
html[data-sg-theme="dark"] .sg-prof {
    background: var(--sg-surface-2);
    border-color: var(--sg-border);
}

html[data-sg-theme="dark"] .sg-svc.is-selected {
    background: linear-gradient(160deg, rgba(167, 139, 250, 0.22), rgba(56, 189, 248, 0.08) 60%, var(--sg-surface-2));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

html[data-sg-theme="dark"] .sg-section {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sg-section) 14%, transparent), var(--sg-surface-2) 55%),
        var(--sg-surface-2);
    border-color: color-mix(in srgb, var(--sg-section) 28%, var(--sg-border));
}

html[data-sg-theme="dark"] .sg-btn--ghost {
    background: var(--sg-surface-2);
    color: var(--sg-muted);
}

html[data-sg-theme="dark"] .sg-promo {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(56, 189, 248, 0.1));
}

html[data-sg-theme="dark"] .sg-promo__code {
    background: var(--sg-surface-2);
}

html[data-sg-theme="dark"] .sg-smart-offer__card {
    background: var(--sg-surface-2);
}

html[data-sg-theme="dark"] .sg-bundle-lines {
    border-color: var(--sg-border);
    background: var(--sg-surface-2);
}

html[data-sg-theme="dark"] .sg-bundle-line {
    border-color: var(--sg-border);
}

html[data-sg-theme="dark"] .sg-alert--warn {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #FCD34D;
}

html[data-sg-theme="dark"] .sg-svc__price {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6EE7B7;
}

html[data-sg-theme="dark"] .sg-svc__price.is-free {
    background: rgba(148, 163, 184, 0.12);
    border-color: var(--sg-border);
    color: var(--sg-muted);
}

.sg-bundle-total__row--disc span:last-child { color: #059669; font-weight: 700; }

.sg-promo {
    margin-bottom: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(0, 163, 255, 0.08));
    border: 1.5px solid rgba(16, 185, 129, 0.35);
}

.sg-promo__head {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.sg-promo__head > i { font-size: 1.35rem; color: #10B981; }

.sg-promo__head strong {
    display: block;
    color: var(--sg-dark);
    font-size: 0.95rem;
}

.sg-promo__head span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--sg-muted);
}

.sg-promo__code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed #10B981;
}

.sg-promo__code > span { font-size: 0.75rem; color: var(--sg-muted); }

.sg-promo__code code {
    font-family: Vazirmatn, monospace;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #047857;
    background: #ECFDF5;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
}

.sg-promo__code em {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 700;
    color: #B45309;
    background: #FEF3C7;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.sg-pay {
    margin-bottom: 1rem;
    padding: 1.25rem 1.2rem;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(145deg, #0F172A, #1E293B);
    color: #E2E8F0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}

.sg-pay__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94A3B8;
    margin-bottom: 0.35rem;
}

.sg-pay__was {
    font-size: 1rem;
    font-weight: 500;
    color: #94A3B8;
    transition: opacity 0.3s;
}

.sg-pay__was.is-struck {
    text-decoration: line-through;
    opacity: 0.7;
}

.sg-pay__now {
    margin-top: 0.15rem;
    font-size: clamp(1.55rem, 5vw, 2.05rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.sg-pay__save {
    margin-top: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: #6EE7B7;
    font-size: 0.82rem;
    font-weight: 700;
}

.sg-pay__hint {
    margin: 0.55rem 0 0;
    font-size: 0.7rem;
    font-weight: 400;
    color: #64748B;
}

.sg-promo__floor {
    margin: 0.65rem 0 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: #047857;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.45;
}

html[data-sg-theme="dark"] .sg-promo__floor { color: #6EE7B7; }

.sg-svc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.sg-svc-toolbar__hint {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sg-muted);
    margin-right: auto;
}

.sg-btn--sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    min-height: auto;
    border-radius: 10px;
}

body.sg-detail-open,
body.sg-lightbox-open { overflow: hidden; }

.sg-detail {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.sg-detail__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

html[data-sg-theme="dark"] .sg-detail__backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.sg-detail__card {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(92vh, 920px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: var(--sg-surface);
    border: 1px solid var(--sg-border);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3);
    animation: sgGiftIn 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-detail__hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--sg-surface-2);
    flex-shrink: 0;
    overflow: hidden;
}

.sg-detail__hero-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 2.8rem;
}

.sg-detail__hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.sg-detail__hero-img:not([hidden]) {
    z-index: 1;
}

.sg-detail__hero-zoom {
    position: absolute;
    z-index: 2;
    bottom: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, transform 0.15s ease;
}

.sg-detail__hero-zoom:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

.sg-detail__hero-zoom[hidden] { display: none !important; }

.sg-detail__body {
    padding: 1.25rem 1.5rem 1.4rem;
    overflow-y: auto;
}

/* Mobile: detail modal fills the viewport */
@media (max-width: 720px) {
    .sg-detail {
        padding: 0;
        place-items: stretch;
    }

    .sg-detail__card {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        min-height: 100dvh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .sg-detail__hero {
        aspect-ratio: 16 / 10;
        max-height: 42dvh;
    }

    .sg-detail__close {
        top: max(0.65rem, env(safe-area-inset-top));
        left: max(0.65rem, env(safe-area-inset-left));
        z-index: 3;
        background: rgba(255, 255, 255, 0.92);
    }

    html[data-sg-theme="dark"] .sg-detail__close {
        background: rgba(17, 24, 39, 0.92);
    }

    .sg-detail__body {
        flex: 1;
        padding: 1.1rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom));
    }
}

@media (min-width: 900px) {
    .sg-detail__card {
        width: min(840px, 94vw);
    }

    .sg-detail__hero {
        min-height: 280px;
    }
}

/* —— Image lightbox —— */
.sg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(2, 6, 23, 0.94);
}

.sg-lightbox[hidden] { display: none !important; }

.sg-lightbox__backdrop {
    position: absolute;
    inset: 0;
}

.sg-lightbox__toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: max(0.65rem, env(safe-area-inset-top)) 0.85rem 0.65rem;
}

.sg-lightbox__btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.sg-lightbox__btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sg-lightbox__btn--close {
    margin-inline-start: 0.35rem;
}

.sg-lightbox__level {
    min-width: 4.2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 700;
}

.sg-lightbox__stage {
    position: relative;
    z-index: 1;
    overflow: auto;
    display: grid;
    place-items: center;
    padding: 0.5rem 0.75rem max(1rem, env(safe-area-inset-bottom));
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
}

.sg-lightbox__img {
    max-width: min(100%, 1200px);
    max-height: calc(100dvh - 5.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.18s ease;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 4px;
}

.sg-detail__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--sg-primary);
}

.sg-detail__copy {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--sg-text);
    line-height: 1.8;
}

.sg-detail__copy p { margin: 0 0 0.65rem; }
.sg-detail__copy p:last-child { margin-bottom: 0; }

.sg-detail__tip {
    margin: 0 0 1rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--sg-primary) 8%, transparent);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--sg-muted);
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    line-height: 1.45;
}

.sg-detail__tip i { color: var(--sg-primary); margin-top: 0.1rem; }

.sg-detail__body .sg-btn--cta { width: 100%; }

.sg-detail__close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--sg-border);
    background: var(--sg-surface-2, var(--sg-surface));
    color: var(--sg-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.sg-detail__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.sg-detail__card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--sg-dark);
}

.sg-detail__price {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #047857;
}

.sg-detail__monthly {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0F766E;
    line-height: 1.45;
}

html[data-sg-theme="dark"] .sg-detail__price { color: #6EE7B7; }
html[data-sg-theme="dark"] .sg-detail__monthly { color: #5EEAD4; }

.sg-detail__long {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--sg-text);
    line-height: 1.7;
}

.sg-detail__list {
    list-style: none;
    margin: 0 0 1.15rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.sg-detail__list li {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--sg-primary) 7%, transparent);
    font-size: 0.82rem;
    color: var(--sg-dark);
    line-height: 1.45;
}

.sg-detail__list i {
    color: #10B981;
    margin-top: 0.1rem;
}

.sg-detail__actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sg-detail__actions .sg-btn { flex: 1; min-width: 120px; }

/* —— Mobile app shell (fullscreen like native app) —— */
@media (max-width: 720px) {
    html {
        height: 100%;
    }

    body.sg-body {
        height: 100%;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .sg-bg {
        opacity: 0.55;
    }

    .sg-wrap {
        max-width: none;
        width: 100%;
        height: 100%;
        height: 100dvh;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .sg-top {
        flex-shrink: 0;
        margin: 0;
        padding: max(0.55rem, env(safe-area-inset-top)) 0.85rem 0.55rem;
        background: color-mix(in srgb, var(--sg-surface) 94%, transparent);
        border-bottom: 1px solid var(--sg-border);
        backdrop-filter: blur(10px);
        z-index: 6;
    }

    .sg-logo img { height: 28px; }

    .sg-top a {
        font-size: 0.78rem;
    }

    .sg-theme-toggle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .sg-hero {
        display: none;
    }

    .sg-progress {
        flex-shrink: 0;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0.55rem 0.5rem;
        gap: 0;
        background: var(--sg-surface);
        z-index: 5;
    }

    .sg-progress__line { width: 14px; }
    .sg-progress__dot { width: 28px; height: 28px; font-size: 0.72rem; }
    .sg-step-label { display: none; }

    .sg-card {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        border-radius: 0;
        border: none;
        box-shadow: none;
        overflow: hidden;
        background: var(--sg-surface);
    }

    .sg-card__body {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
    }

    #sgError {
        margin: 0.75rem 0.9rem 0;
        flex-shrink: 0;
    }

    .sg-pane.is-active {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0.9rem 0.9rem 0;
        animation: sgPaneIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .sg-pane.is-active.is-enter-back {
        animation-name: sgPaneInBack;
    }

    .sg-pane h2 {
        font-size: 1.12rem;
        flex-shrink: 0;
    }

    .sg-pane__sub,
    .sg-step-eyebrow {
        flex-shrink: 0;
    }

    .sg-actions {
        position: sticky;
        bottom: 0;
        z-index: 4;
        margin-top: auto;
        margin-bottom: 0;
        padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, transparent, var(--sg-surface) 28%);
        border-top: 1px solid color-mix(in srgb, var(--sg-border) 70%, transparent);
        gap: 0.5rem;
    }

    .sg-actions .sg-btn {
        flex: 1;
        min-height: 48px;
    }

    .sg-footer-note {
        display: none;
    }

    /* Gift modal — centered card, no stretched CTA */
    .sg-gift {
        padding: max(0.75rem, env(safe-area-inset-top)) 0.85rem max(0.75rem, env(safe-area-inset-bottom));
        place-items: center;
        align-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sg-gift__card {
        width: min(420px, 100%);
        max-width: 100%;
        min-height: 0;
        max-height: min(92dvh, 100%);
        border-radius: 20px;
        border: 1px solid var(--sg-border);
        box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 1.35rem 1.1rem 1.15rem;
        margin: 1.75rem auto 0.5rem;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .sg-gift__ribbon {
        width: 56px;
        height: 56px;
        margin: -2.1rem auto 0.7rem;
        font-size: 1.45rem;
        border-radius: 16px;
        flex-shrink: 0;
    }

    .sg-gift__card h2 {
        font-size: 1.05rem;
        margin-bottom: 0.6rem;
    }

    .sg-gift__text {
        font-size: 0.84rem;
        line-height: 1.7;
        margin-bottom: 0.7rem;
    }

    .sg-gift__hint {
        font-size: 0.74rem;
        margin-bottom: 1rem;
        padding: 0.55rem 0.65rem;
    }

    .sg-gift__card .sg-btn--cta {
        flex: 0 0 auto !important;
        width: 100%;
        min-height: 48px;
        height: auto;
        padding: 0.85rem 1rem;
        font-size: 0.92rem;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
