/* GM福音 BI 手机版 — 共享 PC 主题 token */
@import url("00-fonts.css");
@import url("01-tokens.css");
@import url("12-themes.css");

:root,
html[data-theme="legend"] {
  --m-bg: var(--bg);
  --m-bg2: var(--bg2);
  --m-card: var(--panel);
  --m-border: var(--border);
  --m-gold: var(--gold);
  --m-gold2: var(--gold2);
  --m-text: var(--text);
  --m-muted: var(--muted);
  --m-accent: var(--header-accent);
}

html[data-theme="cyan"],
html[data-theme="violet"],
html[data-theme="emerald"],
html[data-theme="classic"] {
  --m-bg: var(--bg);
  --m-bg2: var(--bg2);
  --m-card: var(--panel);
  --m-border: var(--border);
  --m-gold: var(--gold);
  --m-gold2: var(--gold2);
  --m-text: var(--text);
  --m-muted: var(--muted);
  --m-accent: var(--header-accent);
}

:root {
  --m-nav-h: 44px;
  --m-icp-h: 18px;
  --m-safe-b: env(safe-area-inset-bottom, 0px);
  --m-safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body.m-body {
  height: 100%;
  overflow: hidden;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--m-text);
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%, var(--body-radial-1), transparent 55%),
    linear-gradient(180deg, var(--body-grad-top) 0%, var(--m-bg) 100%);
}

.m-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: var(--m-safe-t);
  padding-bottom: calc(var(--m-nav-h) + var(--m-icp-h) + var(--m-safe-b));
}

.m-main-tabs {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.m-page.m-page-compare.active,
.m-page.m-page-recommend.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  height: 100%;
}

.m-page-compare .m-footer {
  flex-shrink: 0;
  padding-top: 8px;
}

.m-compare-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  overflow: hidden;
}

.m-compare-toolbar {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 0;
  flex-shrink: 0;
}

.m-compare-head-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
  flex-shrink: 0;
}

.m-compare-title-wrap {
  flex: 1;
  min-width: 0;
}

.m-compare-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--m-gold);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.m-compare-head-bar .m-btn-follow {
  margin-left: 0;
  margin-top: 2px;
}

.m-btn-follow {
  flex-shrink: 0;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 160, 60, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--m-gold);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.m-btn-follow.is-active {
  border-color: var(--m-gold2, #ffc53d);
  background: rgba(255, 214, 102, 0.12);
  color: #ffd666;
}

.m-follow-panel {
  margin: 0 12px 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--m-border);
  background: rgba(0, 0, 0, 0.22);
}

.m-follow-panel.hidden { display: none; }

.m-follow-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
}

.m-follow-head strong { color: var(--m-gold); font-size: 12px; }
.m-follow-head span { color: var(--m-muted); font-size: 10px; }

.m-follow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.m-follow-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  color: var(--m-muted);
  font-size: 10px;
  cursor: pointer;
}

.m-follow-chip.is-on {
  border-color: var(--m-gold2, #ffc53d);
  background: rgba(255, 214, 102, 0.14);
  color: #ffd666;
}

.m-follow-empty { font-size: 11px; color: var(--m-muted); }

.m-compare-legend-compact {
  padding-top: 6px;
  flex-wrap: wrap;
}

.m-compare-legend-compact .m-compare-legend-ref {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

.m-compare-legend-focus i,
.m-compare-legend-ref i {
  font-style: normal;
  opacity: 0.85;
  margin-left: 2px;
  font-size: 9px;
  color: var(--m-muted);
}

.m-compare-legend-tag {
  flex: 1 1 100%;
  margin-top: 2px;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(255, 160, 60, 0.22);
  color: var(--m-gold);
  background: rgba(250, 173, 20, 0.06);
  text-align: center;
}

.m-compare-label {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--m-muted);
}

.m-compare-toolbar .m-select {
  flex: 1;
  min-width: 0;
}

.m-compare-tip {
  display: block;
  padding: 0;
  font-size: 10px;
  color: var(--m-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-compare-chart {
  flex-shrink: 0;
  width: 100%;
  height: 132px;
  padding: 0 4px;
  margin: 2px 0 0;
}

.m-compare-chart:empty {
  display: none;
}

.m-compare-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.m-recommend-head {
  flex-shrink: 0;
  position: relative;
  padding: 10px 72px 0 12px;
}

.m-btn-other-sites {
  position: absolute;
  right: 12px;
  top: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--m-gold);
  background: rgba(255, 197, 61, 0.08);
  border: 1px solid rgba(255, 197, 61, 0.35);
  border-radius: 4px;
}

.m-rec-scroll-viewport {
  max-height: 42vh;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 0 6px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, .35) transparent;
  -webkit-mask-image: linear-gradient(180deg, transparent, black 6%, black 92%, transparent);
  mask-image: linear-gradient(180deg, transparent, black 6%, black 92%, transparent);
}

.m-rec-scroll-viewport::-webkit-scrollbar {
  width: 5px;
}

.m-rec-scroll-viewport::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 39, .35);
  border-radius: 3px;
}

.m-rec-scroll-viewport.hidden {
  display: none;
}

.m-rec-scroll-inner.is-css-scroll {
  animation: mRecScrollUp 120s linear infinite;
}

.m-rec-scroll-viewport:active .m-rec-scroll-inner.is-css-scroll {
  animation-play-state: paused;
}

@keyframes mRecScrollUp {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}

.m-recommend-head h2 {
  font-size: 14px;
  color: var(--m-gold);
  font-weight: 600;
  margin-bottom: 2px;
}

.m-recommend-hint {
  font-size: 10px;
  color: var(--m-muted);
  line-height: 1.35;
}

.m-recommend-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 0;
}

.m-recommend-list {
  display: flex;
  flex-direction: column;
}

.m-rec-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
  background: linear-gradient(90deg, rgba(255, 197, 61, 0.12), transparent 70%);
  border-bottom: 1px solid rgba(255, 160, 60, 0.15);
}

.m-rec-section strong {
  font-size: 13px;
  color: var(--m-gold);
}

.m-rec-section span {
  font-size: 11px;
  color: var(--m-muted);
}

.m-rec-section-live {
  margin-top: 6px;
  border-top: 1px solid rgba(255, 160, 60, 0.2);
}

.m-rec-block:empty {
  display: none;
}

.m-empty-inline {
  padding: 16px 12px;
  font-size: 12px;
  color: var(--m-muted);
  text-align: center;
}

.m-rec-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 160, 60, 0.1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.m-rec-item:active {
  background: rgba(255, 160, 60, 0.06);
}

.m-rec-time {
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--m-gold);
  text-align: center;
  line-height: 1.2;
}

.m-rec-name {
  font-size: 12px;
  line-height: 1.35;
  color: var(--m-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.m-back-top {
  position: fixed;
  right: 12px;
  bottom: calc(var(--m-nav-h) + var(--m-icp-h) + var(--m-safe-b) + 12px);
  z-index: 110;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 197, 61, 0.45);
  border-radius: 50%;
  background: rgba(45, 12, 8, 0.94);
  color: var(--m-gold);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s, transform 0.2s;
}

.m-back-top.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.m-nav-2 {
  grid-template-columns: repeat(2, 1fr);
}

.m-bottom-shell {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding-bottom: var(--m-safe-b);
  background: linear-gradient(180deg, rgba(30, 10, 8, 0.96), rgba(18, 6, 6, 0.99));
  border-top: 1px solid rgba(255, 160, 60, 0.22);
}

.m-app-footer-icp {
  display: block;
  height: var(--m-icp-h);
  line-height: var(--m-icp-h);
  text-align: center;
  font-size: 9px;
  color: rgba(197, 109, 52, 0.82);
  text-decoration: none;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.m-app-footer-icp:active { opacity: 0.75; }

.m-nav {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--m-nav-h);
  padding-bottom: 0;
  background: transparent;
  border-top: none;
  box-shadow: none;
}

.m-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: none;
  background: none;
  color: rgba(201, 160, 128, 0.72);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.m-nav-btn.active {
  color: var(--m-gold);
  font-weight: 600;
}

.m-nav-btn.active::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 2px;
  background: var(--m-gold);
  border-radius: 1px;
}

.m-nav-icon { display: none; }

.m-header {
  flex-shrink: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--header-bg1) 0%, var(--header-bg2) 100%);
  border-bottom: 1px solid rgba(255, 160, 60, 0.2);
  box-shadow: none;
}

.m-header-unified .m-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 12px;
  min-height: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9px;
  line-height: 1.2;
  color: rgba(201, 160, 128, 0.65);
}

.m-status-bar .m-sync {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-status-bar .m-clock {
  flex-shrink: 0;
  margin-left: 0;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 9px;
  color: rgba(201, 160, 128, 0.75);
  white-space: nowrap;
}

.m-header-unified .m-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
}

.m-brand-mark-only {
  flex-shrink: 0;
  text-decoration: none;
}

.m-header-unified .m-header-title h1 {
  font-size: 16px;
}

.m-header-unified .m-header-sub {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 1px;
}

.m-header-top { display: flex; align-items: center; gap: 8px; }

.m-brand-lockup {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 42%;
  text-decoration: none;
  min-width: 0;
}

.m-brand-mark {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.m-brand-orbit {
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  border: 1px dashed var(--brand-orbit);
  animation: brand-orbit 18s linear infinite;
}

.m-brand-core {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--brand-mark-ring), 0 0 12px var(--brand-mark-glow);
  animation: brand-mark-float 5s ease-in-out infinite;
}

.m-brand-core svg {
  display: block;
  width: 100%;
  height: 100%;
}

.m-brand-mark img {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 12px rgba(255, 140, 60, 0.2);
  animation: brand-mark-float 5s ease-in-out infinite;
}

.m-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.m-brand-name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--brand-name-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-name-shimmer 8s ease-in-out infinite;
}

.m-brand-domain {
  font-size: 10px;
  font-family: Consolas, monospace;
  color: var(--m-gold);
  opacity: 0.9;
  white-space: nowrap;
}

@keyframes brand-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes brand-mark-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes brand-name-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.m-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 180, 80, 0.35);
  background: rgba(0, 0, 0, 0.25);
}

.m-logo img { display: block; width: 100%; height: 100%; border-radius: 6px; }

.m-header-title { flex: 1; min-width: 0; }

.m-header-title h1 {
  font-family: "汉仪尚巍手书 W", "Ma Shan Zheng", cursive;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff9d0, #ffd147 40%, #ff8844 80%, #e91e8c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-header-sub { font-size: 10px; color: var(--m-muted); margin-top: 2px; }

.m-pc-link {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--m-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--m-gold);
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.m-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--m-muted);
  flex-wrap: wrap;
}

.m-live { display: inline-flex; align-items: center; gap: 4px; color: var(--live-text, #b7eb8f); }

.m-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--live-dot, #52c41a);
  box-shadow: 0 0 6px var(--live-dot-glow, rgba(82, 196, 26, 0.85));
  animation: m-pulse 1.5s ease-in-out infinite;
}

@keyframes m-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.m-sync.is-live { color: #b7eb8f; }
.m-sync.is-stale { color: #ffe58f; }
.m-sync.is-mock { color: #ffccc7; }
.m-clock { margin-left: auto; font-family: Consolas, monospace; color: var(--m-gold); }

.m-theme-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.m-theme-pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: var(--m-muted);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}
.m-theme-pill.active {
  border-color: var(--m-accent);
  color: var(--m-gold);
  background: var(--surface-active, rgba(255, 214, 102, 0.12));
}
#mApp > .data-banner {
  margin: 8px 12px 0;
  position: relative;
  z-index: 2;
}

.m-main { flex: 1; min-height: 0; position: relative; overflow: hidden; }

.m-page {
  display: none;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 16px;
}

.m-page.active { display: block; }

.m-kpi-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.m-kpi-scroll::-webkit-scrollbar { display: none; }

.m-kpi {
  flex: 0 0 128px;
  scroll-snap-align: start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--m-border);
  background: var(--m-card);
}

.m-kpi-label { font-size: 11px; color: var(--m-muted); margin-bottom: 4px; }
.m-kpi-value { font-size: 22px; font-weight: 700; color: var(--m-gold); line-height: 1.2; }
.m-kpi-sub { font-size: 10px; color: rgba(201, 160, 128, 0.75); margin-top: 4px; }

.m-card {
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--m-border);
  background: var(--m-card);
  overflow: hidden;
}

.m-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
}

.m-card-head h3 { font-size: 13px; font-weight: 700; color: var(--m-gold); }
.m-card-tip { font-size: 10px; color: var(--m-muted); }
.m-chart { width: 100%; height: 200px; }
.m-chart-tall { height: 220px; }

.m-rank-list { padding: 4px 12px 12px; }

.m-rank-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.m-rank-item:last-child { border-bottom: none; }

.m-rank-no {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 180, 60, 0.15);
  color: var(--m-gold);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-rank-item.top1 .m-rank-no { background: rgba(255, 215, 0, 0.35); color: #fff; }
.m-rank-item.top2 .m-rank-no { background: rgba(192, 192, 192, 0.3); }
.m-rank-item.top3 .m-rank-no { background: rgba(205, 127, 50, 0.35); }

.m-rank-name { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.m-rank-bar-wrap {
  grid-column: 2 / 4;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.m-rank-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--m-gold2), var(--m-accent));
  transition: width 0.6s ease;
}

.m-rank-count { font-size: 11px; color: var(--m-gold); font-weight: 600; }

.m-filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: 8px;
  background: linear-gradient(180deg, var(--m-bg) 70%, transparent);
}

.m-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--m-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--m-text);
  font-size: 14px;
  margin-bottom: 8px;
}

.m-input::placeholder { color: rgba(201, 160, 128, 0.55); }

.m-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.m-select {
  padding: 8px 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 160, 60, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: var(--m-text);
  font-size: 13px;
}

.m-result-tip { margin-top: 8px; font-size: 11px; color: var(--m-muted); }

.m-ad-list { display: flex; flex-direction: column; gap: 8px; }

.m-ad-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--m-border);
  background: var(--m-card);
}

.m-ad-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }

.m-ad-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--m-text);
}

.m-ad-weight {
  flex-shrink: 0;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(250, 173, 20, 0.25);
  color: var(--m-gold);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.m-ad-meta { font-size: 11px; color: var(--m-muted); line-height: 1.6; }
.m-ad-meta span { display: block; }

.m-ad-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.m-ad-go {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 200, 80, 0.5);
  background: linear-gradient(180deg, rgba(196, 30, 30, 0.5), rgba(55, 14, 10, 0.9));
  color: var(--m-gold);
  font-size: 12px;
  font-weight: 600;
}

.m-tag, .m-type {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
  vertical-align: middle;
}

.m-tag { color: var(--m-gold); border-color: var(--m-gold2); background: rgba(250, 173, 20, 0.12); }
.m-tag-8xf { color: #ffd666; border-color: #faad14; }
.m-tag-kcq { color: #ff9f7f; border-color: #ff7a45; }
.m-tag-9pk { color: #b7eb8f; border-color: #73d13d; }

.m-type-th { color: #ffd666; border-color: #d48806; background: rgba(250, 173, 20, 0.15); }
.m-type-wd { color: #ffa39e; border-color: #ff7875; background: rgba(255, 77, 79, 0.12); }
.m-type-jp { color: #d3adf7; border-color: #b37feb; }
.m-type-tx { color: #91d5ff; border-color: #69c0ff; }

.m-rank-toggle { display: flex; gap: 8px; padding: 0 12px 8px; }

.m-chip {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--m-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--m-muted);
  font-size: 12px;
  cursor: pointer;
}

.m-chip.active {
  border-color: var(--m-gold2);
  color: var(--m-gold);
  background: rgba(250, 173, 20, 0.18);
}

.m-ad-rank { padding: 0 12px 12px; }

.m-ad-rank-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 6px 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.m-ad-rank-item:last-child { border-bottom: none; }

.m-ad-rank-no { font-size: 14px; font-weight: 700; color: var(--m-gold2); text-align: center; }
.m-ad-rank-name { font-size: 13px; font-weight: 600; grid-column: 2; }
.m-ad-rank-sub { font-size: 10px; color: var(--m-muted); grid-column: 2; }
.m-ad-rank-val { font-size: 13px; font-weight: 700; color: var(--m-gold); grid-row: 1 / 3; grid-column: 3; }

.m-ticker { padding: 0 12px 12px; max-height: 320px; overflow-y: auto; }

.m-ticker-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.m-ticker-item:last-child { border-bottom: none; }

.m-ticker-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.m-ticker-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.m-site-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 12px 12px;
}

.m-site-card {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.m-site-card h4 { font-size: 12px; color: var(--m-gold); margin-bottom: 6px; }
.m-site-card p { font-size: 10px; color: var(--m-muted); line-height: 1.55; }
.m-site-card em { color: var(--m-gold); font-style: normal; font-weight: 600; }
.m-site-online { color: #b7eb8f; font-size: 10px; }

.m-compare-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
  font-size: 10px;
  line-height: 1.4;
}

.m-compare-legend-focus {
  color: var(--m-gold);
  font-weight: 600;
}

.m-compare-legend-focus em {
  font-style: normal;
  color: var(--m-accent);
}

.m-compare-legend-ref {
  color: var(--m-muted);
  text-align: right;
}

.m-compare-trend {
  margin: 0 12px 10px;
  padding: 10px 10px 6px;
  border: 1px solid var(--m-border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}
.m-compare-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--m-muted);
}
.m-compare-trend-head strong {
  color: var(--m-gold);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.m-compare-trend-panel {
  flex-shrink: 0;
  margin: 0;
  border-top: 1px solid rgba(255, 160, 60, 0.18);
  background: rgba(0, 0, 0, 0.18);
}

.m-compare-trend-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--m-muted);
  cursor: pointer;
  list-style: none;
}

.m-compare-trend-summary::-webkit-details-marker { display: none; }

.m-compare-trend-summary::after {
  content: "▾";
  color: var(--m-gold);
  font-size: 12px;
  transition: transform 0.2s;
}

.m-compare-trend-panel[open] .m-compare-trend-summary::after {
  transform: rotate(180deg);
}

.m-compare-trend-summary strong {
  color: var(--m-gold);
  font-size: 12px;
}

.m-compare-trend-panel .m-compare-trend-chart {
  width: 100%;
  height: 140px;
  padding: 0 8px 8px;
}

.m-compare-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 12px 4px;
  flex-shrink: 0;
}

.m-follow-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 6px;
  flex-shrink: 0;
}

.m-follow-quick.hidden { display: none; }

.m-quick-chip {
  padding: 4px 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: var(--m-muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.m-quick-chip.is-on {
  border-color: var(--m-gold2, #ffc53d);
  background: rgba(255, 214, 102, 0.14);
  color: #ffd666;
}

.m-compare-table-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.m-compare-stat {
  flex: 1;
  padding: 6px 4px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 160, 60, 0.18);
  border-radius: 0;
  text-align: center;
  min-width: 0;
}

.m-compare-stat.is-focus {
  border-color: rgba(250, 173, 20, 0.55);
  background: linear-gradient(135deg, rgba(250, 173, 20, 0.14), rgba(0, 0, 0, 0.28));
}

.m-compare-stat.is-ref {
  opacity: 0.82;
  border-style: dashed;
}

.m-compare-stat span {
  display: block;
  font-size: 10px;
  color: var(--m-muted);
  margin-bottom: 2px;
}

.m-compare-stat.is-focus span em {
  font-style: normal;
  color: var(--m-accent);
}

.m-compare-stat b { font-size: 16px; color: var(--m-gold); }

.m-compare-stat.is-focus b {
  font-size: 18px;
  color: var(--m-gold);
}

.m-compare-stat.is-delta {
  border-color: rgba(255, 255, 255, 0.12);
}

.m-compare-stat.is-delta b .m-up,
.m-compare-stat.is-delta b.m-up { color: #52c41a; }
.m-compare-stat.is-delta b .m-down,
.m-compare-stat.is-delta b.m-down { color: #ff4d4f; }
.m-compare-stat.is-delta b .m-flat,
.m-compare-stat.is-delta b.m-flat { color: var(--m-muted); }

.m-compare-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1.4;
}

.m-compare-badge.live {
  color: #b7eb8f;
  border: 1px solid rgba(82, 196, 26, 0.35);
  background: rgba(82, 196, 26, 0.12);
}

.m-compare-badge.frozen {
  color: rgba(201, 160, 128, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.m-compare-stat small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: var(--m-muted);
  font-weight: 400;
  line-height: 1.2;
}

.m-compare-head {
  display: grid;
  grid-template-columns: 0.85fr 0.95fr 0.95fr 0.72fr;
  gap: 4px;
  padding: 6px 12px 4px;
  font-size: 10px;
  color: var(--m-muted);
  flex-shrink: 0;
  background: rgba(18, 6, 6, 0.92);
  border-bottom: 1px solid rgba(255, 160, 60, 0.14);
}

.m-compare-head-sticky {
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(6px);
}

.m-compare-head .is-focus small,
.m-compare-head .is-ref small {
  display: block;
  font-size: 8px;
  opacity: 0.75;
  font-weight: 400;
  margin-top: 1px;
}

.m-compare-head .is-focus { color: var(--m-gold); font-weight: 600; text-align: right; }
.m-compare-head .is-ref { text-align: right; opacity: 0.75; }
.m-compare-head span:last-child { text-align: right; }

.m-compare-list {
  padding: 4px 12px 12px;
  font-size: 12px;
}

.m-compare-row {
  display: grid;
  grid-template-columns: 0.85fr 0.95fr 0.95fr 0.72fr;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 160, 60, 0.1);
  align-items: center;
  min-height: 40px;
}

.m-compare-site-wrap {
  min-width: 0;
}

.m-compare-site {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--m-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-compare-site-sub {
  display: block;
  font-size: 9px;
  color: var(--m-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-compare-t.is-focus {
  text-align: right;
  color: var(--m-gold);
  font-weight: 700;
  font-size: 13px;
}

.m-compare-y.is-ref {
  text-align: right;
  color: var(--m-muted);
  font-size: 12px;
}

.m-compare-d { text-align: right; font-weight: 600; font-size: 11px; line-height: 1.25; }
.m-compare-d small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  opacity: 0.85;
}
.m-up { color: #52c41a; }
.m-down { color: #ff4d4f; }
.m-flat { color: var(--m-muted); }

@media (max-width: 360px) {
  .m-compare-summary {
    grid-template-columns: 1fr;
  }
  .m-compare-stat b { font-size: 15px; }
  .m-compare-stat.is-focus b { font-size: 17px; }
}

.m-footer {
  text-align: center;
  padding: 16px 12px 8px;
  font-size: 10px;
  color: var(--m-muted);
  line-height: 1.7;
}

.m-footer a { color: var(--m-accent); text-decoration: none; }
.m-footer-meta {
  font-size: 10px;
  color: rgba(255, 214, 102, 0.65);
  letter-spacing: 0.03em;
  margin: 4px 0;
}

.m-empty { text-align: center; padding: 32px 16px; color: var(--m-muted); font-size: 13px; }
