:root {
    --corp-result-gold: #c9a961;
    --corp-result-border: #e8e0d0;
    --corp-result-text: #1a1a1a;
    --corp-result-muted: #666;
}

* { box-sizing: border-box; }

body.corporate-result-standalone {
    margin: 0;
    background: #fff !important;
    color: var(--corp-result-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.corp-result-page-container {
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: 12px 32px 48px;
    background: #fff;
}

.corp-result-page { min-width: 0; }

.corporate-result-standalone > .container.corp-result-page-container {
    max-width: 1400px !important;
}

.corporate-result-standalone .corp-result-page.card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

body.corporate-result-standalone > .header,
body.corporate-result-standalone > .mobile-nav-overlay,
body.corporate-result-standalone > .mobile-nav-menu,
body.corporate-result-standalone .fz-corporate-entry,
body.corporate-result-standalone #corpLandingTitle,
body.corporate-result-standalone #corpAboutPanel,
body.corporate-result-standalone #corpInputStage {
    display: none !important;
}

.corporate-result-standalone .corp-report-header {
    border: 0;
    background: #fff;
}

.corp-result-masthead {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 80px;
    padding: 8px 0;
}

.corp-result-masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .055;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath d='M30 70 Q30 50 50 50 Q50 30 70 30 Q90 30 90 50 Q110 50 110 50 Q130 50 130 70 Z' fill='%23C9A961' /%3E%3Cpath d='M120 80 Q120 65 135 65 Q135 50 150 50 Q165 50 165 65 Q180 65 180 65 Q195 65 195 80 Z' fill='%23C9A961' /%3E%3C/svg%3E");
    background-size: 300px 150px;
}

.corp-result-identity,
.corp-result-toolbar-actions { position: relative; z-index: 1; }

.corp-result-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.corp-result-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(201,169,97,.45);
    border-radius: 50%;
    background: linear-gradient(145deg,#fffdf7,#f5ead2);
    color: #9a6e2a;
    font-family: "Songti SC", "STSong", serif;
    font-size: 22px;
    font-weight: 700;
}

.corporate-result-standalone .corp-report-subject h1 {
    margin: 0;
    color: var(--corp-result-gold);
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
}

.corporate-result-standalone .corp-report-subject p {
    margin: 5px 0 0;
    color: var(--corp-result-muted);
    font-size: 14px;
    line-height: 1.7;
}

.corporate-result-standalone .corp-result-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.corporate-result-standalone .corp-result-toolbar-actions .btn-sm,
.corporate-result-standalone .corp-report-back {
    min-height: 34px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--corp-result-border);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
}

.corporate-result-standalone #corpReanalyzeBtn {
    border-color: var(--corp-result-gold);
    background: var(--corp-result-gold);
    color: #111;
    font-weight: 700;
}

.corp-result-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 0;
    color: var(--corp-result-gold);
}

.corp-result-divider::before,
.corp-result-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,transparent,var(--corp-result-border) 20%,var(--corp-result-border) 80%,transparent);
}

.corp-result-divider::after { transform: scaleX(-1); }
.corp-result-divider span { font-size: 17px; }

.corporate-result-standalone .corp-report-tabs {
    min-height: 48px;
    border-bottom: 1px solid var(--corp-result-border);
}

.corporate-result-standalone .corp-report-tabs button {
    padding: 0 20px;
    color: #9a6e2a;
    font-family: "Songti SC", "STSong", serif;
    font-size: 16px;
    font-weight: 700;
}

.corporate-result-standalone #corpResultSection {
    margin-top: 20px !important;
}

/* Report cards use a restrained warm-white hierarchy instead of mixed gray/white blocks. */
.corporate-result-standalone #corpOverviewHero .corp-hero-card {
    background: linear-gradient(145deg,#fffaf0,#fffdf8) !important;
    border-color: rgba(201,169,97,.38) !important;
    box-shadow: 0 10px 30px rgba(117,88,31,.06);
}

.corporate-result-standalone .corp-overview-card {
    border: 1px solid #eadfca !important;
    box-shadow: 0 8px 24px rgba(86,67,31,.045);
}

.corporate-result-standalone #corpPaipan .corp-overview-card {
    background: #fbfaf7 !important;
}

.corporate-result-standalone #corpOverview .corp-overview-card {
    background: #fffaf1 !important;
}

.corporate-result-standalone #corpRoleChart .corp-overview-card,
.corporate-result-standalone #corpRoleChart .corp-overview-panel {
    background: #f8f7f3 !important;
}

.corporate-result-standalone .corp-info-item {
    background: rgba(255,255,255,.76) !important;
    border: 1px solid rgba(201,169,97,.2);
}

.corporate-result-standalone .corp-pillar-item {
    padding: 10px 6px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.7);
}

.corporate-result-standalone .corp-main-star {
    min-height: 30px;
    margin: 5px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #7b6f5b;
    font-size: 10px;
}

.corporate-result-standalone .corp-main-star span {
    color: #a08b66;
}

.corporate-result-standalone .corp-main-star b {
    padding: 2px 7px;
    border: 1px solid rgba(201,169,97,.3);
    border-radius: 999px;
    background: #fff8e8;
    color: #8f6829;
    font-size: 11px;
    font-weight: 700;
}

/* Reuse the professional-detail four-pillar table structure on the role report. */
.corporate-result-standalone #corpPaipan .corp-professional-sizhu-card {
    padding: 0 !important;
    overflow: hidden;
    background: #fffdf9 !important;
}

.corporate-result-standalone .corp-yuanju-table-wrap {
    width: 100%;
    overflow-x: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.corporate-result-standalone .corp-yuanju-table {
    width: 100%;
    min-width: 440px;
    border-collapse: collapse;
    table-layout: fixed;
    color: #302b23;
    font-size: 13px;
}

.corporate-result-standalone .corp-yuanju-table th,
.corporate-result-standalone .corp-yuanju-table td {
    height: 48px;
    padding: 7px 9px;
    border: 1px solid #eadfca;
    text-align: center;
    vertical-align: middle;
}

.corporate-result-standalone .corp-yuanju-table th {
    width: 25%;
    background: #f6f0e4;
    color: #806a45;
    font-weight: 500;
    white-space: nowrap;
}

.corporate-result-standalone .corp-yuanju-table .corp-yuanju-date-row th {
    height: 42px;
    background: #f1e6d0;
    color: #8d682c;
    font-weight: 700;
}

.corporate-result-standalone .corp-yuanju-table tr:nth-child(odd) td {
    background: #fffdf9;
}

.corporate-result-standalone .corp-yuanju-table tr:nth-child(even) td {
    background: #fbf7ef;
}

.corporate-result-standalone .corp-yuanju-table .gan-cell,
.corporate-result-standalone .corp-yuanju-table .zhi-cell {
    padding: 9px 5px;
    font-family: "Songti SC", "STSong", serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.corporate-result-standalone .corp-yuanju-table .canggan-cell,
.corporate-result-standalone .corp-yuanju-table .fuxing-cell {
    font-size: 12px;
    line-height: 1.7;
    white-space: nowrap;
}

.corp-mobile-report-nav { display: none; }

@media (max-width: 760px) {
    body.corporate-result-standalone { background: #f8f6f1 !important; }
    .corp-result-page-container {
        width: 100%;
        padding: 0 16px calc(96px + env(safe-area-inset-bottom, 0px));
        background: #f8f6f1;
    }
    .corporate-result-standalone .corp-result-page.card { background: transparent; }
    .corporate-result-standalone .corp-report-header {
        margin: 0 -16px;
        padding: 10px 16px 0;
        border-bottom: 1px solid #ece5d8;
    }
    .corp-result-masthead {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        min-height: 0;
        padding: 6px 0 9px;
    }
    .corp-result-masthead::before { display: none; }
    .corp-result-identity { width: 100%; gap: 11px; }
    .corp-result-avatar {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        font-size: 18px;
        background: #fffaf0;
    }
    .corporate-result-standalone .corp-report-subject { min-width: 0; }
    .corporate-result-standalone .corp-report-subject h1 {
        overflow: hidden;
        font-size: 20px;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .corporate-result-standalone .corp-report-subject p {
        margin-top: 3px;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.55;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .corporate-result-standalone .corp-result-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 7px;
    }
    .corporate-result-standalone .corp-result-toolbar-actions .btn-sm,
    .corporate-result-standalone .corp-report-back { min-height: 32px; padding: 5px 9px; font-size: 11px; }
    .corporate-result-standalone .corp-result-toolbar-actions .btn-sm {
        flex: 0 0 auto;
        border-radius: 16px;
    }
    .corporate-result-standalone .corp-cache-badge { margin-right: auto; font-size: 11px; }
    .corporate-result-standalone .corp-result-divider,
    .corporate-result-standalone .corp-report-tabs { display: none; }

    .corporate-result-standalone #corpResultSection {
        margin-top: 0 !important;
        padding-top: 0;
    }
    .corp-mobile-report-nav {
        position: sticky;
        top: 0;
        z-index: 25;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        margin: 0 -16px 16px;
        padding: 0 16px;
        border-bottom: 1px solid #e8e0d2;
        background: rgba(255, 253, 249, .96);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .corp-mobile-report-nav button {
        position: relative;
        min-height: 48px;
        padding: 0 6px;
        border: 0;
        background: transparent;
        color: #60594e;
        font: 500 14px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    }
    .corp-mobile-report-nav button::after {
        content: "";
        position: absolute;
        right: 22%;
        bottom: 0;
        left: 22%;
        height: 2px;
        border-radius: 2px 2px 0 0;
        background: transparent;
    }
    .corp-mobile-report-nav button.active { color: #9a6e2a; font-weight: 700; }
    .corp-mobile-report-nav button.active::after { background: #9a6e2a; }

    .corporate-result-standalone .corp-result-summary-grid {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }
    .corp-result-summary-grid #corpOverviewHero { order: 1 !important; }
    .corp-result-summary-grid #corpPaipan { order: 2 !important; }
    .corporate-result-standalone #corpOverviewHero,
    .corporate-result-standalone #corpPaipan,
    .corporate-result-standalone #corpOverview,
    .corporate-result-standalone #corpRoleChart { scroll-margin-top: 66px; }

    .corporate-result-standalone #corpOverviewHero::before,
    .corporate-result-standalone #corpPaipan::before {
        display: block;
        margin: 0 0 10px;
        color: #2e2a24;
        font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.45;
    }
    .corporate-result-standalone #corpOverviewHero::before { content: "命局概览"; }
    .corporate-result-standalone #corpPaipan::before { content: "四柱依据"; }

    .corporate-result-standalone #corpOverviewHero .corp-hero-card {
        min-height: 0 !important;
        margin: 0 !important;
        padding: 18px 17px !important;
        border: 1px solid #e4d6bc !important;
        border-left: 3px solid #b58a49 !important;
        border-radius: 12px !important;
        background: #fffdf9 !important;
        box-shadow: none !important;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:first-child {
        font-size: 76px !important;
        opacity: .035 !important;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(2) {
        margin-bottom: 10px !important;
        font-size: 0 !important;
        letter-spacing: 0 !important;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(2)::after {
        content: "核心结论";
        color: #9a6e2a;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 2px;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(3) {
        margin-bottom: 7px !important;
        font-size: 22px !important;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(4) { margin-bottom: 15px !important; }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(5) {
        gap: 9px !important;
        font-size: 14px !important;
        line-height: 1.65 !important;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(5) > div {
        padding: 0 0 9px;
        border-bottom: 1px solid #eee7da;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:nth-child(5) > div:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }
    .corporate-result-standalone #corpOverviewHero .corp-hero-card > div:last-child { display: none; }

    .corporate-result-standalone #corpPaipan .corp-professional-sizhu-card {
        border-radius: 12px;
        background: #fff !important;
        box-shadow: none;
    }
    .corporate-result-standalone .corp-yuanju-table-wrap { overflow-x: hidden; }
    .corporate-result-standalone .corp-yuanju-table {
        min-width: 0;
        font-size: clamp(10px, 2.9vw, 12px);
    }
    .corporate-result-standalone .corp-yuanju-table th,
    .corporate-result-standalone .corp-yuanju-table td { height: 42px; padding: 5px 3px; }
    .corporate-result-standalone .corp-yuanju-table .gan-cell,
    .corporate-result-standalone .corp-yuanju-table .zhi-cell {
        padding: 7px 2px;
        font-size: clamp(23px, 7.2vw, 28px);
    }
    .corporate-result-standalone .corp-yuanju-table .canggan-cell,
    .corporate-result-standalone .corp-yuanju-table .fuxing-cell {
        font-size: clamp(9px, 2.6vw, 11px);
        line-height: 1.55;
    }

    .corporate-result-standalone #corpOverview,
    .corporate-result-standalone #corpRoleChart { margin-top: 22px; margin-bottom: 0; }
    .corporate-result-standalone .corp-module-title {
        margin: 0 0 10px !important;
        padding: 0 !important;
        border: 0 !important;
        color: #2e2a24;
        font-size: 0 !important;
        font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
    }
    .corporate-result-standalone #corpOverview .corp-module-title::after,
    .corporate-result-standalone #corpRoleChart .corp-module-title::after {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.45;
    }
    .corporate-result-standalone #corpOverview .corp-module-title::after { content: "角色画像"; }
    .corporate-result-standalone #corpRoleChart .corp-module-title::after { content: "组织力量"; }

    .corporate-result-standalone .corp-overview-card,
    .corporate-result-standalone .corp-overview-panel {
        padding: 17px !important;
        border: 1px solid #e6ddce !important;
        border-radius: 12px !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    .corporate-result-standalone .corp-overview-card::before { display: none; }
    .corporate-result-standalone .corp-company-name { font-size: 21px; line-height: 1.4; }
    .corporate-result-standalone .corp-strategy {
        margin: 8px 0 13px;
        color: #4f4940;
        font-style: normal;
        line-height: 1.75;
    }
    .corporate-result-standalone .corp-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 12px;
    }
    .corporate-result-standalone .corp-info-item {
        padding: 13px !important;
        border: 1px solid #e8dfd0;
        border-left: 3px solid #b58a49;
        border-radius: 9px;
        background: #fffdf9 !important;
    }
    .corporate-result-standalone .fz-pro-drawer {
        border-bottom: 1px solid #eee7da;
        padding-bottom: 10px;
    }
    .corporate-result-standalone #corpOverview .corp-overview-card > div[style*="linear-gradient"] {
        padding: 14px !important;
        border: 1px solid #eadfcb;
        border-left: 3px solid #c9a96e !important;
        background: #fffaf0 !important;
    }
    .corporate-result-standalone #corpOverview .corp-overview-card > div[style*="linear-gradient"] > div[style*="background:rgba"] {
        padding: 10px 0 !important;
        border: 0 !important;
        border-top: 1px solid #eee3d1 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .corporate-result-standalone #corpRoleChart > div:nth-child(2) { margin: -2px 0 10px !important; }
    .corporate-result-standalone #corpRoleChart .corp-overview-panel > div:first-child {
        font-size: 14px !important;
        line-height: 1.55;
    }
    .corporate-result-standalone .org-overview-row {
        grid-template-columns: 24px minmax(0, 1fr) auto auto !important;
        gap: 6px 8px !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #eee7db;
    }
    .corporate-result-standalone .org-overview-row:last-of-type { border-bottom: 0; }
    .corporate-result-standalone .org-overview-row > div:nth-child(3) {
        grid-column: 2 / -1;
        grid-row: 2;
    }
    .corporate-result-standalone .org-overview-row > div:nth-child(4) { min-width: 38px; }
    .corporate-result-standalone .org-overview-row > div:nth-child(5) { min-width: 42px; }
    .corporate-result-standalone #corpRoleChart .corp-overview-panel > div:last-child {
        margin-top: 12px !important;
        padding: 12px !important;
        border-radius: 8px !important;
        background: #fffaf0 !important;
    }

}


/* 命局角色结果页：首屏结构化骨架屏 */
.corp-loading-skeleton {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(181, 133, 48, .16);
    border-radius: 16px;
    background: linear-gradient(145deg, #fffdf9 0%, #fbf7ee 100%);
    pointer-events: none;
}

.corp-loading-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    transform: translateX(-100%);
    background: linear-gradient(100deg, transparent 24%, rgba(255, 255, 255, .82) 48%, transparent 72%);
    animation: corpLoadingSweep 1.45s ease-in-out infinite;
}

.corp-loading-line,
.corp-loading-chip,
.corp-loading-cell,
.corp-loading-node {
    display: block;
    border-radius: 999px;
    background: rgba(173, 145, 96, .15);
    animation: corpLoadingPulse 1.3s ease-in-out infinite alternate;
}

.corp-loading-line { width: 72%; height: 13px; }
.corp-loading-line + .corp-loading-line { margin-top: 13px; }
.corp-loading-line.is-title { width: 36%; height: 24px; }
.corp-loading-line.is-short { width: 46%; }
.corp-loading-line.is-medium { width: 68%; }
.corp-loading-line.is-long { width: 88%; }
.corp-loading-line.has-top-gap { margin-top: 25px; }

.corp-loading-hero { min-height: 310px; padding: 30px 34px; }
.corp-loading-chip { width: 180px; height: 30px; margin: 22px 0 30px; background: rgba(186, 137, 50, .21); }
.corp-loading-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; color: #95733b; font-size: 14px; }
.corp-loading-progress-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(173, 145, 96, .14); }
.corp-loading-progress-fill { display: block; width: 28%; min-width: 28%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c79b45 0%, #edd28f 50%, #c79b45 100%); background-size: 200% 100%; animation: corpLoadingProgress 1.25s linear infinite; transition: width .3s ease; }

.corp-loading-paipan { min-height: 310px; padding: 18px; }
.corp-loading-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid rgba(181, 133, 48, .12); border-radius: 13px; background: rgba(181, 133, 48, .10); }
.corp-loading-cell { min-height: 41px; border-radius: 0; background: #fcfaf5; }
.corp-loading-cell.is-head { min-height: 48px; background: #f6ecd7; }
.corp-loading-cell.is-main { min-height: 62px; background: #fffdf9; }

.corp-loading-module { min-height: 250px; padding: 26px 30px; margin-top: 18px; }
.corp-loading-card-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.corp-loading-card { min-height: 104px; padding: 20px; border-radius: 13px; background: rgba(255, 255, 255, .74); border: 1px solid rgba(181, 133, 48, .10); }

.corp-loading-chart { min-height: 350px; padding: 28px; margin-top: 18px; }
.corp-loading-org { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 34px; max-width: 760px; margin: 34px auto 0; }
.corp-loading-node { height: 58px; border-radius: 12px; }
.corp-loading-node.is-chairman { grid-column: 2; height: 72px; background: rgba(186, 137, 50, .22); }
.corp-loading-node.is-wide { grid-column: span 2; }

@keyframes corpLoadingSweep {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}
@keyframes corpLoadingPulse {
    from { opacity: .58; }
    to { opacity: 1; }
}
@keyframes corpLoadingProgress {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (max-width: 768px) {
    .corp-loading-hero,
    .corp-loading-paipan,
    .corp-loading-module,
    .corp-loading-chart { min-height: 230px; padding: 20px; }
    .corp-loading-card-row { grid-template-columns: 1fr; }
    .corp-loading-org { gap: 14px; }
    .corp-loading-node { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .corp-loading-skeleton::after,
    .corp-loading-line,
    .corp-loading-chip,
    .corp-loading-cell,
    .corp-loading-node,
    .corp-loading-progress-fill { animation: none !important; }
}
