/* 中药代茶饮配比 · HERBAL CUP · 代茶饮配比 · 独立主题 htr */
.htr-page, .htr-modal, .htr-toast {
    --htr-bg: #f6f5ea;
    --htr-paper: #fffef6;
    --htr-soft: #ecebdc;
    --htr-ink: #2f3a2c;
    --htr-sub: #6f7a68;
    --htr-line: #dcdcc6;
    --htr-brand: #3f6f4a;
    --htr-brand-2: #6f9665;
    --htr-accent: #c4933d;
    --htr-accent-soft: #f6e9c8;
    --htr-good: #2f7a62;
    --htr-bad: #b14a3a;
    --htr-shadow: 0 14px 36px rgba(63,111,74,.10);
    --htr-font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --htr-num: "Bahnschrift", "DIN Alternate", Consolas, monospace;
}
:root[data-theme="dark"] .htr-page,
:root[data-theme="dark"] .htr-modal,
:root[data-theme="dark"] .htr-toast {
    --htr-bg: #111a13;
    --htr-paper: #1a241c;
    --htr-soft: #243024;
    --htr-ink: #e8f0e3;
    --htr-sub: #a2b69c;
    --htr-line: #334434;
    --htr-brand: #8fd6a0;
    --htr-brand-2: #b5e5bd;
    --htr-accent: #e8c977;
    --htr-accent-soft: #37301c;
    --htr-good: #8fd3bf;
    --htr-bad: #ff9b83;
    --htr-shadow: 0 14px 36px rgba(0,0,0,.42);
}
.htr-page .htr-hero-side:before{content:"";position:absolute;inset:-10% -20% auto auto;width:220px;height:220px;border:18px solid var(--htr-accent);border-radius:50%;opacity:.18}
.htr-page { background: var(--htr-bg); color: var(--htr-ink); font-family: var(--htr-font); font-size: 15px; line-height: 1.76; }
.htr-page * { box-sizing: border-box; }
.htr-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 22px 60px; }
.htr-page .detail-breadcrumb { font-size: 13px; color: var(--htr-sub); margin-bottom: 20px; }
.htr-page .detail-breadcrumb a { color: var(--htr-brand); text-decoration: none; }
.htr-page .detail-breadcrumb .sep { margin: 0 8px; opacity: .6; }
.htr-page .detail-breadcrumb .current { color: var(--htr-ink); }

.htr-hero { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, .68fr); gap: 26px; }
.htr-hero > * { min-width: 0; }
.htr-hero-copy { background: var(--htr-paper); border: 1px solid var(--htr-line); border-radius: 16px; padding: 30px 32px 24px; box-shadow: var(--htr-shadow); border-top: 5px solid var(--htr-brand); }
.htr-kicker { display: inline-block; font-family: var(--htr-num); font-size: 11px; letter-spacing: .18em; color: var(--htr-accent); background: var(--htr-brand); padding: 4px 12px; border-radius: 4px; font-weight: 700; }
.htr-hero h1 { font-size: clamp(26px, 3.1vw, 37px); line-height: 1.26; margin: 16px 0 10px; font-weight: 800; letter-spacing: -.02em; }
.htr-hero h1 em { display: block; font-style: normal; font-size: .54em; color: var(--htr-brand-2); font-weight: 600; margin-top: 7px; }
.htr-sub { color: var(--htr-sub); font-size: 14.5px; margin: 0 0 20px; max-width: 64ch; }
.htr-sub b { color: var(--htr-brand-2); }
:root[data-theme="dark"] .htr-sub b { color: var(--htr-brand); }
.htr-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.htr-fact { background: var(--htr-soft); border: 1px solid var(--htr-line); border-radius: 11px; padding: 12px 14px; min-width: 0; }
.htr-fact span { display: block; font-size: 12px; color: var(--htr-sub); }
.htr-fact b { font-family: var(--htr-num); font-size: 24px; line-height: 1.35; word-break: break-word; }
.htr-fact.is-main { background: var(--htr-brand); border-color: var(--htr-brand); }
.htr-fact.is-main span { color: rgba(255,255,255,.76); }
.htr-fact.is-main b { color: var(--htr-accent); font-size: 27px; }
:root[data-theme="dark"] .htr-fact.is-main span { color: rgba(0,0,0,.68); }

.htr-hero-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 9px; align-items: end; border-top: 1px dashed var(--htr-line); padding-top: 16px; }
.htr-hero-form > label { display: block; min-width: 0; }
.htr-page label > span { display: block; font-size: 11.5px; color: var(--htr-sub); margin-bottom: 4px; }
.htr-page input:not([type="checkbox"]), .htr-page select, .htr-page textarea { width: 100%; background: var(--htr-soft); color: var(--htr-ink); border: 1px solid var(--htr-line); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: var(--htr-num); outline: none; }
.htr-page select, .htr-page textarea { font-family: var(--htr-font); }
.htr-page input:focus, .htr-page select:focus, .htr-page textarea:focus { border-color: var(--htr-accent); box-shadow: 0 0 0 3px var(--htr-accent-soft); }
.htr-hero-form .htr-check { display: inline-flex; align-items: center; gap: 6px; align-self: center; font-size: 12.5px; color: var(--htr-sub); }
.htr-hero-form .htr-check span { margin: 0; }
.htr-hero-form .htr-check input { width: auto; accent-color: var(--htr-brand); }
.htr-hero-form .htr-wide { grid-column: 1 / -1; }
.htr-go { background: var(--htr-accent); color: var(--htr-bg); border: 0; border-radius: 8px; padding: 10px 15px; font-weight: 800; font-size: 13.5px; cursor: pointer; white-space: nowrap; font-family: var(--htr-font); }
.htr-go:hover { filter: brightness(1.06); }
.htr-err { color: var(--htr-bad); font-size: 13px; margin: 10px 0 0; font-weight: 600; }

.htr-hero-side { position: relative; overflow: hidden; background: var(--htr-brand); color: #fff; border-radius: 16px; padding: 26px 22px; box-shadow: var(--htr-shadow); display: flex; flex-direction: column; justify-content: center; min-height: 240px; }
.htr-hero-side > * { position: relative; z-index: 1; }
.htr-side-kicker { font-family: var(--htr-num); font-size: 10.5px; letter-spacing: .2em; opacity: .78; }
.htr-side-title { font-size: 21px; font-weight: 800; margin: 10px 0 4px; }
.htr-side-num { font-family: var(--htr-num); font-size: 40px; line-height: 1.2; color: var(--htr-accent); word-break: break-word; }
.htr-side-note { font-size: 12.5px; opacity: .82; margin-top: 10px; }

.htr-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 22px; background: var(--htr-paper); border: 1px dashed var(--htr-line); border-radius: 10px; padding: 12px 16px; }
.htr-quick > span { font-size: 12.5px; color: var(--htr-sub); }
.htr-quick button, .htr-mini { background: var(--htr-soft); color: var(--htr-ink); border: 1px solid var(--htr-line); border-radius: 20px; padding: 6px 13px; font-size: 12.5px; cursor: pointer; font-family: var(--htr-font); }
.htr-quick button:hover, .htr-mini:hover { border-color: var(--htr-accent); }
.htr-quick button.is-main { background: var(--htr-brand); color: #fff; border-color: var(--htr-brand); font-weight: 700; }
:root[data-theme="dark"] .htr-quick button.is-main { color: var(--htr-bg); }

.htr-panel { background: var(--htr-paper); border: 1px solid var(--htr-line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--htr-shadow); margin-bottom: 20px; min-width: 0; }
.htr-panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.htr-panel-head h2 { font-size: 18px; margin: 0; }
.htr-panel-head small { color: var(--htr-sub); font-size: 12px; }
.htr-tag { width: 24px; height: 24px; border-radius: 6px; background: var(--htr-brand); color: var(--htr-accent); display: inline-flex; align-items: center; justify-content: center; font-family: var(--htr-num); font-size: 12px; font-weight: 800; }
.htr-chart { background: var(--htr-soft); border: 1px solid var(--htr-line); border-radius: 10px; padding: 8px; overflow-x: auto; }
.htr-chart svg { width: 100%; min-width: 540px; height: auto; display: block; }
.htr-scroll { overflow-x: auto; margin-top: 14px; }
.htr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.htr-table th { text-align: left; color: var(--htr-sub); font-size: 12px; font-weight: 600; padding: 8px; border-bottom: 1px solid var(--htr-line); white-space: nowrap; }
.htr-table td { padding: 7px 8px; border-bottom: 1px dashed var(--htr-line); }
.htr-table td input, .htr-table td select { padding: 5px 7px; font-size: 13px; }
.htr-table .num { font-family: var(--htr-num); }
.htr-table tr.is-best { background: var(--htr-accent-soft); }
.htr-table tr.is-best .num { color: var(--htr-good); font-weight: 800; }
.htr-tip { color: var(--htr-sub); font-size: 12px; margin: 12px 0 0; }

.htr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.htr-card { background: var(--htr-soft); border: 1px solid var(--htr-line); border-radius: 11px; padding: 14px; min-width: 0; }
.htr-card small { display: block; color: var(--htr-sub); font-size: 11.5px; }
.htr-card b { display: block; font-family: var(--htr-num); font-size: 19px; margin: 5px 0 4px; word-break: break-word; }
.htr-card span { font-size: 12px; color: var(--htr-sub); }

.htr-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.htr-rule { background: var(--htr-soft); border-left: 3px solid var(--htr-accent); padding: 11px 13px; font-size: 12.5px; border-radius: 0 8px 8px 0; min-width: 0; }
.htr-rule b { display: block; margin-bottom: 3px; }
.htr-rule span { color: var(--htr-sub); }

.htr-note span { display: block; font-size: 12px; color: var(--htr-sub); margin-bottom: 6px; }
.htr-note-out { font-size: 13px; background: var(--htr-soft); border-left: 3px solid var(--htr-accent); padding: 8px 12px; margin-top: 10px; }
.htr-note-out:empty { display: none; }
.htr-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.htr-btn { background: var(--htr-brand); color: #fff; border: 1px solid var(--htr-brand); border-radius: 8px; padding: 8px 15px; font-size: 13px; cursor: pointer; font-family: var(--htr-font); }
.htr-btn:hover { filter: brightness(1.14); }
:root[data-theme="dark"] .htr-btn { color: var(--htr-bg); }
.htr-del { background: none; border: 0; color: var(--htr-bad); cursor: pointer; font-size: 17px; }

.htr-modal[hidden] { display: none !important; }
.htr-modal { position: fixed; inset: 0; z-index: 900; background: rgba(12, 18, 24, .62); display: flex; align-items: center; justify-content: center; padding: 20px; }
.htr-sheet { background: var(--htr-paper); color: var(--htr-ink); border-radius: 14px; padding: 26px; max-width: 460px; width: 100%; box-shadow: var(--htr-shadow); border-top: 6px solid var(--htr-accent); }
.htr-sheet h3 { margin: 0 0 8px; font-size: 19px; }
.htr-sheet p { color: var(--htr-sub); font-size: 13px; }
.htr-sheet code { display: block; background: var(--htr-soft); border: 1px dashed var(--htr-line); padding: 10px; font-size: 11.5px; word-break: break-all; border-radius: 6px; }
.htr-sheet-actions { text-align: right; margin-top: 16px; }
.htr-toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); background: var(--htr-brand); color: #fff; padding: 10px 20px; border-radius: 24px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 950; }
.htr-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
    .htr-hero { grid-template-columns: minmax(0, 1fr); }
    .htr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .htr-rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .htr-wrap { padding: 14px 12px 40px; }
    .htr-hero-copy { padding: 22px 18px; }
    .htr-facts { grid-template-columns: minmax(0, 1fr); }
    .htr-hero-form { grid-template-columns: minmax(0, 1fr); }
    .htr-cards { grid-template-columns: minmax(0, 1fr); }
    .htr-chart svg { min-width: 460px; }
    .htr-table { min-width: 0; font-size: 12px; }
    .htr-table th:nth-child(3), .htr-table td:nth-child(3) { display: none; }
    .htr-page input, .htr-page select, .htr-page textarea { font-size: 16px; }
}
@media print { .htr-quick, .htr-actions, .htr-scroll, .htr-modal, .htr-toast, .tskb { display: none !important; } }
