.ap-master-number-tool {
    font-family: inherit;
    margin: 30px auto;
    max-width: 980px;
}

.ap-tool-shell {
    background: linear-gradient(180deg, #ffffff 0%, #f8f5ff 100%);
    border: 1px solid rgba(126, 87, 194, 0.12);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 18px 50px rgba(40, 20, 80, 0.08);
    overflow: hidden;
}

.ap-tool-top {
    text-align: center;
    margin-bottom: 28px;
}

.ap-tool-badge {
    display: inline-block;
    background: rgba(126, 87, 194, 0.10);
    color: #6d3fc0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.ap-tool-title {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
    color: #1f1633;
    margin: 0 0 10px;
}

.ap-tool-subtitle {
    max-width: 760px;
    margin: 0 auto;
    color: #5f5575;
    font-size: 16px;
    line-height: 1.8;
}

.ap-tool-form {
    margin-top: 28px;
}

.ap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.ap-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #31254f;
    margin-bottom: 8px;
}

.ap-field input {
    width: 100%;
    border: 1px solid #ddd6f7;
    background: #fff;
    border-radius: 16px;
    padding: 15px 16px;
    font-size: 15px;
    color: #2d2440;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.ap-field input:focus {
    border-color: #7e57c2;
    outline: none;
    box-shadow: 0 0 0 4px rgba(126, 87, 194, 0.12);
}

.ap-advanced-toggle-wrap {
    text-align: center;
    margin-top: 18px;
}

.ap-advanced-toggle {
    border: none;
    background: transparent;
    color: #6d3fc0;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.ap-advanced-fields {
    margin-top: 20px;
    padding: 20px;
    background: rgba(126, 87, 194, 0.04);
    border-radius: 18px;
}

.ap-submit-wrap {
    text-align: center;
    margin-top: 26px;
}

.ap-submit-btn {
    background: linear-gradient(135deg, #7e57c2, #5b36b4);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(91, 54, 180, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ap-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(91, 54, 180, 0.28);
}

/* RESULT AREA */
.ap-result-wrap {
    margin-top: 34px;
    animation: fadeInUp 0.45s ease;
}

.ap-result-card {
    background: #fff;
    border: 1px solid rgba(126, 87, 194, 0.10);
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: 0 16px 40px rgba(45, 20, 90, 0.08);
}

.ap-result-hero {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee7ff;
    margin-bottom: 24px;
}

.ap-result-kicker {
    display: inline-block;
    background: rgba(126, 87, 194, 0.10);
    color: #6d3fc0;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 12px;
}

.ap-result-title {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 800;
    color: #1f1633;
    margin: 0 0 10px;
}

.ap-result-desc {
    color: #5e5378;
    font-size: 16px;
    line-height: 1.8;
    max-width: 760px;
    margin: 0 auto;
}

.ap-score-box {
    margin-top: 24px;
    background: linear-gradient(135deg, #f8f4ff, #f4f0ff);
    border-radius: 20px;
    padding: 20px;
}

.ap-score-label {
    font-weight: 700;
    color: #31254f;
    margin-bottom: 8px;
}

.ap-score-bar {
    width: 100%;
    height: 12px;
    background: #e8defc;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ap-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #7e57c2, #a55bff);
    border-radius: 999px;
}

.ap-score-text {
    color: #4d4266;
    font-size: 14px;
    font-weight: 600;
}

.ap-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.ap-mini-card,
.ap-insight-card,
.ap-cta-card {
    background: #faf8ff;
    border: 1px solid #ece4ff;
    border-radius: 20px;
    padding: 20px;
}

.ap-mini-card h3,
.ap-insight-card h3,
.ap-cta-card h3 {
    font-size: 18px;
    margin: 0 0 12px;
    color: #24193d;
}

.ap-mini-card p,
.ap-insight-card p,
.ap-cta-card p,
.ap-mini-card ul,
.ap-insight-card ul {
    color: #5b5170;
    line-height: 1.8;
    font-size: 15px;
}

.ap-master-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.ap-master-pill {
    background: linear-gradient(135deg, #7e57c2, #5b36b4);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 999px;
}

.ap-cta-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.ap-cta-btn {
    display: inline-block;
    padding: 13px 18px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ap-cta-primary {
    background: linear-gradient(135deg, #7e57c2, #5b36b4);
    color: #fff;
}

.ap-cta-secondary {
    background: #efe7ff;
    color: #5b36b4;
}

.ap-full-width {
    grid-column: 1 / -1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .ap-tool-shell {
        padding: 24px 16px;
        border-radius: 20px;
    }

    .ap-tool-title {
        font-size: 28px;
    }

    .ap-result-title {
        font-size: 26px;
    }

    .ap-grid,
    .ap-result-grid {
        grid-template-columns: 1fr;
    }

    .ap-submit-btn,
    .ap-cta-btn {
        width: 100%;
        text-align: center;
    }

    .ap-cta-btns {
        flex-direction: column;
    }
}
.ap-result-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcf9ff 100%);
}

.ap-insight-card,
.ap-mini-card,
.ap-cta-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ap-insight-card:hover,
.ap-mini-card:hover,
.ap-cta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(60, 28, 110, 0.08);
}

.ap-result-title {
    letter-spacing: -0.5px;
}

.ap-mini-card ul,
.ap-insight-card ul {
    padding-left: 18px;
    margin: 0;
}

.ap-mini-card li,
.ap-insight-card li {
    margin-bottom: 10px;
}
/* ===== LOADING STATE ===== */
.ap-loading-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcf9ff 100%);
    border: 1px solid rgba(126, 87, 194, 0.10);
    border-radius: 24px;
    padding: 34px 24px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(45, 20, 90, 0.08);
}

.ap-loading-card h3 {
    margin: 18px 0 10px;
    font-size: 26px;
    color: #24193d;
    font-weight: 800;
}

.ap-loading-card p {
    margin: 0;
    color: #5b5170;
    font-size: 15px;
    line-height: 1.8;
}

.ap-loading-spinner {
    width: 54px;
    height: 54px;
    border: 4px solid #e8defc;
    border-top: 4px solid #7e57c2;
    border-radius: 50%;
    margin: 0 auto;
    animation: apSpin 0.9s linear infinite;
}

@keyframes apSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== RESULT ACTION BUTTONS ===== */
.ap-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.ap-action-btn {
    background: #f4ecff;
    color: #5b36b4;
    border: 1px solid #ddd0ff;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
}

.ap-action-btn:hover {
    background: #ede2ff;
    transform: translateY(-1px);
}

/* ===== TOAST ===== */
.ap-result-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #2d1f4d;
    color: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(30, 10, 70, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s ease;
    z-index: 9999;
}

.ap-result-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .ap-loading-card {
        padding: 26px 18px;
    }

    .ap-loading-card h3 {
        font-size: 22px;
    }

    .ap-result-actions {
        flex-direction: column;
    }

    .ap-action-btn {
        width: 100%;
    }

    .ap-result-toast {
        width: calc(100% - 28px);
        text-align: center;
        bottom: 18px;
    }
}
.ap-master-pill-hidden {
    background: linear-gradient(135deg, #9c7cff, #6e54c7);
    opacity: 0.92;
}