:root {
  color-scheme: light;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #1c2333;
  --ink-soft: #4a5468;
  --muted: #8a93a6;
  --line: #e7e2d9;
  --accent: #e8590c;
  --accent-soft: #fff1e8;
  --blue: #2563eb;
  --blue-soft: #eaf1fe;
  --green: #0f9d58;
  --green-soft: #e6f6ec;
  --navy: #14213d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 24px rgba(20, 33, 61, .06);
  --shadow-hover: 0 2px 4px rgba(20, 33, 61, .06), 0 16px 40px rgba(20, 33, 61, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-name { font-weight: 800; font-size: 1.15rem; margin: 0; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.site-name::before {
  content: "研"; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), #2b4a7f); color: #fff;
  font-size: .95rem; font-weight: 800;
  box-shadow: 0 4px 10px rgba(20, 33, 61, .25);
}
.site-name a { color: var(--ink); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- layout ---------- */
main { max-width: 880px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- hero ---------- */
.hero {
  margin: 28px -20px 8px; padding: 56px 40px 48px;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(232, 89, 12, .18), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(37, 99, 235, .14), transparent 60%),
    linear-gradient(160deg, #101c33, #1d2f52 55%, #274069);
  color: #fff; border-radius: 0 0 28px 28px;
}
.hero .eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .18em;
  color: #ffb98a; border: 1px solid rgba(255, 185, 138, .45); border-radius: 999px;
  padding: 3px 12px; margin: 0 0 18px;
}
.hero h1 { font-size: clamp(1.9rem, 5.2vw, 2.9rem); line-height: 1.35; margin: 0 0 16px; font-weight: 800; letter-spacing: .01em; }
.hero h1 .hl { color: #ffb98a; }
.hero p { color: #dbe4f3; max-width: 640px; margin: 0 0 14px; }
.hero .disclosure {
  display: inline-block; background: rgba(255, 255, 255, .12); color: #eaf0fa;
  font-size: .8rem; padding: 4px 12px; border-radius: 999px; margin-top: 6px;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-stats .stat {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px; padding: 10px 16px; min-width: 128px;
}
.hero-stats .num { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.3; color: #fff; }
.hero-stats .cap { font-size: .75rem; color: #aebbd2; }

/* ---------- sections & cards ---------- */
section { margin-top: 48px; }
section > h2, article h2 {
  font-size: 1.3rem; font-weight: 800; margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px;
}
section > h2::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent); flex: none;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #f0c9ae; }
.card .card-title { font-weight: 700; font-size: 1.02rem; line-height: 1.6; }
.card .card-desc { font-size: .88rem; color: var(--ink-soft); line-height: 1.7; flex: 1; }
.card .card-more { font-size: .85rem; font-weight: 700; color: var(--accent); }
.card.empty { align-items: flex-start; justify-content: center; color: var(--muted); border-style: dashed; box-shadow: none; font-size: .92rem; }

.tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  border-radius: 999px; padding: 3px 10px;
}
.tag-real { background: var(--accent-soft); color: var(--accent); }
.tag-research { background: var(--blue-soft); color: var(--blue); }
.tag-diary { background: var(--green-soft); color: var(--green); }

/* ---------- article pages ---------- */
article { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px 40px 48px; margin-top: 28px; box-shadow: var(--shadow); }
article h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.5; margin: 0 0 20px; font-weight: 800; }
article h2 { margin-top: 40px; border: none; padding: 0; }
article h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); flex: none; }
article p, article li { color: var(--ink-soft); }
article p strong, article li strong { color: var(--ink); }
.pr-note, .disclosure-note {
  font-size: .85rem; color: var(--ink-soft); background: var(--bg);
  border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px;
}
table.spec { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .92rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 16px 0; }
table.spec th, table.spec td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: none; }
table.spec th { background: #fbfaf7; font-weight: 700; color: var(--ink); white-space: nowrap; }
.kubo-comment {
  border: 1.5px solid var(--accent); border-radius: 14px; padding: 16px 20px; margin: 24px 0;
  background: var(--accent-soft);
}
.kubo-comment .label { font-weight: 800; color: var(--accent); font-size: .85rem; letter-spacing: .05em; }
.kubo-comment p { color: var(--ink); }
img { max-width: 100%; height: auto; border-radius: 12px; }

/* ---------- footer ---------- */
footer {
  margin-top: 64px; background: var(--navy); color: #c6d2e6;
  padding: 28px 24px; font-size: .85rem;
}
footer a { color: #ffb98a; text-decoration: none; }
footer p { max-width: 880px; margin: 0 auto; }

@media (max-width: 640px) {
  header { padding: 12px 16px; }
  .hero { padding: 40px 22px 36px; margin: 16px -12px 4px; }
  main { padding: 0 12px 48px; }
  article { padding: 26px 20px 34px; }
  nav a { padding: 5px 9px; font-size: .85rem; }
}
