:root {
  --bg: #f4efe4;
  --panel: rgba(255, 250, 243, 0.92);
  --line: rgba(92, 71, 46, 0.14);
  --text: #2e2418;
  --muted: #70604b;
  --accent: #0f766e;
  --accent-soft: #d6f2ee;
  --warn: #9a3412;
  --shadow: 0 24px 80px rgba(61, 41, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 28rem),
    linear-gradient(135deg, #f4efe4 0%, #eadcc8 48%, #d5d9cc 100%);
  color: var(--text);
  font-family: "Nanum Gothic", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.34;
  pointer-events: none;
}

.bg-shape-a {
  top: 3rem;
  right: 8rem;
  width: 16rem;
  height: 16rem;
  background: #e0b97f;
}

.bg-shape-b {
  bottom: 4rem;
  left: 6rem;
  width: 14rem;
  height: 14rem;
  background: #78c8bd;
}

.layout {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.hero {
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 100%;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.board,
.report-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.board {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.board-head,
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.board-head h2,
.report-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.refresh-button,
.tab {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.refresh-button {
  padding: 0.7rem 1rem;
  background: var(--text);
  color: white;
}

.tabs {
  display: inline-flex;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(71, 52, 31, 0.08);
}

.tab {
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.is-active {
  background: white;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(47, 36, 24, 0.12);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.result-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(59, 42, 20, 0.12);
  border-color: rgba(15, 118, 110, 0.22);
}

.result-card.is-selected {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.18);
}

.result-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.result-code {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.stance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  margin-top: 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.stance-strong_bullish,
.stance-bullish {
  background: #dcfce7;
  color: #166534;
}

.stance-neutral {
  background: #f3f4f6;
  color: #374151;
}

.stance-bearish,
.stance-strong_bearish {
  background: #ffedd5;
  color: var(--warn);
}

.result-score,
.result-summary {
  margin: 0.8rem 0 0;
  font-size: 0.92rem;
}

.result-summary {
  color: var(--muted);
  line-height: 1.55;
}

.report-panel {
  padding: 1.25rem;
}

.report-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.report-content {
  margin: 1rem 0 0;
  min-height: 24rem;
  padding: 1.2rem;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(43, 30, 15, 0.94);
  color: #f8f3ea;
  font-family: "Nanum Gothic", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .layout {
    padding: 2rem 1rem 3rem;
  }

  .board-head,
  .report-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}
