:root {
  --paper: #eef2fb;
  --card: #ffffff;
  --ink: #1c2434;
  --muted: #7b8494;
  --line: #e6ebf5;
  --blue: #3b82f6;
  --pink: #f4d4e4;
  --lilac: #ece4fb;
  --sky: #dce9ff;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Noto Sans SC", "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #f7fbff, var(--paper));
}

.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.watermark i {
  position: absolute;
  color: #8b94a7;
  opacity: 0.07;
  font-style: normal;
  font-size: 18px;
  white-space: nowrap;
  transform: rotate(-28deg);
}

.board {
  position: relative;
  z-index: 1;
  height: 100vh;
  padding: 14px 18px 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  box-sizing: border-box;
}

.topbar, .flow, .bottom {
  position: relative;
  z-index: 1;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-row { display: flex; align-items: center; gap: 14px; }
.logo {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(40, 70, 130, 0.06);
}
.logo.sub { color: #5b6b88; font-weight: 600; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.share {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}

.flow {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 320px 1fr;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  min-height: 0;
}
.rail, .orbit { position: relative; z-index: 1; }
.rail.left { grid-column: 1; grid-row: 1; }
.orbit { grid-column: 2; grid-row: 1; }
.rail.right { grid-column: 3; grid-row: 1; }
.rail { display: flex; flex-direction: column; gap: 8px; }
.rail.left { align-items: flex-start; }
.rail.right { align-items: flex-end; }
.rail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}
.chip {
  min-width: 210px;
  background: #fff;
  border-radius: 12px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(48, 72, 120, 0.06);
}
.chip b { font-size: 15px; }
.chip .name { display: flex; align-items: center; gap: 8px; }
.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
}

.orbit {
  display: grid;
  place-items: center;
  height: 100%;
}
.orbit svg { width: min(220px, 22vw); filter: drop-shadow(0 12px 30px rgba(236, 72, 153, 0.18)); }

.trend-bg {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  align-self: stretch;
  justify-self: stretch;
  min-width: 0;
  min-height: 0;
  z-index: 0;
  pointer-events: none;
}
.trend-bg canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.trend-bg-title {
  position: absolute;
  left: 12px;
  top: 0;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #7b8494;
}

.bottom {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 12px;
  min-height: 180px;
}
.panel {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(48, 72, 120, 0.06);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  flex: 1;
}
.stat {
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat.pink { background: var(--pink); }
.stat.lilac { background: var(--lilac); }
.stat.sky { background: var(--sky); grid-row: 1 / span 2; }
.stat .label { font-size: 13px; color: #4b5568; }
.stat .num { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: #6b7280; display: flex; gap: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: 100%; }

.words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: auto;
  align-content: flex-start;
}
.word {
  background: #f4f7ff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.nav-mini { position: fixed; right: 18px; bottom: 14px; z-index: 2; display: flex; gap: 10px; font-size: 12px; }
.nav-mini a { color: #64748b; text-decoration: none; }

.toast { position: fixed; top: 16px; right: 18px; background: #111827; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 12px; z-index: 3; }
