:root {
  --ink: #17211f;
  --ink-soft: #45514e;
  --paper: #f3f2ec;
  --paper-deep: #e9e7df;
  --white: #fffefa;
  --line: #d7d7cf;
  --green: #1fad68;
  --green-soft: #d8f3e4;
  --red: #e65347;
  --red-soft: #fde0dd;
  --violet: #7958d7;
  --violet-soft: #e9e2fb;
  --orange: #ef805d;
  --amber: #f2a114;
  --amber-soft: #fbebc9;
  --shadow: 0 20px 60px rgba(31, 39, 37, 0.1);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 12%, rgba(239, 128, 93, 0.08), transparent 28rem),
    var(--paper);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  width: min(1200px, calc(100% - 48px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid rgba(23, 33, 31, 0.11);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  letter-spacing: 0.13em;
  font-weight: 650;
}

.brand b {
  color: var(--orange);
  font-weight: 850;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  box-shadow: 0 6px 16px rgba(23, 33, 31, 0.18);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 22px;
  fill: none;
  stroke: white;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--white);
}

.lang-switch a {
  padding: 6px 12px;
  border-radius: 100px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.lang-switch a.active {
  color: white;
  background: var(--ink);
}

.header-link {
  height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c9cbc6;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
  background: var(--white);
  transition: 150ms ease;
}

.header-link:hover {
  border-color: var(--orange);
  background: #fff8f4;
}

.header-link svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  padding: 76px 0 64px;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.hero h1 em {
  color: var(--orange);
  font-style: normal;
}

.kanji-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.lead {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 780;
  border: 1px solid transparent;
  transition: 160ms ease;
}

.btn svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  color: white;
  background: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 33, 31, 0.17);
}

.btn-primary:hover {
  background: #26322f;
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--ink);
  background: var(--white);
  border-color: #c9cbc6;
}

.btn-secondary:hover {
  border-color: var(--orange);
  background: #fff8f4;
}

.hero-figure {
  padding: 12px;
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 22px;
  background: rgba(255, 254, 250, 0.92);
  box-shadow: var(--shadow);
}

.hero-figure img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.hero-figure figcaption {
  margin: 14px 6px 4px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 650;
}

.section-head p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.7);
}

.feature-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 10px;
  color: var(--orange);
  background: rgba(239, 128, 93, 0.12);
}

.feature-icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 780;
}

.feature-card p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.quickstart-grid {
  display: grid;
  gap: 18px;
}

.qs-card {
  padding: 22px 24px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.7);
}

.qs-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 780;
}

.qs-card p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.api-table-title {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 780;
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.6;
}

.api-table th,
.api-table td {
  padding: 7px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.api-table th {
  background: rgba(23, 33, 31, 0.05);
  font-weight: 700;
}

.api-table td {
  color: var(--ink-soft);
}

.api-note {
  margin-top: 10px;
}

pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #eef4f0;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
}

pre code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}

.code-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 28px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  transition: 140ms ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.copy-btn svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qs-note {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.qs-note code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(23, 33, 31, 0.08);
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px;
}

.library-example pre {
  margin-top: 4px;
}

.license-body {
  max-width: 720px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.license-body p {
  margin: 0 0 14px;
}

.license-body code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--paper-deep);
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12.5px;
}

.credits {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.credits a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

footer {
  width: min(1200px, calc(100% - 48px));
  margin: 20px auto 0;
  padding: 28px 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: #7e8783;
  font-size: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }
}

@media (max-width: 620px) {
  .site-header {
    justify-content: center;
    text-align: center;
  }

  .header-actions {
    justify-content: center;
  }

  .hero {
    padding: 40px 0 48px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }
}

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