:root {
  --bg: #fff7de;
  --paper: #fffdf7;
  --ink: #243042;
  --muted: #697386;
  --line: #eadfc6;
  --red: #f45b69;
  --blue: #37a2ff;
  --green: #35c998;
  --yellow: #ffd166;
  --purple: #8a6df1;
  --shadow: 0 14px 0 #243042;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18px 18px, rgba(244, 91, 105, 0.15) 0 4px, transparent 5px),
    linear-gradient(135deg, #fff7de 0%, #f0fbff 48%, #fff0f3 100%);
  background-size: 34px 34px, auto;
  font-family:
    "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 56px);
  background: rgba(255, 253, 247, 0.9);
  border-bottom: 3px solid var(--ink);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 3px 0 var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--ink);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: center;
  gap: clamp(20px, 5vw, 56px);
  width: min(100% - 32px, 1060px);
  margin: clamp(24px, 5vw, 48px) auto 0;
  padding: clamp(26px, 6vw, 64px);
  background:
    linear-gradient(135deg, rgba(55, 162, 255, 0.14), transparent 45%),
    linear-gradient(315deg, rgba(244, 91, 105, 0.12), transparent 48%),
    var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 11ch;
  margin: 0 0 18px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 660px;
  color: #344156;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 650;
}

.hero-copy a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 16px 8px 0 0;
  padding: 0 16px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink);
}

.hero-copy a:first-of-type {
  background: var(--yellow);
}

.hero-parameter-link {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(100%, 390px);
  color: inherit;
  border-radius: 18px;
  text-decoration: none;
}

.hero-parameter {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: clamp(14px, 2.8vw, 22px);
  margin: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 42%),
    linear-gradient(135deg, #edfff5 0%, #c9f7de 48%, #9fe9c4 100%);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 8px 0 var(--ink);
}

.hero-parameter-link:hover .hero-parameter,
.hero-parameter-link:focus-visible .hero-parameter {
  transform: translateY(2px);
  box-shadow: 0 6px 0 var(--ink);
}

.hero-parameter-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 6px;
}

.hero-parameter figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.hero-parameter figcaption span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.hero-parameter figcaption strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.radar-chart {
  display: block;
  width: 100%;
  overflow: visible;
}

.radar-grid polygon {
  fill: rgba(255, 255, 255, 0.36);
  stroke: rgba(36, 48, 66, 0.18);
  stroke-width: 2;
}

.radar-grid .radar-grid-outer {
  stroke: var(--ink);
  stroke-width: 3;
}

.radar-axis line {
  stroke: rgba(36, 48, 66, 0.16);
  stroke-linecap: round;
  stroke-width: 2;
}

.radar-area {
  fill: rgba(55, 162, 255, 0.24);
  stroke: var(--blue);
  stroke-linejoin: round;
  stroke-width: 5;
}

.radar-points circle {
  fill: #ffffff;
  stroke: var(--blue);
  stroke-width: 3;
}

.radar-labels text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(238, 255, 245, 0.94);
  stroke-linejoin: round;
  stroke-width: 6;
}

.radar-label-value {
  fill: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.news-shell {
  width: min(100% - 32px, 1060px);
  margin: clamp(34px, 6vw, 64px) auto 0;
}

.news-board {
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 8px 0 var(--ink);
}

.news-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 24px);
  color: #ffffff;
  background: #65706c;
  border-bottom: 3px solid var(--ink);
}

.news-board-head h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.1;
  font-weight: 900;
}

.news-board-head a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.news-list {
  display: grid;
  max-height: 250px;
  overflow-y: auto;
  padding: 12px clamp(14px, 3vw, 22px);
  scrollbar-color: rgba(36, 48, 66, 0.42) rgba(36, 48, 66, 0.08);
}

.news-item {
  display: grid;
  grid-template-columns: 94px 108px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  color: var(--ink);
  border-bottom: 1px dotted rgba(36, 48, 66, 0.36);
  text-decoration: none;
}

.news-item:hover .news-text,
.news-item:focus-visible .news-text {
  color: #176eb6;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.news-item:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  color: #ffffff;
  background: #65706c;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.news-date {
  color: #8a96a3;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.news-text {
  min-width: 0;
  color: #344156;
  font-size: 15px;
  font-weight: 750;
}

.portal-shell {
  width: min(100% - 32px, 1060px);
  margin: clamp(42px, 7vw, 80px) auto clamp(64px, 9vw, 112px);
}

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

.portal-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
}

.portal-title-label {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.95;
}

.search-box {
  display: grid;
  gap: 6px;
  width: min(100%, 360px);
  padding: 14px;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 6px 0 var(--ink);
}

.search-box label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: #fffdf7;
  border: 2px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
}

.search-box input:focus {
  border-color: var(--blue);
  outline: none;
}

.search-box p {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.shortcut-card,
.content-card,
.child-card {
  position: relative;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 7px 0 var(--ink);
}

.shortcut-card,
.child-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 106px;
  padding: 18px;
  text-decoration: none;
}

.shortcut-card:hover,
.shortcut-card:focus-visible,
.child-card:hover,
.child-card:focus-visible {
  transform: translateY(2px);
  box-shadow: 0 5px 0 var(--ink);
  outline: none;
}

.shortcut-card::after,
.child-card::after {
  position: absolute;
  right: 18px;
  top: 18px;
  content: "OPEN";
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.shortcut-card img,
.child-card img,
.card-icon img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.shortcut-card:nth-child(4n + 1),
.child-card:nth-child(4n + 1) {
  background: #ecfbff;
}

.shortcut-card:nth-child(4n + 2),
.child-card:nth-child(4n + 2) {
  background: #fff1f3;
}

.shortcut-card:nth-child(4n + 3),
.child-card:nth-child(4n + 3) {
  background: #f1fff8;
}

.shortcut-card:nth-child(4n + 4),
.child-card:nth-child(4n + 4) {
  background: #fff8d8;
}

.shortcut-card strong,
.child-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.shortcut-card span,
.child-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.content-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: clamp(18px, 3vw, 26px);
  scroll-margin-top: 98px;
}

.card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 15px;
  box-shadow: 0 4px 0 var(--ink);
}

.content-card:nth-child(4n + 1) .card-icon {
  background: #dff7ff;
}

.content-card:nth-child(4n + 2) .card-icon {
  background: #ffe1e6;
}

.content-card:nth-child(4n + 3) .card-icon {
  background: #e2fff1;
}

.content-card:nth-child(4n + 4) .card-icon {
  background: #fff4b8;
}

.page-shell {
  width: min(100% - 32px, 960px);
  margin: clamp(24px, 5vw, 48px) auto clamp(64px, 9vw, 112px);
}

.page-hero,
.page-card {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 0 var(--ink);
}

.page-hero {
  position: relative;
  padding: clamp(20px, 4vw, 40px);
  overflow: hidden;
}

.page-hero::after {
  position: absolute;
  right: clamp(20px, 4vw, 46px);
  top: clamp(20px, 4vw, 36px);
  width: 88px;
  height: 18px;
  content: "";
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
}

.page-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

#page-lead {
  max-width: 680px;
  margin: 14px 0 0;
  color: #344156;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 18px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  background: var(--yellow);
}

.page-card {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 42px);
}

.parameter-detail-panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: clamp(20px, 4vw, 38px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 40%),
    linear-gradient(135deg, #edfff5 0%, #c9f7de 48%, #9fe9c4 100%);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 0 var(--ink);
  overflow: hidden;
}

.parameter-detail-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.parameter-detail-head h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
}

.parameter-detail-chart {
  width: min(100%, 680px);
}

.parameter-history-panel {
  display: grid;
  gap: 22px;
  margin-top: 22px;
  padding: clamp(20px, 4vw, 38px);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 0 var(--ink);
}

.parameter-history-grid {
  display: grid;
  gap: 24px;
}

.parameter-history-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.parameter-history-card h3 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.1;
}

.parameter-trend-chart {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.parameter-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.parameter-trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.parameter-trend-legend-item::before {
  width: 14px;
  height: 14px;
  content: "";
  background: var(--parameter-color);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

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

.parameter-trend-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.parameter-trend-label {
  display: grid;
  gap: 2px;
}

.parameter-trend-label strong {
  line-height: 1.2;
}

.parameter-trend-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.parameter-trend-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.parameter-trend-track {
  display: flex;
  align-items: stretch;
  min-height: 24px;
  overflow: hidden;
  background: rgba(36, 48, 66, 0.08);
  border: 2px solid rgba(36, 48, 66, 0.22);
  border-radius: 999px;
}

.parameter-trend-segment {
  min-width: 12px;
  background: var(--parameter-color);
  border-right: 2px solid rgba(36, 48, 66, 0.2);
}

.parameter-trend-segment.is-negative {
  background: repeating-linear-gradient(
    135deg,
    #f45b69 0 7px,
    #ff9aa5 7px 14px
  );
}

.parameter-trend-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.parameter-trend-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(36, 48, 66, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.parameter-trend-value::before {
  width: 9px;
  height: 9px;
  content: "";
  background: var(--parameter-color);
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.parameter-trend-value.is-negative::before {
  background: #f45b69;
}

.parameter-knowledge {
  --parameter-color: #37a2ff;
}

.parameter-research {
  --parameter-color: #8a6df1;
}

.parameter-fitness {
  --parameter-color: #35c998;
}

.parameter-lifeRhythm {
  --parameter-color: #ffd166;
}

.parameter-curiosity {
  --parameter-color: #f45b69;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 900;
}

.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  text-decoration: none;
}

.breadcrumbs span {
  background: var(--yellow);
}

.child-section {
  margin-top: clamp(32px, 5vw, 56px);
}

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

.markdown-body {
  min-width: 0;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: inherit;
  line-height: 1.12;
  letter-spacing: 0;
}

.content-card .markdown-body h1,
.page-card h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
}

.markdown-body h2 {
  margin: 26px 0 10px;
  font-size: 22px;
}

.markdown-body h3 {
  margin: 22px 0 8px;
  font-size: 18px;
}

.markdown-body p,
.markdown-body li {
  color: #354157;
  font-size: 16px;
}

.markdown-body ul,
.markdown-body ol {
  display: grid;
  gap: 6px;
  padding-left: 1.25rem;
}

.markdown-body strong {
  color: var(--ink);
}

.markdown-body code {
  padding: 0.12em 0.34em;
  color: #9b2531;
  background: #fff1f3;
  border: 1px solid #ffc9d0;
  border-radius: 6px;
  font-size: 0.9em;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 16px;
  color: #f7fafc;
  background: #243042;
  border-radius: 12px;
}

.markdown-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.markdown-body blockquote {
  margin: 18px 0;
  padding: 8px 0 8px 16px;
  background: #fff8d8;
  border-left: 5px solid var(--yellow);
}

.markdown-body a {
  color: #176eb6;
  font-weight: 850;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: #fff8d8;
  font-size: 14px;
}

.is-hidden {
  display: none;
}

.loading-message,
.error-message,
.empty-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.error-message {
  padding: 18px;
  color: #8a1f0d;
  background: #fff1f3;
  border: 2px solid #ffc9d0;
  border-radius: 12px;
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: clamp(12px, 4vw, 24px);
    box-shadow: 0 9px 0 var(--ink);
  }

  .hero-parameter-link {
    width: min(100%, 340px);
    justify-self: center;
  }

  .hero-parameter figcaption {
    align-items: start;
    display: grid;
    gap: 5px;
  }

  .hero-parameter figcaption strong {
    font-size: 20px;
    white-space: nowrap;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 11vw, 64px);
  }

  .portal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
    padding: 12px 0;
  }

  .news-tag {
    justify-self: start;
  }

  .parameter-detail-head {
    align-items: start;
    display: grid;
    gap: 4px;
  }

  .parameter-trend-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .shortcut-grid,
  .content-grid,
  .child-grid {
    grid-template-columns: 1fr;
  }

  .page-hero::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
