:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #f6f9f8;
  --surface: #ffffff;
  --ink: #0b1220;
  --ink-soft: #243044;
  --muted: #687386;
  --line: #e5eaf0;
  --line-strong: #d2d9e3;
  --accent: #10b981;
  --accent-ink: #047857;
  --navy: #0b1220;
  --shadow-xs: 0 6px 18px rgba(11, 18, 32, 0.06);
  --shadow-sm: 0 10px 28px rgba(11, 18, 32, 0.08);
  --radius-sm: 12px;
  --radius-md: 16px;
  --font-sans: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(20px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.blog-footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand img {
  border-radius: 7px;
}

.brand-text {
  white-space: nowrap;
}

.brand-kana {
  font-weight: 700;
}

.site-nav {
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 8px 14px;
  color: var(--ink);
  background: #eef3f1;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.nav-cta:hover {
  color: var(--ink);
  background: var(--line);
}

.blog-hero {
  padding: 74px clamp(20px, 6vw, 72px) 46px;
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.08), transparent 48%),
    var(--paper);
}

.blog-hero-inner,
.blog-main,
.article-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.blog-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 42px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.9;
}

.hero-panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-panel strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.blog-main {
  padding: 54px 0 92px;
}

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

.article-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  min-height: 220px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.article-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.article-thumb {
  overflow: hidden;
  align-self: start;
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: var(--radius-sm);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-thumb img[src$=".svg"] {
  padding: 10px;
  object-fit: contain;
}

.article-card time,
.article-meta,
.article-kicker {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.article-card h2 {
  margin: 9px 0 10px;
  font-size: 1.22rem;
  line-height: 1.48;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.article-main {
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px;
  gap: 58px;
  padding: 58px 0 96px;
}

.article-content {
  min-width: 0;
}

.article-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
}

.mobile-break {
  display: none;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.article-cover {
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-direction: column;
  margin: 28px 0 36px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.08), transparent 38%),
    linear-gradient(180deg, var(--paper), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.article-cover img {
  display: block;
  width: min(100%, 390px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}

.article-cover.is-scene img {
  width: min(100%, 640px);
  border-radius: 18px;
}

.article-cover figcaption,
.article-inline-figure figcaption {
  max-width: 560px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
  text-align: center;
}

.article-inline-figure {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 30px 0 34px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.article-inline-figure img {
  display: block;
  width: min(100%, 340px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-xs);
}

.article-inline-figure.is-scene img {
  width: min(100%, 620px);
  border-radius: 18px;
}

.article-content h2 {
  margin: 42px 0 14px;
  font-size: 1.62rem;
  line-height: 1.45;
}

.article-content h3 {
  margin: 28px 0 10px;
  font-size: 1.18rem;
}

.article-content p,
.article-content li {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.95;
}

.article-content ul,
.article-content ol {
  margin: 12px 0 24px;
  padding-left: 1.35em;
}

.article-content p a {
  color: var(--accent-ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.article-content li + li {
  margin-top: 8px;
}

.article-summary {
  display: grid;
  gap: 12px;
  margin: 30px 0;
  padding: 20px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), var(--paper));
  border: 1px solid rgba(4, 120, 87, 0.2);
  border-radius: var(--radius-md);
}

.article-summary strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.article-summary ul {
  margin: 0;
}

.article-top-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 24px 0 30px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.08), transparent 42%),
    var(--surface);
  border: 1px solid rgba(4, 120, 87, 0.2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.article-top-cta span {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--accent-ink);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-top-cta strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.article-top-cta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.article-top-cta .app-store-badge-link {
  align-self: center;
  transition: transform 0.18s ease;
}

.article-top-cta .app-store-badge-link:hover {
  transform: translateY(-1px);
}

.article-step-list,
.metric-grid {
  display: grid;
  gap: 12px;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
}

.article-step-list {
  counter-reset: article-step;
}

.article-step-list li,
.metric-card {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.article-step-list li {
  position: relative;
  padding-left: 54px;
  counter-increment: article-step;
}

.article-step-list li::before {
  content: counter(article-step, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 900;
}

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

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

.metric-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.metric-card span + span {
  margin-top: 6px;
}

.term-note {
  margin: 32px 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.term-note > strong {
  display: block;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 1.06rem;
}

.term-note dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.term-note div {
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.term-note dt {
  margin-bottom: 6px;
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.term-note dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.note-box,
.article-cta,
.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.note-box {
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--paper);
}

.note-box p {
  margin: 0;
}

.note-box p + p {
  margin-top: 10px;
}

.note-box a {
  color: var(--accent-ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.rule-note {
  border-color: rgba(4, 120, 87, 0.22);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), var(--paper));
}

.source-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.article-cta {
  display: grid;
  gap: 16px;
  margin-top: 48px;
  padding: 26px;
  color: #f1f4f9;
  background: linear-gradient(180deg, #111c32, var(--navy));
}

.article-cta h2,
.article-cta p {
  margin: 0;
}

.article-cta p {
  color: rgba(241, 244, 249, 0.74);
}

.app-store-badge-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  line-height: 0;
}

.app-store-badge-link img {
  width: 163px;
  height: auto;
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 18px;
  background: var(--surface);
}

.toc strong {
  display: block;
  margin-bottom: 12px;
}

.toc a {
  display: block;
  padding: 9px 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  border-top: 1px solid var(--line);
}

.toc a:hover {
  color: var(--ink);
}

.related-list {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.related-list a {
  padding: 14px 16px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.article-return-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.article-return-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 900;
  text-align: center;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.article-return-nav a:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-strong);
}

.blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.blog-footer-links {
  flex-wrap: wrap;
  gap: 18px;
}

.blog-footer a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .blog-hero-inner,
  .article-main {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .blog-hero-inner,
  .blog-main,
  .article-main {
    width: min(350px, calc(100% - 40px));
    margin-right: auto;
    margin-left: 20px;
  }

  .site-header {
    gap: 10px;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    padding: 12px 20px;
  }

  .brand {
    min-width: 0;
  }

  .brand-text {
    overflow: hidden;
    font-size: 0.98rem;
    text-overflow: ellipsis;
  }

  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .site-nav {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
  }

  .nav-cta {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 0.82rem;
    line-height: 1;
    white-space: nowrap;
  }

  .brand-kana {
    display: none;
  }

  .blog-hero {
    padding-top: 48px;
  }

  .blog-hero h1 {
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: clamp(2rem, 8vw, 2.35rem);
    line-height: 1.14;
  }

  .hero-lead {
    max-width: 320px;
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: 1rem;
  }

  .hero-panel {
    display: none;
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .article-thumb {
    aspect-ratio: 16 / 9;
  }

  .article-main {
    gap: 28px;
    padding-top: 34px;
  }

  .article-cover,
  .article-inline-figure {
    padding: 14px;
  }

  .article-cover img,
  .article-inline-figure img {
    width: min(100%, 300px);
  }

  .article-header h1 {
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: clamp(1.72rem, 7.5vw, 2.05rem);
    line-height: 1.14;
  }

  .article-top-cta {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0 28px;
    padding: 15px;
  }

  .article-top-cta .app-store-badge-link {
    justify-self: start;
  }

  .term-note dl {
    grid-template-columns: 1fr;
  }

  .mobile-break {
    display: inline;
  }

  .article-content h2 {
    font-size: 1.42rem;
  }

  .blog-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-return-nav {
    grid-template-columns: 1fr;
  }
}
