/**
 * 人气复盘 — 复用涨停天梯暗色盘面变量，组装 KPI / 题材 / 高度分卡 / 龙虎榜
 */

body.mh-page .sa-page-shell.mh-shell {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

.mh-hud-pills {
    gap: 8px;
}
.mh-hud .lul-pill {
    min-width: 78px;
}

.mh-section {
    margin-bottom: 18px;
}
.mh-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 10px;
}
.mh-section-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 780;
    letter-spacing: 0.02em;
}
.mh-section-sub {
    margin: 0;
    font-size: 12px;
    color: var(--lul-muted);
}

.mh-theme-rail {
    margin-bottom: 0;
}

.mh-echelons {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mh-echelon {
    border: 1px solid var(--lul-border);
    border-radius: 12px;
    background: var(--lul-panel);
    overflow: hidden;
}
.mh-echelon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(24, 34, 53, 0.98), rgba(18, 26, 43, 0.92));
    border-bottom: 1px solid var(--lul-border);
}
.mh-echelon-label {
    font-size: 14px;
    font-weight: 800;
    color: #f8b4b4;
}
.mh-echelon-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--lul-up);
    font-variant-numeric: tabular-nums;
}

.mh-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding: 12px;
}

.mh-card {
    text-align: left;
    border: 1px solid var(--lul-border);
    border-radius: 10px;
    background: rgba(11, 18, 32, 0.45);
    color: inherit;
    padding: 10px 11px;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.mh-card:hover,
.mh-card.is-active {
    border-color: rgba(91, 141, 239, 0.55);
    background: rgba(91, 141, 239, 0.1);
    transform: translateY(-1px);
}
.mh-card.is-dim {
    opacity: 0.38;
}
.mh-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.mh-card-name {
    font-size: 14px;
    font-weight: 780;
    color: #ffd4d6;
}
.mh-card-code {
    font-size: 11px;
    color: var(--lul-muted);
    font-variant-numeric: tabular-nums;
}
.mh-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}
.mh-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(91, 141, 239, 0.14);
    color: #9ec0ff;
}
.mh-tag--dragon {
    background: rgba(255, 209, 102, 0.18);
    color: var(--lul-dragon);
}
.mh-card-reason {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--lul-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}
.mh-card-note {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 700;
    color: #f0d78c;
    letter-spacing: 0.02em;
}
.mh-card-pop {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 650;
    color: var(--lul-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mh-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 11px;
    color: var(--lul-muted);
    font-variant-numeric: tabular-nums;
}
.mh-card-foot .up { color: var(--lul-up); font-weight: 750; }

.mh-lhb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(240px, 1.1fr);
    gap: 12px;
}
.mh-lhb-panel {
    border: 1px solid var(--lul-border);
    border-radius: 12px;
    background: var(--lul-panel);
    padding: 12px;
    min-width: 0;
}
.mh-lhb-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 750;
}
.mh-lhb-title--buy { color: var(--lul-up); }
.mh-lhb-title--sell { color: var(--lul-down); }

.mh-table-wrap {
    overflow: auto;
    max-height: 280px;
}
.mh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.mh-table th,
.mh-table td {
    padding: 7px 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    text-align: left;
    white-space: nowrap;
}
.mh-table th {
    color: var(--lul-muted);
    font-weight: 650;
    position: sticky;
    top: 0;
    background: var(--lul-panel);
    z-index: 1;
}
.mh-table td.num {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.mh-table .up { color: var(--lul-up); }
.mh-table .down { color: var(--lul-down); }
.mh-table tbody tr {
    cursor: pointer;
}
.mh-table tbody tr:hover {
    background: rgba(91, 141, 239, 0.1);
}
.mh-stock-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}
.mh-stock-link:hover { color: #9ec0ff; }

.mh-flow {
    font-size: 12px;
    line-height: 1.55;
    color: var(--lul-muted);
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
}
.mh-flow p { margin: 0 0 8px; }
.mh-flow strong { color: var(--lul-text); }
.mh-more-link {
    display: inline-flex;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 650;
    color: #9ec0ff;
    text-decoration: none;
}
.mh-more-link:hover { text-decoration: underline; }

.mh-focus {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    width: min(360px, calc(100vw - 24px));
}
.mh-focus-inner {
    position: relative;
    padding: 14px 16px 16px;
    border-radius: 12px;
    border: 1px solid var(--lul-border);
    background: rgba(18, 26, 43, 0.96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}
.mh-focus-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: var(--lul-muted);
    font-size: 16px;
    cursor: pointer;
}
.mh-focus h3 {
    margin: 0 28px 6px 0;
    font-size: 15px;
    color: var(--lul-up);
}
.mh-focus p {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--lul-muted);
    line-height: 1.45;
}
.mh-focus-reasons {
    margin: 0 0 12px;
    padding-left: 1.1em;
    color: var(--lul-text);
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .mh-lhb-grid { grid-template-columns: 1fr 1fr; }
    .mh-lhb-panel--flow { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .mh-lhb-grid { grid-template-columns: 1fr; }
    .mh-card-grid { grid-template-columns: 1fr; }
    .lul-btn-label { display: none; }
}

/* —— 五平台人气复盘（截图风格：暗底 + 金边卡片） —— */
.pr-shell {
    --pr-gold: #c9a227;
    --pr-gold-soft: rgba(201, 162, 39, 0.18);
    --pr-panel: #141210;
    --pr-panel-2: #1c1814;
    --pr-border: rgba(201, 162, 39, 0.28);
    margin-bottom: 20px;
    padding: 16px 14px 18px;
    border: 1px solid var(--pr-border);
    border-radius: 14px;
    background:
        radial-gradient(120% 80% at 10% -10%, rgba(201, 162, 39, 0.12), transparent 55%),
        linear-gradient(180deg, #1a1612 0%, #0f0d0b 100%);
    color: #f3efe6;
}
.pr-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}
.pr-head--meta {
    align-items: center;
    margin-bottom: 10px;
}
.pr-head h2 {
    margin: 0 0 4px;
    font-size: clamp(17px, 2.2vw, 22px);
    font-weight: 820;
    letter-spacing: 0.04em;
    color: #f0d78c;
}
.pr-head--meta .pr-sub {
    flex: 1 1 12rem;
    min-width: 0;
}
.pr-sub {
    margin: 0;
    font-size: 12px;
    color: rgba(243, 239, 230, 0.62);
    line-height: 1.45;
    max-width: 52rem;
}
.pr-time {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--pr-gold);
    padding: 4px 10px;
    border: 1px solid var(--pr-border);
    border-radius: 999px;
    background: var(--pr-gold-soft);
}

.pr-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.pr-kpi-item[data-key="surge"] b {
    color: #7dd3fc;
}
.pr-kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    padding: 8px 6px;
    border: 1px solid var(--pr-border);
    border-radius: 10px;
    background: linear-gradient(180deg, #221c16, #15120f);
}
.pr-kpi-item b {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 820;
    color: #ffe8a3;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.pr-kpi-item span {
    font-size: 11px;
    color: rgba(243, 239, 230, 0.58);
    text-align: center;
}

.pr-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.pr-theme {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--pr-border);
    background: var(--pr-gold-soft);
    color: #f0d78c;
    font-size: 12px;
    font-weight: 700;
}
.pr-theme i {
    font-style: normal;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.pr-tiers {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 18px;
}
.pr-tier-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--pr-border);
}
.pr-tier-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #f0d78c;
    letter-spacing: 0.03em;
}
.pr-tier-head span {
    font-size: 12px;
    color: rgba(243, 239, 230, 0.5);
}
.pr-tier--core .pr-tier-head h3 { color: #ffb4a8; }
.pr-tier--surge .pr-tier-head h3 { color: #7dd3fc; }
.pr-tier--tier2 .pr-tier-head h3 { color: #f0d78c; }
.pr-tier--watch .pr-tier-head h3 { color: #c8c2b4; }

.pr-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.pr-card {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 12px 10px;
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    background: linear-gradient(165deg, #221c16 0%, #14110e 100%);
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.pr-card:hover,
.pr-card:focus-visible {
    outline: none;
    border-color: rgba(240, 215, 140, 0.55);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.pr-card.is-dragon {
    border-color: rgba(255, 120, 100, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255, 120, 100, 0.15);
}
.pr-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    margin-bottom: 8px;
}
.pr-card-name {
    font-size: 15px;
    font-weight: 820;
    color: #fff8e7;
}
.pr-card-code {
    font-size: 11px;
    color: rgba(243, 239, 230, 0.45);
    font-variant-numeric: tabular-nums;
}
.pr-card-badges {
    margin-left: auto;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}
.pr-card-board,
.pr-card-surge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.pr-card-board {
    background: rgba(220, 60, 60, 0.22);
    color: #ff8f8f;
}
.pr-card-surge {
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
}
.pr-card.is-surge {
    border-color: rgba(56, 189, 248, 0.35);
}
.pr-status--surge {
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
}
.pr-card-tags,
.pr-table .pr-tag {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.pr-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(201, 162, 39, 0.14);
    border: 1px solid rgba(201, 162, 39, 0.22);
    color: #e6cf86;
    font-size: 11px;
    font-weight: 650;
}
.pr-card-metrics {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: rgba(243, 239, 230, 0.62);
    line-height: 1.55;
}
.pr-card-metrics b {
    color: #ffe8a3;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.pr-card-plats,
.pr-table .pr-plat {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pr-plat {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(243, 239, 230, 0.72);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.pr-table-section {
    margin-top: 6px;
}
.pr-table-section .mh-section-head h2 {
    color: #f0d78c;
}
.pr-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    background: var(--pr-panel);
}
.pr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 720px;
}
.pr-table th,
.pr-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.12);
    text-align: left;
    vertical-align: top;
}
.pr-table th {
    position: sticky;
    top: 0;
    background: #221c16;
    color: #f0d78c;
    font-weight: 750;
    white-space: nowrap;
}
.pr-table tr.is-up td {
    color: #ffb4a8;
}
.pr-table tr.is-dragon td:nth-child(2) a {
    color: #ff8f8f;
}
.pr-table a {
    color: #fff8e7;
    text-decoration: none;
    font-weight: 700;
}
.pr-table a small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(243, 239, 230, 0.45);
}
.pr-table .pr-tag { margin-bottom: 0; }
.pr-status {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(220, 60, 60, 0.16);
    color: #ff9b9b;
    font-weight: 700;
    white-space: nowrap;
}
.pr-empty {
    text-align: center;
    color: rgba(243, 239, 230, 0.45);
    padding: 24px !important;
}

.pr-echelon-fold {
    margin-top: 16px;
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    background: var(--pr-panel-2);
    padding: 0 12px 12px;
}
.pr-echelon-fold > summary {
    cursor: pointer;
    padding: 12px 4px;
    color: #f0d78c;
    font-weight: 750;
    font-size: 13px;
    list-style: none;
}
.pr-echelon-fold > summary::-webkit-details-marker { display: none; }
.pr-legend {
    margin: 12px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(243, 239, 230, 0.45);
}

@media (max-width: 1100px) {
    .pr-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .pr-shell { padding: 10px 8px 12px; border-radius: 10px; }
    .pr-card-grid { grid-template-columns: 1fr; }
    .pr-head {
        margin-bottom: 8px;
        gap: 6px 8px;
    }
    .pr-head h2 { font-size: 15px; }
    .pr-sub { font-size: 11px; line-height: 1.35; }
    .pr-time { padding: 2px 8px; font-size: 11px; }

    /* KPI：双列横排，数字+标签同级，压低留白 */
    .pr-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        margin-bottom: 8px;
    }
    .pr-kpi-item {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 6px;
        min-height: 0;
        padding: 5px 8px;
        border-radius: 8px;
    }
    .pr-kpi-item b {
        font-size: 15px;
        line-height: 1.05;
        flex-shrink: 0;
    }
    .pr-kpi-item span {
        font-size: 10px;
        line-height: 1.2;
        text-align: right;
        color: rgba(243, 239, 230, 0.62);
    }

    /* 题材标签：更小更密 */
    .pr-themes {
        gap: 4px;
        margin-bottom: 10px;
    }
    .pr-theme {
        padding: 2px 7px;
        gap: 3px;
        font-size: 11px;
        font-weight: 650;
        border-radius: 6px;
    }
    .pr-theme i {
        font-size: 10px;
    }

    .pr-tiers { gap: 12px; margin-bottom: 12px; }
    .pr-tier-head { margin-bottom: 6px; }
}

/* 多平台热榜离屏导出（不受页面 viewport media 拖成单列超高） */
.pr-export-host {
    background: #0f0d0b;
    color: #f3efe6;
    border-color: rgba(201, 162, 39, 0.28);
}
.pr-export-host .lul-export-meta {
    color: rgba(240, 215, 140, 0.75);
}
.pr-export-host .lul-export-foot {
    color: rgba(243, 239, 230, 0.42);
}
.pr-export-host .pr-export-body {
    margin-top: 4px;
}
.pr-export-host .pr-shell {
    margin: 0;
    padding: 16px 18px 18px;
    border-radius: 12px;
}
.pr-export-host .pr-card {
    transform: none !important;
    box-shadow: none !important;
}
.pr-export-host .pr-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.pr-export-host .pr-table-wrap {
    overflow: visible;
}
.pr-export-host .pr-table {
    min-width: 0;
}
.pr-export-host--mobile .pr-card-grid {
    grid-template-columns: 1fr 1fr !important;
}
.pr-export-host--mobile .pr-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
}
.pr-export-host--mobile .pr-kpi-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    min-height: 0;
    padding: 5px 8px;
}
.pr-export-host--mobile .pr-themes {
    gap: 4px;
    margin-bottom: 10px;
}
.pr-export-host--mobile .pr-shell {
    padding: 10px 10px 12px;
}
