/* ==========================================================================
   class-trip-budget-calc · 班级春秋游费用分摊计算器
   Visual concept: 「出游通知单与票根」— 牛皮纸、森林绿、落日橙
   Type: 粗黑体标题（通知单）+ 等宽金额（票据）+ 系统无衬线（正文）
   ========================================================================== */

.ctb-page {
    --ctb-paper: #fffdf5;
    --ctb-card: #fffef9;
    --ctb-bg: #f5eedc;
    --ctb-ink: #33291c;
    --ctb-ink-soft: #5c5140;
    --ctb-ink-faint: #918778;
    --ctb-green: #2b6b4a;
    --ctb-green-deep: #1d5137;
    --ctb-green-soft: #e3efe6;
    --ctb-sun: #d98634;
    --ctb-sun-soft: #fbeedb;
    --ctb-red: #b8432f;
    --ctb-line: #e4d8bf;
    --ctb-line-soft: #f0e8d6;
    --ctb-radius: 16px;
    --ctb-shadow: 0 22px 44px -38px rgba(70, 54, 26, .65);
    --ctb-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --ctb-num: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    position: relative;
    padding: 20px 0 58px;
    color: var(--ctb-ink);
    font-family: var(--ctb-sans);
    background:
        repeating-linear-gradient(135deg, rgba(120, 96, 48, .028) 0 6px, transparent 6px 12px),
        radial-gradient(920px 460px at 2% -12%, rgba(43, 107, 74, .1), transparent 60%),
        radial-gradient(760px 420px at 99% 2%, rgba(217, 134, 52, .12), transparent 60%),
        var(--ctb-bg);
}

[data-theme="dark"] .ctb-page {
    --ctb-paper: #171b17;
    --ctb-card: #1b201b;
    --ctb-bg: #0f1310;
    --ctb-ink: #eef1e8;
    --ctb-ink-soft: #b8bfae;
    --ctb-ink-faint: #828a78;
    --ctb-green: #66c08d;
    --ctb-green-deep: #8ad7aa;
    --ctb-green-soft: #16281f;
    --ctb-sun: #e8a65c;
    --ctb-sun-soft: #2e2415;
    --ctb-red: #ff8f74;
    --ctb-line: #2b332b;
    --ctb-line-soft: #232a23;
    --ctb-shadow: 0 22px 44px -38px rgba(0, 0, 0, .9);
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .012) 0 6px, transparent 6px 12px),
        radial-gradient(920px 460px at 2% -12%, rgba(102, 192, 141, .09), transparent 60%),
        radial-gradient(760px 420px at 99% 2%, rgba(232, 166, 92, .08), transparent 60%),
        var(--ctb-bg);
}

.ctb-page *, .ctb-page *::before, .ctb-page *::after { box-sizing: border-box; }
.ctb-inner { max-width: 1220px; margin: 0 auto; padding: 0 26px; }

/* ---------- 面包屑 ---------- */
.ctb-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 2px 0 15px;
    font-size: 12.5px;
    color: var(--ctb-ink-faint);
}
.ctb-crumb a { color: var(--ctb-ink-soft); text-decoration: none; }
.ctb-crumb a:hover { color: var(--ctb-green); }
.ctb-crumb .sep { color: var(--ctb-line); }
.ctb-crumb .cur { color: var(--ctb-green); font-weight: 700; }

/* ---------- 首屏 ---------- */
.ctb-hero {
    position: relative;
    border: 1px solid var(--ctb-line);
    border-radius: 20px;
    background: var(--ctb-card);
    box-shadow: 0 26px 52px -44px rgba(70, 54, 26, .6);
    overflow: hidden;
}
.ctb-scenery {
    position: absolute;
    left: 0;
    bottom: -18px;
    width: 62%;
    height: 150px;
    opacity: .28;
    pointer-events: none;
}
.ctb-scenery circle { display: none; }
[data-theme="dark"] .ctb-scenery { opacity: .14; }

.ctb-hero-in {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .72fr);
    gap: 0;
}

.ctb-hero-copy { padding: 28px 30px 26px 32px; }

.ctb-kicker {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    background: var(--ctb-green);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
}
[data-theme="dark"] .ctb-kicker { color: #0d1a12; }

.ctb-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 800;
    font-style: normal;
    line-height: 1.22;
    letter-spacing: -.8px;
    color: var(--ctb-ink);
}

.ctb-hero-sub {
    margin: 0 0 10px;
    max-width: 580px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.8;
    color: var(--ctb-green-deep);
}
[data-theme="dark"] .ctb-hero-sub { color: var(--ctb-green); }

.ctb-lead {
    margin: 0 0 16px;
    max-width: 620px;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--ctb-ink-soft);
}
.ctb-lead b { color: var(--ctb-ink); border-bottom: 2px solid rgba(217, 134, 52, .45); font-weight: 700; }

.ctb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}
.ctb-chips li {
    padding: 4px 10px;
    border: 1px dashed var(--ctb-line);
    border-radius: 4px;
    background: rgba(255, 255, 255, .5);
    color: var(--ctb-ink-soft);
    font-size: 11.5px;
}
[data-theme="dark"] .ctb-chips li { background: rgba(255, 255, 255, .04); }

.ctb-hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 票根 ---------- */
.ctb-ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 16px;
    border-left: 2px dashed var(--ctb-line);
    background:
        radial-gradient(360px 200px at 100% 0%, rgba(217, 134, 52, .16), transparent 66%),
        var(--ctb-card);
}
.ctb-ticket::before,
.ctb-ticket::after {
    content: "";
    position: absolute;
    left: -11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ctb-card);
    border: 1px solid var(--ctb-line);
}
.ctb-ticket::before { top: -11px; }
.ctb-ticket::after { bottom: -11px; }

.ctb-ticket-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--ctb-line);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--ctb-ink-faint);
}
.ctb-ticket-head b {
    font-family: var(--ctb-num);
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--ctb-sun);
}
.ctb-ticket-main { padding: 12px 0 10px; }
.ctb-ticket-main span {
    display: block;
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--ctb-ink-faint);
}
.ctb-ticket-main strong {
    display: block;
    margin: 2px 0 1px;
    font-family: var(--ctb-num);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.06;
    color: var(--ctb-green);
    font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .ctb-ticket-main strong { color: var(--ctb-green); }
.ctb-ticket-main em {
    display: block;
    font-size: 11px;
    font-style: normal;
    line-height: 1.5;
    color: var(--ctb-ink-faint);
}
.ctb-ticket-rows { margin: 0; padding: 0; }
.ctb-ticket-rows > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px dashed var(--ctb-line);
}
.ctb-ticket-rows dt { font-size: 11.5px; color: var(--ctb-ink-faint); }
.ctb-ticket-rows dd {
    margin: 0;
    font-family: var(--ctb-num);
    font-size: 13px;
    font-weight: 700;
    color: var(--ctb-ink);
    font-variant-numeric: tabular-nums;
}
.ctb-ticket-foot {
    margin-top: auto;
    padding-top: 10px;
    font-size: 10.5px;
    color: var(--ctb-ink-faint);
}

/* ---------- 分摊区布局 ---------- */
.ctb-layout {
    display: grid;
    grid-template-columns: minmax(0, 372px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}
.ctb-layout > * { min-width: 0; }
.ctb-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ctb-col--wide { min-width: 0; }

/* ---------- 卡片 ---------- */
.ctb-card {
    padding: 17px 18px 19px;
    border: 1px solid var(--ctb-line);
    border-radius: var(--ctb-radius);
    background: var(--ctb-card);
    box-shadow: var(--ctb-shadow);
}
.ctb-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 13px;
    font-size: 15.5px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.2px;
    color: var(--ctb-ink);
}
.ctb-card-title i {
    display: inline-block;
    width: 6px;
    height: 16px;
    border-radius: 2px;
    background: var(--ctb-green);
}
.ctb-card-title small {
    margin-left: auto;
    color: var(--ctb-ink-faint);
    font-size: 10.5px;
    font-style: normal;
    font-weight: 400;
}

/* ---------- 字段 ---------- */
.ctb-field { margin-bottom: 10px; min-width: 0; }
.ctb-field > label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--ctb-ink-faint);
}
.ctb-input,
.ctb-select,
.ctb-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ctb-line);
    border-radius: 8px;
    background: var(--ctb-paper);
    color: var(--ctb-ink);
    font-family: inherit;
    font-size: 13px;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.ctb-input:focus,
.ctb-select:focus,
.ctb-textarea:focus {
    outline: none;
    border-color: var(--ctb-green);
    background: var(--ctb-card);
    box-shadow: 0 0 0 3px rgba(43, 107, 74, .14);
}
.ctb-input::-webkit-outer-spin-button,
.ctb-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ctb-input:disabled { color: var(--ctb-ink-faint); background: var(--ctb-line-soft); }

.ctb-select {
    padding-right: 26px;
    background: var(--ctb-paper) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23918778' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 9px center / 10px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.ctb-textarea {
    min-height: 78px;
    padding: 9px 11px;
    font-family: var(--ctb-num);
    font-size: 12px;
    line-height: 1.9;
    resize: vertical;
    background:
        repeating-linear-gradient(180deg, transparent 0 22px, var(--ctb-line-soft) 22px 23px),
        var(--ctb-paper);
}

.ctb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; min-width: 0; }
.ctb-grid2 > * { min-width: 0; }

.ctb-hint {
    margin: 5px 0 0;
    font-size: 10.5px;
    line-height: 1.65;
    color: var(--ctb-ink-faint);
}
.ctb-hint code,
.ctb-family-lead code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--ctb-line-soft);
    font-family: var(--ctb-num);
    font-size: 10.5px;
    color: var(--ctb-ink-soft);
}

/* ---------- 勾选项 ---------- */
.ctb-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; }
.ctb-check {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 6px 0;
    font-size: 12px;
    color: var(--ctb-ink-soft);
    cursor: pointer;
}
.ctb-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1.5px solid #c8b995;
    border-radius: 4px;
    background: var(--ctb-paper);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all .15s;
}
.ctb-check input:hover { border-color: var(--ctb-green); }
.ctb-check input:checked {
    border-color: var(--ctb-green);
    background: var(--ctb-green) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 8.5l3 3L12.7 5' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
[data-theme="dark"] .ctb-check input { border-color: #3d473c; }
.ctb-check em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--ctb-ink-faint);
}

.ctb-divider {
    height: 1px;
    margin: 13px 0 11px;
    background: repeating-linear-gradient(90deg, var(--ctb-line) 0 6px, transparent 6px 11px);
}

/* ---------- 其他费用行 ---------- */
.ctb-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 9px; }
.ctb-other-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 26px;
    gap: 6px;
    align-items: center;
}
.ctb-del {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ctb-ink-faint);
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: all .16s;
}
.ctb-del:hover { border-color: var(--ctb-red); background: rgba(184, 67, 47, .1); color: var(--ctb-red); }

/* ---------- 按钮 ---------- */
.ctb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.ctb-btn:active { transform: translateY(1px); }
.ctb-btn--primary {
    background: linear-gradient(135deg, var(--ctb-green) 0%, var(--ctb-green-deep) 100%);
    color: #ffffff;
    box-shadow: 0 14px 26px -20px rgba(29, 81, 55, .95);
}
.ctb-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -18px rgba(29, 81, 55, .9); }
[data-theme="dark"] .ctb-btn--primary { color: #0c1a11; }
.ctb-btn--ghost {
    border-color: var(--ctb-line);
    background: var(--ctb-card);
    color: var(--ctb-ink-soft);
}
.ctb-btn--ghost:hover { border-color: var(--ctb-green); color: var(--ctb-green); }
.ctb-btn--sm { padding: 6px 11px; font-size: 11.5px; border-radius: 7px; }

/* ---------- 分摊单（收据） ---------- */
.ctb-receipt {
    position: relative;
    padding: 20px 22px 22px;
    border: 1px solid var(--ctb-line);
    border-radius: var(--ctb-radius);
    background:
        repeating-linear-gradient(180deg, transparent 0 30px, rgba(120, 96, 48, .035) 30px 31px),
        var(--ctb-paper);
    box-shadow: 0 24px 46px -40px rgba(70, 54, 26, .7);
}
.ctb-receipt::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -5px;
    height: 9px;
    background:
        radial-gradient(circle at 5px 9px, var(--ctb-bg) 4.2px, transparent 4.6px) 0 0 / 14px 9px repeat-x;
}

.ctb-receipt-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ctb-ink);
}
.ctb-receipt-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--ctb-ink-faint);
}
.ctb-receipt-top h2 {
    margin: 4px 0 0;
    font-size: 19px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.3px;
    color: var(--ctb-ink);
}

.ctb-stamp {
    flex: none;
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 2px solid rgba(43, 107, 74, .55);
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px var(--ctb-paper), inset 0 0 0 5px rgba(43, 107, 74, .3);
    color: rgba(43, 107, 74, .8);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.35;
    text-align: center;
    transform: rotate(-9deg);
}
.ctb-stamp.is-warn {
    border-color: rgba(184, 67, 47, .6);
    box-shadow: inset 0 0 0 4px var(--ctb-paper), inset 0 0 0 5px rgba(184, 67, 47, .32);
    color: rgba(184, 67, 47, .9);
}
[data-theme="dark"] .ctb-stamp {
    border-color: rgba(102, 192, 141, .7);
    box-shadow: inset 0 0 0 4px var(--ctb-paper), inset 0 0 0 5px rgba(102, 192, 141, .38);
    color: var(--ctb-green);
}
[data-theme="dark"] .ctb-stamp.is-warn {
    border-color: rgba(255, 143, 116, .7);
    box-shadow: inset 0 0 0 4px var(--ctb-paper), inset 0 0 0 5px rgba(255, 143, 116, .36);
    color: var(--ctb-red);
}

/* ---------- 三个核心金额 ---------- */
.ctb-receipt-kpi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}
.ctb-page .kpi {
    padding: 12px 13px 13px;
    border: 1px solid var(--ctb-line-soft);
    border-radius: 11px;
    background: var(--ctb-card);
}
.ctb-page .kpi > span {
    display: block;
    font-size: 10.5px;
    letter-spacing: .06em;
    color: var(--ctb-ink-faint);
}
.ctb-page .kpi > strong {
    display: block;
    margin: 2px 0 1px;
    font-family: var(--ctb-num);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -1.2px;
    color: var(--ctb-ink);
    font-variant-numeric: tabular-nums;
}
.ctb-page .kpi > em {
    display: block;
    font-size: 10.5px;
    font-style: normal;
    line-height: 1.5;
    color: var(--ctb-ink-faint);
}
.ctb-page .kpi--main {
    border-color: transparent;
    background: linear-gradient(135deg, var(--ctb-green) 0%, var(--ctb-green-deep) 100%);
}
.ctb-page .kpi--main > span { color: rgba(255, 255, 255, .8); }
.ctb-page .kpi--main > strong { color: #ffffff; font-size: 30px; }
.ctb-page .kpi--main > em { color: rgba(255, 255, 255, .72); }
[data-theme="dark"] .ctb-page .kpi--main {
    background: linear-gradient(135deg, #1f4a35 0%, #26603f 100%);
}

/* ---------- 费用明细 ---------- */
.ctb-receipt-body h3 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--ctb-ink-faint);
}
.ctb-lines { margin: 0; padding: 0; list-style: none; }
.ctb-lines li {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) auto;
    gap: 10px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px dashed var(--ctb-line);
    font-size: 12.5px;
}
.ctb-lines li .n { color: var(--ctb-ink); font-weight: 600; }
.ctb-lines li .d {
    color: var(--ctb-ink-faint);
    font-family: var(--ctb-num);
    font-size: 11px;
    text-align: right;
}
.ctb-lines li .v {
    font-family: var(--ctb-num);
    font-weight: 700;
    color: var(--ctb-ink);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ctb-lines--deduct li .n { color: var(--ctb-green); }
.ctb-lines--deduct li .v { color: var(--ctb-green); }

.ctb-lines-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 0;
    padding: 10px 0;
    border-bottom: 2px solid var(--ctb-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--ctb-ink-soft);
}
.ctb-lines-total b {
    font-family: var(--ctb-num);
    font-size: 21px;
    letter-spacing: -.8px;
    color: var(--ctb-ink);
    font-variant-numeric: tabular-nums;
}

.ctb-pay {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.ctb-pay > div {
    padding: 9px 11px;
    border-radius: 9px;
    background: var(--ctb-sun-soft);
}
.ctb-pay span { display: block; font-size: 10.5px; color: var(--ctb-ink-faint); }
.ctb-pay b {
    display: block;
    margin-top: 1px;
    font-family: var(--ctb-num);
    font-size: 15px;
    font-weight: 700;
    color: #8c5218;
    font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .ctb-pay b { color: var(--ctb-sun); }

.ctb-receipt-note {
    margin: 13px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--ctb-green);
    border-radius: 0 8px 8px 0;
    background: var(--ctb-green-soft);
    font-size: 11.5px;
    line-height: 1.8;
    color: var(--ctb-ink-soft);
}
.ctb-receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

/* ---------- 每户明细 ---------- */
.ctb-family-lead {
    margin: 0 0 9px;
    font-size: 11.5px;
    line-height: 1.75;
    color: var(--ctb-ink-faint);
}
.ctb-family-tools { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 11px; }
.ctb-family-tools .ctb-textarea { flex: 1 1 300px; min-width: 0; }
.ctb-family-btns { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }

.ctb-table-wrap { width: 100%; overflow-x: auto; }
.ctb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.ctb-table th {
    padding: 0 8px 8px;
    border-bottom: 1.5px solid var(--ctb-ink);
    color: var(--ctb-ink-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: right;
    white-space: nowrap;
}
.ctb-table th:nth-child(1) { text-align: center; }
.ctb-table th:nth-child(2) { text-align: left; }
.ctb-table td {
    padding: 8px;
    border-bottom: 1px solid var(--ctb-line-soft);
    color: var(--ctb-ink-soft);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ctb-table tbody tr:last-child td { border-bottom: none; }
.ctb-table td:nth-child(1) { text-align: center; color: var(--ctb-ink-faint); font-family: var(--ctb-num); font-size: 11px; }
.ctb-table td:nth-child(2) { text-align: left; color: var(--ctb-ink); font-weight: 600; }
.ctb-table td:nth-child(6) { color: var(--ctb-green); font-weight: 700; }
.ctb-family-foot {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.7;
    color: var(--ctb-ink-faint);
}

/* ---------- 提醒 ---------- */
.ctb-tips { margin: 0; padding: 0; list-style: none; }
.ctb-tips li {
    position: relative;
    padding: 8px 0 8px 22px;
    border-bottom: 1px dashed var(--ctb-line);
    font-size: 12px;
    line-height: 1.75;
    color: var(--ctb-ink-soft);
}
.ctb-tips li:last-child { border-bottom: none; }
.ctb-tips li::before {
    content: "✓";
    position: absolute;
    left: 2px;
    top: 8px;
    color: var(--ctb-green);
    font-size: 11px;
    font-weight: 700;
}
.ctb-tips li.is-warn { color: #8c5218; }
.ctb-tips li.is-warn::before { content: "!"; color: var(--ctb-sun); }
.ctb-tips li.is-good::before { content: "✓"; color: var(--ctb-green); }

/* ---------- toast ---------- */
.ctb-toast {
    position: fixed;
    left: 50%;
    bottom: 76px;
    z-index: 9999;
    padding: 10px 18px;
    border-radius: 9px;
    background: #33291c;
    color: #fdf8ec;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .7);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity .24s, transform .24s;
}
.ctb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 口径说明 ---------- */
.ctb-block { margin-top: 16px; }
.ctb-note-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ctb-note-table th {
    width: 110px;
    padding: 11px 14px 11px 0;
    border-bottom: 1px solid var(--ctb-line);
    color: var(--ctb-ink);
    font-size: 12.5px;
    font-weight: 800;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}
.ctb-note-table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--ctb-line);
    color: var(--ctb-ink-soft);
    font-size: 12.5px;
    line-height: 1.85;
}
.ctb-note-table tr:last-child th,
.ctb-note-table tr:last-child td { border-bottom: none; padding-bottom: 2px; }
.ctb-note-table td b { color: var(--ctb-ink); }

/* ---------- 标签页 ---------- */
.ctb-tabs {
    display: flex;
    gap: 2px;
    margin: 20px 0 0;
    border-bottom: 1.5px solid var(--ctb-ink);
    overflow-x: auto;
}
.ctb-tab {
    flex: none;
    padding: 10px 15px 11px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--ctb-ink-faint);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: color .16s, border-color .16s;
}
.ctb-tab:hover { color: var(--ctb-ink); }
.ctb-tab.is-on { border-bottom-color: var(--ctb-green); color: var(--ctb-green); }

.ctb-panel[data-ctb-panel] {
    display: none;
    margin-top: 14px;
    padding: 18px 20px 20px;
    border: 1px solid var(--ctb-line);
    border-radius: var(--ctb-radius);
    background: var(--ctb-card);
}
.ctb-panel[data-ctb-panel].is-on { display: block; }
.ctb-panel h2 {
    margin: 0 0 10px;
    font-size: 16.5px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.2px;
    color: var(--ctb-ink);
}
.ctb-panel h2:not(:first-child) { margin-top: 18px; }
.ctb-panel p {
    margin: 0 0 9px;
    font-size: 13px;
    line-height: 1.95;
    color: var(--ctb-ink-soft);
}
.ctb-panel p b { color: var(--ctb-ink); border-bottom: 2px solid rgba(217, 134, 52, .4); }

.ctb-steps {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.95;
    color: var(--ctb-ink-soft);
}
.ctb-steps li { margin-bottom: 6px; }
.ctb-steps li::marker { color: var(--ctb-green); font-weight: 700; }
.ctb-steps b { color: var(--ctb-ink); }
.ctb-steps code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--ctb-line-soft);
    font-family: var(--ctb-num);
    font-size: 11px;
}

.ctb-timeline { margin: 0; padding: 0; list-style: none; }
.ctb-timeline li {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--ctb-line);
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--ctb-ink-soft);
}
.ctb-timeline li:last-child { border-bottom: none; }
.ctb-timeline .ver {
    padding: 0 8px;
    border-radius: 4px;
    background: var(--ctb-green-soft);
    color: var(--ctb-green);
    font-family: var(--ctb-num);
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
}
.ctb-timeline .date { color: var(--ctb-ink-faint); font-family: var(--ctb-num); font-size: 11px; }
.ctb-timeline .txt { flex: 1 1 260px; min-width: 0; }

.ctb-faq details {
    border-bottom: 1px solid var(--ctb-line);
    padding: 0 2px;
}
.ctb-faq details:last-child { border-bottom: none; }
.ctb-faq summary {
    display: flex;
    gap: 9px;
    padding: 11px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--ctb-ink);
    cursor: pointer;
    list-style: none;
}
.ctb-faq summary::-webkit-details-marker { display: none; }
.ctb-faq summary::before {
    content: "?";
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--ctb-green-soft);
    color: var(--ctb-green);
    font-family: var(--ctb-num);
    font-size: 11px;
    font-weight: 700;
}
.ctb-faq .a {
    padding: 0 0 12px 26px;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--ctb-ink-soft);
}
.ctb-faq .a b { color: var(--ctb-ink); }

/* ---------- 相关工具 ---------- */
.ctb-related { margin-top: 24px; }
.ctb-related > h2 {
    margin: 0 0 11px;
    font-size: 16px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -.2px;
}
.ctb-rel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.ctb-rel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid var(--ctb-line);
    border-radius: 12px;
    background: var(--ctb-card);
    color: var(--ctb-ink);
    text-decoration: none;
    transition: transform .16s, border-color .16s, box-shadow .16s;
}
.ctb-rel:hover {
    border-color: var(--ctb-green);
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -24px rgba(29, 81, 55, .9);
}
.ctb-rel .ri {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--ctb-green-soft);
    font-size: 16px;
}
.ctb-rel b { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.ctb-rel small { display: block; margin-top: 1px; font-size: 11px; line-height: 1.5; color: var(--ctb-ink-faint); }

/* ---------- 打印稿 ---------- */
.ctb-sheet { display: none; }
.ctb-sheet-in {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    color: #33291c;
    font-size: 12px;
    line-height: 1.7;
}
.ctb-sheet-title {
    padding-bottom: 6px;
    border-bottom: 2px solid #33291c;
    margin-bottom: 4px;
    font-size: 19px;
    font-weight: 800;
    text-align: center;
}
.ctb-sheet-sub {
    margin-bottom: 12px;
    color: #5c5140;
    font-size: 11px;
    text-align: center;
}
.ctb-sheet-in h2 {
    margin: 13px 0 5px;
    padding-left: 7px;
    border-left: 3px solid #2b6b4a;
    font-size: 12.5px;
    font-weight: 700;
}
.ctb-sheet-in table { width: 100%; border-collapse: collapse; font-size: 11px; }
.ctb-sheet-in th,
.ctb-sheet-in td { padding: 4px 6px; border-bottom: 1px solid #e4d8bf; text-align: left; }
.ctb-sheet-in th { background: #f5eedc; font-weight: 700; }
.ctb-sheet-in .r { text-align: right; font-variant-numeric: tabular-nums; }
.ctb-sheet-in .idx { text-align: center; color: #918778; }
.ctb-sheet-in .sum-row td { border-top: 1.5px solid #33291c; font-weight: 700; }
.ctb-sheet-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 9px 0 3px; }
.ctb-sheet-kpi > div {
    padding: 7px 9px;
    border: 1px solid #e4d8bf;
    border-radius: 4px;
    background: #fbf8f0;
}
.ctb-sheet-kpi span { display: block; font-size: 9.5px; color: #5c5140; }
.ctb-sheet-kpi strong { display: block; font-size: 15px; }
.ctb-sheet-note {
    margin-top: 11px;
    padding: 7px 9px;
    border-radius: 3px;
    background: #f5eedc;
    color: #5c5140;
    font-size: 10px;
    line-height: 1.7;
}
.ctb-sheet-sign {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 9px;
    border-top: 1px dashed #c8b995;
    font-size: 11px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .ctb-layout { grid-template-columns: minmax(0, 1fr); }
    .ctb-hero-in { grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); }
    .ctb-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .ctb-hero-in { grid-template-columns: minmax(0, 1fr); }
    .ctb-ticket {
        border-left: none;
        border-top: 2px dashed var(--ctb-line);
    }
    .ctb-ticket::before,
    .ctb-ticket::after { display: none; }
    .ctb-hero-copy { padding: 22px 18px 18px; }
    .ctb-ticket { padding: 16px 18px 14px; }
}
@media (max-width: 760px) {
    .ctb-page { padding: 14px 0 42px; }
    .ctb-inner { padding: 0 14px; }
    .ctb-hero { border-radius: 14px; }
    .ctb-hero h1 { font-size: 24px; letter-spacing: -.5px; }
    .ctb-hero-sub { font-size: 13px; }
    .ctb-lead { font-size: 12.5px; }
    .ctb-chips li { font-size: 11px; padding: 3px 8px; }
    .ctb-ticket-main strong { font-size: 34px; }
    .ctb-card { padding: 14px 14px 16px; border-radius: 13px; }
    .ctb-card-title { font-size: 14.5px; }
    .ctb-card-title small { flex-basis: 100%; margin-left: 14px; }
    .ctb-receipt { padding: 16px 14px 18px; border-radius: 13px; }
    .ctb-receipt-top h2 { font-size: 16.5px; }
    .ctb-stamp { width: 62px; height: 62px; font-size: 10.5px; }
    .ctb-receipt-kpi { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .ctb-page .kpi--main > strong { font-size: 27px; }
    .ctb-lines li { grid-template-columns: minmax(0, 1fr) auto; }
    .ctb-lines li .d { grid-column: 1 / -1; grid-row: 2; text-align: left; }
    .ctb-pay { grid-template-columns: minmax(0, 1fr); gap: 7px; }
    .ctb-note-table th { width: 84px; font-size: 12px; }
    .ctb-note-table td { font-size: 12px; line-height: 1.8; }
    .ctb-tab { padding: 9px 11px 10px; font-size: 12.5px; }
    .ctb-rel-grid { grid-template-columns: minmax(0, 1fr); }
    .ctb-family-tools .ctb-textarea { flex-basis: 100%; }
}
@media (max-width: 560px) {
    .ctb-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
    .ctb-hero-btns .ctb-btn { flex: 1 1 100%; }
}

/* ---------- 打印 ---------- */
@media print {
    .nav-header,
    .footer,
    .back-to-top,
    .detail-breadcrumb,
    #evadeFab,
    .evade-fab,
    #navEvadeBtn,
    .nav-evade-btn,
    #navMask,
    .nav-mask,
    .ma-page-modal,
    #clicaptcha-container,
    #ai-captcha-holder,
    .ai-captcha-guard { display: none !important; }

    .ctb-page { display: none !important; }

    .ctb-sheet {
        display: block !important;
        visibility: visible !important;
        padding: 10mm 11mm;
        background: #ffffff;
        color: #33291c;
    }
    .ctb-sheet * { visibility: visible !important; }

    @page { size: A4 portrait; margin: 8mm; }
}



