/* =====================================================================
 * 39 · 泡温泉水温时长对照 —— 独立皮肤「汤泉蒸汽」
 * 配色：靛青 / 暖橙 / 米白；布局：温度滑尺 + 时长环 + 禁忌标签云 + 泡后四步；
 * 字体层级：衬线大标题 + 小字疏排说明(letter-spacing .04em) + 等宽 40px 数据。
 * ===================================================================== */

.hg4-p39 {
    --p39-bg: #f6f2ec;
    --p39-surface: #fffdf9;
    --p39-surface2: #efe8dd;
    --p39-ink: #17324d;
    --p39-sub: #4d6070;
    --p39-muted: #8b97a0;
    --p39-line: #ded5c7;
    --p39-accent: #e07b39;
    --p39-accent2: #2d6f8a;
    --p39-bad: #b34b36;
    --p39-soft: rgba(224, 123, 57, .12);
    --p39-badbg: rgba(179, 75, 54, .12);
    --p39-on: #fffdf9;
    --p39-shadow: 0 16px 40px rgba(23, 50, 77, .09);
    --p39-serif: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
    --p39-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    --p39-sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    background:
        radial-gradient(900px 420px at 12% -8%, rgba(224, 123, 57, .10), transparent 62%),
        radial-gradient(760px 360px at 90% 2%, rgba(45, 111, 138, .10), transparent 58%),
        var(--p39-bg);
    color: var(--p39-ink);
    font-family: var(--p39-sans); font-size: 15px; line-height: 1.88;
    letter-spacing: .01em;
    min-height: 60vh; padding: 0 0 72px; -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] .hg4-p39 {
    --p39-bg: #0e1922; --p39-surface: #14222e; --p39-surface2: #1b2c39;
    --p39-ink: #eaf2f6; --p39-sub: #b0c1cc; --p39-muted: #7f96a4;
    --p39-line: #273d4c; --p39-accent: #f0a06b; --p39-accent2: #6cb2cc;
    --p39-bad: #f0917a; --p39-soft: rgba(240, 160, 107, .14); --p39-badbg: rgba(240, 145, 122, .14);
    --p39-on: #0c1720; --p39-shadow: 0 16px 40px rgba(0, 0, 0, .4);
    background: radial-gradient(900px 420px at 12% -8%, rgba(240, 160, 107, .08), transparent 62%),
        radial-gradient(760px 360px at 90% 2%, rgba(108, 178, 204, .08), transparent 58%), var(--p39-bg);
}
.hg4-p39 *, .hg4-p39 *::before, .hg4-p39 *::after { box-sizing: border-box; }
.hg4-p39 h1, .hg4-p39 h2, .hg4-p39 h3 { margin: 0; font-family: var(--p39-serif); font-weight: 700; letter-spacing: 0; line-height: 1.42; }
.hg4-p39 p { margin: 0 0 12px; }
.hg4-p39 strong, .hg4-p39 b { font-weight: 750; color: var(--p39-ink); }
.hg4-p39 a { color: var(--p39-accent); text-decoration: none; }
.hg4-p39 a:hover { text-decoration: underline; }
.hg4-p39 button { cursor: pointer; font-family: inherit; }
.hg4-p39 [hidden] { display: none !important; }
.hg4-p39 img { max-width: 100%; height: auto; }
.p39-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.p39-wrap { max-width: 1220px; margin: 0 auto; padding: 0 24px; }

/* ---------- 首屏 ---------- */
.p39-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); gap: 34px; align-items: center; padding: 38px 0 30px; border-bottom: 1px solid var(--p39-line); }
.p39-kicker { display: inline-block; font: 700 10px/1.4 var(--p39-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--p39-accent); border-bottom: 1px solid var(--p39-accent); padding-bottom: 6px; }
.p39-hero h1 { font-size: clamp(30px, 3.5vw, 45px); line-height: 1.32; margin: 17px 0 13px; color: var(--p39-ink); background: none; -webkit-text-fill-color: currentColor; }
.p39-lede { font-size: 15px; line-height: 2; letter-spacing: .02em; color: var(--p39-sub); max-width: 58ch; margin: 0 0 16px; }
.p39-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; }
.p39-points li { font-size: 12px; letter-spacing: .04em; color: var(--p39-sub); background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 99px; padding: 4px 12px; }
.p39-hero-note { font-size: 12px; letter-spacing: .03em; color: var(--p39-muted); margin: 0; }
.p39-console { background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 14px; box-shadow: var(--p39-shadow); padding: 20px 22px 22px; }
.p39-console-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--p39-line); padding-bottom: 12px; }
.p39-console-head b { font: 700 10.5px/1.4 var(--p39-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--p39-accent); }
.p39-console-head span { font-size: 11px; color: var(--p39-muted); }
.p39-field { display: block; font-size: 12.5px; font-weight: 700; color: var(--p39-ink); margin-bottom: 12px; }
.p39-field > span { display: block; margin-bottom: 5px; }
.p39-field i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--p39-muted); margin-left: 4px; }
.p39-input { width: 100%; font-family: inherit; font-size: 14px; color: var(--p39-ink); background: var(--p39-surface2); border: 1px solid var(--p39-line); border-radius: 8px; padding: 9px 11px; outline: none; }
.p39-input:focus { border-color: var(--p39-accent); box-shadow: 0 0 0 3px var(--p39-soft); }
.p39-textarea { resize: vertical; min-height: 106px; line-height: 1.7; }
.p39-range { width: 100%; accent-color: var(--p39-accent); margin: 6px 0 0; }
.p39-tempout { display: block; font: 700 22px/1.4 var(--p39-mono); color: var(--p39-accent); margin-top: 4px; }
.p39-scale { display: flex; justify-content: space-between; font: 700 10px/1.5 var(--p39-mono); letter-spacing: .04em; color: var(--p39-muted); margin: 0 0 16px; }
.p39-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.p39-lab { display: block; font-size: 12.5px; font-weight: 700; margin: 4px 0 9px; }
.p39-lab i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--p39-muted); margin-left: 5px; }
.p39-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.p39-tags label { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .02em; color: var(--p39-sub); background: var(--p39-surface2); border: 1px solid var(--p39-line); border-radius: 7px; padding: 7px 9px; cursor: pointer; }
.p39-tags input { accent-color: var(--p39-accent); }
.p39-console-btns, .p39-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.p39-btn { appearance: none; border: 1px solid var(--p39-line); background: var(--p39-surface2); color: var(--p39-ink); font-size: 13.5px; font-weight: 700; border-radius: 8px; padding: 9px 17px; transition: transform .14s, filter .14s; }
.p39-btn:hover { transform: translateY(-1px); border-color: var(--p39-accent); }
.p39-btn--main { background: var(--p39-accent); color: var(--p39-on); border-color: var(--p39-accent); }
:root[data-theme="dark"] .p39-btn--main { color: #0c1720; }
.hg4-err.p39-err { font-size: 12.5px; color: var(--p39-bad); min-height: 0; margin: 8px 0 0; }
.hg4-err.p39-err:empty { display: none; }
.p39-scope { margin: 20px 0 0; padding: 14px 17px; border-left: 3px solid var(--p39-accent2); background: var(--p39-surface); border-radius: 0 9px 9px 0; font-size: 13px; line-height: 1.95; color: var(--p39-sub); }

/* ---------- 结果 ---------- */
.p39-result, .p39-extra, .p39-content { padding: 28px 0; border-bottom: 1px solid var(--p39-line); }
.p39-sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.p39-sec-no { font: 700 10px/1 var(--p39-mono); letter-spacing: .16em; color: var(--p39-accent); border: 1px solid var(--p39-accent); border-radius: 4px; padding: 5px 7px; }
.p39-sec-head h2 { font-size: 22px; }
.p39-sec-head small { font-family: var(--p39-sans); font-size: 12px; color: var(--p39-muted); font-weight: 400; }
.p39-empty { display: flex; align-items: center; gap: 16px; background: var(--p39-surface); border: 1px dashed var(--p39-line); border-radius: 12px; padding: 26px 22px; color: var(--p39-muted); font-size: 14px; }
.p39-empty b { font-size: 34px; font-weight: 400; }
.p39-alert { background: var(--p39-badbg); border: 1px solid var(--p39-bad); border-left: 5px solid var(--p39-bad); border-radius: 0 9px 9px 0; padding: 14px 17px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.92; color: var(--p39-sub); }
.p39-alert strong { color: var(--p39-bad); }
.p39-hero-out { display: grid; grid-template-columns: minmax(0, 1fr) 210px minmax(0, .9fr); gap: 14px; align-items: stretch; }
.p39-band-card { background: var(--p39-ink); color: var(--p39-surface); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
:root[data-theme="dark"] .p39-band-card { background: #1b3346; border: 1px solid var(--p39-line); }
.p39-band-card span { font: 700 10px/1.5 var(--p39-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--p39-accent); }
.p39-band-card b { font-family: var(--p39-serif); font-size: 27px; margin: 6px 0 8px; color: inherit; }
.p39-band-card p { font-size: 12.5px; line-height: 1.85; opacity: .85; margin: 0; }
.p39-ring-card { background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 12px; padding: 15px 12px; text-align: center; }
.p39-ring { width: 126px; height: 126px; margin: 0 auto; border-radius: 50%; background: conic-gradient(var(--p39-accent) var(--p39-ring, 0%), var(--p39-surface2) 0); display: grid; place-items: center; }
.p39-ring-in { width: 102px; height: 102px; border-radius: 50%; background: var(--p39-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.p39-ring-in b { font: 700 34px/1.2 var(--p39-mono); color: var(--p39-ink); font-variant-numeric: tabular-nums; }
.p39-ring-in span { font-size: 10.5px; color: var(--p39-muted); }
.p39-ring-note { font-size: 11.5px; line-height: 1.75; color: var(--p39-muted); margin: 9px 0 0; }
.p39-nums { display: flex; flex-direction: column; gap: 9px; justify-content: center; }
.p39-nums > div { background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 9px; padding: 9px 13px; }
.p39-nums span { display: block; font: 700 10px/1.5 var(--p39-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--p39-muted); }
.p39-nums b { font: 700 17px/1.5 var(--p39-mono); color: var(--p39-ink); }
.p39-two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; margin-top: 16px; }
.p39-panel { background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 11px; padding: 16px 18px; }
.p39-panel h3 { font-size: 16px; margin-bottom: 10px; }
.p39-panel h3 small { display: block; font-family: var(--p39-sans); font-size: 11.5px; font-weight: 400; color: var(--p39-muted); margin-top: 3px; }
.p39-list { list-style: none; margin: 0; padding: 0; }
.p39-list li { position: relative; padding: 8px 0 8px 20px; font-size: 13.5px; line-height: 1.9; color: var(--p39-sub); border-bottom: 1px solid var(--p39-line); }
.p39-list li:last-child { border-bottom: 0; }
.p39-list li::before { content: "≈"; position: absolute; left: 0; color: var(--p39-accent); font-family: var(--p39-mono); }
.p39-list strong { color: var(--p39-ink); }
.p39-taglist { display: flex; flex-wrap: wrap; gap: 7px; }
.p39-taglist span { font-size: 12px; border-radius: 99px; padding: 5px 11px; border: 1px solid var(--p39-line); color: var(--p39-sub); background: var(--p39-surface2); }
.p39-taglist span.is-hit { color: var(--p39-bad); background: var(--p39-badbg); border-color: var(--p39-bad); font-weight: 700; }
.p39-subh { font-size: 18px; margin: 24px 0 11px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.p39-chip { font-family: var(--p39-mono); font-size: 11px; background: var(--p39-soft); color: var(--p39-accent); border-radius: 99px; padding: 3px 10px; }
.p39-after { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.p39-after-item { background: var(--p39-surface); border: 1px solid var(--p39-line); border-top: 3px solid var(--p39-accent2); border-radius: 9px; padding: 12px 14px; }
.p39-after-item b { display: block; font: 700 10px/1.5 var(--p39-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--p39-accent); margin-bottom: 5px; }
.p39-after-item h4 { font-family: var(--p39-sans); font-size: 13.5px; margin: 0 0 5px; }
.p39-after-item p { font-size: 12.5px; line-height: 1.8; color: var(--p39-sub); margin: 0; }
.p39-table-scroll { overflow-x: auto; border: 1px solid var(--p39-line); border-radius: 10px; }
.p39-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
.p39-table th, .p39-table td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--p39-line); }
.p39-table th { background: var(--p39-surface2); font-size: 12px; color: var(--p39-sub); font-weight: 700; white-space: nowrap; }
.p39-table tr:last-child td { border-bottom: 0; }
.p39-disclaimer { margin: 20px 0 0; padding: 13px 16px; border-left: 3px solid var(--p39-bad); background: var(--p39-surface2); border-radius: 0 9px 9px 0; font-size: 13px; line-height: 1.92; color: var(--p39-sub); }

/* ---------- 批量 / 内容 ---------- */
.p39-extra-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.p39-card { background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 11px; padding: 17px 19px; }
.p39-card h3 { font-size: 16px; margin-bottom: 10px; }
.p39-hint { font-size: 12.5px; color: var(--p39-muted); line-height: 1.8; margin: 8px 0 12px; }
.p39-card-text { font-size: 13.5px; line-height: 1.98; color: var(--p39-sub); }
.p39-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 17px; }
.p39-tab { border: 1px solid var(--p39-line); background: var(--p39-surface); color: var(--p39-sub); font-size: 13px; font-weight: 700; border-radius: 99px; padding: 8px 17px; }
.p39-tab.is-on { background: var(--p39-ink); color: var(--p39-on); border-color: var(--p39-ink); }
:root[data-theme="dark"] .p39-tab.is-on { background: var(--p39-accent); color: #0c1720; border-color: var(--p39-accent); }
.p39-prose { max-width: 84ch; }
.p39-prose h3 { font-size: 18px; margin: 22px 0 9px; }
.p39-prose h3:first-child { margin-top: 0; }
.p39-prose p { font-size: 14.5px; line-height: 2.05; letter-spacing: .02em; color: var(--p39-sub); margin: 0 0 15px; }
.p39-figure { display: block; width: 100%; max-width: 720px; border: 1px solid var(--p39-line); border-radius: 10px; margin: 6px 0 18px; }
.p39-faq details { border: 1px solid var(--p39-line); background: var(--p39-surface); border-radius: 9px; margin-bottom: 8px; }
.p39-faq summary { cursor: pointer; font-size: 14.5px; font-weight: 700; padding: 13px 16px; }
.p39-faq details > div { padding: 0 16px 15px; font-size: 14px; line-height: 2; color: var(--p39-sub); }
.p39-faq details > div strong { color: var(--p39-ink); }
.p39-boundary { margin: 24px 0 18px; padding: 14px 17px; border: 1px solid var(--p39-line); border-radius: 10px; background: var(--p39-surface2); font-size: 13px; line-height: 1.92; color: var(--p39-sub); }
.p39-related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.p39-related a { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--p39-surface); border: 1px solid var(--p39-line); border-radius: 9px; padding: 12px 14px; font-size: 13.5px; font-weight: 700; color: var(--p39-ink); }
.p39-related a:hover { border-color: var(--p39-accent); text-decoration: none; }
.p39-related a span { color: var(--p39-accent); }

@media (max-width: 980px) {
    .p39-hero-out { grid-template-columns: 1fr 1fr; }
    .p39-nums { grid-column: 1 / -1; flex-direction: row; }
    .p39-nums > div { flex: 1; }
    .p39-after { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .p39-hero, .p39-two, .p39-extra-grid { grid-template-columns: 1fr; }
    .p39-related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .p39-wrap { padding: 0 16px; }
    .p39-fields, .p39-tags, .p39-hero-out { grid-template-columns: 1fr; }
    .p39-nums { flex-direction: column; }
    .p39-after, .p39-related { grid-template-columns: 1fr; }
}
