/* 《猎潮》· 交易台 × 机要档案
   如果说《庙算》是国家档案室的桌面，《猎潮》就是那张桌子的另一面：交易台的冷光屏。
   墨蓝底 + 琥珀数字；朱砂是盈利（中国习惯：红=赚），铜绿是亏损。
   排版：宋体标题（公文感）、黑体正文、等宽数字（数据感）。 */
:root {
  --ink: #0b0e13;          /* 屏幕底色 */
  --ink-2: #12171f;        /* 面板 */
  --ink-3: #19202a;        /* 抬起的面板 */
  --rule: rgba(233, 227, 214, .10);
  --rule-2: rgba(233, 227, 214, .20);
  --paper: #efe9dc;        /* 文书（结算通报） */
  --paper-2: #e5dcc9;
  --paper-ink: #1d1b17;
  --paper-muted: #5f584b;
  --text: #e9e3d6;
  --text-2: #a49d8d;
  --text-3: #6d675b;
  --up: #d9503a;           /* 盈利 · 朱砂 */
  --up-2: #f0735c;
  --down: #4a9c86;         /* 亏损 · 铜绿 */
  --down-2: #63bda3;
  --brass: #c9a24a;        /* 黄铜：强调 */
  --brass-2: #e0bd6b;
  --amber: #d99a2b;
  --dollar: #7fa37a;       /* 美元流向 */
  --alert: #c23a24;
  --serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  --sans: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  --r: 3px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(201,162,74,.10), transparent 62%),
    radial-gradient(900px 600px at -10% 110%, rgba(74,156,134,.07), transparent 62%);
}
#app { position: relative; z-index: 1; min-height: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, [role=slider]:focus-visible {
  outline: 2px solid var(--brass); outline-offset: 2px;
}
a { color: var(--brass); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.serif { font-family: var(--serif); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.up { color: var(--up-2); }
.down { color: var(--down-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  padding: .6em 1.15em; border-radius: var(--r); border: 1px solid var(--rule-2); background: transparent;
  letter-spacing: .08em; font-size: 13.5px; transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { border-color: var(--brass); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn.primary { background: var(--alert); border-color: var(--alert); color: #fff7ee; font-weight: 600; }
.btn.primary:hover { background: var(--up-2); border-color: var(--up-2); }
.btn.brass { border-color: var(--brass); color: var(--brass); }
.btn.brass:hover { background: rgba(201,162,74,.12); }
.btn.ghost { border-color: transparent; color: var(--text-2); }
.btn.small { padding: .34em .75em; font-size: 12.5px; }
.paper .btn { border-color: rgba(29,27,23,.28); color: var(--paper-ink); }
.paper .btn.primary { background: var(--alert); color: #fff7ee; border-color: var(--alert); }

/* ── 扉页（与《庙算》同一套扉页语言，只是字不同） */
.title-screen { min-height: 100vh; display: grid; place-items: center; padding: 48px 20px; position: relative; overflow: hidden; }
.guilloche { position: absolute; width: min(1080px, 150vw); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -52%); opacity: .5; pointer-events: none; }
.guilloche g { transform-origin: 500px 500px; animation: spin 260s linear infinite; }
.guilloche g.rev { animation-direction: reverse; animation-duration: 340s; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .guilloche g { animation: none; } }
.title-card { position: relative; text-align: center; max-width: 760px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .42em; color: var(--brass); text-transform: uppercase; }
.title-word {
  font-family: var(--serif); font-weight: 900; font-size: clamp(84px, 18vw, 180px); line-height: .95; letter-spacing: .08em; margin: 16px 0 6px;
  background: repeating-linear-gradient(-28deg, var(--paper) 0 1.6px, rgba(239,233,220,.32) 1.6px 3.4px);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.6));
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .1s;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); letter-spacing: .3em; } to { opacity: 1; transform: none; } }
.title-quote { font-family: var(--serif); font-size: 17px; letter-spacing: .3em; color: var(--text); animation: rise .9s both .35s; }
.title-quote small { display: block; font-size: 12px; letter-spacing: .2em; color: var(--text-3); margin-top: 6px; }
.title-sub { margin: 26px auto 32px; max-width: 560px; color: var(--text-2); font-size: 14px; line-height: 1.9; animation: rise .9s both .5s; text-align: justify; }
.title-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: rise .9s both .65s; }
.title-links { margin-top: 26px; font-size: 13px; animation: rise .9s both .8s; }
.title-links a { color: var(--text-2); margin: 0 .6em; }

/* ── 关卡选择 */
.levels { max-width: 1120px; margin: 0 auto; padding: 40px 20px 64px; }
.levels-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.levels-head h2 { font-family: var(--serif); font-size: 30px; margin: 0; letter-spacing: .1em; font-weight: 600; }
.levels-head .muted { font-size: 13px; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 20px; }
.lv-card {
  position: relative; text-align: left; border: 1px solid var(--rule-2); border-radius: var(--r);
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); padding: 18px 18px 16px;
  transition: border-color .16s, transform .16s, background .16s;
}
.lv-card:hover { border-color: var(--brass); transform: translateY(-2px); }
.lv-card .lv-num { font-family: var(--serif); font-size: 26px; color: var(--brass); line-height: 1; }
.lv-card .lv-title { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .06em; margin-top: 8px; }
.lv-card .lv-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; font-family: var(--mono); letter-spacing: .04em; }
.lv-card .lv-concept { font-size: 12.5px; color: var(--text-2); margin-top: 10px; line-height: 1.7; }
.lv-card .lv-best { margin-top: 12px; font-size: 12px; font-family: var(--mono); }
.lv-card .lv-badge { position: absolute; right: 14px; top: 14px; font-size: 11px; letter-spacing: .1em; padding: 2px 8px; border: 1px solid var(--rule-2); border-radius: 999px; color: var(--text-2); }
.lv-badge.done { border-color: rgba(201,162,74,.6); color: var(--brass); }

/* ── 简报（关卡开场） */
.brief { max-width: 820px; margin: 0 auto; padding: 48px 20px 72px; animation: fade .5s both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.brief h2 { font-family: var(--serif); font-size: 40px; margin: 10px 0 4px; letter-spacing: .06em; font-weight: 600; }
.brief .b-meta { font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: .06em; }
.brief .b-body { margin: 22px 0; line-height: 2; text-align: justify; color: var(--text); }
.brief .b-lesson { border-left: 3px solid var(--brass); padding: 10px 0 10px 16px; margin: 20px 0; color: var(--brass-2); font-family: var(--serif); font-size: 16px; }
.brief .b-rules { background: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 18px; }
.brief .b-rules h3 { font-family: var(--serif); font-size: 15px; margin: 0 0 10px; letter-spacing: .1em; color: var(--brass); }
.brief .b-rules li { font-size: 13px; color: var(--text-2); margin-bottom: 6px; line-height: 1.8; }
.brief .b-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ── 交易台 */
.desk { max-width: 1240px; margin: 0 auto; padding: 0 16px 96px; }
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 14px; margin: 0 -16px 14px; background: rgba(11,14,19,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-2);
}
.bar .b-title { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; white-space: nowrap; }
.bar .b-round { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.bar .b-stats { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; line-height: 1.25; }
.stat .k { font-size: 10px; letter-spacing: .14em; color: var(--text-3); }
.stat .v { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.stat .v small { font-size: 11px; font-weight: 400; color: var(--text-3); }

.grid3 { display: grid; grid-template-columns: 1.05fr 1.25fr .92fr; gap: 14px; align-items: start; }
@media (max-width: 1080px) { .grid3 { grid-template-columns: 1fr; } }
.panel { background: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 15px; }
.panel h3 {
  font-family: var(--serif); font-size: 13px; letter-spacing: .18em; margin: 0 0 10px; color: var(--brass);
  display: flex; align-items: baseline; gap: 8px;
}
.panel h3 .sub { font-family: var(--sans); font-size: 11px; letter-spacing: .04em; color: var(--text-3); }

/* 电报 */
.wire { font-family: var(--serif); font-size: 15px; line-height: 1.95; text-align: justify; }
.wire .w-date { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--brass); display: block; margin-bottom: 4px; }
.wire .w-title { display: block; margin-bottom: 8px; font-weight: 600; letter-spacing: .04em; }
.note { margin-top: 12px; border-left: 2px solid var(--brass); padding: 6px 0 6px 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.85; }
.intel-box { margin-top: 12px; background: rgba(201,162,74,.07); border: 1px dashed rgba(201,162,74,.45); border-radius: var(--r); padding: 10px 12px; font-size: 12.5px; }
.intel-box .i-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--brass); margin-bottom: 6px; }

/* 仓位 */
.pos { border-top: 1px solid var(--rule); padding: 10px 0; }
.pos:first-of-type { border-top: none; }
.pos .p-top { display: flex; align-items: baseline; gap: 8px; }
.pos .p-name { font-size: 13.5px; font-weight: 600; }
.pos .p-dir { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--rule-2); color: var(--text-2); font-family: var(--mono); }
.pos .p-dir.short { border-color: rgba(217,80,58,.5); color: var(--up-2); }
.pos .p-dir.long { border-color: rgba(74,156,134,.5); color: var(--down-2); }
.pos .p-pnl { margin-left: auto; font-family: var(--mono); font-size: 13px; font-weight: 600; }
.pos .p-hint { font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.7; }
.pos .p-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.steps { display: flex; gap: 3px; }
.step {
  width: 26px; height: 22px; border: 1px solid var(--rule-2); border-radius: 2px; background: transparent;
  display: grid; place-items: center; transition: background .12s, border-color .12s;
}
.step.on { background: var(--brass); border-color: var(--brass); }
.step.on::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.step:hover { border-color: var(--brass-2); }
.step[disabled] { opacity: .3; cursor: not-allowed; }
.pos .p-exp { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.pos .p-locked { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }

/* 仪表 */
.gauge { margin-bottom: 12px; }
.gauge .g-top { display: flex; align-items: baseline; font-size: 12px; }
.gauge .g-top .v { margin-left: auto; font-family: var(--mono); }
.g-track { height: 6px; background: var(--ink-3); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.g-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.g-note { font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.6; }

.acts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.acts .btn { width: 100%; }
.hintline { font-size: 11.5px; color: var(--text-3); line-height: 1.7; margin-top: 8px; }

/* 回合结算浮层 */
.pop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(6,8,11,.72); backdrop-filter: blur(3px); animation: fade .28s both;
}
.pop-card {
  width: min(640px, 100%); max-height: 86vh; overflow: auto; background: var(--ink-2);
  border: 1px solid var(--rule-2); border-radius: var(--r); padding: 22px 22px 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.pop-card h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 2px; letter-spacing: .06em; }
.pop-card .p-date { font-family: var(--mono); font-size: 11.5px; color: var(--brass); letter-spacing: .08em; }
.pop-lines { margin: 14px 0; border-top: 1px solid var(--rule); }
.pop-line { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.pop-line .l-pnl { margin-left: auto; font-family: var(--mono); font-weight: 600; }
.pop-line .l-mv { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.pop-alert { border: 1px solid rgba(217,80,58,.5); background: rgba(217,80,58,.08); border-radius: var(--r); padding: 10px 12px; margin: 12px 0; font-size: 12.5px; line-height: 1.8; }
.pop-alert b { color: var(--up-2); }
.pop-total { display: flex; align-items: baseline; font-family: var(--mono); font-size: 22px; font-weight: 600; }
.pop-total .k { font-family: var(--sans); font-size: 12px; color: var(--text-3); margin-right: auto; letter-spacing: .1em; }

/* 通报（纸质文书） */
.report { max-width: 860px; margin: 0 auto; padding: 40px 20px 80px; animation: fade .5s both; }
.paper {
  background: linear-gradient(168deg, var(--paper) 0%, var(--paper-2) 100%); color: var(--paper-ink);
  border-radius: 2px; padding: 34px 34px 28px; box-shadow: 0 18px 50px -14px rgba(0,0,0,.7);
}
.paper h2 { font-family: var(--serif); font-size: 34px; margin: 0 0 2px; letter-spacing: .08em; font-weight: 700; }
.paper .r-meta { font-family: var(--mono); font-size: 12px; color: var(--paper-muted); letter-spacing: .06em; }
.verdict { display: flex; align-items: center; gap: 18px; margin: 20px 0 6px; }
.seal {
  display: inline-grid; place-items: center; width: 72px; height: 72px; border: 3px solid var(--alert); border-radius: 6px;
  color: var(--alert); font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1; transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px rgba(194,58,36,.25); opacity: .92;
}
.seal.small { width: 40px; height: 40px; font-size: 18px; border-width: 2px; }
.seal.stamp { animation: stamp .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stamp { from { transform: scale(2.4) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1) rotate(-6deg); opacity: .92; } }
.verdict .v-word { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: .1em; }
.verdict .v-snark { font-size: 13px; color: var(--paper-muted); line-height: 1.7; }
.r-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 18px 0; }
.r-stat { border: 1px solid rgba(29,27,23,.16); border-radius: 2px; padding: 10px 12px; }
.r-stat .k { font-size: 11px; letter-spacing: .12em; color: var(--paper-muted); }
.r-stat .v { font-family: var(--mono); font-size: 20px; font-weight: 600; margin-top: 2px; }
.paper h4 { font-family: var(--serif); font-size: 16px; margin: 24px 0 8px; letter-spacing: .1em; border-bottom: 1px solid rgba(29,27,23,.18); padding-bottom: 6px; }
.paper ul, .paper ol { margin: 0; padding-left: 1.3em; }
.paper li { margin-bottom: 8px; line-height: 1.95; text-align: justify; font-size: 13.5px; }
.warn { background: rgba(194,58,36,.07); border-left: 3px solid var(--alert); padding: 8px 12px; margin-bottom: 8px; font-size: 12.5px; line-height: 1.85; text-align: justify; }
.r-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* 召对题卡 */
.quiz { background: var(--ink-2); border: 1px solid var(--rule-2); border-radius: var(--r); padding: 14px 15px; margin-bottom: 14px; }
.quiz .src { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); font-family: var(--mono); letter-spacing: .04em; }
.quiz .qq { font-family: var(--serif); font-size: 15.5px; line-height: 1.9; margin: 8px 0 10px; text-align: justify; }
.quiz .hint { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.opt {
  display: block; width: 100%; text-align: left; border: 1px solid var(--rule-2); border-radius: var(--r);
  padding: 9px 12px; margin-bottom: 6px; font-size: 13px; line-height: 1.7; background: transparent;
  transition: border-color .14s, background .14s;
}
.opt:hover { border-color: var(--brass); background: rgba(201,162,74,.06); }
.opt.sel { border-color: var(--brass); background: rgba(201,162,74,.12); }
.opt.right { border-color: var(--up); background: rgba(217,80,58,.12); }
.opt.wrong { border-color: var(--down); background: rgba(74,156,134,.10); }
.verdict-line { margin-top: 10px; font-size: 13px; line-height: 1.85; }
.verdict-line b { color: var(--brass-2); }
.why { margin-top: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.85; border-left: 2px solid var(--rule-2); padding-left: 10px; }

/* 回合日志（可折叠） */
.log { margin-top: 14px; }
.log details { border-top: 1px solid var(--rule); padding: 8px 0; }
.log summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); list-style: none; display: flex; gap: 8px; align-items: baseline; }
.log summary::-webkit-details-marker { display: none; }
.log summary .d { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.log summary .p { margin-left: auto; font-family: var(--mono); }
.log .body { font-size: 12px; color: var(--text-2); line-height: 1.85; padding: 6px 0 0; text-align: justify; }

/* 通用 */
.center { text-align: center; }
.mt { margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; border: 1px solid var(--rule-2); border-radius: 999px; padding: 1px 7px; color: var(--text-2); }
.tag.hot { border-color: rgba(217,80,58,.55); color: var(--up-2); }
