:root {
  --bg: #120e08;
  --card: #1c160e;
  --line: rgba(226, 182, 87, .18);
  --text: #f7f1e4;
  --muted: rgba(247, 241, 228, .68);
  --gold: #e2b657;
  --up: #3ddc97;
  --down: #ff6b6b;
  --header: 60px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(226, 182, 87, .16), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(1080px, calc(100% - 28px)); margin: 0 auto; }
header {
  position: sticky; top: 0; z-index: 30;
  min-height: var(--header);
  background: rgba(18, 14, 8, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bar {
  width: min(1120px, calc(100% - 20px));
  margin: 0 auto;
  min-height: var(--header);
  display: flex; align-items: center; gap: 12px;
}
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a, .lang {
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}
.nav a.active, .nav a:hover, .lang[aria-pressed="true"] {
  color: #1a1408;
  background: var(--gold);
}
.tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.brand img { width: 22px; height: 22px; }
.menu {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
section { padding: 28px 0; scroll-margin-top: 72px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.02em; }
h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.kicker { margin: 0 0 6px; color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.sub, .lead { color: var(--muted); margin: 6px 0 0; }
.quote-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; }
.px { text-align: right; }
.px strong { display: block; font-size: clamp(32px, 5vw, 52px); line-height: 1; }
.px em { font-style: normal; font-weight: 700; }
.up { color: var(--up); }
.down { color: var(--down); }
.stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.stat span { display: block; color: var(--muted); font-size: 12px; }
.stat b { font-size: 18px; }
.chips, .periods, .tick-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip, .period {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}
.chip.on, .period.on { color: #1a1408; background: var(--gold); border-color: var(--gold); }
.tick-row { margin-bottom: 0; }
.live-note { margin: 8px 0 0; color: #2ec4d6; font-size: 13px; min-height: 1.2em; }
.chart-card {
  margin-top: 12px;
  background: #0c0a07;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}
canvas { width: 100%; display: block; }
.chart-light { background: #fff; border-color: #e4eef3; }
#intra { height: 340px; cursor: crosshair; background: #fff; }
#candles { height: 420px; }
@media (max-width: 800px) {
  #intra { height: 280px; }
  #candles { height: 360px; }
}
.boards { display: grid; gap: 14px; }
.boards article, form, .note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.boards h3 { margin: 0 0 8px; }
.table { display: grid; gap: 6px; }
.rowline {
  display: grid;
  grid-template-columns: 1.4fr .8fr .7fr;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background: transparent;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.rowline b { font-weight: 650; }
.rowline em { font-style: normal; text-align: right; }
form { display: grid; gap: 10px; max-width: 520px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
input, select {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  outline: none;
}
.btn {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  color: #1a1408;
  background: linear-gradient(120deg, #f8e7b0, #c8922a);
}
.result { min-height: 1.4em; color: var(--gold); font-weight: 700; }
.notes { display: grid; gap: 10px; }
.note h3 { margin: 0 0 6px; font-size: 18px; }
.note p { margin: 0; color: var(--muted); }
.note time { color: var(--gold); font-size: 12px; }
footer { border-top: 1px solid var(--line); padding: 22px 0 88px; color: var(--muted); }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { margin-right: 12px; }
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(18, 14, 8, .96);
  border-top: 1px solid var(--line);
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabbar a { color: var(--muted); font-size: 12px; padding: 6px; }
.tabbar a.active { color: var(--gold); }
@media (max-width: 800px) {
  .menu { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute; left: 10px; right: 10px; top: 60px;
    flex-direction: column;
    background: #1c160e;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
  }
  .nav.open { display: flex; }
  header { position: sticky; }
  .bar { position: relative; }
  .brand img { width: 18px; height: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .quote-head { flex-direction: column; align-items: flex-start; }
  .px { text-align: left; }
  .tools .lang { padding: 6px 7px; font-size: 12px; }
  .tabbar { display: flex; }
  body { padding-bottom: 64px; }
}
