@charset "utf-8";
/* 手机端 UI 优化 — 在 stylew.css 之后加载 */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

img,
video {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
    border: 0;
}

/* 顶部 iframe（高度由 JS 按内容自适应） */
.top-frame {
    display: block;
    width: 100%;
    height: 280px;
    min-height: 200px;
    overflow: hidden;
}

/* 日期栏 */
.box.news-box {
    margin-top: 2px;
}

.box.news-box .riqi {
    padding: 10px 8px;
    font-size: clamp(13px, 3.8vw, 17px);
    line-height: 1.55;
    word-break: break-word;
}

/* 区块标题 */
.list-title,
#yxym .list-title {
    font-size: clamp(16px, 4.6vw, 20px) !important;
    line-height: 1.35;
    padding: 8px 6px !important;
    text-shadow: none;
}

.xj-section .xj-title,
.xj-section .list-title {
    font-size: clamp(16px, 4.5vw, 19px) !important;
    padding: 10px 6px !important;
    line-height: 1.35;
}

.tuku-section .tuku-title {
    height: auto;
    min-height: 38px;
    line-height: 1.35;
    padding: 10px 6px;
    font-size: clamp(16px, 4.5vw, 20px) !important;
}

.tuku-section > a {
    display: block;
    margin: 4px 0 6px;
}

.tuku-section > a img {
    display: block;
    width: 100%;
    height: auto;
}

/* 三列按钮网格 */
.blgg {
    border-spacing: 4px !important;
}

.blgg td {
    font-size: clamp(11px, 3.2vw, 15px) !important;
    padding: 0 !important;
    vertical-align: middle;
}

.blgg a {
    min-height: 42px;
    line-height: 1.25 !important;
    padding: 8px 3px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    word-break: break-all;
    overflow-wrap: anywhere;
    -webkit-tap-highlight-color: transparent;
}

.blgg a font {
    font-size: inherit;
    line-height: 1.25;
}

.tuku-section .blgg {
    border-spacing: 0 !important;
}

.tuku-section .blgg td {
    padding: 2px !important;
}

.tuku-section .blgg a {
    min-height: 40px;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: none;
}

/* 链接列表 */
.post-list li {
    padding: 4px 2px;
}

.post-list a {
    display: block;
    height: auto !important;
    min-height: 40px;
    padding: 10px 8px;
    line-height: 1.45 !important;
    font-size: clamp(15px, 4.2vw, 19px) !important;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}

.post-list a font {
    font-size: inherit !important;
}

.post-list li .zg {
    font-size: clamp(14px, 4vw, 20px) !important;
}

/* 公式高手榜：防止「计划高手」换行重叠 */
.plan-master-zone .post-list a.plan-master-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 6px;
    min-height: 44px;
    padding: 8px 6px !important;
    font-size: clamp(12px, 3.4vw, 16px) !important;
    text-align: center;
}

.plan-master-zone .pm-prefix,
.plan-master-zone .pm-suffix {
    color: #000;
    font-weight: bold;
    white-space: nowrap;
}

.plan-master-zone .pm-label {
    color: #ff00ff;
    font-weight: bold;
    font-size: clamp(13px, 3.8vw, 18px);
    white-space: nowrap;
}

@media screen and (max-width: 360px) {
    .plan-master-zone .post-list a.plan-master-link {
        font-size: clamp(11px, 3.1vw, 14px) !important;
    }

    .plan-master-zone .pm-label {
        font-size: clamp(12px, 3.4vw, 15px);
    }
}

/* 资料表格 */
.duilianpt td,
.duilianpt th,
.duilianpt1 td,
.duilianpt1 th {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    padding: 6px 4px !important;
    font-size: clamp(12px, 3.4vw, 16px) !important;
    line-height: 1.45;
}

.duilianpt .zl,
.duilianpt1 .zl {
    font-size: clamp(13px, 3.8vw, 17px) !important;
}

/* 绝密内幕 */
.topzq-tb td {
    white-space: normal !important;
    word-break: break-word;
    padding: 6px 4px !important;
}

.topzq-tb .tb1 {
    font-size: clamp(11px, 3vw, 13px) !important;
    width: 14% !important;
}

.topzq-tb .tb2,
.topzq-tb .tb3,
.topzq-tb .tb0 {
    font-size: clamp(12px, 3.5vw, 15px) !important;
    width: auto !important;
}

.topzq-tb .tb4,
.topzq-foot {
    font-size: clamp(13px, 3.8vw, 16px) !important;
    height: auto !important;
    line-height: 1.4 !important;
    padding: 8px 4px !important;
}

/* 属性知识大全 */
.gongshi td,
.gongshi th {
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word;
    font-size: clamp(11px, 3vw, 14px) !important;
    padding: 6px 3px !important;
    line-height: 1.4;
}

.sx-frame-wrap iframe {
    min-height: 520px;
}

/* 广告/图片区块 */
.box.pad img,
.box img {
    display: block;
    width: 100%;
    height: auto;
}

.box {
    margin: 2px 0;
}

.pad {
    padding: 3px !important;
}

/* 独立详情页 plan / xuanji / tuku */
.detail-page {
    margin: 0;
    padding: 12px 10px calc(20px + env(safe-area-inset-bottom, 0));
    background: #fff;
    color: #000;
    font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif;
}

.detail-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.detail-title {
    margin: 0 0 8px;
    font-size: clamp(18px, 5vw, 22px);
    font-weight: bold;
    color: #0000ff;
    text-align: center;
    line-height: 1.35;
    word-break: break-word;
}

.detail-tip {
    margin: 0 0 12px;
    font-size: 12px;
    color: #800080;
    text-align: center;
    line-height: 1.5;
}

.detail-card {
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    background: #fff;
    padding: 12px 10px;
    margin-bottom: 10px;
}

.detail-lines {
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: bold;
    color: #000;
    line-height: 1.75;
    word-break: break-word;
}

.detail-back {
    margin: 16px 0 0;
    text-align: center;
}

.detail-back a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f8f8f8;
}

.xj-item,
.tk-item {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #ddd;
}

.xj-item:last-child,
.tk-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.xj-period,
.tk-period {
    margin: 0 0 6px;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: bold;
    color: #0000ff;
}

.xj-poem {
    margin: 0 0 6px;
    font-size: clamp(13px, 3.8vw, 15px);
    color: #333;
    line-height: 1.75;
    word-break: break-word;
}

.xj-hint {
    margin: 0 0 6px;
    font-size: clamp(13px, 3.6vw, 14px);
    color: #008000;
    line-height: 1.6;
}

.xj-result,
.tk-caption {
    margin: 0;
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: bold;
    color: #000;
}

.tk-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.detail-empty {
    margin: 0;
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: bold;
    color: #000;
    text-align: center;
    line-height: 1.75;
}

@media screen and (max-width: 360px) {
    .top-frame {
        min-height: 180px;
    }

    .blgg {
        border-spacing: 3px !important;
    }

    .blgg a {
        min-height: 38px;
        padding: 6px 2px !important;
    }

    .post-list a {
        padding: 9px 6px;
    }
}

@media screen and (min-width: 721px) {
    .detail-wrap {
        padding: 0 8px;
    }
}
