.rk-loading {
  margin: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.rk-quicknav {
  -webkit-overflow-scrolling: touch;
}

.rk-quicknav .sv-anchor-tab-btn {
  border-radius: 8px 8px 0 0;
}

@media (max-width: 480px) {
  .rk-quicknav .sv-anchor-tab-btn {
    padding: 12px 11px;
    font-size: 12.5px;
  }
}

@media (max-width: 360px) {
  .rk-quicknav .sv-anchor-tab-btn {
    padding: 11px 8px;
    font-size: 12px;
  }
}

.rk-hero {
  position: relative;
  margin: 14px 0 18px;
  padding: 22px 24px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rk-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--brand-gradient);
  opacity: 0.75;
}

.rk-kicker {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.rk-hero-title {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.rk-hero-lede {
  margin: 0 0 14px;
  max-width: 62ch;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

.rk-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rk-topic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-alt, rgba(127, 127, 127, 0.05));
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

a.rk-topic:hover {
  color: var(--text);
  box-shadow: 0 2px 8px rgba(94, 70, 24, 0.14);
}

.rk-topic.is-active {
  color: var(--text);
  border-color: transparent;
  background: var(--accent-bg);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.rk-topic.is-soon {
  opacity: 0.62;
}

.rk-topic-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
}

.rk-learns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

/* JS 掛上 rk-js 後只留當前主題那一條；無 JS 時兩條同時可讀 */
.rk-js .rk-learn {
  display: none;
}

.rk-js .rk-learn.is-active {
  display: inline-block;
}

.rk-learn {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-text, var(--accent));
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.rk-learn:hover {
  color: var(--brand-cyan-text, var(--accent));
}

.rk-markets {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt, rgba(127, 127, 127, 0.05));
  width: fit-content;
}

.rk-market-tab {
  padding: 7px 26px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.rk-market-tab:hover {
  color: var(--text);
}

.rk-market-tab.is-active {
  color: var(--on-accent, #fff);
  background: var(--brand-gradient);
  box-shadow: 0 3px 10px rgba(94, 70, 24, 0.24);
}

.rk-panel {
  margin-bottom: 26px;
}

/* JS 掛上 rk-js 後才做分頁；無 JS 時兩個市場同時完整可讀 */
.rk-js .rk-panel {
  display: none;
}

.rk-js .rk-panel.is-active {
  display: block;
}

.rk-panel-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.rk-period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 12px;
}

/* 金色寫死不吃主題代幣，五個主題下是同一顆對比合格的膠囊 */
.rk-period-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #241900;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 52%),
    linear-gradient(134deg, #fdf1c4 0%, #f3d67d 26%, #e2b53f 58%, #c99722 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(126, 90, 16, 0.5),
    0 5px 14px -8px rgba(126, 90, 16, 0.9);
}

.rk-period-ico {
  font-size: 16px;
  line-height: 1;
}

.rk-period-tag {
  font-style: normal;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #241900;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(126, 90, 16, 0.38);
}

.rk-period-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.rk-period-pick-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
}

.rk-period-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 30px 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background-color: var(--card-bg);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 15px center, right 10px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rk-period-select:hover {
  border-color: var(--accent);
}

.rk-period-select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.rk-panel.is-loading {
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.rk-progress {
  margin-bottom: 16px;
  padding: 14px 16px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.rk-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.rk-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.rk-progress-num {
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.rk-progress-pct {
  font-style: normal;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
}

.rk-progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.rk-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-gradient);
}

.rk-progress-note {
  margin: 9px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

.rk-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rk-lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.rk-card {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rk-card--wide {
  grid-column: 1 / -1;
}

.rk-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.rk-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.rk-card-count {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.rk-card-lede {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
}

.rk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt, rgba(127, 127, 127, 0.04));
}

.rk-rank {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  background: var(--border);
}

/* 金銀銅色值刻意寫死不吃主題代幣，五個主題下是同一枚章 */
.rk-rank--medal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12.5px;
}

.rk-rank--gold {
  color: #241900;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 46%),
    linear-gradient(146deg, #fdf4cf 0%, #f5dc86 20%, #e0b445 48%, #b3841a 76%, #eed07a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(126, 90, 16, 0.55),
    0 4px 10px -6px rgba(126, 90, 16, 0.8);
}

.rk-rank--silver {
  color: #1e2126;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 46%),
    linear-gradient(146deg, #fbfcfd 0%, #dfe4e9 22%, #b6bec7 52%, #8d959e 78%, #dde2e7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(120, 128, 138, 0.5),
    0 4px 10px -6px rgba(90, 98, 108, 0.7);
}

.rk-rank--bronze {
  color: #2b1608;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 46%),
    linear-gradient(146deg, #f6ddc4 0%, #e2b183 24%, #c08553 54%, #93602f 80%, #e5bb90 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(129, 84, 41, 0.5),
    0 4px 10px -6px rgba(129, 84, 41, 0.75);
}

.rk-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-name a {
  color: inherit;
  text-decoration: none;
}

.rk-name a:hover {
  color: var(--accent);
}

.rk-id {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.rk-cell {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
}

.rk-val {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}

.rk-val--up { color: var(--up); }
.rk-val--down { color: var(--down); }
.rk-val--flat { color: var(--text-muted); }

.rk-val--badge {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--text);
  background: var(--accent-bg);
  border: 1px solid var(--border-strong);
  white-space: nowrap;
}

.rk-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rk-sub--up { color: var(--up); opacity: 0.85; }
.rk-sub--down { color: var(--down); opacity: 0.85; }

.rk-radar {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-bg);
  color: var(--accent-text);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.rk-radar:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-1px);
}

.rk-radar-ico {
  font-size: 10px;
  line-height: 1;
}

@media (max-width: 400px) {
  .rk-radar {
    gap: 2px;
    padding: 2px 6px;
    font-size: 10px;
  }
}

.rk-row--lock {
  border-style: dashed;
  pointer-events: none;
}

.rk-rank--lock {
  background: var(--border);
  color: var(--text-faint);
}

.rk-mask {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--border), var(--border-strong), var(--border));
  filter: blur(1.2px);
}

.rk-mask--name { flex: 1 1 auto; min-width: 24px; }
.rk-mask--val { flex: 0 0 auto; width: 62px; }
.rk-mask--chip { flex: 0 0 auto; width: 78px; height: 15px; border-radius: 8px; }

.rk-lockbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--accent-bg);
  border: 1px solid var(--border);
}

.rk-lockbar-ico {
  font-size: 12px;
  line-height: 1;
}

.rk-ctawrap {
  margin-top: 18px;
  text-align: center;
}

.rk-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--on-accent, #fff);
  background: var(--brand-gradient);
  box-shadow: 0 4px 14px rgba(94, 70, 24, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rk-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(94, 70, 24, 0.32);
}

.rk-cta-ico {
  font-size: 13px;
  line-height: 1;
}

.rk-inds {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rk-ind {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt, rgba(127, 127, 127, 0.04));
}

.rk-ind--lock {
  border-style: dashed;
  pointer-events: none;
  padding: 9px 14px;
}

.rk-ind--lock .rk-ind-head {
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.rk-ind--lock .rk-mask--name {
  max-width: 150px;
}

.rk-ind--lock .rk-mask--chip {
  margin-left: auto;
}

.rk-ind-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.rk-ind-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}

.rk-ind-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.rk-ind-median {
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

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

.rk-ind-ai {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 10px 0 0;
  font-size: 12px;
  font-style: italic;
  line-height: 1.75;
  color: var(--text-muted);
}

.rk-ind-ai-tag {
  flex: none;
  align-self: center;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-bg);
  color: var(--accent-text);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

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

.rk-chip--more {
  color: var(--text-faint);
  border-style: dashed;
  cursor: default;
}

.rk-chip-val {
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rk-empty {
  margin: 8px 0 0;
  padding: 18px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
}

.rk-empty--panel {
  margin-top: 0;
  padding: 34px 16px;
}

.rk-foot {
  margin: 6px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.rk-fine {
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--text-faint);
}

@media (prefers-reduced-motion: reduce) {
  .rk-cta,
  .rk-market-tab,
  .rk-chip,
  .rk-period-select,
  .rk-panel.is-loading {
    transition: none;
  }
  .rk-cta:hover {
    transform: none;
  }
}

@media (max-width: 1080px) {
  .rk-lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .rk-lists {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .rk-hero {
    padding: 18px 15px 16px;
  }
  .rk-hero-title {
    font-size: 21px;
  }
  .rk-markets {
    width: 100%;
  }
  .rk-market-tab {
    flex: 1 1 0;
    text-align: center;
    padding: 8px 0;
  }
  .rk-card {
    padding: 15px 13px 14px;
  }
  .rk-row {
    padding: 7px 8px;
    gap: 8px;
  }
  .rk-name {
    font-size: 13px;
  }
  .rk-val {
    font-size: 13px;
  }
  .rk-ind-median {
    margin-left: 0;
    width: 100%;
  }
  .rk-progress-head {
    flex-wrap: wrap;
  }
  .rk-period {
    gap: 9px 10px;
  }
  .rk-period-pill {
    padding: 8px 16px;
    font-size: 15.5px;
  }
  .rk-period-pick {
    width: 100%;
  }
  .rk-period-select {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .rk-id {
    margin-left: 4px;
    font-size: 10px;
  }
  .rk-period-pill {
    padding: 7px 13px;
    font-size: 14.5px;
  }
  .rk-period-tag {
    font-size: 10px;
    padding: 1px 6px;
  }
  .rk-mask--val {
    width: 48px;
  }
  .rk-cta {
    padding: 10px 18px;
    font-size: 12.5px;
  }
}
