:root {
  color-scheme: dark;
  --void: #0c1117;
  --panel: #111a23;
  --panel-deep: #101720;
  --line: #25323e;
  --text: #f0e8d8;
  --muted: #9ba8b5;
  --gold: #e7bf7d;
  --candle-up: #ef8585;
  --candle-down: #65c5a4;
  --candle-flat: #a0b0bf;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --nums: "Bahnschrift", "Segoe UI", var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--void); font: 16px/1.55 var(--sans); }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, canvas:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.frame { width: min(100% - 88px, 1480px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: #0e151d; }
.topbar { height: 64px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 13px; white-space: nowrap; font-weight: 700; color: #e9dbc2; }
.brand strong { color: var(--gold); letter-spacing: .08em; font: 700 17px Georgia, serif; }
.brand-divider { display: inline-block; margin-inline: 10px; width: 1px; height: 11px; background: #64605a; }
.brand-mark, .empty-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #af8250; transform: rotate(45deg); }
.brand-mark::before, .empty-mark::before { content: ""; width: 12px; height: 12px; border: 1px solid var(--gold); background: linear-gradient(130deg, #ffe2a1, #98663d 51%, #4b3730 52%); }
.topbar nav { display: flex; gap: 26px; margin-left: auto; color: var(--muted); }
.topbar nav a { padding-block: 13px; }
.topbar nav a:hover, .methodology a:hover, .rank-back:hover { color: var(--gold); }
.zone { margin-left: 28px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 12px/1.4 var(--nums); white-space: nowrap; }

.hero { position: relative; overflow: hidden; border-bottom: 1px solid #312b25; background: radial-gradient(ellipse at 78% 32%, #513523 0%, #29232a 29%, #131a24 62%, #101820 90%); }
.hero::before { position: absolute; inset: 0; content: ""; background: repeating-linear-gradient(119deg, transparent 0 32px, #d4905120 33px, transparent 34px 54px); opacity: .35; mask-image: linear-gradient(90deg, transparent 16%, black); }
.hero-content { position: relative; isolation: isolate; min-height: 258px; display: flex; align-items: center; padding: 24px 0 30px; }
.hero-content > div:first-child { position: relative; z-index: 1; }
.hero-label { margin: 0 0 10px; color: #dcc098; font-size: 14px; font-weight: 700; letter-spacing: .11em; display: flex; align-items: center; gap: 12px; }
.hero-label span { width: 14px; height: 1px; background: #b17745; }
h1 { margin: 0; font: 800 clamp(44px, 6vw, 78px)/1.1 var(--serif); letter-spacing: .045em; text-shadow: 0 4px 20px #080c14a0; }
h1 span { color: var(--gold); }
.hero-copy { margin: 19px 0 0; color: #c8c2ba; font-size: clamp(14px, 1.4vw, 17px); }
.hero-motif { position: absolute; right: 8%; top: 49%; width: 300px; aspect-ratio: 1; transform: translateY(-50%); opacity: .9; pointer-events: none; }
.motif-ring, .motif-core, .motif-ray, .motif-spark { position: absolute; }
.motif-ring { inset: 14%; border: 1px solid #97684270; border-radius: 50%; box-shadow: 0 0 0 13px #a7763b18, 0 0 0 28px #a7763b0d, inset 0 0 65px #ca874b0b; }
.motif-ring::before, .motif-ring::after { position: absolute; content: ""; inset: 11%; border: 1px solid #daad6870; transform: rotate(45deg); }
.motif-ring::after { inset: 21%; transform: rotate(0); border-color: #c683474a; }
.motif-core { inset: 35%; transform: rotate(45deg); border: 1px solid #f7ca8a; box-shadow: 0 0 27px #ffb45f54, inset 0 0 28px #ffbb6e55; background: linear-gradient(134deg,#ebbf7e80 0%,#b5764c18 39%,#f5b96c80 40%,#59413530 41% 61%,#eaa56c58 62%); }
.motif-core::after { position: absolute; inset: 18%; content: ""; border: 1px solid #ffe0b08c; background: conic-gradient(from 25deg,#f7dc9c60,#2b1a1950 30%, #ffc37160 57%,#4c2d1c70 79%,#ffc37166); }
.motif-ray { inset: 0 49.9%; background: linear-gradient(transparent,#eab27880,transparent); }
.motif-ray.two { transform: rotate(90deg); }
.motif-spark { left: 49%; top: 49%; width: 6px; height: 6px; border-radius: 50%; background: #ffe6b9; box-shadow: 0 0 22px 7px #ffd289ad; }

.content { padding-block: 24px 42px; }
.panel { background: linear-gradient(145deg, #14202a 0%, var(--panel) 70%); border: 1px solid var(--line); border-radius: 12px; }
.field-label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: .045em; }
.filters { padding: 17px 19px 18px; }
.league-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.league-option, .segment, .chart-toolbar button { appearance: none; border: 1px solid var(--line); color: #b9c3cd; background: #101821; }
.league-option { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 7px; min-height: 45px; text-align: left; }
.league-option .version { flex: none; color: #c4a880; font-family: var(--nums); font-size: 13px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.league-option .league-title { font-size: 15px; overflow-wrap: anywhere; line-height: 1.3; }
.league-option:hover, .segment:hover, .chart-toolbar button:not(:disabled):hover { border-color: #90704b; color: var(--text); }
.league-option[aria-pressed="true"], .segment[aria-pressed="true"] { border-color: #9d774b; background: #473727; color: #ffda9f; }
.league-option[aria-pressed="true"] .version { color: #ffdba0; }
.filter-bottom { display: flex; align-items: end; flex-wrap: wrap; column-gap: 30px; row-gap: 12px; margin-top: 14px; }
.segment-list { display: flex; flex-wrap: wrap; gap: 5px; }
.segment { min-height: 38px; padding: 5px 9px; border-radius: 6px; font: 700 14px var(--nums); white-space: nowrap; }
.segment .prior { color: #acb6c2; font-size: 13px; font-weight: 400; }
.segment[aria-pressed="true"] .prior { color: #e6bb81; }
.quote-list .segment { padding-inline: 12px; }
.quote-list .segment::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 7px 1px 0; border: 1px solid #cda76d; transform: rotate(45deg); background: #b17e4c; }
.quote-list .segment:nth-child(2)::before { background: #c7d5e4; border-color: #d0d8e0; }
select, input[type="search"] { min-height: 38px; background: #0c151e; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
select { min-width: 132px; padding: 4px 25px 4px 10px; }
.custom-toggle { min-width: 105px; padding-inline: 14px; border-color: #936d3e; background: #2d241a; color: #f5cd91; font-size: 15px; }
.custom-toggle:hover, .custom-toggle[aria-expanded="true"], .custom-toggle.is-current, .custom-apply { border-color: #c89756; background: #473727; color: #ffda9f; }
.custom-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #101922; }
.custom-period label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }
.custom-period select { min-width: 86px; }
.custom-period-error { margin: 0; font-size: 13px; color: #ffb3a5; }
.custom-period [aria-invalid="true"] { border-color: #e78c7d; }
.data-meta { margin: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.data-coverage { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 13px; }
.data-meta .current { color: var(--gold); font-weight: 700; }
.data-meta .coverage-partial { color: #f1bf80; }
.data-meta .cover-dot { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; vertical-align: 2px; background: #60b79f; }
.data-meta .coverage-partial .cover-dot { background: #f1bf80; }
.exchange-rate { justify-self: center; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; max-width: 100%; padding: 8px 17px; border: 1px solid #a5743c; border-radius: 8px; background: linear-gradient(105deg, #292016, #3b2b1c 55%, #292016); color: #e6bf89; font-size: 14px; font-weight: 700; text-align: center; box-shadow: inset 0 1px #edbb6c26; }
.exchange-rate strong { color: #f5e3cb; font-size: 19px; line-height: 1.25; }
.exchange-rate-number { color: #ffcf80; font-size: 25px; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rank-panel, .detail-panel, .methodology { scroll-margin-block-start: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px 17px 15px; }
.panel-head h2 { margin: 0; font: 800 27px/1.2 var(--serif); color: #f2e3cc; }
.quiet { color: var(--muted); margin: 0; font-size: 14px; }
.panel-head .quiet { margin-top: 6px; }
.search { min-width: 0; width: 175px; flex-shrink: 1; }
.search input { width: 100%; padding: 4px 9px; }
.search input::placeholder { color: #a5aeba; opacity: 1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 9px 7px; border-block: 1px solid var(--line); background: #111822; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
td { padding: 10px 7px; border-bottom: 1px solid #22303a; vertical-align: middle; }
tr[data-item] { cursor: pointer; }
tr[data-item]:hover { background: #24313b; }
tr[data-item].selected { background: #312b25; }
tr[data-item].selected td:first-child { box-shadow: inset 2px 0 #dfac6c; }
.rank-cell { padding-inline: 12px 6px; color: var(--muted); text-align: center; width: 44px; }
td.rank-cell { font: 600 15px var(--nums); font-variant-numeric: tabular-nums; }
td.rank-cell.top-rank { color: var(--gold); }
.item-cell { width: 100%; }
.search-quote-label { display: block; color: var(--muted); font-size: 12px; }
.item-name-with-preview { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.item-button { padding: 1px 0; color: inherit; background: none; border: 0; text-align: left; text-wrap: pretty; overflow-wrap: anywhere; font-size: 16px; font-weight: 700; line-height: 1.35; }
.item-preview-trigger { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 2px; border: 1px solid #6e563b; border-radius: 6px; background: #211b18; }
.item-preview-trigger:hover, .item-preview-trigger[aria-expanded="true"] { border-color: #d4a669; background: #3a2b21; }
.item-preview-trigger img, .item-preview-header img { display: block; object-fit: contain; }
.item-preview { position: fixed; inset: 0 auto auto 0; z-index: 12; width: min(289px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); overflow: auto; border: 1px solid #a67d49; border-radius: 8px; background: #151a20; color: var(--text); box-shadow: 0 9px 28px #060910b5; }
.item-preview-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #665038; background: linear-gradient(115deg, #3c2b1f, #231e1b); }
.item-preview-header strong { display: block; overflow-wrap: anywhere; color: #ffda9f; font: 700 18px/1.3 var(--serif); }
.item-preview-type, .item-preview-stack { font-size: 12px; color: var(--muted); }
.item-preview-body { padding: 10px 13px 12px; font-size: 13px; }
.item-preview-body p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.item-preview-body .item-preview-effect { margin-top: 0; color: #dfbaff; font-size: 15px; font-weight: 700; }
.item-preview-flavour { color: #d2af7f; }
tr[data-item].selected .item-button { color: #f9cf94; }
.growth-cell, .prices-cell, .volume-cell { text-align: right; white-space: nowrap; }
.sort-caret { color: #c6a278; margin-left: 3px; }
.growth-value { color: var(--candle-up); font: 700 16px var(--nums); font-variant-numeric: tabular-nums; }
.growth-value.is-down, .detail-growth.is-down { color: var(--candle-down); }
.growth-value.is-neutral, .detail-growth.is-neutral { color: var(--muted); }
.prices-cell { color: #b6c0cc; }
td.prices-cell, td.volume-cell { font: 14px var(--nums); font-variant-numeric: tabular-nums; }
.prices-cell strong { color: var(--text); font-weight: 700; }
.flow { color: #8796a6; display: inline-block; margin: 0 3px; }
.volume-cell { padding-right: 15px; color: #a7b4be; }
.empty-row td { padding: 30px 16px; text-align: center; color: var(--muted); }
.table-status { min-height: 38px; padding: 10px 16px; }

.detail-panel { position: sticky; top: 12px; overflow: clip; }
.detail-head { align-items: start; padding-bottom: 14px; }
.detail-identity { min-width: 0; }
.detail-head h2 { overflow-wrap: anywhere; scroll-margin-block-start: 16px; }
.detail-head h2:focus { outline: none; }
.detail-growth { flex: none; padding: 4px 7px; border: 1px solid #804b50; border-radius: 5px; background: #382427; color: #f8a19d; font: 700 15px/1.4 var(--nums); font-variant-numeric: tabular-nums; }
.detail-growth.is-down { border-color: #3c6c5b; background: #163830; }
.detail-growth.is-neutral { border-color: var(--line); background: #131f29; }
.detail-growth:empty { display: none; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 15px 13px; }
.comparison-note { margin: -4px 15px 13px; }
.comparison-card { min-width: 0; margin: 0; padding: 8px 9px; border: 1px solid #293642; background: #0e171f; border-radius: 7px; }
.comparison-card.to-day { border-color: #7b603e; background: #2a241e; }
.comparison-card dt { color: var(--muted); font-size: 13px; }
.comparison-card dd { margin: 2px 0 0; font: 700 20px/1.2 var(--nums); font-variant-numeric: tabular-nums; }
.comparison-card .comparison-volume { font: 13px/1.4 var(--sans); color: var(--muted); margin-top: 5px; }
.chart-section { padding: 12px 15px 14px; border-top: 1px solid var(--line); background: #0d161f; }
.chart-header { display: flex; align-items: center; gap: 5px; justify-content: space-between; }
.chart-header h3 { margin: 0; font-size: 16px; color: #eaddc7; white-space: nowrap; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #aeb9c3; font-size: 12px; }
.chart-legend i { display: inline-block; vertical-align: 1px; margin-right: 4px; }
.legend-candle { width: 7px; height: 8px; border-radius: 1px; }
.legend-up { background: var(--candle-up); }
.legend-down { background: var(--candle-down); }
.legend-average { width: 10px; height: 2px; background: var(--gold); }
.legend-volume { width: 8px; height: 6px; background: #6885a3; }
.axis-unit { margin-top: 4px; }
.chart-frame { position: relative; height: 260px; min-width: 0; }
canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.chart-toolbar { display: flex; align-items: center; gap: 7px; justify-content: space-between; margin: 6px 0; }
.chart-toolbar span { color: #d8cabc; font-size: 13px; text-align: center; }
.chart-toolbar button { flex: none; width: 27px; height: 27px; padding: 0; border-radius: 5px; font: 19px/1 var(--sans); }
.chart-toolbar button:disabled { opacity: .35; cursor: default; }
.chart-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; gap: 3px; }
.chart-values > div { min-width: 0; padding: 4px 4px; border-radius: 5px; background: #131f29; }
.chart-values dt { color: var(--muted); font-size: 12px; }
.chart-values dd { margin: 2px 0 0; font: 700 14px var(--nums); color: #ede3d3; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.chart-values .daily-average dd { color: var(--gold); }
.chart-note { margin: 8px 0 1px; font-size: 13px; }
.detail-empty { min-height: 290px; display: grid; justify-items: center; align-content: center; gap: 11px; padding: 18px; text-align: center; }
.detail-empty h2, .detail-empty p { margin: 0; }
.detail-empty h2 { margin-top: 10px; font: 700 21px var(--serif); }
.detail-empty p { color: var(--muted); }
.rank-back { display: none; color: #e2c393; padding: 11px 15px; border-top: 1px solid var(--line); }

.methodology { margin-top: 16px; padding: 14px 16px 15px; }
.methodology summary { color: #ebdbc5; font-weight: 700; }
.methodology dl { margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.methodology dt { color: #e4cfb0; margin: 0 0 4px; font-weight: 700; font-size: 14px; }
.methodology dd { margin: 0; color: var(--muted); font-size: 14px; }
.methodology a { color: #e3c08d; white-space: nowrap; }
.site-credits { margin-top: 16px; padding: 12px 2px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-credits p { margin: 0 0 5px; }
.site-credits a { color: #e3c08d; text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 911px) and (max-height: 610px) {
  .detail-panel { position: static; }
}
@media (max-width: 1160px) {
  .frame { width: min(100% - 52px, 1480px); }
  .workbench { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); }
  .filter-bottom { column-gap: 19px; }
  .league-option { align-items: start; flex-direction: column; gap: 1px; }
  td.prices-cell .flow, td.volume-cell .flow { display: none; }
  .prices-cell strong, .volume-cell .right-number { display: block; margin-top: 2px; }
}
@media (max-width: 910px) {
  .data-meta { grid-template-columns: minmax(0, 1fr); }
  .frame { width: calc(100% - 40px); }
  .workbench { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .rank-back { display: block; }
  .league-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .league-option { flex-direction: row; align-items: center; gap: 7px; }
  td.prices-cell .flow, td.volume-cell .flow { display: inline-block; }
  .prices-cell strong, .volume-cell .right-number { display: inline; margin-top: 0; }
  .chart-frame { height: 310px; }
  .chart-values { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .frame { width: calc(100% - 26px); }
  .topbar { height: 55px; }
  .brand { gap: 10px; font-size: 13px; }
  .brand strong { font-size: 15px; }
  .brand-mark { width: 18px; height: 18px; margin-left: 4px; }
  .brand-mark::before { width: 9px; height: 9px; }
  .brand-divider { margin-inline: 6px; }
  .topbar nav { gap: 12px; font-size: 13px; }
  .zone { display: none; }
  .hero-content { min-height: 200px; padding-bottom: 22px; }
  .hero-motif { right: -32px; width: 206px; opacity: .48; }
  .hero-copy { max-width: 275px; }
  .content { padding-block: 13px 25px; }
  .filters { padding: 12px 11px; }
  .league-options { gap: 5px; }
  .league-option { padding: 6px 7px; min-height: 44px; flex-direction: column; align-items: start; gap: 1px; }
  .league-option .version { font-size: 11px; }
  .league-option .league-title { font-size: 13px; line-height: 1.25; }
  .filter-bottom { margin-top: 10px; column-gap: 15px; row-gap: 8px; }
  .filter-bottom > div:first-child { width: 100%; }
  .segment-list { gap: 3px; }
  .segment { min-height: 34px; font-size: 13px; padding: 4px 7px; }
  .segment .prior { font-size: 12px; }
  .custom-toggle { min-width: 89px; font-size: 14px; }
  .quote-list .segment { padding-inline: 7px; }
  .quote-list .segment::before { margin-right: 5px; }
  select { min-height: 34px; min-width: 112px; font-size: 14px; }
  .custom-period { padding: 8px; column-gap: 8px; }
  .data-meta { padding-inline: 2px; margin-block: 8px; gap: 8px; }
  .data-coverage { gap: 1px 10px; }
  .exchange-rate { padding-inline: 12px; gap: 3px 10px; font-size: 12px; }
  .exchange-rate strong { font-size: 16px; }
  .exchange-rate-number { font-size: 22px; }
  .panel-head { padding: 12px 11px 10px; gap: 6px; }
  .panel-head h2 { font-size: 23px; }
  .search { width: 130px; }
  .search input { font-size: 14px; }
  th, td { padding-inline: 4px; }
  .rank-cell { width: 31px; padding-inline: 5px 2px; }
  td.rank-cell { font-size: 13px; }
  .growth-value { font-size: 14px; }
  .item-button { font-size: 14px; }
  .item-name-with-preview { gap: 5px; }
  .item-preview-trigger { width: 30px; height: 30px; }
  .item-preview-trigger img { width: 24px; height: 24px; }
  td.prices-cell, td.volume-cell { font-size: 12px; }
  td.prices-cell .flow, td.volume-cell .flow { display: none; }
  .prices-cell strong, .volume-cell .right-number { display: block; margin-top: 1px; }
  .volume-cell { padding-right: 7px; }
  .table-status { padding-inline: 11px; }
  .comparison { margin-inline: 10px; }
  .comparison-note { margin-inline: 10px; }
  .chart-section { padding-inline: 10px; }
  .chart-frame { height: 253px; }
  .chart-values { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .methodology dl { grid-template-columns: 1fr; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
