/* ---------- 订阅栏目：官方地区低价 / 平台套餐档位 ---------- */
.plans-page { padding-top: 20px; }

/* 表头对齐：覆盖首页比价表 thead th:nth-child 的右对齐规则 */
.plans-page thead th { text-align: left; }
.plans-page thead th.num { text-align: right; }

/* ---------- 渠道与产品切换 ---------- */
.plans-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.plans-toolbar select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.plans-toolbar .field-label:first-child { margin-left: 0; }

/* ---------- 三栏平台表 ---------- */
.official-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
}
.platform-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.platform-col .table-scroll { flex: 1; position: relative; }
.platform-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-strong);
}
.platform-col-head h3 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.platform-col-head .count { font-size: 12px; color: var(--text-3); }
.plan-table { width: 100%; border-collapse: collapse; }
.plan-table th, .plan-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.plan-table thead th { font-size: 11px; font-weight: 500; color: var(--text-3); }
.plan-table tbody tr:last-child th, .plan-table tbody tr:last-child td { border-bottom: 0; }
.plan-table tbody tr { cursor: pointer; transition: background-color var(--dur-fast) var(--ease); }
.plan-table tbody tr:hover { background: var(--bg-raised); }
.plan-table tbody tr[data-selected="true"] { background: var(--bg-raised); box-shadow: inset 2px 0 0 var(--accent); }
.plan-table tbody th { font-weight: 600; }
.plan-table .inline-muted { margin-left: 4px; font-size: 11px; font-weight: 400; color: var(--text-3); }
.plan-table td.num { text-align: right; white-space: nowrap; font-weight: 600; }
.plan-table td.num .inline-muted { margin-left: 6px; }
.plan-table th.col-action, .plan-table td.col-action { width: 24px; padding-right: 8px; text-align: right; }
.plan-open {
  font-size: 13px;
  line-height: 1;
  color: var(--text-3);
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
}
.plan-table tbody tr:hover .plan-open,
.plan-table tbody tr[data-selected="true"] .plan-open { color: var(--accent); }

/* ---------- 地区价格表 ---------- */
/* ---------- 地区价格底部抽屉 ---------- */
.sheet-scrim[hidden], .plan-sheet[hidden] { display: none; }
.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 46;
  background: rgba(9, 9, 11, 0.4);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.sheet-scrim[data-open="true"] { opacity: 1; }
.plan-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 47;
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 720px);
  background: var(--bg);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--radius) var(--radius) 0 0;
  transform: translateY(100%);
  transition: transform var(--dur-base) var(--ease);
}
.plan-sheet[data-open="true"] { transform: none; }
.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sheet-coverage { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.sheet-head .region-tools { margin-left: auto; }
.sheet-close {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}
.sheet-close:hover { color: var(--text); border-color: var(--text-4); }
.sheet-body { overflow: auto; position: relative; }
.sheet-body .region-table { min-width: 640px; }
@media (max-width: 640px) {
  .sheet-head { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; }
  .sheet-head .subsection-title { order: 1; white-space: nowrap; }
  .sheet-coverage { order: 2; }
  .sheet-close { order: 3; margin-left: auto; }
  .sheet-head .region-tools { order: 4; flex: 1 1 100%; justify-content: flex-end; }
  .sheet-head .region-tools .field-label { display: none; }
  .region-detail { max-width: calc(100vw - 40px); }
}

.subsection-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.region-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.region-tools select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.region-table .col-rank { width: 64px; }
.region-table .col-action { width: 76px; white-space: nowrap; }
.region-table td.local { color: var(--text-2); }
.region-table td.cny { font-weight: 700; }
.region-table td.delta-cell { color: var(--price-up); font-weight: 600; }
.region-table td.delta-cell.is-same { color: var(--text-3); font-weight: 400; }
.region-table tbody th { font-weight: 500; }
.region-table tr[data-expanded="true"] { background: var(--bg-raised); }
.region-detail-row > td { padding: 0; height: auto; background: var(--bg-surface); }
.region-detail { padding: 12px 20px 14px; position: sticky; left: 0; }
.region-detail-terms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px 24px;
  margin: 0;
}
.region-detail-terms dt { font-size: 11px; color: var(--text-3); }
.region-detail-terms dd { margin: 2px 0 0; font-size: 12px; font-weight: 600; }
.region-detail-terms dd.is-null { color: var(--text-4); font-weight: 400; }
.region-detail-terms dd a { font-weight: 600; }
.region-detail-empty { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }
.region-detail-note { margin: 4px 0 0; font-size: 11px; color: var(--text-3); }
@media (max-width: 640px) {
  .region-detail-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
}
.region-table tr[data-best="true"] td:first-child { position: relative; }
.history-button {
  height: 26px;
  padding: 0 10px;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-2);
  font-size: 12px;
}
.history-button:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 档位表：固定列宽 + 单行紧凑，不产生横向滚动 ---------- */
.tier-table { table-layout: fixed; }
.tier-table .c-vendor { width: 9%; }
.tier-table .c-tier { width: 25%; }
.tier-table .c-type { width: 8%; }
.tier-table .c-intro { width: 10%; }
.tier-table .c-renewal { width: 10%; }
.tier-table .c-quota { width: 17%; }
.tier-table .c-limit { width: 14%; }
.tier-table .c-updated { width: 7%; }
.tier-table thead th { padding: 8px 10px; font-size: 11px; }
.tier-table tbody td, .tier-table tbody th {
  padding: 6px 10px;
  height: 34px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tier-table tbody th { font-weight: 500; }
.tier-table .tier-line { display: flex; align-items: center; min-width: 0; }
.tier-table .tier-link {
  flex: 0 1 auto;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.tier-table .tier-link:hover { color: var(--accent); }
.tier-table .tier-product {
  flex: 0 1 auto;
  flex-shrink: 3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
}
.tier-table .tier-product::before { content: "·"; margin: 0 6px; color: var(--text-4); }
.tier-table td.num { font-weight: 600; }
.tier-table td.is-intro { color: var(--price-down); }
.tier-table td.null { color: var(--text-4); font-weight: 400; }
.tier-table .date-cell { font-size: 11px; color: var(--text-3); }
.tier-table tr.is-sold-out .tier-link { color: var(--text-3); }
.tier-table .quota-cell { font-variant-numeric: tabular-nums; }

.badge--sold, .badge--seat, .badge--hot {
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
}
.badge--seat { color: var(--warn); border-color: var(--warn); }

/* ---------- 抽屉补充 ---------- */
.drawer-empty {
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-3);
}
.drawer-source { font-size: 12px; color: var(--text-3); }
.drawer-source a { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .official-grid { grid-template-columns: 1fr; }
  .plans-toolbar { gap: 8px 10px; }
  .region-table { min-width: 620px; }
  /* 窄屏收起次要列，仍不产生横向滚动 */
  .tier-table .c-type, .tier-table .c-updated,
  .tier-table thead th:nth-child(3), .tier-table thead th:nth-child(8),
  .tier-table tbody td:nth-child(3), .tier-table tbody td:nth-child(8) { display: none; }
}
@media (max-width: 560px) {
  .tier-table .c-vendor, .tier-table .c-limit,
  .tier-table thead th:nth-child(1), .tier-table thead th:nth-child(7),
  .tier-table tbody td:nth-child(1), .tier-table tbody td:nth-child(7) { display: none; }
  .tier-table .c-tier { width: 29%; }
  .tier-table .c-intro { width: 21%; }
  .tier-table .c-renewal { width: 21%; }
  .tier-table .c-quota { width: 29%; }
  .tier-table thead th { padding: 6px 5px; font-size: 10px; }
  .tier-table tbody td, .tier-table tbody th { padding: 5px; height: 30px; font-size: 11px; }
  .plans-toolbar select, .region-tools select { flex: 1 1 auto; }
  .plans-toolbar .field-label { flex: 0 0 auto; }
}
