/* ==========================================================================
   订阅比价页基础布局与中转目录样式 (继承 styles.css 旗舰级暗色驾驶舱系统)
   ========================================================================== */

.main-shell.price-shell {
  max-width: 1320px;
  padding: 28px 24px 80px;
  color: var(--text);
}
.top-nav .nav-shell { max-width: 1320px; }

.price-shell h1 {
  font-size: clamp(30px, 3.8vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 12px 0 6px;
  background: linear-gradient(180deg, #FFFFFF 35%, rgba(255, 255, 255, 0.62) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.price-shell h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 14px 0; }
.price-shell p, .price-shell small { color: var(--text-2); line-height: 1.6; }
.price-shell a { color: var(--amber-bright); }
.price-shell [hidden] { display: none !important; }
.price-shell details summary, .price-shell button { cursor: pointer; }

.price-header-bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.price-header-copy { min-width: 0; flex: 1; }
#updated { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.market-stats {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px;
}
.stat-pill {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text-2);
}
.stat-pill.stat-green { background: var(--green-soft); border-color: var(--green-line); color: #A7F3D0; }

.price-notice { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.price-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.price-controls label { display: grid; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-3); min-width: 0; }
.price-controls input, .price-controls select {
  max-width: 100%; padding: 7px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg-elevated);
  color: var(--text); font: inherit; font-size: 12.5px;
}

.price-row, #coverage {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-box);
  background: var(--surface); overflow-wrap: anywhere;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.price-row strong { color: var(--amber-bright); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

#coverage { margin-top: 24px; }
#coverage summary { font-weight: 600; font-size: 13px; color: var(--text-2); }
#coverage summary:hover { color: var(--text); }
#sources p { font-size: 12.5px; margin-top: 8px; color: var(--text-2); }
#sources small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--text-3); }

/* 中转推荐 */
.main-shell.price-shell:has(#relayDirectory:not([hidden])) { max-width: 1320px; }
#relayDirectory {
  margin: 16px 0 36px; background: var(--surface);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 28px 56px -34px rgba(0, 0, 0, 0.95);
}
.relay-tools, #relayFamilies, #relayViews, .relay-title, .relay-tags { display: flex; align-items: center; gap: 8px; }
.relay-tools {
  padding: 13px 16px; gap: 10px; flex-wrap: wrap;
  background: rgba(9, 10, 13, 0.88); border-bottom: 1px solid var(--line);
}
.relay-tools input {
  font: inherit; font-size: 13px; padding: 7px 11px;
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); width: min(230px, 100%);
}
#relayFamilies { flex-wrap: wrap; }
#relayViews {
  margin-left: auto; background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 2px; gap: 2px;
}
.relay-tools button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--text-2); background: transparent; border: 1px solid transparent;
}
#relayFamilies button { border-color: var(--line); background: var(--surface-solid); }
#relayFamilies button:hover, #relayViews button:hover { color: var(--text); border-color: var(--line-2); }
.relay-tools button[aria-pressed=true] { background: rgba(255, 255, 255, 0.1); border-color: var(--line-3); color: var(--text); }
#relayViews button[aria-pressed=true] { background: var(--text); border-color: transparent; color: #040406; }
.relay-tools img { width: 14px; height: 14px; background: #F4F4F5; border-radius: 4px; padding: 1.5px; }

.relay-scroll { overflow-x: auto; }
#relayDirectory table {
  width: 100%; min-width: 740px; border-collapse: collapse;
  font-size: 13px; text-align: left; font-variant-numeric: tabular-nums;
}
#relayDirectory :is(th, td) { padding: 13px 16px; border-bottom: 1px solid var(--line); }
#relayDirectory th {
  background: rgba(9, 10, 13, 0.85); color: var(--text-3);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
#relayDirectory tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
#relayDirectory tbody tr:last-child td { border: 0; }

.relay-title { gap: 10px; font-weight: 600; white-space: nowrap; color: var(--text); }
.relay-mark {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  font-style: normal; font-size: 12px; font-weight: 700;
  background: var(--amber-soft); color: var(--amber-bright); border: 1px solid var(--amber-line);
}
#relayBody tr:nth-child(2) .relay-mark { background: rgba(99, 102, 241, 0.14); color: #A5B4FC; border-color: rgba(129, 140, 248, 0.34); }
.relay-tags { flex-wrap: wrap; gap: 5px; }
.relay-tags span {
  padding: 2px 7px; border-radius: 5px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text-2); font-size: 11px; font-weight: 500;
}
#relayDirectory .relay-action {
  display: inline-flex; align-items: center; white-space: nowrap; padding: 5px 11px;
  background: linear-gradient(180deg, #FFFFFF, #E4E4E7); color: #040406;
  border-radius: 6px; font-size: 12px; font-weight: 700;
}
#relayDirectory .relay-action:hover { filter: brightness(1.06); }
#relayEmpty { padding: 24px; text-align: center; color: var(--text-3); }

#price-group {
  position: fixed; inset: 0; margin: auto; width: min(350px, 90vw); height: fit-content; max-height: 90vh; overflow: auto;
  padding: 28px 24px 22px; text-align: center; color: var(--text);
  background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--r-card);
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.95);
}
#price-group::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(8px); }
#price-group h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
#price-group .qr-border-frame { margin: 14px auto 18px; }
#price-group img { display: block; width: 184px; height: 184px; object-fit: contain; }

@media (max-width: 850px) { .price-header-bar { flex-direction: column; align-items: stretch; gap: 14px; } }
@media (max-width: 600px) {
  .main-shell.price-shell { padding: 18px 16px 60px; }
  .price-notice span { display: none; }
  .price-controls label { flex: 1 1 40%; }
  .price-controls label:first-child { flex-basis: 100%; }
}
