/* Product implementation of designs/city-data-extraction-v12/source.html.
   Shared navigation, map data and billing controls retain their own contracts. */
.datahub-shell--city { padding: 0; --ctf-border: var(--border); --ms-control-height: 40px; --ms-control-font-size: 12px; }
.datahub-shell--city .datahub-wb__main { padding: 0; min-width: 0; }
.datahub-shell--city .datahub-wb { margin: 0; padding: 0; }
/* 模块工具栏位于工作区之上，全站导航及其抽屉使用更高的顶栏层级。 */
.ctf-toolbar { height: 66px; display: flex; align-items: center; gap: 12px; padding: 0 26px; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: var(--z-dock); }
.ctf-module-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand-heavy); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius-md); }
.ctf-module-title { min-width: 0; }
.ctf-module-title > p { margin: 2px 0 0; color: var(--ink-secondary); font-size: 12px; }
.ctf-menu { position: relative; }
.ctf-menu > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; border-radius: var(--radius-sm); }
.ctf-menu > summary::-webkit-details-marker { display: none; }
.ctf-menu h1 { font-size: calc(var(--fs-h2) + 2px); margin: 0; font-weight: 650; line-height: 25px; }
.ctf-menu > summary > i { font-size: .85em; color: var(--muted); }
.ctf-menu nav { position: absolute; top: calc(100% + 10px); left: 0; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.ctf-menu nav a { display: block; padding: 8px 10px; color: var(--ink); border-radius: var(--radius-sm); white-space: nowrap; }
.ctf-menu nav a:hover { background: var(--layout-bg); }
.ctf-toolbar-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 12px; color: var(--ink-secondary); }
.ctf-toolbar-actions > a { display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.ctf-toolbar-actions > a:hover { color: var(--brand-heavy); }
.ctf-toolbar-actions .ctf-menu nav { left: auto; right: 0; }
.ctf-workspace { --ctf-sidebar-width: 380px; position: relative; isolation: isolate; height: calc(100dvh - var(--ctf-nav-offset, var(--dtb-nav-h, 56px)) - 66px); min-height: 520px; display: grid; grid-template-columns: var(--ctf-sidebar-width) minmax(0, 1fr); background: var(--surface); }
.ctf-page-loader { position: absolute; inset: 0; z-index: calc(var(--z-dock) + 1); display: grid; place-items: center; background: rgba(255,255,255,.78); backdrop-filter: blur(3px); transition: opacity .18s ease, visibility .18s ease; }
.ctf-page-loader[hidden] { display: grid !important; opacity: 0; visibility: hidden; pointer-events: none; }
.ctf-page-loader__card { display: grid; justify-items: center; gap: 10px; min-width: 220px; padding: 22px 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.96); box-shadow: var(--shadow-md); color: var(--ink); }
.ctf-page-loader__card strong { font-size: 14px; font-weight: 600; }
.ctf-page-loader__card > span:last-child { color: var(--ink-secondary); font-size: 12px; }
.ctf-page-loader__spinner { width: 26px; height: 26px; border: 2px solid var(--brand-line); border-top-color: var(--brand-heavy); border-radius: 50%; animation: ctf-page-loader-spin .8s linear infinite; }
@keyframes ctf-page-loader-spin { to { transform: rotate(360deg); } }
.ctf-flow { position: relative; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.ctf-flow-form { display: flex; flex-direction: column; min-height: 0; flex: 1; margin: 0; }
.ctf-scroll { width: 100%; flex: 1; min-height: 0; overflow-y: auto; padding: 22px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.ctf-step { position: relative; padding: 0; }
.ctf-step::before { display: none; }
.ctf-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.ctf-section-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; font-weight: 650; line-height: 22px; }
.ctf-number { position: static; width: 21px; height: 21px; flex: none; border: 0; border-radius: var(--radius-pill); display: inline-grid; place-items: center; font-size: 12px; color: var(--ink-secondary); background: var(--layout-bg); font-weight: 600; }
.ctf-section-tip { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ctf-kind-label { border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink-secondary); border-radius: var(--radius-xs); padding: 3px 6px; font-size: 12px; }
.ctf-scope-fixed { flex: none; padding: 20px 22px 18px; border-bottom: 1px solid var(--line); z-index: 8; }
.ctf-scope-fixed .ctf-section-heading { margin-bottom: 16px; }
.ctf-scope-tabs { position: static; display: flex; gap: 3px; width: 100%; padding: 3px; margin-bottom: 16px; background: var(--layout-bg); border-radius: var(--radius-md); }
.ctf-scope-tabs > button { flex: 1; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; padding: 5px; border-radius: var(--radius-sm); font-size: 12px; color: var(--ink-secondary); white-space: nowrap; }
.ctf-scope-tabs > button.is-selected { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.ctf-entitlement-icon, .ctf-member-badge { width: 22px; height: 22px; display: inline-grid; place-items: center; color: var(--brand-heavy); background: var(--brand-soft); border-radius: var(--radius-xs); font-size: 12px; padding: 0; }
.ctf-inline-entitlement-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--brand-heavy); font-size: 11px; }
.ctf-field-label { display: block; margin: 0 0 7px; font-size: 12px; line-height: 18px; color: var(--ink-secondary); font-weight: 400; }
.ctf-scope-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ctf-scope-field { min-width: 0; }
.ctf-scope-control { width: 100%; display: flex; align-items: center; gap: 8px; --ms-control-height: 42px; }
.ctf-scope-control > strong { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctf-scope-control > i { margin-left: auto; color: var(--muted); font-size: .85em; }
.ctf-scope-control:hover { border-color: var(--brand-light); }
.ctf-scope-district > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctf-scope-note { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; color: var(--ink-secondary); font-size: 12px; line-height: 18px; }
.ctf-scope-note > i { margin-top: 3px; color: var(--muted); }
.ctf-scope-fixed .datahub-scope-picker { top: calc(100% - 8px); left: 16px; right: 16px; max-height: min(480px, 62dvh); overflow: auto; z-index: 9; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }
.ctf-search { display: flex; align-items: center; gap: 8px; height: 36px; margin: 4px 12px 10px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface); }
.ctf-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.ctf-search button { border: 0; background: none; color: var(--muted); font-size: 20px; padding: 0; }
.ctf-search:focus-within { border-color: var(--brand); box-shadow: var(--focus-ring); }
.ctf-search input::-webkit-search-cancel-button { display: none; }
.ctf-hot-cities { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.ctf-hot-cities a { color: var(--ink-secondary); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 3px 8px; }
.ctf-form-field { margin-bottom: 16px; }
.ctf-form-control { width: 100%; }
.ctf-industry-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ctf-input-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.ctf-input-label .ctf-field-label { margin: 0; }
.ctf-input-label label > span { color: var(--muted); }
.ctf-member-badge { flex: none; }
.ctf-member-badge > i { font-size: .85em; }
/* 「名称包含」标签行右侧：「找品牌门店」链接和会员标记并排 */
.ctf-input-aside { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.ctf-keyword { position: relative; }
.ctf-keyword > i { position: absolute; right: var(--ms-select-arrow-inset); top: 14px; font-size: 12px; color: var(--muted); pointer-events: none; }
/* 锁定的名称框：文字标注直接写在框里，点击才说明权益。 */
.ctf-keyword.is-locked input { padding-inline-end: 116px; background: var(--surface-soft); cursor: pointer; }
.ctf-lock-tag { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 18px; color: var(--ink-secondary); white-space: nowrap; pointer-events: none; }
.ctf-lock-tag > i { color: var(--muted); }
.ctf-hint { font-size: 12px; color: var(--ink-secondary); margin: 6px 0 0; line-height: 1.7; }
.ctf-card-description { margin: 5px 0 0; color: var(--ink-secondary); font-size: 12px; }
.ctf-step-count { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.ctf-total { display: flex; align-items: baseline; gap: 6px; line-height: 1.3; margin-top: 6px; }
.ctf-total strong { font-size: var(--fs-metric); font-weight: 650; font-variant-numeric: tabular-nums; }
.ctf-total.is-pending strong { font-size: 20px; color: var(--ink-secondary); }
/* 核对中：文字留给读屏，视觉上是一根占位条。 */
.ctf-total.is-loading strong { min-width: 96px; border-radius: var(--radius-xs); color: transparent; background: linear-gradient(90deg, var(--line) 25%, var(--surface-soft) 50%, var(--line) 75%); background-size: 200% 100%; animation: ctf-count-skeleton 1.2s ease-in-out infinite; user-select: none; }
@keyframes ctf-count-skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.ctf-total > span { font-size: 12px; color: var(--ink-secondary); }
.ctf-count-sub { margin: 5px 0 0; font-size: 12px; color: var(--ink-secondary); }
.ctf-count-caption { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 12px; color: var(--ink-secondary); }
.ctf-fields-line { margin: 8px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.ctf-count-details { margin-top: 12px; font-size: 12px; color: var(--ink-secondary); }
.ctf-count-details > summary { cursor: pointer; color: var(--muted); }
.ctf-ruler { position: relative; margin-top: 32px; }
.ctf-ruler-bar { display: flex; height: 6px; border-radius: var(--radius-xs); overflow: hidden; }
.ctf-ruler-bar i:nth-child(1) { width: 34%; background: var(--success-line); }
.ctf-ruler-bar i:nth-child(2) { width: 46%; background: var(--warning-line); }
.ctf-ruler-bar i:nth-child(3) { width: 20%; background: var(--danger-line); }
.ctf-ruler-pointer { position: absolute; top: -24px; left: var(--flow-ruler-position, 0%); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1; font-size: 12px; color: var(--ink); }
.ctf-ruler-pointer span { color: var(--surface); background: var(--ink); padding: 2px 6px; border-radius: var(--radius-xs); white-space: nowrap; }
.ctf-ruler-ticks { position: relative; height: 18px; font-size: 12px; color: var(--muted); }
.ctf-ruler-ticks span { position: absolute; top: 1px; }
.ctf-ruler-ticks span:nth-child(2) { left: 34%; transform: translateX(-50%); }
.ctf-ruler-ticks span:nth-child(3) { left: 80%; transform: translateX(-50%); }
.ctf-ruler-labels { display: grid; grid-template-columns: 34% 46% 20%; font-size: 12px; color: var(--ink-secondary); text-align: center; }
.ctf-light-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 10px 11px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-secondary); }
.ctf-light-note > i { margin-top: 3px; font-size: 12px; }
.ctf-light-note > p { font-size: 12px; line-height: 1.7; margin: 0; }
.ctf-link { border: 0; padding: 0; background: none; font-size: 12px; color: var(--brand-heavy); cursor: pointer; }
.ctf-link:disabled { color: var(--muted); cursor: default; }
.ctf-readonly { display: inline-block; background: var(--surface-soft); border-radius: var(--radius-sm); font-size: 12px; color: var(--ink-secondary); padding: 5px 8px; }
/* 找品牌门店对话框（spec 20261118-city-data-history-poi D-11）：品牌输入组件原来在筛选步的「品牌门店」卡里 */
.ctf-brand-dialog .datahub-brand-chips { margin-top: 8px; border-color: var(--border); border-radius: var(--radius-sm); box-shadow: none; }
.ctf-brand-dialog .datahub-brand-chip { background: var(--layout-bg) !important; color: var(--ink) !important; }
.ctf-brand-dialog .datahub-brand-chip__x { color: var(--muted); }
.ctf-brand-dialog .datahub-brand-hot { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.ctf-brand-dialog .datahub-brand-hot__tag { font-size: 12px; color: var(--ink-secondary); background: none; border: 1px solid var(--line); }
.ctf-brand-lead { margin: 0 0 12px; font-size: 13px; line-height: 20px; }
.ctf-brand-dialog .ctf-gate-note { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-secondary); }
.ctf-brand-dialog [data-brand-search] + .ctf-hint, .ctf-brand-dialog .ctf-gate-note + .ctf-hint { margin-top: 12px; }
.ctf-settlement { flex: none; padding: 15px 22px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.ctf-settlement-scope { margin: 0 0 4px; font-size: 12px; line-height: 19px; color: var(--ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctf-settlement-status { margin: 0; font-size: 12px; line-height: 18px; color: var(--ink); }
/* 价格行常驻：报价前是计费规则，报价后是条数、豆数和余额变化。 */
.ctf-settlement-price { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.ctf-settlement-actions { display: flex; gap: 8px; margin-top: 10px; }
.ctf-settlement .ms-button:disabled { cursor: not-allowed; }
.ctf-settlement #cityFlowPrimary { flex: 1 1 auto; min-width: 0; min-height: 42px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.ctf-settlement #cityFlowPrimary:disabled { opacity: .65; }
.ctf-settlement .ctf-sample-button { flex: none; min-height: 42px; padding: 0 14px; border-radius: var(--radius-sm); font-size: 13px; white-space: nowrap; }
.ctf-settlement .ctf-sample-button:disabled { color: var(--muted); background: var(--surface-soft); }
.ctf-settlement-links { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 9px; font-size: 12px; }
.ctf-settlement-links a, .ctf-settlement-links .ctf-link { color: var(--ink-secondary); }
.ctf-settlement-links .ctf-link { font: inherit; }
.ctf-settlement-links > :last-child { color: var(--brand-heavy); }
.ctf-custom-load { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 18px 12px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: var(--surface-soft); color: var(--ink-secondary); font-size: 12px; }
.ctf-custom-load > i { color: var(--brand-heavy); font-size: 20px; margin-bottom: 2px; }
.ctf-custom-load > strong { font-size: 13px; color: var(--ink); font-weight: 550; }
.ctf-custom-load:hover { border-color: var(--brand-light); background: var(--brand-tint); }
.ctf-dialog { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); }
.ctf-dialog::backdrop, .ctf-map-dialog::backdrop { background: rgba(30, 36, 30, .38); backdrop-filter: blur(3px); }
.ctf-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 18px; gap: 16px; border-bottom: 1px solid var(--line); }
.ctf-dialog h2 { font-size: calc(var(--fs-h2) + 2px); margin: 0; font-weight: 650; }
.ctf-dialog header > button { border: 0; background: none; color: var(--muted); font-size: var(--fs-metric); line-height: 24px; }
.ctf-dialog-body { padding: 24px; overflow: auto; max-height: 65dvh; }
.ctf-dialog dl { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px 12px; font-size: 13px; margin: 0; }
.ctf-dialog dt { color: var(--ink-secondary); font-weight: 400; }
.ctf-dialog dd { margin: 0; overflow-wrap: anywhere; }
.ctf-dialog hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.ctf-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding: 15px 24px; }
.ctf-dialog .ms-button { min-height: 38px; border-radius: var(--radius-sm); font-size: 12px; padding: 8px 16px; }
/* 提交预估（先统计、后扣豆）：说明句和「不超过多少豆自动继续」（spec 20261118-city-data-history-poi FR-5） */
.ctf-estimate { margin-top: 16px; padding: 10px 12px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--brand-tint); }
.ctf-estimate[hidden] { display: none; }
.ctf-estimate-lead { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink); }
.ctf-estimate-auto { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--ink); }
.ctf-estimate-auto input[type="checkbox"] { margin: 0; }
.ctf-estimate-limit { width: 96px; height: 28px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums; }
.ctf-estimate-limit:disabled { background: var(--surface-soft); color: var(--ink-disabled); }
.ctf-entitlement-heading { display: flex; align-items: center; gap: 10px; }
.ctf-entitlement-heading h2 { margin-bottom: 4px; }
.ctf-entitlement-heading p { margin: 0; font-size: 12px; color: var(--ink-secondary); }
.ctf-entitlement-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-md); color: var(--brand-heavy); background: var(--brand-soft); }
.ctf-entitlement-message { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink); }
.ctf-entitlement-list { margin: 16px 0 0; padding: 14px 16px 14px 34px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--brand-tint); color: var(--ink-secondary); font-size: 12px; line-height: 1.9; }
.ctf-sidebar-resizer { position: absolute; z-index: 5; top: 0; bottom: 0; left: calc(var(--ctf-sidebar-width) - 4px); width: 8px; cursor: col-resize; touch-action: none; }
.ctf-sidebar-resizer::after { content: ''; position: absolute; top: 50%; left: 3px; width: 2px; height: 42px; border-radius: 2px; background: var(--border); transform: translateY(-50%); transition: background .15s ease, height .15s ease; }
.ctf-sidebar-resizer:hover::after, .ctf-sidebar-resizer.is-dragging::after, .ctf-sidebar-resizer:focus-visible::after { height: 64px; background: var(--brand); }
.ctf-sidebar-resizer:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ctf-sidebar-resizing, .ctf-sidebar-resizing * { cursor: col-resize !important; user-select: none !important; }
.ctf-modal-open #cityFlowPrimary { background: var(--surface); border-color: var(--border); color: var(--ink-secondary); }
.ctf-district-picker [data-flow-districts] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; max-height: 45dvh; overflow: auto; }
.ctf-district-picker label { display: flex; align-items: center; gap: 7px; padding: 10px; font-size: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ctf-district-picker input, .ctf-district-all input { accent-color: var(--brand-action); }
.ctf-area-field { display: grid; gap: 8px; font-size: 12px; margin-bottom: 18px; color: var(--ink-secondary); }
.ctf-area-field select { width: 100%; }
.ctf-area-options label { display: flex; align-items: center; gap: 10px; min-height: 50px; border: 1px solid var(--line); padding: 12px; border-radius: var(--radius-sm); margin-top: 8px; font-size: 13px; }
.ctf-area-options label:has(:checked) { background: var(--brand-tint); border-color: var(--brand-line); }
.ctf-area-options input { accent-color: var(--brand-action); }
.ctf-sample-dialog { width: min(980px, calc(100vw - 32px)); }
.ctf-sample-table { overflow: auto; }
.ctf-sample-table table { border-collapse: collapse; font-size: 12px; width: 100%; white-space: nowrap; }
.ctf-sample-table td, .ctf-sample-table th { border: 1px solid var(--line); padding: 8px; }
/* 样例与字段：预览、字段说明、下载三个页签共用一个弹窗。 */
.ctf-sample-dialog > header { padding-bottom: 12px; border-bottom: 0; }
.ctf-sample-dialog > header > div { min-width: 0; }
.ctf-sample-scope { margin: 4px 0 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); }
.ctf-sample-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.ctf-sample-tabs > button { margin-bottom: -1px; padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-secondary); font-size: 13px; }
.ctf-sample-tabs > button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.ctf-sample-dialog [role="tabpanel"] > p { margin: 0 0 12px; font-size: 13px; line-height: 1.7; color: var(--ink-secondary); }
.ctf-sample-dialog [role="tabpanel"] > .ctf-sample-table + p { margin: 12px 0 0; }
.ctf-field-table th { text-align: left; font-weight: 600; background: var(--surface-soft); }
.ctf-field-table code { color: var(--ink); font-size: 12px; }
.ctf-benefits-dialog { width: min(860px, calc(100vw - 32px)); }
.ctf-brand-dialog { width: min(480px, calc(100vw - 32px)); }
.ctf-benefits-dialog a:not(.ms-button) { color: var(--brand-heavy); }
.ctf-task-capsule { display: flex; align-items: center; gap: 6px; border: 1px solid var(--brand-line); background: var(--brand-tint); color: var(--brand-heavy); border-radius: var(--radius-pill); font-size: 12px; padding: 5px 10px; }
/* 预估完成、等用户确认：和「进行中」区分开，提醒这里有一步要人来做 */
.ctf-task-capsule.is-awaiting { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning-dark); }
#cityFlowMapDock { min-width: 0; min-height: 0; }
.ctf-map { position: relative; height: 100%; min-height: 0; overflow: hidden; isolation: isolate; background: var(--layout-bg); }
.ctf-map > .datahub-map { position: absolute; inset: 0; z-index: 0; height: 100%; min-height: 0; border: 0; border-radius: 0; }
.ctf-map .leaflet-tile-pane { filter: saturate(.45); opacity: .6; }
.ctf-map-controls { pointer-events: none; position: absolute; inset: 24px 24px auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; z-index: 2; }
.ctf-map-controls > * { pointer-events: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); font-size: 12px; }
.ctf-map-back { color: var(--ink-secondary); padding: 10px 12px; }
.ctf-map-rank { margin-left: auto; width: 196px; }
.ctf-map-rank summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.ctf-map-rank ol { padding: 0 14px 10px; margin: 0; }
.ctf-map-rank li { padding: 5px 0; display: flex; gap: 16px; justify-content: space-between; }
.ctf-map-rank a { color: var(--ink-secondary); }
.ctf-map-rank li span { color: var(--muted); font-variant-numeric: tabular-nums; }
/* 地图底部的停靠区：提示条在上，时期条在下。没有时期条时提示条靠左下，和原来一样。 */
.cth-dock { position: absolute; left: 12px; right: 12px; bottom: 8px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.cth-dock > #datahubCatalogMapNote { box-sizing: border-box; margin: 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); }
.cth-dock > #datahubCatalogMapNote:not(:empty) { padding: 8px 12px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--surface); }
.ctf-map-rank[hidden] { display: none; }
.ctf-map-expand, .ctf-map-fullscreen-head { display: none; }
.ctf-map-dialog { padding: 0; border: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; }
.ctf-map-dialog .ctf-map { height: 100%; }
.ctf-map-dialog .ctf-map-fullscreen-head { display: flex; height: 48px; padding: 8px 12px; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); }
.ctf-map-dialog .ctf-map > .datahub-map { top: 48px; height: calc(100% - 48px); pointer-events: auto; }
.ctf-map-dialog .ctf-map-controls { top: 60px; }
.ctf-map-dialog .ctf-map-expand { display: none; }
.datahub-shell--city .datahub-learn-more { margin: 20px; }
@media (min-width: 1600px) { .ctf-workspace { --ctf-sidebar-width: 412px; } .ctf-scope-fixed, .ctf-scroll, .ctf-settlement { padding-left: 28px; padding-right: 28px; } }
@media (min-width: 960px) and (max-width: 1220px) { .ctf-workspace { --ctf-sidebar-width: 350px; } .ctf-scope-fixed, .ctf-scroll, .ctf-settlement { padding-left: 18px; padding-right: 18px; } }
@media (max-height: 800px) and (min-width: 960px) {
  .ctf-scope-fixed { padding-top: 10px; padding-bottom: 8px; }
  .ctf-scope-fixed .ctf-section-heading { margin-bottom: 10px; }
  .ctf-scope-tabs { margin-bottom: 8px; }
  .ctf-scope-tabs > button { min-height: 30px; }
  .ctf-scope-control { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
  .ctf-scope-note { margin-top: 7px; }
  .ctf-field-label { margin-bottom: 5px; }
  .ctf-scroll { padding-top: 16px; padding-bottom: 14px; }
  .ctf-section-heading { margin-bottom: 14px; }
  .ctf-form-field { margin-bottom: 13px; }
  .ctf-settlement { padding-top: 10px; padding-bottom: 10px; }
  .ctf-settlement #cityFlowPrimary, .ctf-settlement .ctf-sample-button { min-height: 38px; }
  .ctf-settlement-actions { margin-top: 8px; }
}
@media (max-width: 959px) {
  .ctf-toolbar { height: 61px; padding: 0 16px; }
  .ctf-module-icon { display: none; }
  .ctf-module-title > p { font-size: 12px; }
  .ctf-toolbar-actions { gap: 12px; }
  .ctf-toolbar-docs, .ctf-toolbar-actions > .ctf-menu { display: none; }
  .ctf-workspace { height: auto; min-height: 0; display: block; padding-bottom: 175px; }
  .ctf-flow { border: 0; }
  .ctf-scope-fixed { padding: 16px 18px; }
  .ctf-scroll { overflow: visible; padding: 18px; }
  .ctf-settlement { position: fixed; bottom: 0; left: 0; right: 0; z-index: var(--z-topbar); padding: 12px 18px max(13px, env(safe-area-inset-bottom)); }
  .ctf-settlement #cityFlowPrimary, .ctf-settlement .ctf-sample-button { min-height: 43px; }
  .ctf-settlement-actions { margin-top: 9px; }
  .ctf-sample-tabs { padding: 0 18px; }
  #cityFlowMapDock { display: none; }
  .ctf-sidebar-resizer { display: none; }
  .ctf-scope-controls { grid-template-columns: 1fr; }
  .ctf-industry-row { grid-template-columns: 1fr; }
  #cityFlowMapSlot { height: 200px; margin-top: 18px; }
  #cityFlowMapSlot .ctf-map { border-radius: var(--radius-md); }
  #cityFlowMapSlot .ctf-map > .datahub-map { pointer-events: none; }
  #cityFlowMapSlot .ctf-map-controls { display: none; }
  #cityFlowMapSlot .ctf-map-expand { display: flex; align-items: flex-end; justify-content: flex-end; position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; z-index: 3; color: var(--ink); padding: 10px; }
  #cityFlowMapSlot .leaflet-control-container { display: none; }
  .ctf-dialog { width: calc(100vw - 20px); }
  .ctf-page-loader__card { min-width: 190px; padding: 18px 22px; }
  .ctf-dialog > header, .ctf-dialog-body, .ctf-dialog > footer { padding: 18px; }
  .ctf-district-picker [data-flow-districts] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .ctf-workspace * { scroll-behavior: auto; transition: none; } .ctf-total.is-loading strong { animation: none; } }
/* Range summary follows the reference without replacing the real map. */
.ctf-map-location { max-width: min(340px, 45%); overflow: hidden; }
.ctf-map-location > p { display: flex; align-items: center; gap: 8px; margin: 0; padding: 11px 14px; }
.ctf-map-location > p > i { color: var(--brand-heavy); }
.ctf-map-location strong { font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctf-map-location .ctf-map-back { display: block; padding: 7px 14px; font-size: 12px; border-top: 1px solid var(--line); }
/* 范围概况卡：内容超出地图高度时在卡片内部滚动（具体版式见文件末尾的 cth- 规则）。 */
.ctf-map-summary { width: 292px; max-height: 100%; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ctf-map-summary h3 { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-secondary); font-weight: 600; margin: 0; }
.ctf-map-summary .ctf-map-rank { width: auto; margin: 10px -4px -5px; }
.ctf-map-summary .ctf-map-rank summary { padding: 5px 4px; }
.ctf-map-summary .ctf-map-rank ol { padding: 8px 4px; }
.ctf-workspace[data-scope-source="custom"] .ctf-map-rank, .ctf-workspace[data-scope-source="custom"] .ctf-map-back { display: none; }
@media (max-width: 1220px) { .ctf-map-controls { top: 18px; left: 18px; right: 18px; } .ctf-map-summary { width: 264px; } }

/* Membership boundaries remain visible beside the fixed Shanghai example. */
.ctf-access-notice { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--ink-secondary); font-size: 12px; line-height: 1.6; }
.ctf-access-notice > i { color: var(--brand-heavy); padding-top: 3px; }
.ctf-access-notice p { margin: 0; }
.ctf-access-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.ctf-industry-login { width: 100%; justify-content: center; gap: 8px; }
.ctf-industry-row[hidden], .ctf-industry-row select[hidden] { display: none; }
.ctf-industry-row:has(select[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ctf-industry-overview { margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.ctf-industry-overview h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; }
.ctf-industry-overview ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ctf-industry-overview li { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.ctf-industry-overview li > span { flex: 1; }
.ctf-industry-overview strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.ctf-industry-overview small { color: var(--muted); min-width: 38px; text-align: right; }

/* 地图图例：标题带时期，点开是统计口径说明；无数据用浅灰斜纹，和最浅一级橙色分得开。 */
.datahub-map-legend__title > summary { display: flex; align-items: center; gap: 6px; min-height: 24px; font-weight: 600; white-space: nowrap; cursor: pointer; list-style: none; }
.datahub-map-legend__title > summary::-webkit-details-marker { display: none; }
.datahub-map-legend__title > p { max-width: 208px; margin: 0 0 4px; line-height: 18px; color: var(--ink-secondary); }
.datahub-map-legend__help, .ctf-count-hint__help { width: 16px; height: 16px; flex: none; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--ink-secondary); font-size: 12px; font-weight: 400; line-height: 1; }
.datahub-map-legend i.is-hatched { border: 1px solid var(--border); background: repeating-linear-gradient(-45deg, var(--ink-disabled) 0 2px, var(--data-map-null) 2px 4px); }

/* ── 历年 POI：时期条、范围概况卡、两期对比（spec 20261118-city-data-history-poi） ──
   地图区会被移进全屏弹窗（在 .ctf-workspace 之外），所以这里的规则以 .ctf-map 为祖先，不依赖工作区。 */
/* 换范围时只替换 #cityDataRoot；它本身不参与布局，工作区的尺寸规则照旧生效。 */
#cityDataRoot { display: contents; }
.cth-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ctf-toolbar-actions > a.ctf-toolbar-beans { height: 30px; padding: 0 12px; border: 1px solid var(--brand-line); border-radius: var(--radius-pill); background: var(--brand-tint); color: var(--brand-heavy); white-space: nowrap; }
.ctf-toolbar-actions > a.ctf-toolbar-beans[hidden] { display: none; }
.ctf-toolbar-beans b { font-weight: 600; font-variant-numeric: tabular-nums; }
/* 顶栏多了余额之后，窄屏一行放不下：链接文字不折行，标题和副标题放不下时省略；
   手机宽度（≤600px）收起副标题和「数据口径」，余额只留图标和数字（「数据豆」三个字仍留给读屏）。 */
.ctf-toolbar-actions > a { white-space: nowrap; }
.ctf-menu > summary > h1, .ctf-module-title > p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .ctf-module-title > p, .ctf-toolbar-actions > a.ctf-toolbar-docs { display: none; }
  .ctf-toolbar-beans-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* 两期对比的颜色：基准期 A 和「减少」用蓝，对比期 B 和「增加」用橙。蓝色加深到白底小字可读。 */
.ctf-map, .ctf-flow { --cth-a: var(--info); --cth-b: var(--brand-action); --cth-up: var(--brand-heavy); --cth-down: var(--info); }
@supports (color: color-mix(in srgb, red, blue)) { .ctf-map, .ctf-flow { --cth-a: color-mix(in srgb, var(--info) 78%, #000); --cth-down: color-mix(in srgb, var(--info) 78%, #000); } }
/* 原地更新时只在变化的区块上给占位：顶部一条细进度线，地图和卡片内容变淡，不盖整页遮罩。 */
.ctf-workspace.is-soft-loading::after { content: ''; position: absolute; inset: 0 0 auto; height: 2px; z-index: 6; pointer-events: none; background: linear-gradient(90deg, transparent, var(--brand), transparent) no-repeat; background-size: 40% 100%; animation: cth-soft-loading 1s linear infinite; }
@keyframes cth-soft-loading { from { background-position: -70% 0; } to { background-position: 170% 0; } }
.ctf-workspace.is-soft-loading .ctf-map > .datahub-map, .ctf-workspace.is-soft-loading .cth-card-total, .ctf-workspace.is-soft-loading .cth-card-body { opacity: .55; transition: opacity .15s ease; }
@media (prefers-reduced-motion: reduce) { .ctf-workspace.is-soft-loading::after { animation: none; background-size: 100% 100%; } }
/* 工作区被按住（city-nav.js 的 hold）时外观不变：「正在更新」已经由上面的进度线和变淡的地图表示，
   站点通用的 [aria-disabled] 变灰规则（workbench.css）不套在整块工作区上。 */
.ctf-workspace[aria-disabled="true"] { opacity: 1; cursor: auto; }
/* 卡片的高度上限：底边停在底部停靠区和右下角缩放按钮的上方（按钮高 64px、离底 10px，再留 12px）。--cth-dock-h 由 city-flow.js 量出。 */
.ctf-map-controls { bottom: max(calc(var(--cth-dock-h, 0px) + 24px), 86px); }
.cth-card-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 0 14px; }
.cth-collapse { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: var(--radius-xs); background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.cth-collapse:hover { background: var(--layout-bg); color: var(--ink); }
.cth-collapse > i { transition: transform .15s ease; }
.cth-card.is-collapsed .cth-collapse > i { transform: rotate(180deg); }
.cth-card-scope { flex: none; margin: 4px 14px 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); overflow-wrap: anywhere; }
.cth-card-total { flex: none; display: flex; align-items: baseline; gap: 8px; margin: 0 14px; }
.cth-card-total > strong { font-size: 20px; line-height: 28px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.cth-card-total > span { font-size: 12px; color: var(--muted); }
.cth-card-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 14px 12px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.cth-card-sub { margin: 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); }
.cth-card-foot { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; line-height: 18px; color: var(--muted); }
/* 收起成一行：只留范围名和收录量 */
.cth-card.is-collapsed { flex-direction: row; align-items: center; gap: 10px; width: auto; max-width: 360px; padding: 6px 6px 6px 14px; }
.cth-card.is-collapsed .cth-card-head { order: 3; padding: 0; }
.cth-card.is-collapsed .cth-card-head > h3 { display: none; }
.cth-card.is-collapsed .cth-card-scope { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cth-card.is-collapsed .cth-card-total { margin: 0; }
.cth-card.is-collapsed .cth-card-total > strong { font-size: 14px; line-height: 22px; }
.ctf-map-rank.is-replaced { display: none; }
/* 卡片里由历年数据画出的内容 */
.cth-line { margin: 6px 0 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); }
.cth-line--lead { color: var(--ink); }
.cth-fixed { margin: 6px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.cth-why > summary { cursor: pointer; color: var(--ink-secondary); }
.cth-why > p { margin: 4px 0 0; }
.cth-warning { margin: 8px 0 0; padding: 6px 8px; border: 1px solid var(--warning-line); border-radius: var(--radius-sm); background: var(--warning-bg); font-size: 12px; line-height: 18px; color: var(--ink); }
.cth-block { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cth-block h4 { margin: 0 0 8px; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--ink); }
.cth-block h5 { margin: 8px 0 2px; font-size: 12px; line-height: 18px; font-weight: 400; color: var(--muted); }
.cth-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cth-block-head > h4 { margin: 0; }
.cth-bars { display: flex; align-items: stretch; gap: 4px; height: 66px; }
.cth-bar { flex: 1 1 0; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) 14px; row-gap: 3px; }
.cth-bar > i { align-self: end; display: block; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--brand-line); }
/* 柱子窄，九个时期名排不下：只写最早一期、最新一期和当前期，其余的看悬停提示和地图下方的时期条 */
.cth-bar > b { visibility: hidden; justify-self: center; font-size: .85em; line-height: 14px; font-weight: 400; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cth-bar:first-child > b, .cth-bar:last-child > b, .cth-bar.is-current > b { visibility: visible; }
.cth-bar:first-child > b { justify-self: start; }
.cth-bar:last-child > b { justify-self: end; }
.cth-bar.is-current > i { background: var(--brand); }
.cth-bar.is-current > b { color: var(--ink); font-weight: 600; }
.cth-bar.is-empty > i { height: 12px !important; background: none; border: 1px dashed var(--border); border-bottom: 0; }
.cth-bars > .cth-sep { margin: 4px 0 18px; }
.cth-mix { list-style: none; margin: 0; padding: 0; }
.cth-mix-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 42px; align-items: center; gap: 8px; width: calc(100% + 8px); min-height: 24px; margin: 0 -4px; padding: 0 4px; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; color: var(--ink); text-align: left; }
button.cth-mix-row { cursor: pointer; }
button.cth-mix-row:hover { background: var(--brand-soft); }
.cth-mix-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cth-mix-bar { height: 8px; border-radius: var(--radius-xs); background: var(--line); overflow: hidden; }
.cth-mix-bar > i { display: block; height: 100%; border-radius: var(--radius-xs); background: var(--brand-light); }
.cth-mix-share { text-align: right; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.cth-rank { list-style: none; margin: 0; padding: 0; }
.cth-rank > li { display: flex; align-items: center; gap: 6px; min-height: 24px; margin: 0 -4px; padding: 0 4px; border-radius: var(--radius-xs); }
.cth-rank > li:hover, .cth-rank > li:focus-within { background: var(--brand-soft); }
.cth-rank > li.is-selected { font-weight: 600; }
.cth-rank-no { flex: none; width: 18px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.cth-rank > li > a, .cth-rank > li > span:not([class]) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cth-rank > li > a:hover { color: var(--brand-heavy); }
.cth-rank-value { flex: none; color: var(--ink-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cth-rank-delta { flex: none; min-width: 50px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cth-rank-delta.is-up { color: var(--cth-up); }
.cth-rank-delta.is-down { color: var(--cth-down); }
.cth-seg { flex: none; display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cth-seg > button { height: 22px; padding: 0 8px; border: 0; background: var(--surface); font: inherit; color: var(--ink-secondary); cursor: pointer; }
.cth-seg > button + button { border-left: 1px solid var(--border); }
.cth-seg > button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-heavy); font-weight: 600; }
.cth-seg > button:disabled { color: var(--ink-disabled); cursor: not-allowed; }
.cth-pair { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; }
.cth-pair > dt { color: var(--ink-secondary); font-weight: 400; }
.cth-pair > dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.cth-multi { width: 100%; margin-top: 12px; justify-content: center; }
/* 对比标记：常显在范围路径下方，不遮挡地图 */
.ctf-map-location > .cth-flag { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 14px; border-top: 1px solid var(--line); background: var(--info-bg); color: var(--ink); }
.ctf-map-location > .cth-flag[hidden] { display: none; }
.cth-flag > span { min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cth-flag > .ctf-link { flex: none; white-space: nowrap; }
/* 时期条：桌面端在地图底部居中 */
.ctf-map--strip .cth-dock { left: 50%; right: auto; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); align-items: center; }
.ctf-map--strip .cth-dock > #datahubCatalogMapNote { text-align: center; }
.ctf-map--strip .cth-dock > #datahubCatalogMapNote:not(:empty) { margin-bottom: 6px; padding: 6px 12px; }
/* 提示条和时期条一样宽，文字多了就换行，不把停靠区撑宽 */
.ctf-map--strip .cth-dock:has(> .cth-strip:not([hidden])) > #datahubCatalogMapNote { width: 0; min-width: 100%; }
.cth-strip { pointer-events: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 10px; box-sizing: border-box; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); font-size: 12px; }
.cth-strip[hidden] { display: none; }
/* 地图窄到排不下九期时，只有时期格横向滑动，右侧的「对比两期」留在原处。底部留 4px 给格子下方的小点 */
.cth-strip > .cth-cells { min-width: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: -4px; }
.cth-strip > .cth-cells::-webkit-scrollbar { display: none; }
.cth-slots { grid-column: 1 / -1; justify-self: end; display: flex; gap: 6px; margin-bottom: 4px; }
.cth-strip-side { align-self: center; }
.cth-cells { display: flex; align-items: flex-end; gap: 2px; }
/* 按钮的浏览器默认样式是 align-items: flex-start，不写 stretch 的话中间那一行没有高度，柱子画不出来 */
.cth-cell { position: relative; flex: none; display: grid; grid-template-rows: 16px minmax(0, 1fr) 16px; row-gap: 2px; align-items: stretch; box-sizing: border-box; width: 50px; height: 76px; padding: 0 4px; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; color: var(--ink-secondary); text-decoration: none; cursor: pointer; }
.cth-cell:hover { background: var(--brand-tint); text-decoration: none; }
.cth-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cth-cell-top { justify-self: center; line-height: 16px; font-weight: 600; color: var(--brand-heavy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cth-cell-bar { display: flex; align-items: flex-end; min-height: 0; }
.cth-cell-bar > i { display: block; width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: var(--brand-line); }
.cth-cell-name { line-height: 16px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cth-cell.is-current .cth-cell-bar > i { background: var(--brand); }
.cth-cell.is-current .cth-cell-name { color: var(--ink); font-weight: 600; }
/* 仅浏览：斜纹柱加「仅看」角标 */
.cth-cell.is-browse .cth-cell-bar > i { background: repeating-linear-gradient(45deg, var(--brand-line) 0 3px, var(--surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--brand-line); }
.cth-cell.is-browse.is-current .cth-cell-bar > i { background: repeating-linear-gradient(45deg, var(--brand) 0 3px, var(--surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--brand); }
.cth-cell-tag { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 0 3px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); font-size: .85em; line-height: 14px; color: var(--ink-secondary); white-space: nowrap; }
/* 无区县细分：柱下一个小点 */
.cth-cell-dot { position: absolute; left: 50%; bottom: -3px; width: 4px; height: 4px; margin-left: -2px; border-radius: var(--radius-pill); background: var(--warning-dark); }
/* 无数据：虚线空柱，不可选 */
.cth-cell.is-empty { color: var(--muted); cursor: not-allowed; }
.cth-cell.is-empty:hover { background: none; }
.cth-cell.is-empty .cth-cell-bar > i { height: 14px !important; min-height: 0; background: none; border: 1px dashed var(--border); border-bottom: 0; }
/* 两期对比：A、B 两期的柱子换颜色，柱顶写 A / B */
.cth-cell.is-slot-a .cth-cell-bar > i { background: var(--cth-a); box-shadow: none; }
.cth-cell.is-slot-b .cth-cell-bar > i { background: var(--cth-b); box-shadow: none; }
.cth-cell-slot { position: absolute; top: 0; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: var(--radius-pill); background: var(--cth-a); color: #fff; line-height: 16px; text-align: center; font-weight: 600; }
.cth-cell.is-slot-b .cth-cell-slot { background: var(--cth-b); }
.cth-cell.is-slot-a .cth-cell-top, .cth-cell.is-slot-b .cth-cell-top { visibility: hidden; }
/* 口径不同的相邻两期之间画虚线 */
.cth-sep { flex: none; align-self: stretch; width: 0; margin: 18px 2px; border-left: 1px dashed var(--border); }
/* 服务端渲染的链接版：历年数据取到前（或取不到时）显示，没有柱子 */
.cth-cells--links { align-items: center; }
.cth-cells--links > .cth-cell { grid-template-rows: none; place-items: center; height: 32px; }
.cth-cells--links > .cth-cell.is-current { background: var(--brand-soft); color: var(--brand-heavy); font-weight: 600; }
.cth-compare-toggle { height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font: inherit; color: var(--ink-secondary); white-space: nowrap; cursor: pointer; }
.cth-compare-toggle:hover { border-color: var(--brand); color: var(--brand-heavy); }
.cth-compare-toggle.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-heavy); font-weight: 600; }
.cth-slot { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 4px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font: inherit; color: var(--ink-secondary); white-space: nowrap; cursor: pointer; }
.cth-slot > b { width: 16px; height: 16px; border-radius: var(--radius-pill); background: var(--cth-a); color: #fff; line-height: 16px; text-align: center; font-weight: 600; }
.cth-slot[data-history-slot="b"] > b { background: var(--cth-b); }
.cth-slot.is-active { border-color: var(--ink); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 2px rgba(0, 0, 0, .06); }
/* 图例和缩放控件给时期条让位：地图够宽时三者在底部排成一行，不够宽时图例和缩放控件抬到时期条上方。 */
.ctf-map { container-type: inline-size; }
.ctf-map--strip .leaflet-bottom { bottom: calc(var(--cth-dock-h, 104px) + 12px); }
/* 缩放按钮抬高后，卡片的底边跟着抬高，仍然停在按钮上方 */
.ctf-map--strip .ctf-map-controls { bottom: calc(var(--cth-dock-h, 104px) + 98px); }
@container (min-width: 1040px) {
  .ctf-map--strip .leaflet-bottom { bottom: 0; }
  .ctf-map--strip .ctf-map-controls { bottom: max(calc(var(--cth-dock-h, 104px) + 24px), 86px); }
}
/* 自定义区域不是行政区划，没有对应的历年统计：历年内容、时期条和卡片上的行政区划总量都不显示，换时期用左栏的下拉框。 */
.ctf-map[data-scope-source="custom"] :is(.cth-card-scope, .cth-card-total, .cth-live, .cth-strip, .cth-flag, .ctf-map-rank, .ctf-map-back), .ctf-workspace[data-scope-source="custom"] .cth-tabs { display: none; }
/* 口径差异提示（FR-14）：可下载条数和收录量相差较大时才出现，点开是口径说明 */
.ctf-count-hint { margin-top: 8px; font-size: 12px; line-height: 18px; color: var(--ink-secondary); }
.ctf-count-hint > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.ctf-count-hint > summary::-webkit-details-marker { display: none; }
.ctf-count-hint > p { margin: 4px 0 0; color: var(--muted); }
/* 窄屏：时期条改为左栏里一行可横向滑动的时期标签 */
.cth-tabs { display: none; }
@media (max-width: 959px) {
  .cth-tabs:not([hidden]) { display: block; margin-top: 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cth-tabs > .cth-cells { width: max-content; align-items: center; gap: 6px; padding: 2px; }
  .cth-tabs .cth-cell { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: auto; min-width: 54px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); }
  .cth-tabs .cth-cell.is-current { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-heavy); font-weight: 600; }
  .cth-tabs .cth-cell.is-current .cth-cell-name { color: inherit; }
  .cth-tabs .cth-cell.is-empty { border-style: dashed; }
  .cth-tabs .cth-cell-tag { position: static; transform: none; padding: 0; border: 0; background: none; }
  .cth-tabs .cth-cell-dot, .cth-tabs .cth-cell-slot { position: static; margin: 0; }
  .cth-tabs .cth-sep { margin: 6px 0; }
  #cityFlowMapSlot .cth-strip { display: none; }
  .ctf-map-dialog .ctf-map-controls { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; left: 8px; right: 8px; }
  .ctf-map-dialog .ctf-map-location { max-width: none; }
  .ctf-map-dialog .ctf-map-summary { width: auto; max-height: 38dvh; }
}
/* 多期一起取（spec 20261118-city-data-history-poi FR-10）：时期勾选列表；不能勾的时期置灰并写明原因 */
.ctf-multi { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.ctf-multi[hidden] { display: none; }
.ctf-multi .ctf-field-label { font-weight: 600; color: var(--ink); }
.ctf-multi__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.ctf-multi__item { display: flex; align-items: center; gap: 6px; min-height: 24px; font-size: 13px; color: var(--ink); cursor: pointer; }
.ctf-multi__item input { margin: 0; flex: none; }
.ctf-multi__item small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ctf-multi__item.is-blocked { color: var(--ink-disabled); cursor: default; }
/* 确认弹窗里的逐期费用表：时期、条数、豆数，最后一行合计 */
.ctf-confirm-periods { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; max-height: 240px; }
.ctf-confirm-periods[hidden] { display: none; }
.ctf-confirm-periods table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctf-confirm-periods th, .ctf-confirm-periods td { padding: 8px 12px; text-align: left; font-weight: 400; border-top: 1px solid var(--line); }
.ctf-confirm-periods thead th { border-top: 0; background: var(--surface-soft); color: var(--ink-secondary); font-size: 12px; }
.ctf-confirm-periods thead th + th, .ctf-confirm-periods td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctf-confirm-periods tbody small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ctf-confirm-periods tr.is-empty td { color: var(--muted); }
.ctf-confirm-periods tfoot th, .ctf-confirm-periods tfoot td { font-weight: 600; background: var(--surface-soft); }

/* ============ 免费用户的全国地图（spec 20261119-city-data-province-summary）============
   页面骨架沿用上面的 ctf- / cth- 规则，这里只有全国视图独有的部分，类名以 ctn- 开头。 */
.ctn-map-dock { min-width: 0; min-height: 0; }
/* 顶部提示里的出口（全国视图和上海体验共用）：跟在句子后面，不拆行 */
.ctf-access-notice a { color: var(--brand-heavy); white-space: nowrap; }
.ctf-access-notice a:hover { text-decoration: underline; }
.ctn-notice p > a, .ctn-notice p > .ctf-link { margin-left: 4px; }
.ctn-notice .ctf-link { font: inherit; white-space: nowrap; }
.ctn-notice .ctf-link:hover { text-decoration: underline; }
.ctn-workspace .ctf-scope-tabs > button { cursor: pointer; }
/* 被锁的范围控件：还是选择框的样子，写的是「会员权益」，没有下拉箭头 */
.ctn-scope-locked.ms-select-trigger { gap: 6px; padding-inline: 10px; background-image: none; background-color: var(--surface-soft); color: var(--ink-secondary); }
.ctn-scope-locked > i { margin-left: 0; font-size: 11px; }
.ctn-scope-locked > strong { font-size: 12px; font-weight: 400; }
/* 被锁的输入框（行业、名称包含）：左边是当前取值或占位文字，右边写明要哪一档权益 */
.ctn-lockbox { box-sizing: border-box; width: 100%; height: var(--ms-control-height); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 var(--ms-control-padding); border: 1px solid var(--border); border-radius: var(--ms-control-radius); background: var(--surface-soft); font: inherit; font-size: var(--ms-control-font-size); color: var(--ink); text-align: left; cursor: pointer; }
.ctn-lockbox:hover { border-color: var(--brand-light); }
.ctn-lockbox > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctn-lockbox__placeholder { color: var(--muted); }
.ctn-lockbox > b { flex: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 400; color: var(--ink-secondary); white-space: nowrap; }
.ctn-lockbox > b > i { font-size: 11px; color: var(--muted); }
.ctn-member-tag { flex: none; display: inline-block; padding: 0 5px; border-radius: var(--radius-xs); background: var(--brand-soft); color: var(--brand-heavy); font-size: 11px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.cth-compare-toggle > .ctn-member-tag { margin-left: 6px; }
/* 「需要会员权益」对话框左下角的出口（体验上海大类分布 / 回全国各省收录量） */
.ctf-dialog > footer > .ctf-entitlement-link { align-self: center; margin-right: auto; font-size: 12px; color: var(--brand-heavy); }
.ctf-dialog > footer > .ctf-entitlement-link:hover { text-decoration: underline; }
/* 地图左上角：位置框里第二行是边界说明 */
.ctf-map-location > p.ctn-boundary-note { display: block; margin-top: -5px; padding: 0 14px 9px; font-size: 11px; line-height: 16px; color: var(--muted); }
/* 范围概况卡 */
.ctn-card-back { flex: none; margin-left: auto; white-space: nowrap; text-decoration: none; }
.ctn-card-back:hover { text-decoration: underline; }
/* 历年变化的柱子在这里是按钮：点一根就换到那一期 */
.ctn-bars > .cth-bar { align-items: stretch; padding: 0; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; color: inherit; cursor: pointer; }
.ctn-bars > .cth-bar:hover > i { background: var(--brand-light); }
.ctn-bars > .cth-bar.is-current:hover > i { background: var(--brand); }
.ctn-bars > .cth-bar.is-empty:hover > i { background: none; border-color: var(--brand-light); }
.ctn-bars > .cth-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* 行业构成：只有一行，说明这是会员权益，给一个上海体验的出口 */
.ctn-lockline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ctn-lockline > h4 { margin: 0; }
.ctn-lockline > a { margin-left: auto; color: var(--brand-heavy); white-space: nowrap; }
.ctn-lockline > a:hover { text-decoration: underline; }
.ctn-lock-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-soft); font: inherit; font-size: 11px; color: var(--ink-secondary); white-space: nowrap; cursor: pointer; }
.ctn-lock-chip:hover { border-color: var(--brand-light); color: var(--brand-heavy); }
.ctn-lock-chip > i { font-size: 10px; color: var(--muted); }
/* 选中省后的锁定区：下一级只有名称和锁，没有数字 */
.ctn-locked-free { margin: 0 0 8px; font-size: 12px; line-height: 18px; color: var(--ink); }
.ctn-locked-free > a { margin-left: 4px; color: var(--brand-heavy); white-space: nowrap; }
.ctn-locked-free > a:hover { text-decoration: underline; }
.ctn-names { display: flex; flex-wrap: wrap; gap: 6px; }
.ctn-name { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-soft); font: inherit; color: var(--ink-secondary); white-space: nowrap; cursor: pointer; }
.ctn-name:hover { border-color: var(--brand-light); color: var(--brand-heavy); }
.ctn-name > i { font-size: 10px; color: var(--muted); }
.ctn-name--more { border-style: dashed; background: none; }
.ctn-locked-note { margin: 8px 0 0; font-size: 12px; line-height: 18px; color: var(--ink-secondary); }
.ctn-locked-note > .ctf-link { margin-left: 4px; font: inherit; }
.ctn-locked-note > .ctf-link:hover { text-decoration: underline; }
/* 统计数据取不到时的卡片和地图（PRD 4.7）：地图只画省界，不着色，不出图例 */
.ctn-fail > .cth-warning { margin-top: 2px; }
.ctn-fail-actions { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.ctn-fail-actions > .ms-button { min-height: 30px; padding: 4px 14px; font-size: 12px; }
.ctn-fail-actions > a:not(.ms-button) { color: var(--brand-heavy); }
.ctn-map-message { position: absolute; z-index: 2; left: 50%; bottom: 20px; transform: translateX(-50%); margin: 0; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 12px; line-height: 18px; color: var(--ink-secondary); white-space: nowrap; pointer-events: none; }
.ctn-map-message[hidden] { display: none; }
.ctn-map.is-failed .leaflet-overlay-pane path { fill: var(--surface-soft); fill-opacity: 1; cursor: default; }
.ctn-map.is-failed .datahub-map-legend { display: none; }
/* 省名下面的数量（面积够大的省才写） */
.ctn-map .leaflet-tooltip.district-label .value { font-size: 11px; font-weight: 500; }
/* 时期条：第一行是标题，下面是各个时期和「对比两期」 */
.ctn-strip-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 6px; margin: 0 0 4px; font-size: 12px; line-height: 18px; color: var(--muted); }
.ctn-strip-head > b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
/* 每一格都带数量，但只写出当前期（鼠标或焦点在别的格上时写那一格），免得几个数字挤在一起 */
/* 柱子上方的数量（如「6,830 万」）比格子宽：列宽不跟着它撑开，文字才会居中向两边溢出，而不是只往右 */
.ctn-strip .cth-cell { grid-template-columns: minmax(0, 1fr); }
.ctn-strip .cth-cell-top { visibility: hidden; }
.ctn-strip .cth-cell.is-current .cth-cell-top, .ctn-strip .cth-cell:hover .cth-cell-top, .ctn-strip .cth-cell:focus-visible .cth-cell-top { visibility: visible; }
.ctn-strip .cth-cells:hover .cth-cell.is-current:not(:hover) .cth-cell-top { visibility: hidden; }
/* 这里没有数据的时期也能选（看到的是「这一期没有数据」），和会员页的「不可选」不同 */
.ctn-strip .cth-cell, .ctn-strip .cth-cell.is-empty { cursor: pointer; }
.ctn-strip .cth-cell.is-empty:hover { background: var(--brand-tint); }
.ctn-strip .cth-cell.is-empty .cth-cell-top { font-weight: 400; color: var(--muted); }
.ctn-strip .cth-compare-toggle { display: inline-flex; align-items: center; }
/* 分省统计表（FR-14，PRD 第 5 节）：「地图 | 表格」在位置框第一行右侧，负边距让它不撑高那一行。
   表格占满地图区，概况卡、图例、时期条让位；地图只是看不见，尺寸不变，切回来不用重新取景 */
.ctn-view { display: inline-flex; gap: 2px; margin: -4px -6px -4px auto; padding: 2px; border-radius: var(--radius-pill); background: var(--surface-soft); }
.ctn-view[hidden] { display: none; }
.ctn-view > button { height: 22px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: none; font: inherit; color: var(--ink-secondary); cursor: pointer; }
.ctn-view > button:hover { color: var(--brand-heavy); }
.ctn-view > button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-heavy); font-weight: 600; }
.ctn-view > button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ctn-table { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ctn-table[hidden] { display: none; }
.ctn-table-head { flex: none; display: flex; align-items: baseline; gap: 8px; padding: 10px 16px 8px; }
.ctn-table-head > h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.ctn-table-head > span { color: var(--muted); }
.ctn-table-head > .ctn-table-pick { margin-left: auto; white-space: nowrap; }
.ctn-table-pick.is-on { color: var(--ink-secondary); }
.ctn-table-pick > b { font-weight: 600; color: var(--ink); }
.ctn-table-pick > button { margin-left: 10px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--brand-heavy); cursor: pointer; }
.ctn-table-pick > button:hover { text-decoration: underline; }
.ctn-table-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ctn-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.ctn-table th, .ctn-table td { height: 24px; padding: 0 10px; border-bottom: 1px solid var(--line); font-weight: 400; text-align: right; white-space: nowrap; }
/* 表头、全国合计行和省名列滚动时固定：合计行贴在 30px 高的表头下面。叠放从低到高是省名列、合计行、表头，两行的首格各比本行高一层 */
.ctn-table th:first-child { position: sticky; left: 0; z-index: 1; padding-left: 16px; text-align: left; box-shadow: inset -1px 0 var(--line); }
.ctn-table tbody th { background: var(--surface); }
.ctn-table thead th { position: sticky; top: 0; z-index: 4; height: 30px; background: var(--surface-soft); font-weight: 600; color: var(--ink-secondary); }
.ctn-table thead th:first-child { z-index: 5; }
.ctn-table thead th > button { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.ctn-table thead th > button:hover { color: var(--brand-heavy); }
.ctn-table thead th.is-current { background: var(--brand-soft); color: var(--brand-heavy); }
.ctn-table td.is-current { background: var(--brand-tint); }
.ctn-table .ctn-table-total > * { position: sticky; top: 30px; z-index: 2; background: var(--surface); border-bottom-color: var(--border); font-weight: 600; }
.ctn-table .ctn-table-total > th:first-child { z-index: 3; }
.ctn-table .ctn-table-total > td.is-current { background: var(--brand-soft); }
.ctn-table tbody tr[data-ctn-row] { cursor: pointer; }
.ctn-table tbody tr[data-ctn-row] > th > a { color: inherit; text-decoration: none; }
.ctn-table tbody tr[data-ctn-row]:hover > * { background: var(--brand-soft); }
.ctn-table tbody tr.is-selected[data-ctn-row] > * { background: var(--brand-soft-strong); font-weight: 600; }
.ctn-table td.is-flagged { text-decoration: underline dotted var(--warning-dark); text-underline-offset: 3px; cursor: help; }
.ctn-table td.is-empty { color: var(--muted); }
.ctn-table-foot { flex: none; margin: 0; padding: 7px 16px 9px; border-top: 1px solid var(--line); line-height: 18px; color: var(--muted); }
.ctn-table-wait { margin: 0; padding: 24px 16px; color: var(--muted); }
.ctn-table-wait > button { margin-left: 8px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--brand-heavy); cursor: pointer; }
/* 表格占满地图区（免费的全国视角和会员的全国范围共用）：概况卡、时期条让位，地图留着位置但不显示 */
@media (min-width: 960px) {
  .ctf-map.is-table > .ctf-map-controls { bottom: 24px; flex-direction: column; align-items: stretch; }
  .ctf-map.is-table .ctf-map-location { flex: none; align-self: flex-start; }
  .ctf-map.is-table .ctf-map-summary, .ctf-map.is-table > .cth-dock, .ctf-map.is-table > .ctn-map-message { display: none; }
  .ctf-map.is-table > .datahub-map { visibility: hidden; }
}
/* 南海诸岛附图：和图例并排放在左下角（图例在左）。图用制图工作台的同一份，卡片样式也照它的写（maker_page.css 的 .dtb-scs-*） */
.ctn-map .leaflet-bottom.leaflet-left { display: flex; align-items: flex-end; }
.ctn-map .leaflet-bottom.leaflet-left > .datahub-map-legend { order: 1; }
.ctn-map .leaflet-bottom.leaflet-left > .ctn-inset { order: 2; }
.ctn-inset { width: 96px; height: 128px; }
.ctn-inset[hidden] { display: none; }
.ctn-inset .dtb-scs-card { display: flex; flex-direction: column; width: 100%; height: 100%; box-sizing: border-box; background: #e3f0fa; border: 1px solid #bfbfbf; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.ctn-inset .dtb-scs-title { flex: 0 0 auto; height: 18px; line-height: 18px; padding: 0 6px; font-size: 11px; font-weight: 600; color: #434343; background: rgba(255, 255, 255, .72); border-bottom: 1px solid #d9d9d9; white-space: nowrap; }
.ctn-inset .dtb-scs-body { flex: 1 1 auto; min-height: 0; display: flex; }
.ctn-inset .dtb-scs-body svg { display: block; width: 100%; height: 100%; }
/* 图例加附图比会员页的图例宽：地图要更宽，左下角才能和时期条排在同一行 */
@container (min-width: 1040px) and (max-width: 1199px) {
  .ctn-map.ctf-map--strip .leaflet-bottom.leaflet-left { bottom: calc(var(--cth-dock-h, 104px) + 12px); }
}
/* 手机首屏（FR-15）的色带图例：只在窄屏显示（见下面的窄屏规则），尺寸照设计稿：每段 26px，分界的数写在两段之间 */
.ctn-band { display: none; padding: 5px 8px 3px; border-radius: 6px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); font-size: 10px; line-height: 13px; color: var(--ink-secondary); }
.ctn-band summary { display: block; list-style: none; cursor: pointer; }
.ctn-band summary::-webkit-details-marker { display: none; }
.ctn-band summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--radius-xs); }
.ctn-band-title { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ctn-band-help { display: inline-grid; place-items: center; width: 12px; height: 12px; border: 1px solid var(--border); border-radius: 50%; font-size: 9px; line-height: 1; color: var(--muted); }
.ctn-band-ramp { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.ctn-band-colors { display: flex; }
.ctn-band-colors > i { width: 26px; height: 7px; }
.ctn-band-null { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); white-space: nowrap; }
.ctn-band-null > i { width: 10px; height: 7px; box-sizing: border-box; border: 1px solid var(--border); background: repeating-linear-gradient(-45deg, var(--ink-disabled) 0 2px, var(--data-map-null) 2px 4px); }
.ctn-band-ticks { display: flex; padding-left: 26px; font-size: 9px; line-height: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ctn-band-ticks > span { flex: none; width: 26px; text-align: center; transform: translateX(-50%); }
.ctn-band details > p { max-width: 210px; margin: 4px 0 2px; color: var(--ink-secondary); white-space: normal; }
/* 窄屏上点省从底部升起的卡片（FR-15）。是模态对话框，只在窄屏由 city-national.js 打开；中间一段内容在卡片里滚动，两个按钮固定在底部 */
.ctn-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 82vh; max-height: min(82dvh, 640px); margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -4px 12px rgba(0, 0, 0, .06); font-size: 12px; line-height: 18px; overscroll-behavior: contain; }
.ctn-sheet[open] { display: flex; flex-direction: column; animation: ctn-sheet-in .2s ease-out; }
.ctn-sheet:focus { outline: none; }
/* 遮罩只压暗不模糊：地图上选中的省和排行里加粗的一行要看得见 */
.ctn-sheet::backdrop { background: rgba(0, 0, 0, .18); backdrop-filter: none; }
@keyframes ctn-sheet-in { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .ctn-sheet[open] { animation: none; } }
/* 顶部（把手和标题行）可以按住往下拉，拉过一段松手就收起，不让浏览器拿去滚动页面。把手独占一行：左右外边距把这一行占满 */
.ctn-sheet-head { flex: none; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 12px; padding: 6px 14px 0; touch-action: none; }
.ctn-sheet-head::before { content: ''; flex: none; width: 36px; height: 4px; margin: 0 calc(50% - 18px) 8px; border-radius: var(--radius-pill); background: var(--border); }
.ctn-sheet-head > h3 { min-width: 0; margin: 0; font-size: 12px; line-height: 18px; font-weight: 400; color: var(--ink-secondary); overflow-wrap: anywhere; }
.ctn-sheet-head > .ctf-link { flex: none; white-space: nowrap; }
.ctn-sheet > .cth-card-total { margin-top: 2px; }
.ctn-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 14px 10px; overscroll-behavior: contain; }
.ctn-sheet .cth-bars { height: 52px; }
.ctn-sheet-lock { display: flex; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; margin-top: 10px; padding: 7px 10px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); font: inherit; color: var(--ink-secondary); text-align: left; cursor: pointer; }
.ctn-sheet-lock > i { flex: none; color: var(--muted); }
.ctn-sheet-lock:hover { border-color: var(--brand-light); color: var(--brand-heavy); }
.ctn-sheet-actions { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.ctn-sheet-actions > .ms-button { min-height: 36px; padding: 0 10px; justify-content: center; font-size: 13px; }
body.ctn-sheet-open { overflow: hidden; }
@media (max-width: 959px) {
  /* 手机上的简化排版：说明 → 地图 → 时期条 → 概况卡 → 选范围 → 筛选；结算区和会员页一样固定在底部 */
  .ctf-workspace.ctn-workspace { display: flex; flex-direction: column; }
  .ctn-workspace > .ctf-flow, .ctn-workspace .ctf-flow-form { display: contents; }
  .ctn-workspace .ctn-notice { order: 1; }
  .ctn-workspace .ctn-map-dock { order: 2; }
  .ctn-workspace .ctf-scope-fixed { order: 3; }
  .ctn-workspace .ctf-scroll { order: 4; }
  .ctn-map { display: flex; flex-direction: column; height: auto; overflow: visible; background: var(--surface); }
  .ctn-map > .ctf-map-controls { display: contents; }
  .ctn-map .ctf-map-location { order: 0; max-width: none; margin: 10px 12px 8px; box-shadow: none; }
  /* 34 行 × 9 列在手机上读不了：窄屏没有表格，桌面版切到表格后窗口变窄也回到地图 */
  .ctn-view, .ctn-table { display: none; }
  .ctn-map > .datahub-map { order: 1; position: relative; inset: auto; height: 340px; }
  .ctn-map > .ctn-map-message { order: 2; position: static; transform: none; margin: 8px 12px 0; box-shadow: none; text-align: center; white-space: normal; }
  .ctn-map.ctf-map--strip > .cth-dock { order: 3; position: static; transform: none; width: auto; max-width: none; margin: 8px 12px 0; align-items: stretch; }
  .ctn-map .ctf-map-summary { order: 4; width: auto; max-width: none; max-height: none; margin: 8px 12px 4px; box-shadow: none; }
  .ctn-map .ctf-map-summary.is-collapsed { max-width: none; }
  .ctn-map .cth-card-body { overflow: visible; }
  /* 地图上的控件不用再给时期条和卡片让位 */
  .ctn-map.ctf-map--strip .leaflet-bottom { bottom: 0; }
  /* 小地图上附图挪到右下角（南海本来的方位），缩放按钮让到它上面；图例挪到左上角，那里是境外，不挡任何省。
     这个容器铺满整张地图也不挡操作：Leaflet 的角容器不接收点击，只有里面的控件接收 */
  .ctn-map .leaflet-bottom.leaflet-left { top: 0; right: 0; }
  .ctn-map .leaflet-left > .datahub-map-legend { align-self: flex-start; margin-top: 10px; }
  .ctn-map .leaflet-left > .ctn-inset { width: 72px; height: 96px; margin-left: auto; margin-right: 10px; }
  .ctn-map.ctf-map--strip .leaflet-bottom.leaflet-right { bottom: 106px; }
  /* 图例收紧成两列，高度减半。图例每行是「色块 + 文字 + 换行」，去掉换行后色块和文字各占一格 */
  .ctn-map .datahub-map-legend { display: grid; grid-template-columns: 10px auto 18px auto; column-gap: 4px; align-items: center; padding: 6px 8px; font-size: 10px; line-height: 15px; }
  .ctn-map .datahub-map-legend > br { display: none; }
  .ctn-map .datahub-map-legend > details, .ctn-map .datahub-map-legend > strong { grid-column: 1 / -1; }
  .ctn-map .datahub-map-legend i { width: 10px; height: 10px; margin: 0; justify-self: end; }
  .ctn-map .datahub-map-legend__title > summary { min-height: 18px; gap: 4px; }
  .ctn-map .datahub-map-legend__help { width: 14px; height: 14px; }
  /* 画出色带（FR-15）后上面这块图例不显示：色带在左下角，和右下角的附图各占一边 */
  .ctn-map.has-band .datahub-map-legend { display: none; }
  .ctn-map .leaflet-left > .ctn-band { display: block; order: 1; }
  /* 概况卡固定是各省排行（FR-15）：卡头、范围和收录量不显示（全国的数写在时期条上），一整行都能点 */
  .ctn-card--rank > .cth-card-head, .ctn-card--rank > .cth-card-scope, .ctn-card--rank > .cth-card-total { display: none; }
  .ctn-card--rank > .cth-card-body { padding-top: 10px; }
  .ctn-card--rank .cth-card-body > .cth-block:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
  .ctn-card--rank .cth-block h4 { font-size: 13px; }
  .ctn-card--rank .cth-rank > li { position: relative; min-height: 30px; font-size: 13px; }
  .ctn-card--rank .cth-rank > li > a::after { content: ''; position: absolute; inset: 0; }
  /* 时期条：「对比两期」挪到标题行右侧，九期平分整行。按 50px 一格横向滑动的话，默认选中的最新一期在屏幕外面。
     两侧各留 6px：当前期柱子上方的数量比格子宽，靠边的格子要有地方写 */
  .ctn-strip > .ctn-strip-head { grid-column: 1; grid-row: 1; align-self: center; margin: 0; }
  .ctn-strip > .cth-strip-side { grid-column: 2; grid-row: 1; }
  .ctn-strip > .cth-cells { grid-column: 1 / -1; grid-row: 2; gap: 1px; margin-top: 6px; padding-left: 6px; padding-right: 6px; }
  .ctn-strip .cth-cell { flex: 1 1 0; width: auto; min-width: 0; padding: 0 1px; }
  .ctn-strip .cth-cell-name { font-size: 11px; }
  /* 固定在底部的结算区少占屏幕：去掉两行说明（页顶的提示已经说了哪些免费、哪些是会员权益），留范围、两个按钮和链接 */
  .ctn-workspace .ctf-settlement-status, .ctn-workspace .ctf-settlement-price { display: none; }
  .ctf-workspace.ctn-workspace { padding-bottom: 140px; }
}
