/* ===========================================================
   工好友AI工会活动助手 · 中国红主题
   =========================================================== */
:root {
    --red: #C7000B;
    --red-2: #E11D26;
    --red-dark: #960008;
    --red-soft: #FDECEC;
    --red-line: #F7DADC;
    --gold: #FBE3A8;
    --gold-deep: #E0A93B;
    --ink: #1B1E24;
    --ink-2: #454B54;
    --muted: #8A8F99;
    --muted-2: #A9ADB5;
    --bg: #F5F4F2;
    --card: #FFFFFF;
    --line: #EEECE8;
    --green: #1F9D5A;
    --blue: #2C6FD1;
    --radius: 18px;
    --shadow: 0 6px 18px rgba(27, 30, 36, 0.06);
    --shadow-red: 0 8px 20px rgba(199, 0, 11, 0.18);
    --tabbar-h: 68px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #EAE8E4;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#app {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    font-size: inherit;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------------- 启动态 ---------------- */
.boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(160deg, #d81722 0%, #c7000b 45%, #9c0009 100%);
    color: #fff;
}

.boot-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
}

.boot-text {
    font-size: 13px;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* ---------------- 通用布局 ---------------- */
.page {
    padding: 0 16px 24px;
    animation: fade 0.24s ease;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.with-tabbar {
    padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px);
}

.hero {
    margin: 0 -16px 18px;
    padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 26px;
    background: linear-gradient(150deg, #d81722 0%, #c7000b 52%, #a80009 100%);
    color: #fff;
    border-radius: 0 0 26px 26px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -46px;
    top: -54px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.hero::before {
    content: "";
    position: absolute;
    right: 34px;
    bottom: -70px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.hero-kicker {
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.82;
    text-transform: uppercase;
}

.hero-title {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 6px;
    line-height: 1.35;
}

.hero-sub {
    font-size: 13px;
    opacity: 0.82;
    margin-top: 6px;
    line-height: 1.55;
}

/* 管理后台下发的公告条 */
.notice-bar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 2px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff8e6;
    border: 1px solid #ffe1a8;
    color: #8a5300;
    font-size: 13px;
    line-height: 1.6;
}

.notice-ico { flex: 0 0 auto; }
.notice-txt { min-width: 0; }

.sec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 2px 12px;
}

.sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.sec-bar {
    width: 4px;
    height: 15px;
    border-radius: 3px;
    background: var(--red);
}

.sec-more {
    font-size: 12px;
    color: var(--muted);
}

.sec-more:active {
    color: var(--red);
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

.card + .card {
    margin-top: 12px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12px;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    padding: 0 20px;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.12s ease, opacity 0.12s ease;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #d81722, #c7000b);
    color: #fff;
    box-shadow: var(--shadow-red);
}

.btn-ghost {
    background: #fff;
    color: var(--red);
    border: 1px solid var(--red-line);
}

.btn-plain {
    background: #F1F0ED;
    color: var(--ink-2);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 10px;
}

.btn[disabled] {
    opacity: 0.55;
    pointer-events: none;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ef3b3b, #d31717);
}

/* ---------------- 表单 ---------------- */
.field {
    margin-bottom: 14px;
}

.field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.field-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
}

.field-req {
    color: var(--red);
    margin-left: 3px;
}

.field-ex {
    font-size: 12px;
    color: var(--red);
    background: var(--red-soft);
    border-radius: 8px;
    padding: 3px 9px;
    font-weight: 500;
}

.field-ex:active {
    background: #f9dcde;
}

.input,
.textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #FCFBF9;
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.input:focus,
.textarea:focus {
    border-color: #efb9bd;
    background: #fff;
}

.textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.65;
}

.ph {
    color: var(--muted-2);
}

.field-tip {
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
}

.field-tip b {
    color: var(--red);
    font-weight: 600;
}

.field-err {
    font-size: 12px;
    color: #d31717;
    margin-top: 4px;
}

/* ---------------- 登录 / 注册 ---------------- */
.auth {
    min-height: 100vh;
    background: linear-gradient(165deg, #d81722 0%, #c7000b 42%, #8f0007 100%);
    padding: calc(env(safe-area-inset-top, 0px) + 46px) 20px 30px;
    position: relative;
    overflow: hidden;
}

.auth-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.auth-circle.c1 {
    width: 240px;
    height: 240px;
    top: -90px;
    right: -80px;
}

.auth-circle.c2 {
    width: 160px;
    height: 160px;
    top: 120px;
    left: -70px;
}

.auth-brand {
    position: relative;
    color: #fff;
    margin-bottom: 26px;
}

.auth-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
}

.auth-sub {
    font-size: 13.5px;
    opacity: 0.85;
    margin-top: 8px;
    line-height: 1.6;
}

.auth-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 18px;
}

.auth-tab {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    padding-bottom: 7px;
    position: relative;
}

.auth-tab.on {
    color: #fff;
}

.auth-tab.on::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--gold);
}

.auth-card {
    position: relative;
    background: #fff;
    border-radius: 22px;
    padding: 20px 18px 18px;
    box-shadow: 0 18px 40px rgba(90, 0, 5, 0.24);
}

.auth-card .field-label {
    font-size: 13px;
}

.auth-note {
    position: relative;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    text-align: center;
    margin-top: 18px;
    line-height: 1.7;
}

.role-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.role {
    flex: 1;
    text-align: center;
    padding: 9px 4px;
    border-radius: 11px;
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-2);
    background: #FCFBF9;
}

.role.on {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-soft);
    font-weight: 600;
}

/* ---------------- 搜索条 ---------------- */
.search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 14px;
    padding: 0 6px 0 14px;
    height: 46px;
    box-shadow: 0 8px 22px rgba(120, 0, 6, 0.16);
}

.search-ico {
    font-size: 15px;
    opacity: 0.55;
}

.search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14.5px;
    min-width: 0;
    color: #1b1e24;
    -webkit-text-fill-color: #1b1e24;
    opacity: 1;
}

.search input::placeholder {
    color: #a9adb5;
    -webkit-text-fill-color: #a9adb5;
}

.search-go {
    height: 34px;
    padding: 0 15px;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.search-go:active {
    background: var(--red-dark);
}

.hero .search {
    margin-top: 18px;
}

/* ---------------- 工具卡片（两列） ---------------- */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.tool {
    position: relative;
    background: #fff;
    border: 1px solid var(--red-line);
    border-radius: 17px;
    padding: 14px 13px 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(199, 0, 11, 0.04);
    transition: transform 0.12s;
    text-align: left;
}

.tool:active {
    transform: scale(0.98);
    background: #FFF9F9;
}

.tool-ico {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    line-height: 1;
}

.tone-pink {
    background: #FDEDEF;
}
.tone-blue {
    background: #EAF2FD;
}
.tone-green {
    background: #EAF6EC;
}
.tone-gold {
    background: #FDF4E3;
}

.tool-name {
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
    letter-spacing: 0.3px;
}

.tool-desc {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 5px;
}

.tool-badge {
    position: absolute;
    top: 11px;
    right: 11px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    padding: 2px 7px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ed3540, #c7000b);
}

.tool-badge.badge-new {
    background: linear-gradient(135deg, #f0b429, #d98c00);
}

/* ---------------- 分类卡片墙（文稿类型） ---------------- */
.tpl-group {
    margin-bottom: 6px;
}

.tpl-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 2px 10px;
}

.tpl-bar {
    width: 4px;
    height: 14px;
    border-radius: 3px;
    background: var(--red);
}

.tpl-title {
    font-size: 15px;
    font-weight: 700;
}

.tpl-num {
    font-size: 11px;
    color: var(--red);
    background: var(--red-soft);
    padding: 1px 9px;
    border-radius: 20px;
}

.tpl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.tpl {
    position: relative;
    background: #fff;
    border: 1px solid var(--red-line);
    border-radius: 17px;
    padding: 13px 13px 15px;
    box-shadow: 0 4px 14px rgba(199, 0, 11, 0.04);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.tpl:active {
    background: #FFF9F9;
}

.tpl-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.tpl-name {
    font-size: 14.5px;
    font-weight: 700;
    margin-top: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tpl-desc {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 4px;
    flex: 1;
}

.tpl-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
    padding: 2px 7px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ed3540, #c7000b);
}

.tpl-badge.new {
    background: linear-gradient(135deg, #f0b429, #d98c00);
}

/* ---------------- 列表条目 ---------------- */
.item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 15px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid var(--line);
    margin-bottom: 10px;
    transition: background 0.12s;
    text-align: left;
    width: 100%;
}

.item:active {
    background: #FBFAF8;
}

.item-main {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-arrow {
    color: var(--muted-2);
    font-size: 17px;
    align-self: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #F3F2EF;
    color: var(--ink-2);
}

.tag-red {
    background: var(--red-soft);
    color: var(--red);
}

.tag-green {
    background: #EAF6EC;
    color: #1F7A48;
}

.tag-blue {
    background: #EAF2FD;
    color: #2C6FD1;
}

.tag-gold {
    background: #FDF4E3;
    color: #A9740A;
}

/* ---------------- 空态 / 骨架 ---------------- */
.empty {
    text-align: center;
    padding: 54px 20px;
    color: var(--muted);
}

.empty-ico {
    font-size: 38px;
    opacity: 0.5;
    margin-bottom: 10px;
}

.empty-title {
    font-size: 14px;
    color: var(--ink-2);
    font-weight: 600;
    margin-bottom: 5px;
}

.empty-desc {
    font-size: 12.5px;
    line-height: 1.6;
}

.skeleton {
    background: linear-gradient(90deg, #F1F0ED 25%, #F8F7F5 37%, #F1F0ED 63%);
    background-size: 400% 100%;
    animation: shimmer 1.3s ease infinite;
    border-radius: 10px;
}

@keyframes shimmer {
    from {
        background-position: 100% 50%;
    }
    to {
        background-position: 0 50%;
    }
}

.sk-line {
    height: 13px;
    margin-bottom: 9px;
}

/* ---------------- 底部 tab ---------------- */
.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid #EFEDE9;
    display: flex;
    z-index: 60;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #9A9EA6;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 500;
    padding-top: 2px;
}

.tab.on {
    color: var(--red);
    font-weight: 700;
}

.tab-ico {
    font-size: 21px;
    line-height: 1;
    filter: grayscale(1) opacity(0.55);
    transition: filter 0.15s;
}

.tab.on .tab-ico {
    filter: none;
}

/* ---------------- 结果页（公文纸） ---------------- */
.doc-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.doc-actions .btn {
    flex: 1;
    height: 40px;
    font-size: 13.5px;
    border-radius: 11px;
}

.paper {
    background: #fff;
    border-radius: 16px;
    padding: 26px 20px 30px;
    box-shadow: 0 8px 26px rgba(27, 30, 36, 0.07);
}

.paper h1 {
    font-size: 19px;
    line-height: 1.6;
    text-align: center;
    font-weight: 700;
    margin: 0 0 20px;
    letter-spacing: 0.5px;
    font-family: "Songti SC", "SimSun", serif;
}

.paper .to {
    font-size: 15px;
    margin-bottom: 12px;
    font-family: "Songti SC", "SimSun", serif;
}

.paper p {
    font-size: 15px;
    line-height: 2;
    text-indent: 2em;
    margin: 0 0 6px;
    font-family: "Songti SC", "SimSun", serif;
    color: #23262b;
    word-break: break-word;
}

.paper p.h {
    font-weight: 700;
    text-indent: 2em;
    margin-top: 8px;
}

.paper p.sign {
    text-indent: 0;
    text-align: right;
    margin-top: 20px;
    font-size: 14.5px;
    line-height: 1.9;
}

.meta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 2px 12px;
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------------- 政策检索结果 ---------------- */
.hit {
    background: #fff;
    border-radius: 15px;
    border: 1px solid var(--line);
    padding: 14px 15px;
    margin-bottom: 10px;
    border-left: 3px solid var(--red);
    text-align: left;
    width: 100%;
}

.hit-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.hit-score {
    margin-left: auto;
    font-size: 10.5px;
    color: var(--red);
    background: var(--red-soft);
    padding: 1px 7px;
    border-radius: 20px;
}

.hit-key {
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
}

.hit-text {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hit-src {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 8px;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 12px;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    font-size: 12.5px;
    padding: 6px 13px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.chip.on {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 600;
}

/* ---------------- 我的 ---------------- */
.profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 2px 20px;
}

.avatar {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex: 0 0 auto;
}

.profile-name {
    font-size: 19px;
    font-weight: 700;
}

.profile-sub {
    font-size: 12.5px;
    opacity: 0.84;
    margin-top: 4px;
    line-height: 1.5;
}

.stat-row {
    display: flex;
    background: #fff;
    border-radius: 17px;
    padding: 15px 0;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

.stat {
    flex: 1;
    text-align: center;
    position: relative;
}

.stat + .stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--line);
}

.stat-num {
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.stat-num em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    margin-left: 2px;
    font-weight: 500;
}

.stat-label {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 3px;
}

.menu {
    background: #fff;
    border-radius: 17px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid #F4F2EF;
    font-size: 14.5px;
    width: 100%;
    text-align: left;
}

.menu-row:last-child {
    border-bottom: 0;
}

.menu-row:active {
    background: #FBFAF8;
}

.menu-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: var(--red-soft);
}

.menu-arrow {
    margin-left: auto;
    color: var(--muted-2);
    font-size: 15px;
}

.menu-label {
    flex: 1;
}

/* ---------------- 详情排版 ---------------- */
.detail-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.55;
    margin: 4px 0 10px;
}

.detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.block {
    margin-bottom: 18px;
}

.block-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.block-title::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 2px;
    background: var(--red);
}

.block p {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink-2);
    margin: 0 0 6px;
}

.point {
    padding: 12px 14px;
    background: #fff;
    border-radius: 13px;
    border: 1px solid var(--line);
    margin-bottom: 9px;
}

.point-key {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 5px;
}

.point-text {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--ink-2);
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(#f3c6ca, #f7e6e7);
    border-radius: 2px;
}

.tl-item {
    position: relative;
    padding-bottom: 16px;
}

.tl-dot {
    position: absolute;
    left: -26px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--red);
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-title {
    font-size: 14px;
    font-weight: 700;
}

.tl-desc {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.75;
    margin-top: 4px;
}

.tl-why {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 5px;
    background: #FAF9F6;
    border-radius: 8px;
    padding: 7px 9px;
    line-height: 1.6;
}

/* ---------------- 底部操作栏 ---------------- */
.footer-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    padding: 10px 16px calc(10px + var(--safe-b));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-top: 1px solid #EFEDE9;
    display: flex;
    gap: 10px;
    z-index: 55;
}

.footer-bar .btn {
    flex: 1;
}

.footer-space {
    height: calc(70px + var(--safe-b));
}

/* ---------------- Toast / Sheet ---------------- */
.toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    background: rgba(24, 26, 30, 0.9);
    color: #fff;
    font-size: 13.5px;
    padding: 12px 18px;
    border-radius: 12px;
    max-width: 78%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 200;
    line-height: 1.55;
}

.toast.on {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.sheet-mask {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 26, 0.45);
    z-index: 150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fade 0.18s ease;
}

.sheet-mask[hidden] {
    display: none;
}

.sheet {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(16px + var(--safe-b));
    animation: up 0.22s ease;
}

@keyframes up {
    from {
        transform: translateY(36px);
    }
    to {
        transform: none;
    }
}

.sheet-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
}

.sheet-body {
    font-size: 13.5px;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
    margin-bottom: 18px;
}

.sheet-actions {
    display: flex;
    gap: 10px;
}

.sheet-actions .btn {
    flex: 1;
}

/* ---------------- 进度 / 分组 ---------------- */
.progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
}

.progress-track {
    flex: 1;
    height: 6px;
    border-radius: 6px;
    background: #EDEBE7;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #e11d26, #c7000b);
    transition: width 0.3s ease;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 13px;
    padding: 9px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
}

.toolbar .grow {
    flex: 1;
}

.toolbar b {
    color: var(--red);
}

.link {
    color: var(--red);
    font-size: 12.5px;
    font-weight: 600;
}

.tip-banner {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    background: #FFF9E8;
    border: 1px solid #F6E3B4;
    color: #8B6212;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.tip-banner.blue {
    background: #F0F6FF;
    border-color: #D6E4F7;
    color: #2A558F;
}

.disclaimer {
    font-size: 11px;
    color: var(--muted-2);
    line-height: 1.7;
    text-align: center;
    padding: 18px 12px 6px;
}

.calc-out {
    background: #fff;
    border-radius: 16px;
    padding: 4px 16px;
    box-shadow: var(--shadow);
    margin-top: 16px;
    border: 1px solid var(--line);
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #F4F2EF;
    font-size: 13.5px;
}

.calc-row:last-child {
    border-bottom: 0;
}

.calc-row b {
    font-size: 15px;
    color: var(--red);
    font-weight: 700;
}

.verdict {
    background: #FFF6F6;
    border: 1px solid #F8D9DB;
    border-radius: 13px;
    padding: 11px 13px;
    font-size: 13px;
    color: #A5131B;
    line-height: 1.7;
    margin-top: 12px;
}

.verdict.ok {
    background: #F2FAF4;
    border-color: #CFEBD8;
    color: #1B7A45;
}

/* 滚动条（桌面端） */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.14);
    border-radius: 6px;
}

@media (min-width: 560px) {
    body {
        padding: 0;
    }
    #app {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
        min-height: 100vh;
    }
}

/* ---------------- 顶部导航（二级页） ---------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    height: calc(48px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 12px 0;
    background: linear-gradient(135deg, #d81722, #c7000b 70%, #b00008);
    color: #fff;
    box-shadow: 0 3px 12px rgba(199, 0, 11, 0.16);
}

.navbar-back {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: rgba(255, 255, 255, 0.14);
    flex: 0 0 auto;
}

.navbar-back:active {
    background: rgba(255, 255, 255, 0.26);
}

.navbar-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding-right: 34px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-slot {
    width: 34px;
    flex: 0 0 auto;
    text-align: right;
    font-size: 13px;
}

.page-top {
    padding-top: 16px;
}

/* ---------------- 政策库筛选栏 ---------------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 16px 10px;
}

.filter-bar select {
    flex: 1 1 0;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #E7E4DF;
    border-radius: 10px;
    background: #fff;
    color: #454B54;
    -webkit-text-fill-color: #454B54;
    font-size: 13px;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9A9EA6 50%), linear-gradient(135deg, #9A9EA6 50%, transparent 50%);
    background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.filter-count {
    flex: 0 0 auto;
    font-size: 12px;
    color: #8A8F98;
    white-space: nowrap;
}

/* ---------------- 政策详情：来源与依据卡片 ---------------- */
.src-warn-box {
    margin: 0 16px 12px;
}

.src-warn {
    padding: 9px 12px;
    border-radius: 10px;
    background: #FFF6E8;
    border: 1px solid #F5DFB6;
    color: #8A5A12;
    font-size: 12.5px;
    line-height: 1.6;
}

.src-card {
    padding: 14px 16px;
}

.src-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.65;
}

.src-k {
    flex: 0 0 62px;
    color: #8A8F98;
}

.src-v {
    flex: 1;
    color: #454B54;
    word-break: break-all;
}

.src-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 10px;
}

.src-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #E7E4DF;
    background: #fff;
    color: #454B54;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.src-link-main {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}

.src-link:active {
    opacity: 0.85;
}

.src-note {
    color: #8A8F98;
    font-size: 12px;
    line-height: 1.7;
    padding-top: 8px;
    border-top: 1px dashed #EEEAE4;
}

/* 小屏适配 */
@media (max-width: 340px) {
    .tool-name,
    .tpl-name {
        font-size: 13.5px;
    }
    .tool-desc,
    .tpl-desc {
        font-size: 11px;
    }
}
