﻿:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --bg-accent: #d9e4d1;
  --surface: rgba(255, 252, 245, 0.92);
  --surface-strong: #fffdf8;
  --text: #22201b;
  --muted: #625d53;
  --line: rgba(34, 32, 27, 0.12);
  --brand: #1f6b52;
  --brand-soft: #d9efe6;
  --score-total: #204f3e;
  --score-tech: #9d5f19;
  --score-volume: #2a5676;
  --negative-strong: #b54343;
  --negative-soft: #8d6241;
  --positive-soft: #4e6f5e;
  --shadow: 0 18px 40px rgba(41, 46, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 228, 209, 0.95), transparent 36%),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 100%);
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.hero {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
}

.summary {
  max-width: 56rem;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.summary-ml {
  margin-top: 12px;
  font-size: 0.92rem;
}

.meta,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.meta div,
.stat-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--brand-soft);
}

.stat-card {
  border: 1px solid rgba(31, 107, 82, 0.08);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0;
}

.panel-note,
.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: end;
  gap: 12px;
}

.sort-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.sort-control select {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

thead th {
  position: sticky;
  top: 0;
  white-space: nowrap;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--surface-strong);
}

tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(217, 239, 230, 0.38);
}

.rank-chip,
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.rank-chip {
  background: #ece6d5;
}

.score-total {
  color: #fff;
  background: var(--score-total);
}

.score-tech {
  color: #fff;
  background: var(--score-tech);
}

.score-volume {
  color: #fff;
  background: var(--score-volume);
}

.mono {
  font-variant-numeric: tabular-nums;
  font-family: "Consolas", "SFMono-Regular", monospace;
}

.name-cell {
  min-width: 220px;
}

.negative-strong {
  color: var(--negative-strong);
  font-weight: 700;
}

.negative-soft {
  color: var(--negative-soft);
  font-weight: 700;
}

.positive-soft {
  color: var(--positive-soft);
}

@media (max-width: 720px) {
  .page {
    padding: 20px 14px 40px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .panel-header,
  .panel-actions {
    align-items: start;
  }

  h1 {
    font-size: 2rem;
  }

  thead th,
  tbody td {
    padding: 10px 8px;
  }
}
