:root {
  --paper: #f2f4ee;
  --paper-deep: #e1e7da;
  --surface: #ffffff;
  --ink: #24302a;
  --ink-soft: #66705f;
  --accent: #3f6b52;
  --accent-deep: #2d4d3b;
  --accent-tint: #dde8dd;
  --line: #cdd6c5;
  --shadow-soft: 0 8px 22px rgba(30, 40, 25, 0.08);
  --shadow-lift: 0 14px 30px rgba(30, 40, 25, 0.12);

  --tag-tiny-wonders: #c98a2e;
  --tag-mbti: #b892ff;
  --tag-kokuyo: #8a6fd6;
  --tag-aisho: #d67ab8;
  --tag-lovechar: #ef6b96;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1c211d;
    --paper-deep: #262c24;
    --surface: #23281f;
    --ink: #e7ece2;
    --ink-soft: #a3ad97;
    --accent: #8fc6a4;
    --accent-deep: #b6dcc2;
    --accent-tint: #2c3a2d;
    --line: #3a4636;
    --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 16px 34px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --paper: #1c211d;
  --paper-deep: #262c24;
  --surface: #23281f;
  --ink: #e7ece2;
  --ink-soft: #a3ad97;
  --accent: #8fc6a4;
  --accent-deep: #b6dcc2;
  --accent-tint: #2c3a2d;
  --line: #3a4636;
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 16px 34px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

#app {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.hero {
  text-align: center;
  margin-bottom: 48px;
}

.brand-mark {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.hero h1 {
  font-family: "Klee One", "Noto Sans JP", sans-serif;
  font-weight: 600;
  font-size: 2.2rem;
  margin: 0 0 16px;
  color: var(--ink);
  text-wrap: balance;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 auto;
  max-width: 34em;
}

.lead-en {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.85;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .lab-grid { grid-template-columns: 1fr; }
}

.lab-card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lab-card:hover,
.lab-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.card-tag {
  position: absolute;
  top: 0;
  left: 22px;
  width: 34px;
  height: 8px;
  border-radius: 0 0 4px 4px;
}
.lab-card[data-tag="tiny-wonders"] .card-tag { background: var(--tag-tiny-wonders); }
.lab-card[data-tag="mbti"] .card-tag { background: var(--tag-mbti); }
.lab-card[data-tag="kokuyo"] .card-tag { background: var(--tag-kokuyo); }
.lab-card[data-tag="aisho"] .card-tag { background: var(--tag-aisho); }
.lab-card[data-tag="lovechar"] .card-tag { background: var(--tag-lovechar); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-deep);
  margin-bottom: 14px;
}
.card-icon svg { width: 22px; height: 22px; }

.lab-card h2 {
  font-family: "Klee One", "Noto Sans JP", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.card-tagline {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.tagline-en {
  font-size: 0.78rem;
  font-style: italic;
  opacity: 0.85;
}

.card-url {
  font-size: 0.76rem;
  color: var(--accent-deep);
  margin: 0;
  word-break: break-all;
}

.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.site-footer p { margin: 0 0 4px; }

.footer-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.footer-links a {
  color: var(--accent-deep);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
