:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --secondary: #3B82F6;
  --accent: #EC4899;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --text: #111827;
  --text-soft: #6B7280;
  --text-muted: #9CA3AF;
  --line: #E5E7EB;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

.page {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.intro {
  position: sticky;
  top: 28px;
  height: calc(100vh - 56px);
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
}

.brand p {
  margin: 8px 0 0;
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

.lead {
  color: var(--text-soft);
  line-height: 1.8;
  margin: 28px 0;
}

.principles h2,
.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.principles ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.principles li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.principles span {
  display: block;
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 4px;
  line-height: 1.5;
}

.content {
  display: grid;
  gap: 24px;
}

.content > .panel {
  padding: 26px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.swatch div {
  height: 88px;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.swatch b,
.swatch code {
  display: block;
  font-size: 13px;
}

.swatch code {
  color: var(--text-soft);
  margin-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: var(--text-soft);
  font-weight: 700;
}

.h1 { font-size: 28px; font-weight: 700; }
.h2 { font-size: 22px; font-weight: 700; }
.h3 { font-size: 18px; font-weight: 600; }

.token-list {
  display: grid;
  gap: 12px;
}

.token-list div {
  display: grid;
  grid-template-columns: 28px 180px 120px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.token-list span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.token-list code {
  color: var(--text-soft);
}

.token-list em {
  color: var(--text-soft);
  font-style: normal;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.component-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}

.component-card h3 {
  margin: 0 0 16px;
}

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  margin-bottom: 12px;
  font-weight: 800;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn.secondary {
  background: #F3F4F6;
  color: var(--text);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
}

.post {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-head span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 2px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.post p {
  line-height: 1.7;
}

.tags {
  display: flex;
  gap: 12px;
}

.tags a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.actions {
  margin-top: 14px;
  color: var(--text-soft);
}

.match-card {
  background: #F8FAFC;
  border-radius: 18px;
  padding: 18px;
}

.score {
  color: var(--primary);
  font-size: 46px;
  font-weight: 900;
}

.wallet-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  color: white;
  padding: 20px;
}

.wallet-box span {
  display: block;
  opacity: .8;
  margin-bottom: 10px;
}

.wallet-box b {
  display: block;
  font-size: 28px;
}

.wallet-box p {
  opacity: .8;
}

.rules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.rules div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.rules b {
  color: var(--primary);
  display: block;
  font-size: 18px;
}

.rules span {
  color: var(--text-soft);
  font-size: 13px;
}

.phone {
  max-width: 390px;
  margin: 0 auto;
  border: 10px solid #111827;
  border-radius: 42px;
  overflow: hidden;
  background: white;
  box-shadow: 0 24px 70px rgba(15,23,42,.18);
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
}

.phone-top img {
  width: 28px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 70px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.tabs b {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  padding-bottom: 12px;
}

.tabs span {
  color: var(--text-soft);
}

.mobile-post {
  padding: 18px;
}

.mobile-chart {
  height: 150px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  margin: 14px 0;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px 8px;
  color: var(--text-soft);
  font-size: 12px;
  text-align: center;
}

.bottom-nav b {
  background: var(--text);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  font-size: 22px;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .intro {
    position: static;
    height: auto;
  }

  .swatch-grid,
  .component-grid,
  .rules {
    grid-template-columns: repeat(2, 1fr);
  }

  .token-list div {
    grid-template-columns: 28px 1fr;
  }

  .token-list code,
  .token-list em {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .swatch-grid,
  .component-grid,
  .rules {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }
}
