:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #fff;
  --panel-2: #f9fafc;
  --line: #dfe4ec;
  --text: #172033;
  --muted: #5b6679;
  --blue: #086fa8;
  --coral: #d54d3f;
  --yellow: #a96b00;
  --green: #147554;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(25, 110, 180, 0.07), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(213, 77, 63, 0.06), transparent 25rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.85;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner,
.site-footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  text-decoration: none;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 21px;
  letter-spacing: 0.05em;
}

.wordmark span {
  color: var(--coral);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.header-nav a {
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--text);
}

.header-play {
  border: 1px solid rgba(213, 77, 63, 0.36);
  border-radius: 8px;
  padding: 8px 14px;
  background: rgba(213, 77, 63, 0.08);
  color: #a3332a !important;
}

.guide-hero,
.article-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.guide-hero::after,
.article-hero::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(8, 111, 168, 0.12);
  border-radius: 40%;
  box-shadow:
    0 0 0 38px rgba(8, 111, 168, 0.025),
    0 0 0 76px rgba(8, 111, 168, 0.018);
  content: "";
  transform: rotate(16deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0 84px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
h3 {
  line-height: 1.35;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: -0.045em;
}

.article-hero h1 {
  font-size: clamp(32px, 5vw, 60px);
}

.hero-lead {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: #8694b5;
  font-size: 13px;
}

.accent {
  color: var(--coral);
}

.guide-main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  margin-bottom: 64px;
}

.intro-copy,
.quick-start,
.guide-card,
.article-body,
.article-toc {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 50px rgba(34, 47, 68, 0.08);
}

.intro-copy,
.quick-start {
  padding: 30px;
}

.intro-copy h2,
.quick-start h2 {
  margin-top: 0;
  font-size: 22px;
}

.intro-copy p,
.quick-start p {
  color: var(--muted);
}

.quick-start ol {
  margin: 18px 0 0;
  padding-left: 1.4em;
}

.quick-start li + li {
  margin-top: 8px;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.guide-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 26px;
}

.guide-card-number {
  color: var(--yellow);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.guide-card h2 {
  margin: 14px 0 12px;
  font-size: 24px;
}

.guide-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.guide-card a {
  margin-top: auto;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.guide-card a:hover {
  text-decoration: underline;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 28px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 100px;
}

.article-body {
  padding: clamp(26px, 5vw, 58px);
}

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

.article-body h2 {
  margin: 62px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(25px, 3.4vw, 34px);
}

.article-body h3 {
  margin: 36px 0 12px;
  color: #27344b;
  font-size: 20px;
}

.article-body p,
.article-body li {
  color: #3f4b60;
}

.article-body strong {
  color: var(--text);
}

.article-body a:not(.cta-button) {
  color: var(--blue);
  text-underline-offset: 3px;
}

.article-body code {
  border: 1px solid #d9dee7;
  border-radius: 4px;
  padding: 0.08em 0.38em;
  background: #f1f3f6;
  color: #933c32;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body li + li {
  margin-top: 9px;
}

.lead-box,
.tip,
.warning,
.source-note {
  margin: 28px 0;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 20px 22px;
  background: #eef7fb;
}

.lead-box {
  font-size: 17px;
}

.tip {
  border-left-color: var(--green);
  background: #edf8f3;
}

.warning {
  border-left-color: var(--yellow);
  background: #fff8e7;
}

.source-note {
  border-left-color: #8490ad;
  background: #f2f4f7;
  font-size: 14px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
  padding: 0 !important;
  list-style: none;
}

.check-grid li {
  margin: 0 !important;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 16px 15px 42px;
  background: #fafbfc;
  position: relative;
}

.check-grid li::before {
  position: absolute;
  left: 16px;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.table-wrap {
  margin: 26px 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 15px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  background: #edf6fb;
}

td {
  color: #3f4b60;
}

.practice-plan {
  counter-reset: plan;
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0 !important;
  list-style: none;
}

.practice-plan li {
  counter-increment: plan;
  position: relative;
  min-height: 58px;
  margin: 0 !important;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 14px 64px;
}

.practice-plan li::before {
  position: absolute;
  top: 13px;
  left: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: rgba(213, 77, 63, 0.1);
  color: var(--coral);
  content: counter(plan);
  font-weight: 900;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 26px 0;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: #fafbfc;
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.mini-card p {
  margin: 0;
  font-size: 14px;
}

.worksheet {
  margin: 28px 0;
  border: 1px solid #cdd5e1;
  border-radius: 12px;
  padding: 24px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(0deg, transparent, transparent 29px, #e9edf2 30px) border-box;
}

.worksheet h3 {
  margin-top: 0;
}

.worksheet-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  border-bottom: 1px dashed #d9dfe7;
  padding: 10px 0;
}

.worksheet-row:last-child {
  border-bottom: 0;
}

.worksheet-label {
  color: #667286;
  font-size: 13px;
  font-weight: 800;
}

.key-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(80px, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.key-map div {
  border: 1px solid #d9dfe7;
  border-bottom-width: 3px;
  border-radius: 8px;
  padding: 12px 8px;
  background: #fff;
  color: #3f4b60;
  font-size: 12px;
  text-align: center;
}

.key-map strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
}

.practice-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 28px;
}

.practice-words span {
  border: 1px solid #d9dfe7;
  border-radius: 999px;
  padding: 6px 11px;
  background: #fff;
  color: #344055;
  font-size: 13px;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.faq details p {
  margin-bottom: 0;
}

.article-toc {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.article-toc p {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.3em;
}

.article-toc li + li {
  margin-top: 10px;
}

.article-toc a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

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

.article-cta {
  margin-top: 58px;
  border: 1px solid rgba(213, 77, 63, 0.25);
  border-radius: 14px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(213, 77, 63, 0.07), rgba(8, 111, 168, 0.05)),
    var(--panel);
  text-align: center;
}

.article-cta h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.article-cta p {
  margin: 0 auto 22px;
}

.cta-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 24px;
  background: var(--coral);
  box-shadow: 0 5px 0 #a94438;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(1px);
  box-shadow: 0 4px 0 #a94438;
}

.related {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.related a {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fafbfc;
  text-decoration: none !important;
}

.related a:hover {
  border-color: rgba(8, 111, 168, 0.45);
}

.related small {
  display: block;
  margin-bottom: 5px;
  color: #68758b;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #eceff3;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
  color: #667286;
  font-size: 12px;
}

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

.footer-links a {
  text-decoration: none;
}

@media (max-width: 820px) {
  .header-nav a:not(.header-play) {
    display: none;
  }

  .hero-inner {
    padding: 70px 0 60px;
  }

  .intro-grid,
  .guide-list,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    grid-row: 1;
  }

  .article-body {
    grid-row: 2;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .site-footer-inner,
  .hero-inner,
  .guide-main,
  .article-layout {
    width: min(100% - 28px, var(--max));
  }

  .header-inner {
    min-height: 60px;
  }

  .wordmark {
    font-size: 18px;
  }

  .header-play {
    padding: 7px 10px;
    font-size: 12px;
  }

  .hero-inner {
    padding: 58px 0 48px;
  }

  .guide-main,
  .article-layout {
    padding-top: 34px;
  }

  .article-body,
  .intro-copy,
  .quick-start,
  .guide-card {
    border-radius: 12px;
  }

  .check-grid,
  .related,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .key-map {
    grid-template-columns: repeat(2, 1fr);
  }

  .worksheet-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  th,
  td {
    min-width: 130px;
    padding: 11px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
