/* ============================================================
   pharmacist-exam-plan · 执业药师备考规划
   药柜处方风（ph-）：药品绿 + 处方纸米白 + 纯 CSS 百格药柜 + 处方笺卡片
   处方笺：左上角「Rp.」角标、楷体标题、双线边框；深色模式全变量重定义
   ============================================================ */
.ph-page {
    --ph-bg: #f4efe1;
    --ph-panel: #fffdf5;
    --ph-panel-2: #efe9d6;
    --ph-ink: #2a2b22;
    --ph-sub: #75745f;
    --ph-line: #ddd3ba;
    --ph-line-strong: #c3b78f;
    --ph-accent: #2f8a5e;
    --ph-accent-deep: #1c5e3f;
    --ph-accent-soft: rgba(47, 138, 94, 0.12);
    --ph-accent2: #b3452f;
    --ph-accent2-soft: rgba(179, 69, 47, 0.10);
    --ph-brass: #b98a3f;
    --ph-shadow: 0 6px 20px rgba(28, 94, 63, 0.12);

    color: var(--ph-ink);
    font-size: 15px;
    line-height: 1.8;
}

[data-theme="dark"] .ph-page {
    --ph-bg: #1f231b;
    --ph-panel: #262b21;
    --ph-panel-2: #2d3327;
    --ph-ink: #e9ecdd;
    --ph-sub: #9aa08a;
    --ph-line: #41473a;
    --ph-line-strong: #585f49;
    --ph-accent: #5fb78a;
    --ph-accent-deep: #93d8b0;
    --ph-accent-soft: rgba(95, 183, 138, 0.16);
    --ph-accent2: #e08a70;
    --ph-accent2-soft: rgba(224, 138, 112, 0.14);
    --ph-brass: #d8b26a;
    --ph-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.ph-page h1, .ph-page h2, .ph-page h3 { line-height: 1.4; }
.ph-page b, .ph-page strong { color: var(--ph-accent-deep); }

/* ---------- 首屏 ---------- */
.ph-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.6fr) minmax(240px, 0.85fr);
    gap: 22px 26px;
    align-items: center;
    padding: 30px 32px 26px;
    margin-bottom: 24px;
    border-radius: 16px;
    border: 1px solid var(--ph-line-strong);
    background:
        radial-gradient(circle at 90% 0%, var(--ph-accent-soft) 0, transparent 38%),
        linear-gradient(180deg, var(--ph-bg) 0%, var(--ph-panel) 100%);
    box-shadow: var(--ph-shadow);
    overflow: hidden;
}
/* 处方纸横线 + 左侧红边线 */
.ph-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 52px, var(--ph-accent2-soft) 52px 54px, transparent 54px),
        repeating-linear-gradient(180deg, transparent 0 27px, var(--ph-line) 27px 28px);
    opacity: 0.35;
    pointer-events: none;
}
.ph-hero > * { position: relative; z-index: 1; }

.ph-kicker {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    background: var(--ph-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}
.ph-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(25px, 3.2vw, 36px);
    font-weight: 900;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", serif;
    letter-spacing: 0.04em;
}
.ph-hero-sub { margin: 0 0 14px; max-width: 56ch; color: var(--ph-sub); font-size: 15px; }
.ph-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ph-hero-chips li {
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid var(--ph-line-strong);
    background: var(--ph-panel);
    color: var(--ph-sub);
    font-size: 12px;
    font-weight: 700;
}

/* hero 百格药柜（纯 CSS：grid 方格 + radial-gradient 小圆拉手） */
.ph-hero-cab { display: grid; justify-items: center; gap: 8px; }
.ph-cabinet {
    position: relative;
    width: 150px;
    height: 178px;
    margin-top: 12px;
    border-radius: 10px;
    border: 3px solid var(--ph-accent-deep);
    background:
        radial-gradient(circle at 50% 68%, var(--ph-brass) 0 2.6px, transparent 3.4px) 0 0 / 30px 35.6px,
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1.6px, transparent 1.6px 35.6px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 1.6px, transparent 1.6px 30px),
        linear-gradient(170deg, var(--ph-accent) 0%, var(--ph-accent-deep) 100%);
    box-shadow: 0 12px 24px rgba(28, 94, 63, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.ph-cab-plaque {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 24px;
    border-radius: 5px;
    border: 2px solid var(--ph-brass);
    background: var(--ph-panel);
    color: var(--ph-accent2);
    font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
    font-size: 15px;
    font-weight: 900;
}
.ph-cab-rx {
    padding: 4px 14px;
    transform: rotate(-4deg);
    border-radius: 4px;
    border: 1.5px solid var(--ph-line-strong);
    background: var(--ph-panel);
    color: var(--ph-accent2);
    font-family: "Kaiti SC", "STKaiti", "KaiTi", Georgia, serif;
    font-style: italic;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
    box-shadow: var(--ph-shadow);
}

/* hero 读数 */
.ph-hero-readout, .ph-verdict {
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--ph-line-strong);
    background: var(--ph-panel);
    display: grid;
    gap: 4px;
    justify-items: start;
    box-shadow: var(--ph-shadow);
}
.ph-hero-readout { position: relative; z-index: 1; }
.ph-readout-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--ph-sub);
}
.ph-readout-num {
    font-size: 25px;
    font-weight: 900;
    color: var(--ph-accent-deep);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.ph-readout-meta { font-size: 13px; font-weight: 700; color: var(--ph-accent2); }
.ph-readout-tip { margin-top: 4px; font-size: 12px; color: var(--ph-sub); opacity: 0.9; }

/* ---------- 处方笺卡片（Rp. 角标 + 双线边框） ---------- */
.ph-rx {
    position: relative;
    padding: 34px 20px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--ph-accent-deep);
    background: var(--ph-panel);
    box-shadow:
        inset 0 0 0 3.5px var(--ph-panel),
        inset 0 0 0 5px var(--ph-line-strong),
        var(--ph-shadow);
    display: grid;
    gap: 4px;
    justify-items: start;
}
.ph-rx::before {
    content: "Rp.";
    position: absolute;
    top: 9px;
    left: 14px;
    font-family: Georgia, "Times New Roman", "Kaiti SC", "KaiTi", serif;
    font-style: italic;
    font-weight: 800;
    font-size: 20px;
    line-height: 1;
    color: var(--ph-accent2);
}
.ph-rx-tag {
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--ph-accent-soft);
    color: var(--ph-accent-deep);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
}
.ph-verdict-num {
    font-size: 22px;
    font-weight: 900;
    color: var(--ph-accent-deep);
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}
.ph-verdict-sub { font-size: 13px; font-weight: 700; color: var(--ph-ink); }
.ph-verdict-tip { margin-top: 4px; font-size: 12px; color: var(--ph-sub); }

/* ---------- 主体两栏 ---------- */
.ph-calc {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 28px;
}
.ph-input-col { display: grid; gap: 16px; min-width: 0; }

.ph-panel {
    padding: 20px 22px;
    border: 1px solid var(--ph-line);
    border-radius: 14px;
    background: var(--ph-panel);
    box-shadow: var(--ph-shadow);
}
.ph-panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ph-panel-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", serif;
}
.ph-panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--ph-sub); }
.ph-step {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ph-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

/* 字段 */
.ph-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ph-field { display: grid; gap: 6px; margin-bottom: 12px; }
.ph-grid2 .ph-field { margin-bottom: 0; }
.ph-label { font-size: 13px; font-weight: 700; }
.ph-select-wrap { position: relative; display: block; }
.ph-select-wrap::after {
    content: "▾";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ph-sub);
    pointer-events: none;
    font-size: 12px;
}
.ph-input {
    width: 100%;
    height: 44px;
    padding: 0 30px 0 12px;
    border: 1.5px solid var(--ph-line-strong);
    border-radius: 10px;
    background: var(--ph-panel-2);
    color: var(--ph-ink);
    font-size: 14px;
    font-weight: 700;
    outline: none;
    appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
input.ph-input { padding-right: 12px; }
.ph-input:focus { border-color: var(--ph-accent); box-shadow: 0 0 0 3px var(--ph-accent-soft); }
.ph-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--ph-sub); }

/* 分段切换（方向/专业/状态/职称） */
.ph-seg {
    display: grid;
    gap: 0;
    border: 1.5px solid var(--ph-line-strong);
    border-radius: 10px;
    overflow: hidden;
    min-height: 44px;
}
.ph-seg--2 { grid-template-columns: 1fr 1fr; }
.ph-seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ph-seg-btn {
    border: none;
    background: var(--ph-panel-2);
    color: var(--ph-sub);
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 6px;
    cursor: pointer;
    transition: all 0.14s;
    line-height: 1.5;
}
.ph-seg-btn + .ph-seg-btn { border-left: 1.5px solid var(--ph-line-strong); }
.ph-seg-btn.is-active {
    background: var(--ph-accent);
    color: #fff;
}
.ph-seg--3 .ph-seg-btn { font-size: 12.5px; }

.ph-error {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--ph-accent2);
    background: var(--ph-accent2-soft);
    color: var(--ph-accent2);
    font-size: 13px;
}
.ph-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ph-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--ph-line-strong);
    border-radius: 10px;
    background: var(--ph-panel-2);
    color: var(--ph-ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.ph-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(28, 94, 63, 0.18); }
.ph-btn--primary {
    border-color: var(--ph-accent-deep);
    background: linear-gradient(170deg, var(--ph-accent) 0%, var(--ph-accent-deep) 100%);
    color: #fff;
}

/* 结果列 */
.ph-result-col { display: grid; gap: 14px; position: sticky; top: 16px; }

.ph-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ph-kpi {
    padding: 12px 14px;
    border: 1px solid var(--ph-line);
    border-radius: 12px;
    background: var(--ph-panel);
    display: grid;
    gap: 2px;
}
.ph-kpi span { font-size: 12px; color: var(--ph-sub); font-weight: 700; }
.ph-kpi b { font-size: 18px; font-weight: 900; color: var(--ph-ink); line-height: 1.25; font-variant-numeric: tabular-nums; }
.ph-kpi small { font-size: 11px; color: var(--ph-sub); }

.ph-mini-card {
    padding: 16px 18px;
    border: 1px solid var(--ph-line);
    border-radius: 12px;
    background: var(--ph-panel);
}
.ph-mini-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--ph-accent-deep); }

/* 学时进度条 */
.ph-bar {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: var(--ph-panel-2);
    border: 1px solid var(--ph-line);
    overflow: hidden;
    min-width: 60px;
}
.ph-bar i {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--ph-accent) 0%, var(--ph-accent-deep) 100%);
    transition: width 0.3s;
}

/* 表格 */
.ph-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ph-table th, .ph-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px dashed var(--ph-line);
    vertical-align: top;
}
.ph-table th { font-size: 12px; font-weight: 800; color: var(--ph-sub); letter-spacing: 0.06em; white-space: nowrap; }
.ph-table td { font-variant-numeric: tabular-nums; }
.ph-table tr:last-child td { border-bottom: none; }
.ph-table--wide th, .ph-table--wide td { padding: 10px 12px; line-height: 1.7; }
.ph-void { color: var(--ph-accent2); font-weight: 700; }
.ph-table-note { margin: 10px 0 0; font-size: 12px; color: var(--ph-sub); }
.ph-empty { text-align: center; color: var(--ph-sub); padding: 14px 0 !important; }

/* 推荐顺序 */
.ph-order { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: pho; display: grid; gap: 9px; }
.ph-order li {
    position: relative;
    padding: 9px 12px 9px 34px;
    border: 1px dashed var(--ph-line-strong);
    border-radius: 10px;
    background: var(--ph-panel-2);
    font-size: 13px;
    color: var(--ph-sub);
    counter-increment: pho;
}
.ph-order li::before {
    content: counter(pho);
    position: absolute;
    left: 10px;
    top: 10px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ph-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}
.ph-order li b { display: block; font-size: 13.5px; color: var(--ph-ink); }

/* ---------- 通用 section ---------- */
.ph-section { margin-bottom: 28px; }
.ph-sec-head { margin-bottom: 14px; }
.ph-sec-head h2 {
    margin: 0 0 4px;
    font-size: 21px;
    font-weight: 900;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", serif;
}
.ph-sec-head p { margin: 0; font-size: 13.5px; color: var(--ph-sub); }

/* 免考职称结果 */
.ph-title-result {
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--ph-accent);
    background: var(--ph-accent-soft);
    display: grid;
    gap: 4px;
}
.ph-title-result b { font-size: 15px; color: var(--ph-accent-deep); }
.ph-title-result p { margin: 0; font-size: 13px; color: var(--ph-sub); }

/* 免考口径卡 */
.ph-clean-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ph-taboos { display: grid; gap: 10px; }
.ph-taboo {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px dashed var(--ph-line-strong);
    background: var(--ph-panel-2);
}
.ph-taboo b { display: block; font-size: 14px; color: var(--ph-accent-deep); margin-bottom: 2px; }
.ph-taboo p { margin: 0; font-size: 12.5px; color: var(--ph-sub); }

/* 注册与继续教育卡片 */
.ph-channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ph-channel {
    padding: 16px 16px 14px;
    border: 1px solid var(--ph-line);
    border-radius: 14px;
    background: var(--ph-panel);
    box-shadow: var(--ph-shadow);
    display: grid;
    gap: 8px;
    align-content: start;
}
.ph-channel--risk { border-color: var(--ph-accent2); }
.ph-channel-ico { font-size: 26px; line-height: 1; }
.ph-channel h3 { margin: 0; font-size: 15px; font-weight: 800; }
.ph-channel--risk h3 { color: var(--ph-accent2); }
.ph-channel-desc { margin: 0; font-size: 12.5px; color: var(--ph-sub); line-height: 1.7; }
.ph-channel-tags { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.ph-channel-tags li {
    font-size: 12px;
    font-weight: 600;
    color: var(--ph-sub);
    padding-left: 14px;
    position: relative;
}
.ph-channel-tags li::before { content: "·"; position: absolute; left: 2px; font-weight: 900; color: var(--ph-accent); }
.ph-channel-tags li.is-good { color: var(--ph-accent-deep); }
.ph-channel-tags li.is-good::before { content: "✓"; color: var(--ph-accent); }
.ph-channel-tags li.is-warn { color: var(--ph-accent2); }
.ph-channel-tags li.is-warn::before { content: "!"; color: var(--ph-accent2); font-weight: 900; }

/* 待遇区间卡 */
.ph-pay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ph-pay {
    padding: 16px 16px 14px;
    border: 1px solid var(--ph-line);
    border-radius: 14px;
    background: var(--ph-panel);
    box-shadow: var(--ph-shadow);
    display: grid;
    gap: 6px;
    align-content: start;
}
.ph-pay-ico { font-size: 24px; line-height: 1; }
.ph-pay h3 { margin: 0; font-size: 14px; font-weight: 800; }
.ph-pay strong { font-size: 17px; color: var(--ph-accent-deep); font-variant-numeric: tabular-nums; line-height: 1.4; }
.ph-pay p { margin: 0; font-size: 12.5px; color: var(--ph-sub); line-height: 1.7; }
.ph-pay-note { margin-top: 12px; }

/* FAQ */
.ph-faq { display: grid; gap: 10px; }
.ph-faq .faq-item {
    border: 1px solid var(--ph-line);
    border-radius: 12px;
    background: var(--ph-panel);
    overflow: hidden;
}
.ph-faq .faq-item summary {
    padding: 13px 16px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.ph-faq .faq-item summary::-webkit-details-marker { display: none; }
.ph-faq .faq-item summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ph-accent);
    font-weight: 900;
    font-size: 16px;
}
.ph-faq .faq-item[open] summary::after { content: "−"; }
.ph-faq .faq-a { padding: 0 16px 13px; font-size: 13.5px; color: var(--ph-sub); line-height: 1.8; }

/* 留言 */
.ph-comments { margin-bottom: 30px; }

/* 返回顶部 */
.ph-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--ph-line-strong);
    background: var(--ph-panel);
    color: var(--ph-accent-deep);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s;
    box-shadow: var(--ph-shadow);
    z-index: 50;
}
.ph-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.ph-top:hover { background: var(--ph-accent); color: #fff; }

/* toast */
.ph-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--ph-accent-deep);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    z-index: 60;
}
.ph-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .ph-hero { grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.8fr); }
    .ph-hero-cab { display: none; }
    .ph-calc { grid-template-columns: 1fr; }
    .ph-result-col { position: static; }
    .ph-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ph-pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .ph-hero { grid-template-columns: 1fr; padding: 24px 20px 20px; }
    .ph-hero::before { background: repeating-linear-gradient(180deg, transparent 0 27px, var(--ph-line) 27px 28px); }
    .ph-panel { padding: 16px 16px; }
    .ph-grid2, .ph-clean-grid, .ph-kpis, .ph-channels, .ph-pay-grid { grid-template-columns: 1fr; }
    .ph-seg--3 { grid-template-columns: 1fr; }
    .ph-seg--3 .ph-seg-btn + .ph-seg-btn { border-left: none; border-top: 1.5px solid var(--ph-line-strong); }
    .ph-actions { display: grid; grid-template-columns: 1fr; }
    .ph-actions .ph-btn { width: 100%; }
    .ph-sec-head h2 { font-size: 18px; }
    .ph-table--wide { font-size: 12.5px; }
    .ph-table--wide th, .ph-table--wide td { padding: 8px 8px; }
    .ph-top { right: 14px; bottom: 18px; }
}
