:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff6ff;
  --primary-border: #bfdbfe;
  --emerald: #047857;
  --emerald-soft: #ecfdf5;
  --emerald-border: #a7f3d0;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -6px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.container {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.28);
  position: relative;
  flex-shrink: 0;
}

.brand-logo::before,
.brand-logo::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 2px;
}

.brand-logo::before {
  width: 16px;
  height: 5px;
  left: 10px;
  top: 15.5px;
}

.brand-logo::after {
  width: 5px;
  height: 16px;
  left: 15.5px;
  top: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 2px;
}

.main-tabs {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-pill {
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.tab-btn.active .tab-pill {
  background: var(--primary-soft);
  color: var(--primary);
}

.tab-pill.alert {
  background: #fee2e2;
  color: #b91c1c;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s;
}

.sync-pill:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.sync-pill.running {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  color: var(--amber);
}

.sync-pill.running .status-dot {
  background: #f59e0b;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sync-pill.running #sync-ico {
  animation: spin 1s linear infinite;
}

/* Main Content */
.page-main {
  flex: 1;
  padding-top: 24px;
  padding-bottom: 56px;
}

/* Hero & Search */
.command-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-header h1 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.hero-header h1 span {
  color: var(--primary);
  margin-left: 4px;
}

.hero-header p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 640px;
}

.metrics-strip {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.metric-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  min-width: 118px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.metric-card strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  margin-top: 2px;
}

.search-bar-wrap {
  margin-top: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 11px;
  padding: 0 14px;
  height: 48px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.search-ico {
  color: var(--muted);
  width: 1.15rem;
  height: 1.15rem;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.96rem;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.clear-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted);
}

.clear-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.kbd-hint {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 0.76rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Live Ticker */
.live-ticker {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.87rem;
}

.ticker-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.ticker-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-secondary);
}

.ticker-link {
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
}

.ticker-link:hover {
  text-decoration: underline;
}

/* Province Matrix Panel */
.province-panel {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.province-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.prov-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prov-title-group .ico {
  color: var(--primary);
}

.prov-title-group h2 {
  font-size: 0.98rem;
  font-weight: 700;
}

.prov-summary {
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: 4px;
}

.region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.region-tab {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--muted);
  transition: all 0.12s;
}

.region-tab:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.region-tab.active {
  background: #eff6ff;
  color: var(--primary);
}

.province-grid {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prov-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all 0.14s ease;
}

.prov-pill:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
}

.prov-pill.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.prov-pill small {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
  font-weight: 600;
}

.prov-pill.selected small {
  opacity: 0.92;
}

/* Results Toolbar */
.results-section {
  margin-top: 20px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.subfilters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.14s;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-chip.active {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.filter-chip small {
  font-size: 0.74rem;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.toggle-unverified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.toggle-unverified input {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.result-summary {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.changes-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unread-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.ghost-btn {
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.ghost-btn:hover:enabled {
  border-color: var(--primary-border);
  color: var(--primary);
}

/* Hospital Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cards-grid.feed-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.h-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.h-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.h-card.unverified-card {
  background: #fafbfd;
  border-style: dashed;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.loc-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.grade-tag {
  background: #f1f5f9;
  color: #334155;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.portal-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.portal-badge.system {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.portal-badge.column {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.portal-badge.pending {
  background: #f1f5f9;
  color: var(--muted);
}

.card-title-box h3 {
  font-size: 1.04rem;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}

.alias-line {
  margin-top: 3px;
  font-size: 0.77rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
  background: var(--surface-subtle);
  border: 1px solid #eef2f7;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.domain-line .ico {
  width: 0.92rem;
  height: 0.92rem;
  color: #10b981;
}

.domain-host {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  color: var(--ink-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-date {
  margin-left: auto;
  font-size: 0.73rem;
  color: #94a3b8;
  white-space: nowrap;
}

.notice-snippet {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: #92400e;
  font-size: 0.79rem;
  line-height: 1.35;
  transition: background 0.12s;
}

.notice-snippet:hover {
  background: #fef3c7;
}

.notice-snippet span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.card-actions {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 650;
  transition: background 0.15s;
}

.btn-cta:hover {
  background: var(--primary-hover);
}

.btn-cta .ico {
  width: 0.92rem;
  height: 0.92rem;
}

.btn-cta.subtle {
  background: #f1f5f9;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.btn-cta.subtle:hover {
  background: #e2e8f0;
  color: var(--ink);
}

.btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.14s;
}

.btn-home:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Feed Notice Card */
.feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.feed-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.feed-card.unread {
  border-left: 3.5px solid var(--primary);
}

.feed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.feed-type {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
}

.feed-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
}

.feed-card h3 a {
  color: var(--ink);
}

.feed-card h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.feed-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.81rem;
  color: var(--ink-secondary);
}

.feed-hosp {
  font-weight: 600;
}

/* Empty & Loading States */
.loading-state,
.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 440px;
  margin-inline: auto;
}

.empty-state button {
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
}

/* Pagination */
.pagination-bar {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.page-btn:hover:enabled {
  border-color: var(--primary-border);
  color: var(--primary);
}

.page-btn[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
  font-size: 0.83rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-left strong {
  color: var(--ink);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.text-btn {
  color: var(--primary);
  font-weight: 600;
}

.text-btn:hover {
  text-decoration: underline;
}

/* Modal Dialog */
.modal-dialog {
  width: min(540px, calc(100% - 32px));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  color: var(--ink);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.12rem;
  font-weight: 750;
}

.icon-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.icon-close:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.modal-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.modal-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.modal-stat {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.modal-stat span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.modal-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 1.02rem;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-btn:hover:enabled {
  background: var(--primary-hover);
}

.modal-btn.outline {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.modal-btn.outline:hover:enabled {
  background: var(--primary-soft);
}

.modal-progress {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 500;
}

.cmd-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px 13px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.79rem;
  overflow-x: auto;
  white-space: pre;
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  background: #0f172a;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}

/* Responsive Breakpoints */
@media (max-width: 1060px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 24px);
  }
  .topbar-inner {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-text span {
    display: none;
  }
  .main-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .tab-btn {
    flex: 1;
    justify-content: center;
  }
  .command-hero {
    padding: 18px;
  }
  .metrics-strip {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .metric-card {
    min-width: 0;
    padding: 8px 10px;
  }
  .metric-card strong {
    font-size: 1.12rem;
  }
  .cards-grid,
  .cards-grid.feed-mode {
    grid-template-columns: 1fr;
  }
  .kbd-hint {
    display: none;
  }
}


/* VIP & Commercial Paywall UI */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.24);
  transition: transform 0.14s, opacity 0.14s;
}

.vip-pill:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.vip-pill.is-vip {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
  box-shadow: none;
}

.btn-cta.pay-cta {
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.btn-cta.pay-cta:hover {
  background: #334155;
}

.domain-line.locked-domain .ico {
  color: #64748b;
}

.pay-hero-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
  border: 1px solid var(--primary-border);
  border-radius: 12px;
  padding: 16px 18px;
}

.pay-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pay-price-row strong {
  font-size: 1.9rem;
  font-weight: 850;
  color: var(--primary);
  line-height: 1.1;
}

.pay-price-row .pay-unit {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.pay-price-row del {
  font-size: 0.85rem;
  color: var(--muted);
}

.pay-perks {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.pay-perks li::before {
  content: "✓ ";
  color: var(--emerald);
  font-weight: 800;
}

.checkout-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.94rem;
}

.checkout-cta:hover {
  background: var(--primary-hover);
}

.wechat-pay-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.qr-pair {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wechat-qr {
  width: 148px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
}

.wechat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.wechat-info strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.wechat-info p {
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.45;
}

.wx-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wx-code-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  background: #fff;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
  color: var(--ink);
}

.copy-wx-btn {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 9px;
  border-radius: 5px;
}

.redeem-box {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.redeem-box label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.redeem-row {
  display: flex;
  gap: 8px;
}

.redeem-row input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.redeem-row button {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 0.87rem;
  white-space: nowrap;
}

.redeem-row button:hover:enabled {
  background: #1e293b;
}

.redeem-msg {
  margin-top: 7px;
  font-size: 0.81rem;
  color: #dc2626;
}
