/**
 * 平潭天气专题页（/tianqi/）样式
 *
 * 由 haitan-weather 插件提供，仅在 page-tianqi.php 模板下加载。
 * V2：首屏精简 + CSS Tab（radio，零 JS）+ 潮汐曲线图。
 *
 * 约定：
 *   - 所有选择器带 htw- 前缀或挂在 .htw-page 下，不覆盖 JustNews 全局样式
 *   - 不复用主题的 .container / .row / .card 等通用类
 *   - 不引入任何第三方 CSS 框架，字体继承站点 body
 *
 * 目录：
 *   1. 变量与基础
 *   2. 容器与分区
 *   3. Hero
 *   4. 首屏：今日天气
 *   5. Tab 选项卡（radio + label）
 *   6. 场景卡片（今天适合怎么玩）
 *   7. 未来天气（横向滚动）
 *   8. 潮汐曲线图 + 潮汐表
 *   9. 日出日落
 *   10. 蓝眼泪
 *   11. 景点卡片
 *   12. 旅游服务入口
 *   13. 文章与 SEO 文案
 *   14. 通用元件（按钮 / 空态 / 免责声明）
 *   15. 响应式
 */

/* ------------------------------------------------------------------ 1. 变量 */

.htw-page {
    --htw-blue: #1684d8;
    --htw-blue-deep: #0d6aa8;
    --htw-ink: #16324a;
    --htw-text: #46647a;
    --htw-muted: #7d97a9;
    --htw-line: #e4eef6;
    --htw-surface: #ffffff;
    --htw-surface-soft: #f5faff;
    --htw-tag-bg: #edf6fd;
    --htw-tag-ink: #2c6a94;
    --htw-warn: #f2740c;
    --htw-good: #1684d8;
    --htw-radius-l: 14px;
    --htw-radius-m: 10px;
    --htw-radius-s: 8px;
    --htw-gap: 10px;

    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    color: var(--htw-text);
    background: var(--htw-surface-soft);
}

.htw-page .htw-section-title,
.htw-page .htw-seo-body,
.htw-page .htw-poi-title,
.htw-page .htw-scene-reason {
    overflow-wrap: anywhere;
}

.htw-page img {
    max-width: 100%;
}

/* 跨午夜缓存自检提示条：默认 hidden，仅脚本判定日期不匹配时显示 */
.htw-stale[hidden] {
    display: none !important;
}

.htw-stale {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #f5c98a;
    border-radius: 8px;
    background: #fff7ee;
    color: #8a5a10;
    font-size: 13px;
    line-height: 1.6;
}

.htw-stale-btn {
    padding: 5px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--htw-warn);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

/* ------------------------------------------------------------ 2. 容器与分区 */

.htw-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.htw-page .htw-section {
    scroll-margin-top: 136px;
    padding: 30px 0 6px;
}

.htw-section-head {
    margin-bottom: 16px;
}

.htw-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: var(--htw-ink);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.35;
}

.htw-section-emoji {
    font-size: 20px;
    line-height: 1;
}

.htw-section-desc {
    margin: 0;
    color: var(--htw-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ------------------------------------------------------------------ 3. Hero */

.htw-hero {
    padding: 34px 0 26px;
    background: linear-gradient(180deg, #e6f3fd 0%, #f2f9ff 55%, var(--htw-surface-soft) 100%);
    border-bottom: 1px solid var(--htw-line);
}

.htw-hero-kicker {
    margin: 0 0 8px;
    color: var(--htw-blue);
    font-size: 13px;
    letter-spacing: .04em;
}

.htw-hero-title {
    margin: 0 0 10px;
    color: var(--htw-ink);
    font-size: 34px;
    font-weight: 500;
    line-height: 1.25;
}

.htw-hero-desc {
    margin: 0;
    max-width: 640px;
    color: var(--htw-text);
    font-size: 15px;
    line-height: 1.7;
}

.htw-hero-meta {
    margin: 10px 0 0;
    color: var(--htw-muted);
    font-size: 13px;
}

/* -------------------------------------------------------------- 4. 首屏今日天气 */

.htw-now {
    padding: 20px 0 6px;
}

.htw-now-card {
    padding: 18px 16px;
}

.htw-now-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.htw-now-icon {
    font-size: 42px;
    line-height: 1;
}

.htw-now-tempbox {
    min-width: 0;
}

.htw-now-temp {
    margin: 0;
    color: var(--htw-ink);
    font-size: 38px;
    font-weight: 500;
    line-height: 1.1;
}

.htw-now-cond {
    margin: 2px 0 0;
    color: var(--htw-text);
    font-size: 15px;
}

.htw-now-range {
    margin: 2px 0 0;
    color: var(--htw-muted);
    font-size: 13px;
}

/* 核心指标：4 格，首屏一眼看完 */
.htw-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 0;
}

.htw-metric {
    padding: 10px 12px;
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface-soft);
}

.htw-metric dt {
    color: var(--htw-muted);
    font-size: 12px;
    line-height: 1.5;
}

.htw-metric dd {
    margin: 2px 0 0;
    color: var(--htw-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.htw-now-sun {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px dashed var(--htw-line);
    color: var(--htw-text);
    font-size: 13px;
}

.htw-now-sun-tip {
    color: var(--htw-muted);
    font-size: 12px;
}

.htw-now-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--htw-blue);
    border-radius: 0 var(--htw-radius-s) var(--htw-radius-s) 0;
    background: var(--htw-surface-soft);
    color: var(--htw-text);
    font-size: 14px;
    line-height: 1.7;
}

.htw-now-sea {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: var(--htw-radius-s);
    background: #fff7ee;
    color: var(--htw-ink);
    font-size: 14px;
    line-height: 1.7;
}

.htw-now-sea-disclaimer {
    display: block;
    margin-top: 2px;
    color: var(--htw-muted);
    font-size: 12px;
}

.htw-now-disclaimer {
    margin: 10px 0 0;
    color: var(--htw-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* ------------------------------------------------------- 5. Tab 选项卡（radio） */

/* radio 本身隐藏，靠 label 触发 */
.htw-tab-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.htw-tab-labels {
    display: flex;
    gap: 6px;
    padding: 2px 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.htw-tab-label {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--htw-line);
    border-radius: 999px;
    background: var(--htw-surface);
    color: var(--htw-text);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    min-height: 38px;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.htw-tab-label:hover {
    border-color: var(--htw-blue);
}

/* radio 选中 → label 高亮 */
#htw-tab-play:checked ~ .htw-container .htw-tab-label:nth-of-type(1),
#htw-tab-forecast:checked ~ .htw-container .htw-tab-label:nth-of-type(2),
#htw-tab-tide:checked ~ .htw-container .htw-tab-label:nth-of-type(3),
#htw-tab-lanyanlei:checked ~ .htw-container .htw-tab-label:nth-of-type(4),
#htw-tab-poi:checked ~ .htw-container .htw-tab-label:nth-of-type(5) {
    background: var(--htw-blue);
    border-color: var(--htw-blue);
    color: #fff;
}

/* 面板：默认全部隐藏 */
.htw-panel {
    display: none;
    padding: 10px 0 16px;
}

/* radio 选中 → 对应面板显示 */
#htw-tab-play:checked ~ .htw-panels #htw-panel-play,
#htw-tab-forecast:checked ~ .htw-panels #htw-panel-forecast,
#htw-tab-tide:checked ~ .htw-panels #htw-panel-tide,
#htw-tab-lanyanlei:checked ~ .htw-panels #htw-panel-lanyanlei,
#htw-tab-poi:checked ~ .htw-panels #htw-panel-poi {
    display: block;
}

/* -------------------------------------------------- 6. 场景卡片（今天适合怎么玩） */

.htw-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--htw-gap);
    padding-bottom: 20px;
}

.htw-scene {
    padding: 12px 12px 14px;
    border: 1px solid var(--htw-line);
    border-left: 3px solid var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface);
    min-width: 0;
}

.htw-page .htw-scene-good { border-left-color: var(--htw-good); }
.htw-page .htw-scene-ok   { border-left-color: #6cb6e4; }
.htw-page .htw-scene-fair { border-left-color: #b9cbd8; }
.htw-page .htw-scene-bad  { border-left-color: var(--htw-warn); }
.htw-page .htw-scene-unknown { border-left-color: var(--htw-line); }

.htw-scene-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.htw-scene-emoji {
    font-size: 18px;
    line-height: 1;
}

.htw-scene-title {
    color: var(--htw-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.htw-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.6;
    white-space: nowrap;
    background: var(--htw-tag-bg);
    color: var(--htw-tag-ink);
}

.htw-badge-good { background: var(--htw-good); color: #fff; }
.htw-badge-ok   { background: #d9edfa; color: #1b6ea8; }
.htw-badge-fair { background: #e9eff3; color: #6b8296; }
.htw-badge-bad  { background: var(--htw-warn); color: #fff; }
.htw-badge-unknown { background: #eef2f5; color: #8b9aa6; }

.htw-scene-desc {
    margin: 6px 0 0;
    color: var(--htw-muted);
    font-size: 12px;
    line-height: 1.6;
}

.htw-scene-reason {
    margin: 6px 0 0;
    color: var(--htw-text);
    font-size: 13px;
    line-height: 1.7;
}

.htw-page .htw-lv-good { color: var(--htw-good); }
.htw-page .htw-lv-ok   { color: #1b6ea8; }
.htw-page .htw-lv-fair { color: #6b8296; }
.htw-page .htw-lv-bad  { color: var(--htw-warn); }

/* -------------------------------------------------------------- 7. 未来天气 */

.htw-forecast {
    display: flex;
    gap: 10px;
    margin: 0 -15px;
    padding: 4px 15px 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.htw-forecast-day {
    flex: 0 0 108px;
    scroll-snap-align: start;
    padding: 12px 8px;
    border: 1px solid var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface);
    text-align: center;
}

.htw-forecast-week { margin: 0; color: var(--htw-ink); font-size: 13px; font-weight: 500; }
.htw-forecast-date { margin: 2px 0 0; color: var(--htw-muted); font-size: 12px; }
.htw-forecast-icon { margin: 8px 0 0; font-size: 26px; line-height: 1; }
.htw-forecast-cond { margin: 4px 0 0; color: var(--htw-text); font-size: 12px; line-height: 1.5; }
.htw-forecast-temp { margin: 6px 0 0; color: var(--htw-muted); font-size: 12px; }
.htw-forecast-max { color: var(--htw-ink); font-size: 14px; }
.htw-forecast-wind,
.htw-forecast-rain { margin: 4px 0 0; color: var(--htw-muted); font-size: 11px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -------------------------------------------------- 8. 潮汐曲线图 + 潮汐表 */

.htw-tide-figure {
    margin: 0 0 6px;
}

.htw-tide-chart {
    position: relative;
    width: 100%;
    height: 140px;
}

.htw-tide-chart-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* 高低潮标签：用 HTML 绝对定位叠在 SVG 上方，文字不会随缩放变形 */
.htw-tide-marks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 28px;
    pointer-events: none;
}

.htw-tide-mark {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--htw-text);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
}

.htw-tide-mark b {
    color: var(--htw-ink);
    font-weight: 600;
    font-size: 12px;
}

.htw-tide-mark i {
    font-style: normal;
    color: var(--htw-muted);
    font-size: 10px;
}

.htw-mark-low { padding-top: 4px; }
.htw-mark-high { top: auto; bottom: 0; padding-bottom: 2px; }

/* 时间轴 */
.htw-tide-axis {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 16px;
    pointer-events: none;
}

.htw-tide-axis span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    color: var(--htw-muted);
    font-size: 10px;
    white-space: nowrap;
}

.htw-tide-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 2px 0 14px;
    color: var(--htw-muted);
    font-size: 11px;
}

.htw-legend-line {
    display: inline-block;
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: var(--htw-blue);
}

.htw-legend-now {
    display: inline-block;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: repeating-linear-gradient(90deg, var(--htw-warn), var(--htw-warn) 3px, transparent 3px, transparent 6px);
}

/* 潮汐表 */
.htw-tide-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.htw-tide-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface-soft);
}

.htw-tide-low { box-shadow: inset 3px 0 0 var(--htw-blue); }
.htw-tide-high { box-shadow: inset 3px 0 0 #b9cbd8; }

.htw-tide-time {
    color: var(--htw-ink);
    font-size: 16px;
    font-weight: 500;
}

.htw-tide-type {
    color: var(--htw-text);
    font-size: 13px;
}

.htw-tide-height {
    margin-left: auto;
    color: var(--htw-muted);
    font-size: 12px;
}

.htw-tide-window {
    margin: 0 0 14px;
    color: var(--htw-text);
    font-size: 14px;
    line-height: 1.7;
}

.htw-tide-window strong {
    color: var(--htw-ink);
    font-weight: 600;
}

/* 「查看完整潮汐表」按钮行（指向 /tide/ 潮汐专页） */
.htw-tide-more {
    margin: 14px 0 0;
}

.htw-disclaimer {
    margin: 0;
    color: var(--htw-muted);
    font-size: 12px;
    line-height: 1.7;
}

/* -------------------------------------------------------------- 9. 日出日落 */

.htw-sun-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.htw-sun-card {
    text-align: center;
    padding: 18px 14px;
}

.htw-sun-label {
    margin: 0;
    color: var(--htw-muted);
    font-size: 13px;
}

.htw-sun-time {
    margin: 6px 0 0;
    color: var(--htw-ink);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
}

.htw-sun-tip {
    margin: 8px 0 0;
    color: var(--htw-text);
    font-size: 13px;
    line-height: 1.6;
}

/* ---------------------------------------------------------------- 10. 蓝眼泪 */

.htw-lanyanlei-level {
    margin: 0;
    color: var(--htw-text);
    font-size: 14px;
}

.htw-lanyanlei-level strong {
    font-weight: 600;
}

.htw-lanyanlei-reason {
    margin: 8px 0 0;
    color: var(--htw-text);
    font-size: 14px;
    line-height: 1.7;
}

.htw-lanyanlei-link {
    margin: 14px 0 0;
}

/* -------------------------------------------------------------- 11. 景点卡片 */

.htw-poi-grid {
    align-items: stretch;
}

.htw-poi-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--htw-line);
    border-radius: var(--htw-radius-l);
    background: var(--htw-surface);
    color: var(--htw-text);
    text-decoration: none;
    overflow: hidden;
    min-width: 0;
    box-shadow: 0 1px 3px rgba(22, 50, 74, .06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

@media (hover: hover) {
    .htw-poi-card:hover {
        transform: translateY(-2px);
        border-color: #cfe4f4;
        box-shadow: 0 8px 20px rgba(22, 50, 74, .1);
        color: var(--htw-text);
    }
}

.htw-poi-card:focus-visible {
    outline: 2px solid var(--htw-blue);
    outline-offset: 2px;
}

.htw-poi-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e8f2fa;
}

.htw-poi-img-empty {
    background: linear-gradient(135deg, #eaf4fc 0%, #dcebf7 100%);
}

.htw-poi-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 14px;
}

.htw-poi-title {
    margin: 0;
    color: var(--htw-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.htw-poi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 23px;
}

.htw-poi-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--htw-tag-bg);
    color: var(--htw-tag-ink);
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
}

.htw-more {
    margin: 0 0 20px;
}

/* ---------------------------------------------------------- 12. 旅游服务入口 */

.htw-services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 20px;
}

.htw-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1px solid var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface);
    color: var(--htw-blue-deep);
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(22, 132, 216, .06);
    transition: border-color .2s ease, background-color .2s ease;
    min-height: 74px;
}

@media (hover: hover) {
    .htw-service:hover {
        border-color: var(--htw-blue);
        background: var(--htw-tag-bg);
    }
}

.htw-service:focus-visible {
    outline: 2px solid var(--htw-blue);
    outline-offset: 2px;
}

.htw-service-emoji {
    font-size: 20px;
    line-height: 1;
}

/* ------------------------------------------------------------ 13. 文章与文案 */

.htw-content-body {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.9;
}

.htw-content-body p:last-child {
    margin-bottom: 0;
}

.htw-seo {
    margin-top: 18px;
    padding: 24px 0 30px;
    border-top: 1px solid var(--htw-line);
    background: var(--htw-surface);
    border-radius: var(--htw-radius-l);
    padding-left: 16px;
    padding-right: 16px;
}

.htw-seo-title {
    margin: 0 0 14px;
    color: var(--htw-ink);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.htw-article-list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.htw-article-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--htw-line);
}

.htw-article-item:last-child {
    border-bottom: 0;
}

.htw-article-item a {
    color: var(--htw-ink);
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
    min-width: 0;
}

@media (hover: hover) {
    .htw-article-item a:hover {
        color: var(--htw-blue);
    }
}

.htw-article-date {
    flex: 0 0 auto;
    color: var(--htw-muted);
    font-size: 12px;
}

.htw-seo-body {
    max-width: 860px;
    color: var(--htw-text);
    font-size: 14px;
    line-height: 1.9;
}

.htw-seo-body p {
    margin: 0 0 12px;
}

.htw-seo-body p:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------ 13.5 场景卡跳转 / 景点天气 */

/* 蓝眼泪建议关注时段 */
.htw-scene-window {
    margin: 8px 0 0;
    color: var(--htw-text);
    font-size: 12px;
    line-height: 1.6;
}

.htw-scene-window strong {
    color: var(--htw-ink);
    font-weight: 600;
}

/* 场景 → 下一步动作。label 模拟按钮，点击切换 Tab（原生 radio 行为） */
.htw-scene-action {
    margin: 10px 0 0;
}

.htw-scene-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--htw-line);
    border-radius: 999px;
    background: var(--htw-surface-soft);
    color: var(--htw-blue-deep);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    min-height: 30px;
    transition: border-color .2s ease, background-color .2s ease;
}

@media (hover: hover) {
    .htw-scene-link:hover {
        border-color: var(--htw-blue);
        background: var(--htw-tag-bg);
    }
}

.htw-scene-link:focus-visible {
    outline: 2px solid var(--htw-blue);
    outline-offset: 2px;
}

/* 潮汐涨退潮提示 */
.htw-tide-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--htw-surface-soft);
    color: var(--htw-text);
    font-size: 13px;
    line-height: 1.5;
}

.htw-tide-trend strong {
    font-weight: 600;
}

.htw-trend-rising { color: var(--htw-blue-deep); }
.htw-trend-rising strong { color: var(--htw-blue-deep); }
.htw-trend-falling { color: #2c6a94; }
.htw-trend-falling strong { color: #2c6a94; }
.htw-trend-slack { color: var(--htw-muted); }

/* 场景化 POI 分组 */
.htw-poi-group {
    margin-bottom: 6px;
}

.htw-poi-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 18px 0 10px;
    color: var(--htw-ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.htw-poi-group-tag {
    margin-left: 4px;
}

/* 景点天气参考 */
.htw-spot-head {
    margin-top: 24px;
}

.htw-spot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px 14px;
    border: 1px solid var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface);
    min-width: 0;
}

.htw-spot-name {
    margin: 0;
    color: var(--htw-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.htw-spot-main {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 0;
    color: var(--htw-text);
    font-size: 13px;
}

.htw-spot-icon {
    font-size: 18px;
    line-height: 1;
}

.htw-spot-temp {
    margin: 2px 0 0;
    color: var(--htw-ink);
    font-size: 15px;
    font-weight: 500;
}

.htw-spot-wind {
    margin: 0;
    color: var(--htw-muted);
    font-size: 12px;
}

.htw-spot-tip {
    margin: 6px 0 0;
    color: var(--htw-text);
    font-size: 12px;
    line-height: 1.6;
}

.htw-spot-link {
    margin-top: 6px;
    color: var(--htw-blue-deep);
    font-size: 12px;
    text-decoration: none;
}

@media (hover: hover) {
    .htw-spot-link:hover {
        color: var(--htw-blue);
    }
}

/* ------------------------------------------- 13.6 风力速查 / 经验参考 / 四季表 */

.htw-wind-head {
    margin-top: 24px;
}

/* 风力速查：四档，当前档位高亮 */
.htw-wind-scale {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.htw-wind-item {
    display: grid;
    grid-template-columns: 72px 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--htw-line);
    border-left: 3px solid var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface);
    font-size: 13px;
    line-height: 1.6;
}

.htw-wind-item.is-current {
    border-color: #cfe4f4;
    border-left-color: var(--htw-blue);
    background: var(--htw-tag-bg);
}

.htw-wind-range {
    color: var(--htw-ink);
    font-weight: 600;
    white-space: nowrap;
}

.htw-wind-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--htw-text);
    white-space: nowrap;
}

.htw-wind-now {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--htw-blue);
    color: #fff;
    font-size: 10px;
    line-height: 1.6;
}

.htw-wind-desc {
    color: var(--htw-text);
    min-width: 0;
}

/* 日出/日落推荐打卡地 */
.htw-sun-spots {
    margin: 10px 0 0;
    color: var(--htw-muted);
    font-size: 12px;
    line-height: 1.7;
}

.htw-sun-spots a {
    color: var(--htw-blue-deep);
    text-decoration: none;
}

@media (hover: hover) {
    .htw-sun-spots a:hover {
        color: var(--htw-blue);
        text-decoration: underline;
    }
}

/* 经验参考卡（追泪公式） */
.htw-tips {
    margin-top: 12px;
    background: var(--htw-surface-soft);
}

.htw-tips-title {
    margin: 0 0 10px;
    color: var(--htw-ink);
    font-size: 15px;
    font-weight: 500;
}

.htw-tips-formula {
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: var(--htw-radius-m);
    background: #eef6fd;
    color: var(--htw-blue-deep);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
}

.htw-tips-note {
    margin: 0;
    color: var(--htw-muted);
    font-size: 12px;
    line-height: 1.7;
}

/* 四季气候速览 */
.htw-seo-sub {
    margin: 24px 0 12px;
    color: var(--htw-ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/*
 * 四季表：宽屏两列并排，窄屏（<768px）回落单列。
 * 两列时同一行的两张卡片靠 grid 默认的 stretch 拉成等高，
 * 内容长短不一也不会参差。minmax(0,1fr) 防止长文案把列撑破。
 */
.htw-seasons {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.htw-season {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    border: 1px solid var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface-soft);
}

.htw-season-name {
    margin: 0 0 4px;
    color: var(--htw-ink);
    font-size: 14px;
    font-weight: 500;
}

.htw-season-desc {
    margin: 0;
    color: var(--htw-text);
    font-size: 13px;
    line-height: 1.7;
}

/* ------------------------------------- 13.7 长期内容区（Tab 之外，始终可见） */

.htw-longform {
    padding: 26px 0 34px;
    border-top: 1px solid var(--htw-line);
    background: var(--htw-surface-soft);
}

/* 长期内容区里的攻略块不再重复画分隔线 */
.htw-longform .htw-seo {
    margin-top: 16px;
    border-top: 0;
}

/* 四季旅游指数：适合 / 留意 两行标签 */
.htw-season-index {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 7px 0 0;
    color: var(--htw-text);
    font-size: 13px;
    line-height: 1.6;
}

.htw-index-label {
    flex: 0 0 auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--htw-tag-bg);
    color: var(--htw-tag-ink);
    font-size: 11px;
    line-height: 1.7;
}

.htw-index-warn {
    background: #fff1e3;
    color: #b45309;
}

/* ---------------------------------------------------------------- 14. 通用件 */

.htw-card {
    display: block;
    padding: 18px 16px;
    border: 1px solid var(--htw-line);
    border-radius: var(--htw-radius-l);
    background: var(--htw-surface);
    box-shadow: 0 1px 3px rgba(22, 50, 74, .06);
}

.htw-btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--htw-blue);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    min-height: 38px;
}

@media (hover: hover) {
    .htw-btn:hover {
        background: var(--htw-blue-deep);
        color: #fff;
    }
}

.htw-btn:focus-visible {
    outline: 2px solid var(--htw-blue-deep);
    outline-offset: 2px;
}

.htw-empty {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px dashed var(--htw-line);
    border-radius: var(--htw-radius-m);
    background: var(--htw-surface);
    color: var(--htw-muted);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

/* ---------------------------------------------------------------- 15. 响应式 */

@media (min-width: 768px) {
    .htw-container {
        max-width: 750px;
        padding: 0 10px;
    }

    .htw-page {
        --htw-gap: 16px;
    }

    .htw-hero {
        padding: 44px 0 34px;
    }

    .htw-hero-title {
        font-size: 38px;
    }

    .htw-hero-desc {
        font-size: 16px;
    }

    .htw-now-icon {
        font-size: 48px;
    }

    .htw-now-temp {
        font-size: 44px;
    }

    .htw-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .htw-forecast {
        margin: 0;
        padding: 4px 0 12px;
    }

    .htw-forecast-day {
        flex: 0 0 120px;
    }

    .htw-tide-chart {
        height: 170px;
    }

    .htw-tide-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .htw-services {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .htw-container {
        max-width: 970px;
    }

    .htw-page {
        --htw-gap: 18px;
    }
}

@media (min-width: 1024px) {
    .htw-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .htw-scenes {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1240px) {
    .htw-container {
        max-width: 1200px;
    }

    .htw-page {
        --htw-gap: 24px;
    }

    .htw-hero {
        padding: 52px 0 40px;
    }

    .htw-hero-title {
        font-size: 42px;
    }

    .htw-tide-chart {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .htw-page .htw-section {
        scroll-margin-top: 122px;
    }

    /* 窄屏放不下两列季节卡，回落单列 */
    .htw-seasons {
        grid-template-columns: minmax(0, 1fr);
    }

    /* 窄屏放不下「范围 + 档位 + 说明」三列，说明折到第二行 */
    .htw-wind-item {
        grid-template-columns: 64px minmax(0, 1fr);
        row-gap: 4px;
    }

    .htw-wind-desc {
        grid-column: 1 / -1;
        font-size: 12px;
    }

    .htw-tide-chart {
        height: 130px;
    }

    .htw-services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .htw-poi-body {
        padding: 11px 8px 13px;
    }

    .htw-poi-tags {
        gap: 5px;
    }

    .htw-poi-tag {
        padding: 3px 4px;
    }

    .htw-poi-tag:nth-child(n + 3) {
        display: none;
    }
}
