:root {
  --bg: #f6f2ea;
  --ink: #121316;
  --muted: #6f6f76;
  --brand: #d46b1f;
  --brand-dark: #a85617;
  --teal: #1c8b82;
  --mint: #d6f5ef;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(18, 19, 22, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "DM Sans", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 520px;
  height: 520px;
  filter: blur(0px);
  opacity: 0.35;
  border-radius: 50%;
}

.glow-1 {
  background: radial-gradient(circle, rgba(212, 107, 31, 0.8), transparent 60%);
  top: -160px;
  left: -80px;
}

.glow-2 {
  background: radial-gradient(circle, rgba(28, 139, 130, 0.7), transparent 60%);
  bottom: -200px;
  right: -120px;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(18, 19, 22, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 19, 22, 0.04) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.6;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(246, 242, 234, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8vw;
  border-bottom: 1px solid rgba(18, 19, 22, 0.08);
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #f2b03b);
  color: white;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 1px;
}

.brand-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 20px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr);
  gap: 48px;
  padding: 64px 8vw 40px;
  align-items: center;
}

.hero-content h1 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2.4rem, 3vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--teal);
}

.hero-desc {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(28, 139, 130, 0.15);
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  padding: 12px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: linear-gradient(120deg, var(--brand), #f2b03b);
  color: white;
  box-shadow: 0 10px 20px rgba(212, 107, 31, 0.25);
}

.secondary-btn {
  background: white;
  color: var(--ink);
  border: 1px solid rgba(18, 19, 22, 0.12);
}

.ghost-btn {
  background: rgba(28, 139, 130, 0.1);
  color: var(--teal);
  padding: 8px 16px;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-card {
  background: var(--card);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(18, 19, 22, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-title {
  font-weight: 700;
  font-size: 16px;
}

.badge {
  background: var(--mint);
  color: var(--teal);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.card-body {
  display: grid;
  gap: 14px;
}

.stat {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--muted);
}

.stat strong {
  color: var(--ink);
  font-size: 18px;
}

.mini-line {
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(28, 139, 130, 0.15), rgba(212, 107, 31, 0.2));
}

.section {
  padding: 40px 8vw;
}

.section-title {
  margin-bottom: 24px;
}

.section-title h2 {
  font-size: 2rem;
  font-family: "Noto Serif SC", serif;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--muted);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  background: var(--card);
  padding: 28px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(18, 19, 22, 0.06);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(18, 19, 22, 0.12);
  font-size: 14px;
  font-family: inherit;
  background: #fffaf2;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(28, 139, 130, 0.3);
}

.full {
  grid-column: 1 / -1;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  background: var(--card);
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(18, 19, 22, 0.06);
  box-shadow: 0 12px 30px rgba(18, 19, 22, 0.08);
}

.panel h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.panel-note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pillar {
  background: #fff7eb;
  border: 1px solid rgba(212, 107, 31, 0.2);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-family: "Noto Serif SC", serif;
  color: var(--brand-dark);
}

.name-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.name-score strong {
  font-size: 2.4rem;
}

.bullet {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.bullet li::before {
  content: "◆";
  color: var(--brand);
  margin-right: 6px;
}

.elements {
  display: grid;
  gap: 10px;
}

.element-bar {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--muted);
}

.element-fill {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #f2b03b);
}

.trend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trend-card {
  background: #f9f7f2;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(18, 19, 22, 0.08);
}

.trend-card strong {
  font-size: 20px;
  display: block;
  margin-bottom: 6px;
}

.kline-wrap {
  background: var(--card);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(18, 19, 22, 0.06);
}

#kline-canvas {
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf7 0%, #f6f2ea 100%);
}

.kline-legend {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.legend-dot.rise {
  background: #1c8b82;
}

.legend-dot.fall {
  background: #d46b1f;
}

.legend-dot.neutral {
  background: #1f2d3d;
}

.site-footer {
  text-align: center;
  padding: 28px 8vw 40px;
  color: var(--muted);
  font-size: 14px;
}

.tip-card {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(18, 19, 22, 0.06);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.tip-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.tip-address {
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
  word-break: break-all;
}

.tip-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .input-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero,
  .section {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content,
.hero-card,
.section {
  animation: floatIn 0.6s ease;
}
