:root {
  --ink: #25313a;
  --muted: #68747b;
  --paper: #fff;
  --canvas: #f4f2ed;
  --line: #ddd9cf;
  --accent: #d65b42;
  --accent-dark: #a83f2b;
  --accent-soft: #fff1eb;
  --green: #287262;
  --green-soft: #eaf5f1;
  --yellow: #fff7d8;
  --shadow: 0 14px 36px rgba(37, 49, 58, .1);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; line-height: 1.85; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #1677c8; outline-offset: 3px; }

.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 8px 14px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.header-inner { max-width: 1200px; height: 64px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.site-name { color: var(--ink); font: 800 .78rem/1.2 Arial, sans-serif; letter-spacing: .16em; text-decoration: none; }
.header-note { color: var(--muted); font-size: .78rem; }

.hero { color: #fff; background: var(--ink); overflow: hidden; }
.hero-inner { position: relative; max-width: 1200px; margin: auto; padding: 88px 28px 92px; }
.hero-inner::after { content: ""; position: absolute; right: -70px; bottom: -190px; width: 480px; height: 480px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.025); }
.eyebrow, .section-label { margin: 0 0 16px; color: #f0a690; font: 800 .78rem/1.2 Arial, sans-serif; letter-spacing: .18em; }
.hero h1 { position: relative; z-index: 1; max-width: 800px; margin: 0; font-size: clamp(2.25rem, 5.4vw, 4.75rem); line-height: 1.23; letter-spacing: .02em; }
.hero h1::after { content: ""; display: block; width: 76px; height: 5px; margin-top: 30px; background: var(--accent); }
.hero-lead { position: relative; z-index: 1; max-width: 700px; margin: 28px 0 0; color: #dce1e3; font-size: 1.05rem; }
.hero-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.hero-meta span { padding: 5px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: #eef1f2; font-size: .78rem; }

.layout { max-width: 1200px; margin: 0 auto; padding: 72px 28px 100px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; }
.toc-inner { position: sticky; top: 92px; }
.toc-title { margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-weight: 800; letter-spacing: .08em; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 7px 4px; color: var(--muted); font-size: .78rem; line-height: 1.45; text-decoration: none; border-left: 2px solid transparent; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: #a2a8aa; font: 700 .68rem/1.7 Arial, sans-serif; }
.toc a:hover, .toc a.active { color: var(--accent-dark); border-left-color: var(--accent); background: var(--accent-soft); }

.content { min-width: 0; }
.intro, .step, .finish { margin-bottom: 24px; padding: clamp(30px, 5vw, 58px); background: var(--paper); border: 1px solid var(--line); }
.intro { border-top: 5px solid var(--accent); }
.intro h2, .finish h2 { margin: 0 0 18px; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.4; }
.intro > p, .step > p, .finish > p { max-width: 760px; }
.flow { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 34px 0; padding: 22px; background: var(--canvas); font-weight: 700; text-align: center; }
.flow span[aria-hidden] { color: var(--accent); }
.step { scroll-margin-top: 84px; }
.step-heading { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.step-heading span { color: var(--accent-dark); font: 800 .78rem/1.2 Arial, sans-serif; letter-spacing: .15em; }
.step-heading h2 { margin: 7px 0 0; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.45; }
.step h3 { margin: 0 0 8px; font-size: 1.08rem; }
code { padding: .12em .38em; color: #8c3827; background: var(--accent-soft); border-radius: 4px; font-family: Consolas, monospace; }

.note, .point, .warning { margin: 30px 0 0; padding: 20px 22px; border-left: 4px solid var(--green); background: var(--green-soft); }
.warning { border-left-color: #d49d1a; background: var(--yellow); }
.point { border-left-color: var(--accent); background: var(--accent-soft); }
.note strong, .point strong, .warning strong { display: block; margin-bottom: 4px; }
.note p, .point p, .warning p { margin: 0; }
.check-list, .final-list { margin: 26px 0 0; padding: 0; list-style: none; }
.check-list li, .final-list li { position: relative; margin: 8px 0; padding: 8px 10px 8px 34px; background: var(--canvas); }
.check-list li::before, .final-list li::before { content: "✓"; position: absolute; left: 11px; color: var(--green); font-weight: 900; }

.screen { position: relative; margin: 30px 0 0; }
.image-wrap { position: relative; overflow: hidden; background: #eee; border: 1px solid #d4d4d4; box-shadow: var(--shadow); }
.screen img { width: 100%; }
.screen figcaption { margin-top: 13px; color: var(--muted); font-size: .84rem; line-height: 1.65; }
.screen figcaption b { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 5px; color: #fff; background: var(--accent); border-radius: 50%; font: 700 .72rem/1 Arial, sans-serif; }
.portrait { max-width: 590px; margin-right: auto; margin-left: auto; }
.portrait.document { max-width: 500px; }
.portrait.preview { max-width: 620px; }
.gallery { display: grid; gap: 22px; align-items: start; margin-top: 30px; }
.gallery .screen { margin-top: 0; }
.gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.three .screen figcaption { font-size: .78rem; }
.small-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-shots .image-wrap { max-width: 340px; margin: auto; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: center; margin-top: 30px; }
.compare .screen { margin: 0; }
.compare-arrow { color: var(--accent); font-size: 2rem; text-align: center; }
.compare.compact { max-width: 680px; margin-right: auto; margin-left: auto; grid-template-columns: minmax(0, 283px) 60px minmax(0, 299px); }
.state { position: absolute; z-index: 3; top: 10px; left: 10px; padding: 4px 10px; color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.state.before { background: #68747b; }
.state.after { background: var(--green); }
.edit-compare { grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 30px 0; }
.definition-grid > div { padding: 22px; border-top: 3px solid var(--accent); background: var(--canvas); }
.definition-grid p { margin: 0 0 8px; }
.definition-grid small { color: var(--muted); }

.continuous-page { max-width: 740px; margin: 30px auto 0; }
.continuous-page .screen { margin: 0; }
.continuous-page .screen:last-child { max-width: 630px; margin: auto; }
.continuous-page figcaption { text-align: center; }
.omission { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 18px 0; color: var(--muted); font-size: .78rem; letter-spacing: .1em; }
.omission span { height: 10px; background: radial-gradient(circle, var(--accent) 1.5px, transparent 2px) 0 50% / 10px 10px repeat-x; }

.finish { margin-top: 48px; color: #fff; background: var(--ink); border: 0; }
.finish .section-label { color: #f0a690; }
.final-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.final-list li { margin: 0; color: var(--ink); background: #fff; }
.back-link { display: inline-flex; gap: 12px; align-items: center; margin-top: 32px; padding-bottom: 4px; color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }
.back-link span { color: #f0a690; }
.to-top { position: fixed; z-index: 45; right: 20px; bottom: 20px; width: 48px; height: 48px; color: #fff; background: var(--accent); border: 0; border-radius: 50%; box-shadow: 0 8px 24px rgba(0,0,0,.2); cursor: pointer; font-size: 1.2rem; }
.to-top[hidden] { display: none; }

/* 接続先、公開URLなど公開に不適切な情報を表示上で隠す */
.mask { position: absolute; z-index: 2; display: block; background: #20262a; border-radius: 2px; }
.mask-filezilla-title { top: 0; left: 0; width: 40%; height: 4.5%; }
.mask-filezilla-path { top: 33.5%; left: 7%; width: 26%; height: 4.8%; }
.mask-filezilla-user { top: 38.5%; left: 6.5%; width: 11%; height: 5%; }
.mask-slug-before-line1 { left: 15%; top: 70.5%; width: 38%; height: 5%; }
.mask-slug-before-line2 { left: 15%; top: 75.2%; width: 19%; height: 5%; }
.mask-slug-after-line1 { left: 19%; top: 82.5%; width: 39%; height: 5.5%; }
.mask-slug-after-line2 { left: 19%; top: 88%; width: 17%; height: 5.5%; }
.mask-link-url { left: 18%; top: 46%; width: 39%; height: 13%; }
.mask-link-complete { left: 16%; top: 63%; width: 40%; height: 10%; }
.mask-published { left: 18%; top: 54%; width: 44%; height: 9%; }
.mask-link-check { left: 13%; top: 57%; width: 34%; height: 8%; }

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; gap: 34px; padding-top: 40px; }
  .toc { overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
  .toc-inner { position: static; }
  .toc-title { margin: 0; padding: 16px 20px; }
  .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px 18px; }
  .toc a { padding: 7px; }
  .gallery.three, .small-shots { grid-template-columns: 1fr; }
  .gallery.three .screen, .small-shots .screen { max-width: 680px; width: 100%; margin-right: auto; margin-left: auto; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 66px; }
  .header-inner { height: 56px; padding: 0 18px; }
  .header-note { display: none; }
  .hero-inner { padding: 62px 20px 66px; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-lead { font-size: .94rem; }
  .layout { padding: 24px 12px 70px; }
  .toc ol { grid-template-columns: 1fr 1fr; padding: 10px; }
  .intro, .step, .finish { padding: 28px 18px; }
  .flow { align-items: stretch; flex-direction: column; gap: 7px; }
  .flow span[aria-hidden] { transform: rotate(90deg); }
  .gallery.two, .definition-grid, .final-list { grid-template-columns: 1fr; }
  .compare, .compare.compact, .edit-compare { grid-template-columns: 1fr; gap: 12px; }
  .compare.compact { max-width: 330px; }
  .compare-arrow { transform: rotate(90deg); }
  .screen figcaption { font-size: .78rem; }
  .note, .point, .warning { padding: 17px; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
