/* ===== #23 电影院最佳座位 · 票根幕布（幕布米 / 酒红 / 铜金 / 深蓝黑） ===== */
.cbs-page, .cbs-modal, .cbs-toast {
    --cbs-bg: #f7f1e8;
    --cbs-surface: #fffdf8;
    --cbs-surface-2: #f0e7da;
    --cbs-line: #e0d3bf;
    --cbs-ink: #2b2430;
    --cbs-ink-2: #6f6360;
    --cbs-wine: #76212f;
    --cbs-gold: #a8802f;
    --cbs-dark: #23202a;
    --cbs-shadow: 0 12px 30px rgba(43, 36, 48, .10);
    font-family: "PingFang SC", "Microsoft YaHei", Georgia, serif;
    color: var(--cbs-ink);
}
:root[data-theme="dark"] .cbs-page,
:root[data-theme="dark"] .cbs-modal,
:root[data-theme="dark"] .cbs-toast {
    --cbs-bg: #151219;
    --cbs-surface: #1f1b22;
    --cbs-surface-2: #29232d;
    --cbs-line: #3d343f;
    --cbs-ink: #f2ebe2;
    --cbs-ink-2: #b7a9a2;
    --cbs-wine: #d4788a;
    --cbs-gold: #e0bb6a;
    --cbs-dark: #0d0b10;
    --cbs-shadow: 0 14px 34px rgba(0, 0, 0, .44);
}
.cbs-page { background: var(--cbs-bg); min-height: 100vh; padding: 22px 0 60px; }
.cbs-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.cbs-page *, .cbs-page *::before, .cbs-page *::after { box-sizing: border-box; }
.cbs-page b, .cbs-page strong { color: var(--cbs-wine); font-weight: 700; }
.cbs-page h1, .cbs-page h2, .cbs-page h3 { margin: 0; }
.cbs-page p { margin: 0; }
.cbs-page .detail-breadcrumb { font-size: 13px; color: var(--cbs-ink-2); margin-bottom: 18px; }
.cbs-page .detail-breadcrumb a { color: var(--cbs-wine); text-decoration: none; }
.cbs-page .detail-breadcrumb a:hover { text-decoration: underline; }
.cbs-page .detail-breadcrumb .sep { margin: 0 8px; }
.cbs-page .detail-breadcrumb .current { color: var(--cbs-ink); font-weight: 700; }

/* 首屏 */
.cbs-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; align-items: stretch; }
.cbs-hero-copy { background: var(--cbs-wine); color: #fdf4e6; border-radius: 6px; padding: 34px 32px 30px; position: relative; overflow: hidden; min-width: 0; }
:root[data-theme="dark"] .cbs-hero-copy { color: #f7efe6; }
.cbs-hero-copy::before { content: ""; position: absolute; inset: 12px; border: 1px dashed rgba(253, 244, 230, .35); border-radius: 3px; pointer-events: none; }
.cbs-hero-copy::after { content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; border: 20px solid rgba(168, 128, 47, .22); }
.cbs-kicker { display: inline-block; font: 700 11.5px/1 Georgia, serif; letter-spacing: .24em; color: #e8c982; margin-bottom: 20px; position: relative; }
.cbs-hero h1 { font-size: clamp(28px, 3.2vw, 41px); line-height: 1.3; font-weight: 700; letter-spacing: -.015em; color: #fff8ec; position: relative; }
:root[data-theme="dark"] .cbs-hero h1 { color: #fff6ea; }
.cbs-hero h1::after { content: ""; display: block; width: 100px; height: 2px; background: #e8c982; margin-top: 16px; }
.cbs-sub { margin-top: 18px !important; font-size: 15px; line-height: 2; color: #f0dcda; max-width: 600px; position: relative; }
:root[data-theme="dark"] .cbs-sub { color: #e6d0cb; }
.cbs-page .cbs-sub b { color: #f5d68d; }
.cbs-ticket { display: flex; gap: 0; margin-top: 26px; background: var(--cbs-surface); color: var(--cbs-ink); border-radius: 4px; position: relative; overflow: hidden; flex-wrap: wrap; }
.cbs-ticket > div { flex: 1 1 120px; min-width: 0; padding: 15px 16px; border-right: 1px dashed var(--cbs-line); }
.cbs-ticket > div:last-child { border-right: 0; }
.cbs-ticket b { display: block; font: 700 26px/1.2 ui-monospace, Consolas, monospace; color: var(--cbs-wine); font-variant-numeric: tabular-nums; }
.cbs-ticket span { display: block; font-size: 11.5px; color: var(--cbs-ink-2); margin-top: 5px; }
.cbs-disclaim { margin-top: 18px !important; font-size: 12.5px; line-height: 1.8; color: #e9cfcb; position: relative; }
:root[data-theme="dark"] .cbs-disclaim { color: #d8c0bb; }

.cbs-hero-panel { background: var(--cbs-surface); border: 1px solid var(--cbs-line); border-radius: 6px; padding: 24px; box-shadow: var(--cbs-shadow); min-width: 0; }
.cbs-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--cbs-wine); padding-bottom: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cbs-panel-head b { font-size: 18px; }
.cbs-panel-head span { font-size: 12px; color: var(--cbs-ink-2); }
.cbs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.cbs-field { min-width: 0; }
.cbs-field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.cbs-field input, .cbs-field select, .cbs-page .cbs-table input, .cbs-page .cbs-table select {
    width: 100%; padding: 9px 11px; font-size: 13.5px; color: var(--cbs-ink); background: var(--cbs-bg);
    border: 1px solid var(--cbs-line); border-radius: 4px; outline: none; font-variant-numeric: tabular-nums;
}
.cbs-field input:focus, .cbs-field select:focus { border-color: var(--cbs-wine); box-shadow: 0 0 0 3px rgba(118, 33, 47, .12); }
.cbs-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 12.5px; color: var(--cbs-ink-2); }
.cbs-checks label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.cbs-checks input { accent-color: var(--cbs-wine); }
.cbs-err { margin-top: 12px !important; font-size: 13px; color: var(--cbs-wine); background: rgba(118, 33, 47, .09); padding: 9px 12px; border-left: 3px solid var(--cbs-wine); }
.cbs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cbs-btn { border: 1px solid var(--cbs-line); background: var(--cbs-surface); color: var(--cbs-ink); border-radius: 4px; padding: 10px 15px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.cbs-btn:hover { transform: translateY(-1px); box-shadow: var(--cbs-shadow); }
.cbs-btn-main { background: var(--cbs-wine); border-color: var(--cbs-wine); color: #fff8ec; }

/* 通用 */
.cbs-card { margin-top: 20px; background: var(--cbs-surface); border: 1px solid var(--cbs-line); border-radius: 6px; padding: 24px; box-shadow: var(--cbs-shadow); }
.cbs-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cbs-sec-head h2 { font-size: 19px; font-weight: 700; }
.cbs-sec-head h2::before { content: "❖ "; color: var(--cbs-gold); font-size: 14px; }
.cbs-sec-head span { font-size: 12.5px; color: var(--cbs-ink-2); }

/* 座位图 */
.cbs-seat-card { display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px; }
.cbs-seat-side, .cbs-result-side { min-width: 0; }
.cbs-theater { background: var(--cbs-dark); border-radius: 6px; padding: 22px 18px 18px; overflow-x: auto; }
.cbs-screen { height: 26px; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: linear-gradient(180deg, #fffdf4, #cfc6b4); color: #4a4034; text-align: center; font: 700 11px/26px Georgia, serif; letter-spacing: .12em; margin-bottom: 8px; }
.cbs-screen b { color: #76212f; }
.cbs-view-lines { display: flex; justify-content: center; gap: 62%; height: 24px; opacity: .35; }
.cbs-view-lines span { width: 1px; height: 100%; background: #e8c982; }
.cbs-seats { display: grid; gap: 5px; justify-items: center; }
.cbs-seat { width: 100%; max-width: 22px; aspect-ratio: 1 / .78; border: 0; border-radius: 4px 4px 2px 2px; background: #4a4650; cursor: pointer; padding: 0; transition: transform .12s, background .12s; }
.cbs-seat:hover { transform: scale(1.18); }
.cbs-seat.is-gold { background: #b8923f; }
.cbs-seat.is-best { background: #f0d28a; box-shadow: 0 0 0 2px #fff8ec, 0 0 12px rgba(240, 210, 138, .8); }
.cbs-seat.is-aisle { opacity: .75; }
.cbs-row-labels { display: flex; justify-content: space-between; margin-top: 10px; color: #a9a0ad; font: 600 10.5px/1.4 ui-monospace, Consolas, monospace; }
.cbs-seat-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; font-size: 12px; color: var(--cbs-ink-2); }
.cbs-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; }
.cbs-dot-gold { background: #b8923f; } .cbs-dot-best { background: #f0d28a; } .cbs-dot-normal { background: #4a4650; }
.cbs-seat-pick { margin-top: 12px !important; padding: 10px 13px; background: var(--cbs-surface-2); border-left: 3px solid var(--cbs-gold); font-size: 12.5px; line-height: 1.8; color: var(--cbs-ink-2); }

/* 结果 */
.cbs-verdict { border: 1px solid var(--cbs-line); border-top: 3px solid var(--cbs-gold); background: var(--cbs-surface-2); padding: 20px; border-radius: 4px; }
.cbs-verdict-label { font: 700 10.5px/1 Georgia, serif; letter-spacing: .2em; color: var(--cbs-gold); }
.cbs-verdict h2 { font-size: 23px; margin-top: 12px; line-height: 1.4; }
.cbs-verdict p { margin-top: 10px !important; font-size: 13.5px; line-height: 1.95; color: var(--cbs-ink-2); }
.cbs-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 16px; }
.cbs-kpis div { border: 1px solid var(--cbs-line); border-radius: 4px; padding: 12px; }
.cbs-kpis b { display: block; font: 700 19px/1.2 ui-monospace, Consolas, monospace; color: var(--cbs-ink); font-variant-numeric: tabular-nums; }
.cbs-kpis span { font-size: 11.5px; color: var(--cbs-ink-2); display: block; margin-top: 5px; }
.cbs-diff { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--cbs-wine); background: var(--cbs-surface-2); font-size: 13px; line-height: 1.9; color: var(--cbs-ink-2); }

/* 逐排表 */
.cbs-table-scroll { overflow-x: auto; }
.cbs-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.cbs-table th, .cbs-table td { padding: 9px 9px; text-align: left; border-bottom: 1px solid var(--cbs-line); }
.cbs-table th { font-size: 11.5px; color: var(--cbs-ink-2); background: var(--cbs-surface-2); white-space: nowrap; }
.cbs-table td { font-variant-numeric: tabular-nums; }
.cbs-table tr.is-gold td { background: rgba(184, 146, 63, .13); }
.cbs-table tr.is-best td { background: rgba(118, 33, 47, .1); font-weight: 700; }
.cbs-table .cbs-good { color: #2a7a55; font-weight: 700; }
.cbs-table .cbs-bad { color: var(--cbs-wine); font-weight: 700; }
.cbs-table .cbs-mid { color: var(--cbs-gold); font-weight: 700; }
.cbs-cmp { min-width: 940px; }
.cbs-cmp input, .cbs-cmp select { padding: 6px 7px; font-size: 12px; min-width: 58px; }
.cbs-cmp .cbs-del { border: 0; background: none; color: var(--cbs-wine); font-size: 18px; cursor: pointer; }
.cbs-assume { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--cbs-line); border-radius: 4px; font-size: 12.5px; line-height: 1.9; color: var(--cbs-ink-2); }

/* 快捷 & 说明 */
.cbs-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cbs-quick button { text-align: left; padding: 15px; border: 1px solid var(--cbs-line); border-radius: 4px; background: var(--cbs-surface); color: var(--cbs-ink); cursor: pointer; }
.cbs-quick button:hover { border-color: var(--cbs-gold); }
.cbs-quick button b { display: block; font-size: 14px; margin-bottom: 5px; color: var(--cbs-ink); }
.cbs-quick button span { font-size: 12px; line-height: 1.7; color: var(--cbs-ink-2); }
.cbs-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--cbs-line); }
.cbs-notes h3 { font-size: 14.5px; margin-bottom: 8px; }
.cbs-notes p { font-size: 13px; line-height: 1.9; color: var(--cbs-ink-2); }

/* 浮层 */
.cbs-modal { position: fixed; inset: 0; z-index: 999; background: rgba(24, 18, 24, .66); display: flex; align-items: center; justify-content: center; padding: 20px; }
.cbs-modal[hidden], .cbs-toast[hidden], .cbs-page [hidden] { display: none !important; }
.cbs-modal-box { background: var(--cbs-surface); border: 1px solid var(--cbs-gold); border-radius: 6px; padding: 26px; width: min(440px, 100%); position: relative; box-shadow: var(--cbs-shadow); }
.cbs-modal-box h3 { font-size: 18px; margin-bottom: 10px; }
.cbs-modal-box p { font-size: 13px; line-height: 1.8; color: var(--cbs-ink-2); margin-bottom: 14px; }
.cbs-modal-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--cbs-line); border-radius: 4px; background: var(--cbs-bg); color: var(--cbs-ink); font-size: 12.5px; margin-bottom: 12px; }
.cbs-modal-x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 25px; color: var(--cbs-ink-2); cursor: pointer; }
.cbs-toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 1000; background: var(--cbs-wine); color: #fff8ec; padding: 11px 20px; border-radius: 4px; font-size: 13.5px; }
.cbs-page .tskb { margin-top: 22px; }
.cbs-page .tskb-card, .cbs-page .tskb-panel { background: var(--cbs-surface); }

@media (max-width: 960px) {
    .cbs-hero, .cbs-seat-card { grid-template-columns: 1fr; }
    .cbs-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .cbs-wrap { padding: 0 13px; }
    .cbs-hero-copy, .cbs-hero-panel { padding: 18px; }
    .cbs-hero h1 { font-size: 27px; }
    .cbs-grid, .cbs-quick, .cbs-notes { grid-template-columns: 1fr; }
    .cbs-card { padding: 17px; }
    .cbs-ticket > div { flex-basis: 100%; border-right: 0; border-bottom: 1px dashed var(--cbs-line); }
    .cbs-theater { padding: 16px 12px; }
    .cbs-seat { max-width: 16px; }
}

/* 公共推荐位与底部套件在窄屏的既有溢出：仅在本组页面 CSS 内修复，不改线上已有页面 */
@media (max-width: 640px) {
    .tool-rec { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; box-sizing: border-box; }
    .tool-rec-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .tool-rec-item { min-width: 0 !important; width: 100% !important; box-sizing: border-box; }
    .tool-rec-body, .tool-rec-body b, .tool-rec-body small { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
    .tskb-card { overflow-x: auto; }
    .tskb-legend { min-width: 0; width: 100%; table-layout: fixed; }
    .tskb-legend th, .tskb-legend td { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
    .tskb-tabs { flex-wrap: wrap; }
}

/* 深色专属：幕布 hero 与主控按钮固定深酒红 */
:root[data-theme="dark"] .cbs-hero-copy { background: #4a1622; color: #f7efe6; }
:root[data-theme="dark"] .cbs-btn-main { background: #8f2a3b; color: #fff8ec; border-color: #8f2a3b; }
:root[data-theme="dark"] .cbs-toast { background: #4a1622; color: #fff8ec; }
/* 窄屏首屏指标紧凑：让操作入口落在手机首屏 */
@media (max-width: 600px) {
    .cbs-ticket > div { flex-basis: calc(33.333% - 1px); border-right: 1px dashed var(--cbs-line); border-bottom: 0; padding: 10px 8px; }
    .cbs-ticket b { font-size: 16px; }
    .cbs-ticket span { font-size: 10px; }
}
