.pf-shell {
    --pf-ink: #0f172a;
    --pf-muted: #5b6474;
    --pf-border: rgba(15, 23, 42, 0.08);
    --pf-border-strong: rgba(15, 23, 42, 0.16);
    --pf-surface: #ffffff;
    --pf-surface-soft: #f8fafc;
    --pf-primary: #ff4fa3;
    --pf-primary-dark: #d63384;
    --pf-accent: #7d4dff;
    --pf-success: #16a34a;
    --pf-warning: #d97706;
    --pf-danger: #dc2626;
    --pf-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.pf-shell--admin {
    --pf-primary: #0f6cbd;
    --pf-primary-dark: #0a4f8a;
    --pf-accent: #14b8a6;
    --pf-shadow: 0 26px 72px rgba(15, 23, 42, 0.1);
}

.pf-shell .hg-wrap {
    position: relative;
}

.pf-shell a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.pf-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(125, 77, 255, 0.1);
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(125, 77, 255, 0.14), transparent 38%),
        radial-gradient(circle at bottom right, rgba(255, 79, 163, 0.16), transparent 36%),
        linear-gradient(135deg, #ffffff 0%, #fff8fc 52%, #f8f7ff 100%);
    box-shadow: var(--pf-shadow);
}

.pf-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 79, 163, 0.16), transparent 72%);
    pointer-events: none;
}

.pf-shell--admin .pf-hero {
    border-color: rgba(15, 108, 189, 0.12);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 36%),
        radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 54%, #eef7ff 100%);
}

.pf-shell--admin .pf-kicker {
    background: rgba(15, 108, 189, 0.08);
    color: #0a4f8a;
}

.pf-shell--admin .pf-badge,
.pf-shell--admin .pf-chip {
    border-color: rgba(15, 108, 189, 0.14);
    color: #0a4f8a;
}

.pf-shell--admin .pf-title strong,
.pf-shell--admin .pf-title em {
    color: var(--pf-primary);
}

.pf-shell--admin .pf-alert {
    border-color: rgba(15, 108, 189, 0.14);
    background: #f3f9ff;
    color: #0a4f8a;
}

.pf-shell--admin .fair-step {
    border-color: rgba(15, 108, 189, 0.14);
}

.pf-shell--admin .fair-step:hover {
    border-color: rgba(15, 108, 189, 0.24);
}

.pf-shell--admin .fair-step.is-active {
    background: linear-gradient(135deg, #0f6cbd, #14b8a6);
    box-shadow: 0 16px 34px rgba(15, 108, 189, 0.22);
}

.pf-shell--admin .fair-step-num {
    background: rgba(15, 108, 189, 0.1);
    color: #0a4f8a;
}

.pf-hero-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
    padding: 34px;
    align-items: start;
}

.pf-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(125, 77, 255, 0.1);
    color: #4c1d95;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.pf-title {
    margin: 0;
    color: var(--pf-ink);
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 0.97;
    font-weight: 900;
}

.pf-title strong,
.pf-title em {
    color: var(--pf-primary);
    font-style: normal;
}

.pf-lead {
    max-width: 62ch;
    margin: 16px 0 0;
    color: var(--pf-muted);
    font-size: 1.02rem;
    line-height: 1.68;
}

.pf-chip-row,
.pf-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pf-chip,
.pf-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(125, 77, 255, 0.12);
    background: rgba(255, 255, 255, 0.88);
    color: #312e81;
    font-size: 0.86rem;
    font-weight: 700;
}

.pf-badge.is-success {
    border-color: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.pf-badge.is-warning {
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.pf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.pf-card,
.pf-panel,
.pf-sidebar {
    border: 1px solid var(--pf-border);
    border-radius: 24px;
    background: var(--pf-surface);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.05);
}

.pf-panel,
.pf-sidebar {
    padding: 22px;
}

.pf-card {
    padding: 24px;
}

.pf-card.is-soft,
.pf-panel.is-soft,
.pf-sidebar.is-soft {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), #fff);
}

.pf-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.pf-kpi {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.95);
    padding: 16px;
}

.pf-kpi strong {
    display: block;
    color: var(--pf-ink);
    font-size: 1.35rem;
    line-height: 1;
}

.pf-kpi span {
    display: block;
    margin-top: 6px;
    color: var(--pf-muted);
    font-size: 0.82rem;
}

.pf-grid {
    display: grid;
    gap: 18px;
}

.pf-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pf-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pf-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pf-shell--top-spacing {
    padding-top: 28px;
}

.pf-section--top-md {
    padding-top: 28px;
}

.pf-section--top-sm {
    padding-top: 12px;
}

.pf-section-head--tight {
    margin-bottom: 14px;
}

.pf-inline-note--top-xs {
    margin: 6px 0 0;
}

.pf-inline-note--top-sm {
    margin: 8px 0 0;
}

.pf-divider--spaced {
    margin: 18px 0;
}

.pf-choice-cta {
    margin-top: auto;
}

.pf-list,
.pf-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.pf-list li,
.pf-checklist li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--pf-muted);
    line-height: 1.5;
}

.pf-list li i,
.pf-checklist li i {
    color: var(--pf-accent);
    margin-top: 3px;
}

.pf-checklist.is-success li i {
    color: var(--pf-success);
}

.pf-split {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.pf-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.pf-section-head h2,
.pf-section-head h3,
.pf-card h2,
.pf-card h3,
.pf-panel h2,
.pf-panel h3,
.pf-sidebar h2,
.pf-sidebar h3 {
    margin: 0;
    color: var(--pf-ink);
}

.pf-section-head p,
.pf-card p,
.pf-panel p,
.pf-sidebar p {
    color: var(--pf-muted);
}

.pf-choice-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pf-choice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(125, 77, 255, 0.09), transparent 34%),
        linear-gradient(180deg, #fff, #fcfbff);
    padding: 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.05);
}

.pf-choice-card.is-featured {
    border-color: rgba(255, 79, 163, 0.25);
    box-shadow: 0 22px 60px rgba(255, 79, 163, 0.12);
}

.pf-choice-card.is-selected {
    border-color: rgba(125, 77, 255, 0.3);
    box-shadow: 0 20px 50px rgba(125, 77, 255, 0.14);
}

.pf-choice-card-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.pf-choice-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(125, 77, 255, 0.16), rgba(255, 79, 163, 0.12));
    color: var(--pf-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.pf-choice-card h3 {
    font-size: 1.16rem;
}

.pf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6d28d9;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pf-price {
    color: var(--pf-ink);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 900;
    line-height: 1;
}

.pf-price small {
    color: var(--pf-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.pf-inline-note,
.pf-hint {
    color: var(--pf-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.pf-divider {
    width: 100%;
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
}

.pf-step-track {
    display: grid;
    gap: 12px;
}

.pf-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
}

.pf-step-num {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(125, 77, 255, 0.12);
    color: #5b21b6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.pf-step.is-done .pf-step-num {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.pf-step h4 {
    margin: 0;
    color: var(--pf-ink);
    font-size: 0.98rem;
}

.pf-step p {
    margin: 4px 0 0;
    font-size: 0.88rem;
}

.pf-progress {
    display: grid;
    gap: 10px;
}

.pf-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pf-progress-bar {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.pf-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pf-accent), var(--pf-primary));
}

.pf-aside-stack {
    display: grid;
    gap: 16px;
}

.pf-preview-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        linear-gradient(160deg, rgba(125, 77, 255, 0.96), rgba(255, 79, 163, 0.82));
    color: #fff;
    min-height: 240px;
    padding: 24px;
}

.pf-preview-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -40px auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.pf-preview-card h3,
.pf-preview-card p,
.pf-preview-card small,
.pf-preview-card strong {
    color: inherit;
}

.pf-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pf-preview-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 700;
}

.pf-autosave {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(125, 77, 255, 0.16);
    border-radius: 16px;
    background: #f9f7ff;
    color: #5b21b6;
    font-size: 0.85rem;
}

.pf-autosave.is-visible {
    display: flex;
}

.pf-autosave strong {
    color: inherit;
}

.pf-sticky-actions {
    position: sticky;
    bottom: 16px;
    z-index: 18;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    margin-top: 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
}

.pf-small-print {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.5;
}

.pf-recap-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.pf-recap-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
}

.pf-recap-item strong {
    display: block;
    color: var(--pf-ink);
    font-size: 0.92rem;
}

.pf-recap-item span {
    display: block;
    margin-top: 6px;
    color: var(--pf-muted);
    font-size: 0.84rem;
}

.fair-wizard-steps {
    display: flex;
    gap: 10px;
    padding: 8px;
    margin: 18px 0 20px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.92);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fair-wizard-steps::-webkit-scrollbar {
    display: none;
}

.fair-step {
    appearance: none;
    border: 1px solid rgba(125, 77, 255, 0.14);
    background: rgba(255, 255, 255, 0.98);
    color: #4b5563;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.fair-step:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 77, 255, 0.26);
    color: #1f2937;
}

.fair-step.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #7d4dff, #ff4fa3);
    box-shadow: 0 16px 34px rgba(125, 77, 255, 0.26);
}

.fair-step-num {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(125, 77, 255, 0.12);
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease;
}

.fair-step.is-active .fair-step-num {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.fair-wizard-panel {
    display: none;
    animation: pfWizardFade .22s ease;
}

.fair-wizard-panel.is-active {
    display: block;
}

.pf-duplicate-launcher {
    display: grid;
    gap: 14px;
}

.pf-duplicate-list {
    display: grid;
    gap: 12px;
}

.pf-duplicate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.94);
}

.pf-duplicate-item__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pf-duplicate-item__copy strong {
    color: var(--pf-ink);
    font-size: 0.98rem;
}

.pf-duplicate-item__copy span {
    color: var(--pf-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.pf-duplicate-item__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@keyframes pfWizardFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pf-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: #fff8eb;
    color: #92400e;
}

.pf-alert.is-danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: #fff1f2;
    color: #991b1b;
}

.pf-alert.is-success {
    border-color: rgba(34, 197, 94, 0.18);
    background: #effcf3;
    color: #166534;
}

.pf-form-section {
    display: grid;
    gap: 16px;
}

.pf-form-section > h3 {
    margin: 0;
}

.pf-form-help {
    margin-top: -4px;
    color: var(--pf-muted);
    font-size: 0.83rem;
    line-height: 1.55;
}

.pf-recurrence-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.pf-recurrence-preset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(125, 77, 255, 0.18);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 79, 163, 0.12), rgba(125, 77, 255, 0.12));
    color: #6d28d9;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.pf-recurrence-preset:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 77, 255, 0.34);
    background: linear-gradient(135deg, rgba(255, 79, 163, 0.18), rgba(125, 77, 255, 0.18));
}

.pf-recurrence-tools .pf-inline-note {
    flex: 1 1 220px;
    margin: 0;
}

.pf-text-link {
    color: #6d28d9;
    font-weight: 700;
}

.pf-mobile-only {
    display: none;
}

.pf-mobile-choice-grid {
    display: none;
}

.pf-mobile-choice-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--pf-border);
    background: rgba(255, 255, 255, 0.94);
    color: var(--pf-ink);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.pf-mobile-choice-card strong {
    color: var(--pf-ink);
    font-size: 1rem;
    line-height: 1.08;
}

.pf-mobile-choice-card small {
    color: var(--pf-muted);
    line-height: 1.45;
}

@media (max-width: 1080px) {
    .pf-hero-grid,
    .pf-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .pf-grid.cols-4,
    .pf-grid.cols-3,
    .pf-grid.cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pf-shell--top-spacing {
        padding-top: 14px;
    }

    .pf-hero {
        border-radius: 24px;
    }

    .pf-hero-grid,
    .pf-card,
    .pf-panel,
    .pf-sidebar,
    .pf-choice-card {
        padding: 20px;
    }

    .pf-hero-grid {
        gap: 16px;
    }

    .pf-title {
        font-size: 2rem;
    }

    .pf-lead {
        font-size: 0.94rem;
        line-height: 1.58;
    }

    .pf-badge-row {
        margin-top: 14px;
        gap: 8px;
    }

    .pf-sidebar {
        display: none;
    }

    .pf-mobile-choice-grid {
        display: grid;
        gap: 10px;
        margin-top: 18px;
    }

    .pf-actions,
    .pf-sticky-actions {
        flex-direction: column;
    }

    .pf-duplicate-item {
        flex-direction: column;
        align-items: stretch;
    }

    .pf-duplicate-item__actions {
        justify-content: stretch;
    }

    .pf-sticky-actions .hg-btn,
    .pf-sticky-actions .btn,
    .pf-actions .hg-btn,
    .pf-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .pf-duplicate-item__actions .hg-btn {
        width: 100%;
        justify-content: center;
    }

    .pf-mobile-only {
        display: inline-flex;
    }

    .pf-section--top-md {
        padding-top: 14px;
    }

    .pf-choice-grid {
        gap: 12px;
    }

    .fair-step-label {
        display: none;
    }

    .fair-step-num {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}
