:root {
  --line: #243854;
  --text: #eef4ff;
  --muted: #9fb0c9;
  --accent: #6eb3ff;
  --accent2: #8de0ff;

  --bg1: #06101d;
  --bg2: #0a1322;

  --panel1: rgba(18, 31, 50, 0.98);
  --panel2: rgba(13, 23, 38, 0.98);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --radius: 16px;
  --mobile: 390px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
}

body {
  min-height: 100vh;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: linear-gradient(180deg, var(--panel1), var(--panel2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar,
.hero,
.profile-grid,
.axes-grid,
.meta-grid,
.subscores {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: 1fr;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.topbar-detail {
  margin-bottom: 20px;
}

.hero {
  grid-template-columns: 1.3fr 0.9fr;
  margin-bottom: 20px;
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

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

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

.hero-main {
  padding: 22px;
}

.hero-side,
.summary-card,
.profile-card {
  padding: 18px;
}

.summary-card {
  margin-bottom: 20px;
}

.axes-group-card {
  margin-bottom: 20px;
  padding: 18px;
}

.title-list-card {
  padding: 18px;
}

.topbar-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.topbar-sub,
.muted,
.footnote,
.meta-label,
.score-den,
.subscore-label,
.evidence-meta,
.selector-label {
  color: var(--muted);
}

.title {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 8px;
}

.subtitle,
.summary-text,
.axis-summary,
.evidence-desc,
.counter-note {
  line-height: 1.8;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 12px;
}

.block-gap {
  margin: 10px 0 8px;
}

.selector {
  min-width: 240px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c1728;
  color: var(--text);
  padding: 0 12px;
}

.scope-list,
.simple-list {
  margin: 0;
  padding-left: 18px;
}

.scope-list li,
.simple-list li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.meta-item,
.subscore,
.evidence-item,
.score-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.meta-item,
.subscore,
.evidence-item {
  padding: 12px;
}

.score-box {
  min-width: 82px;
  padding: 10px 12px;
  text-align: center;
}

.loading,
.error-box {
  max-width: 700px;
  margin: 20px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel1), var(--panel2));
}

.error-box {
  color: #ffd7d7;
  white-space: pre-line;
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
    background: #07111d;
  }

  .page {
    width: 100%;
    max-width: var(--mobile);
    min-width: 360px;
    padding: 12px 10px 22px;
  }

  .hero,
  .profile-grid,
  .axes-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .title {
    font-size: 24px;
  }

  .section-title {
    font-size: 18px;
  }

  .topbar-title {
    font-size: 18px;
  }

  .hero-main,
  .hero-side,
  .summary-card,
  .profile-card,
  .title-list-card {
    padding: 14px;
  }

  .summary-card {
    margin-bottom: 14px;
  }

  .axes-group-card {
    margin-bottom: 14px;
    padding: 14px;
  }

  .selector {
    width: 100%;
    min-width: 0;
  }

  .subscores {
    gap: 8px;
  }

  .subscore {
    padding: 9px 10px;
  }
}