@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #fffaf5;
  --surface: #ffffff;
  --surface-soft: #fff3e8;
  --surface-strong: #201b18;
  --text: #28211d;
  --text-soft: #70645c;
  --line: #eadfd6;
  --accent: #f39a4d;
  --accent-deep: #d96c24;
  --accent-pale: #ffe2c7;
  --green: #347d61;
  --red: #b9504a;
  --shadow: 0 24px 60px rgba(72, 43, 22, .10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --sidebar: 264px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #171411;
  --surface: #211d1a;
  --surface-soft: #2b221b;
  --surface-strong: #f8eee5;
  --text: #f5ede7;
  --text-soft: #b9aaa0;
  --line: #3b332d;
  --accent: #f6a25a;
  --accent-deep: #ffb575;
  --accent-pale: #4b2e1c;
  --green: #76c2a3;
  --red: #ec8c84;
  --shadow: 0 24px 60px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", "Noto Sans SC", sans-serif; line-height: 1.75; transition: background .25s, color .25s; }
[lang="ja"] body { font-family: "DM Sans", "Noto Sans JP", sans-serif; }
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
code, kbd { font-family: "Cascadia Code", Consolas, monospace; }
code { padding: .15em .42em; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--accent-deep); font-size: .9em; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 2em; padding: .12em .48em; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 7px; background: var(--surface); color: var(--text); font-size: .88em; font-weight: 700; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--surface-strong); color: var(--bg); text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }

.topbar { position: fixed; inset: 0 0 auto; z-index: 100; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 18%); background: color-mix(in srgb, var(--bg), transparent 12%); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 5px 9px rgba(72, 43, 22, .18)); }
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.lang-switcher { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); }
.lang-switcher a { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; border-radius: 999px; color: var(--text-soft); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.lang-switcher a:hover { color: var(--text); }
.lang-switcher a.is-active { background: var(--accent); color: #2c1c10; }
.lang-switcher a:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
[data-theme="dark"] .lang-switcher a.is-active { color: #2c1c10; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-button { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; }
.icon-button:hover, .menu-button:hover { background: var(--surface-soft); }
.icon-button svg { width: 21px; fill: currentColor; vertical-align: middle; }
.menu-button { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-button > span:not(.sr-only) { width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }

.page-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; padding-top: 68px; }
.sidebar { position: sticky; top: 68px; z-index: 80; height: calc(100vh - 68px); border-right: 1px solid var(--line); background: var(--bg); }
.sidebar-inner { display: flex; flex-direction: column; height: 100%; padding: 40px 24px 28px; overflow-y: auto; }
.eyebrow, .section-number, .mini-label { margin: 0; color: var(--accent-deep); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-title { margin: 0 0 24px; font-size: 22px; font-weight: 750; }
.toc { display: flex; flex-direction: column; gap: 3px; }
.toc a { display: flex; gap: 12px; align-items: center; padding: 9px 11px; border-radius: 10px; color: var(--text-soft); text-decoration: none; font-size: 13px; font-weight: 600; transition: background .2s, color .2s, transform .2s; }
.toc a span { color: color-mix(in srgb, var(--text-soft), transparent 35%); font-size: 10px; font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--surface-soft); color: var(--text); transform: translateX(2px); }
.toc a.active { background: var(--accent-pale); color: var(--accent-deep); }
.sidebar-backdrop { display: none; }
main { min-width: 0; overflow: hidden; }

.hero { position: relative; min-height: 670px; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(430px, 1.1fr); align-items: center; gap: 60px; padding: 90px clamp(42px, 7vw, 110px); background: linear-gradient(135deg, var(--surface-soft) 0%, var(--bg) 58%); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none; background-image: radial-gradient(var(--accent) .6px, transparent .6px); background-size: 20px 20px; mask-image: linear-gradient(to right, black, transparent 45%); }
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.hero h1 { max-width: 650px; margin: 18px 0 22px; font-family: "Noto Sans SC", sans-serif; font-size: clamp(48px, 5vw, 78px); line-height: 1.1; letter-spacing: -.055em; }
[lang="ja"] .hero h1, [lang="ja"] .section-heading h2 { font-family: "Noto Sans JP", sans-serif; }
.hero h1 em { color: var(--accent-deep); font-style: normal; }
.hero-lead { max-width: 590px; margin: 0; color: var(--text-soft); font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 21px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(67, 39, 20, .12); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #2c1c10; }
.button.secondary { background: var(--surface); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 32px; margin: 42px 0 0; }
.hero-meta div { display: grid; gap: 2px; }
.hero-meta dt { color: var(--text-soft); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-meta dd { margin: 0; font-size: 13px; font-weight: 700; }
.hero-visual { min-height: 440px; }
.preview-card { position: absolute; padding: 10px; border: 1px solid rgba(255,255,255,.6); border-radius: 22px; background: rgba(255,255,255,.72); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
[data-theme="dark"] .preview-card { background: rgba(45,38,32,.8); border-color: rgba(255,255,255,.08); }
.preview-card img { border-radius: 13px; }
.preview-main { width: min(92%, 650px); top: 40px; left: 0; transform: rotate(1.5deg); }
.preview-detail { width: min(54%, 340px); right: 0; bottom: 20px; transform: rotate(-3deg); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-one { width: 300px; height: 300px; top: -10px; right: -20px; background: var(--accent-pale); }
.orb-two { width: 190px; height: 190px; bottom: 0; left: 5%; background: color-mix(in srgb, var(--accent), transparent 70%); }

.manual-section { width: min(100% - 80px, 1080px); margin: 0 auto; padding: 110px 0; border-bottom: 1px solid var(--line); }
.section-heading { max-width: 760px; margin-bottom: 46px; }
.section-heading h2 { margin: 10px 0 16px; font-family: "Noto Sans SC", sans-serif; font-size: clamp(34px, 4vw, 52px); line-height: 1.25; letter-spacing: -.04em; }
.section-heading > p:last-child { margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.9; }
.intro-section { padding-top: 90px; }
.callout { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.callout-icon { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-pale); color: var(--accent-deep); font-weight: 800; }
.callout strong { font-size: 14px; }
.callout p { margin: 3px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.callout.tip { align-items: center; margin-top: 28px; background: var(--surface-soft); }
.callout.tip img { width: 260px; margin-left: auto; border-radius: 10px; }
.callout.warning { border-color: color-mix(in srgb, var(--accent), var(--line) 40%); background: var(--surface-soft); }
.callout.compact { padding: 17px; }
.route-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.route-grid a { display: grid; gap: 5px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.route-grid a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.route-grid span { color: var(--text-soft); font-size: 11px; font-weight: 700; }
.route-grid strong { font-size: 15px; }

.step-list { display: grid; gap: 18px; }
.step-card { display: grid; grid-template-columns: 54px minmax(220px, .8fr) minmax(310px, 1.2fr); gap: 24px; align-items: center; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.step-index { align-self: start; color: var(--accent-deep); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.step-content h3, .feature-card h3, .expression-items h3, .mini-card-grid h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.step-content p, .feature-card p, .expression-items p, .mini-card-grid p { margin: 0; color: var(--text-soft); font-size: 13px; }
figure { margin: 0; }
figure img { cursor: zoom-in; }
.step-card figure img, .mini-card-grid img { margin: auto; border-radius: 10px; }
figcaption { margin-top: 8px; color: var(--text-soft); font-size: 10px; line-height: 1.4; text-align: center; }
.figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: center; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature-card { min-height: 230px; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.feature-card img { width: auto; max-height: 76px; margin: auto auto 0; border-radius: 9px; }
.feature-head { display: flex; gap: 12px; align-items: center; }
.feature-head span { color: var(--accent-deep); font-size: 10px; font-weight: 800; }
.feature-head h3 { margin: 0; }
.feature-card > p { margin-top: 12px; }
.detail-block { margin-top: 18px; padding: 34px; border-radius: var(--radius-lg); background: var(--surface-strong); color: var(--bg); }
.detail-copy { max-width: 700px; }
.detail-copy h3, .anchor-copy h3, .shortcut-copy h3, .timeline-copy h3 { margin: 8px 0 10px; font-size: 25px; line-height: 1.4; letter-spacing: -.02em; }
.detail-copy > p:last-child { color: color-mix(in srgb, var(--bg), transparent 22%); }
.rule-table { margin-top: 26px; border: 1px solid color-mix(in srgb, var(--bg), transparent 82%); border-radius: 14px; overflow: hidden; }
.rule-row { display: grid; grid-template-columns: 90px 1fr 1.4fr; gap: 16px; padding: 12px 16px; border-top: 1px solid color-mix(in srgb, var(--bg), transparent 86%); font-size: 12px; }
.rule-row:first-child { border-top: 0; }
.rule-row code { justify-self: start; border-color: color-mix(in srgb, var(--bg), transparent 75%); background: transparent; color: inherit; }
.rule-head { color: color-mix(in srgb, var(--bg), transparent 45%); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.rule-row.good > span:first-child { color: #7fdbb4; }
.rule-row.bad > span:first-child { color: #ff9990; }
.anchor-guide { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; margin-top: 18px; padding: 42px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.anchor-copy > p:not(.mini-label) { color: var(--text-soft); }
.compact-steps { display: grid; gap: 11px; padding: 0; margin: 24px 0; list-style: none; }
.compact-steps li { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.compact-steps li > span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; background: var(--surface-soft); color: var(--accent-deep); font-size: 10px; font-weight: 800; }
.text-link { color: var(--accent-deep); font-size: 12px; font-weight: 700; text-underline-offset: 4px; }
.anchor-tip { margin-top: 24px; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface-soft); }
.anchor-tip strong { font-size: 12px; }
.anchor-tip p { margin: 2px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.7; }
.anchor-tip .text-link { margin-left: .25em; }
.image-frame { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
.image-frame img { width: 100%; border-radius: 10px; }

.expression-layout { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 54px; align-items: start; }
.expression-reference { margin: -18px 0 40px; }
.expression-reference .text-link { margin-left: .25em; }
.phone-figure { position: sticky; top: 100px; padding: 18px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.phone-figure img { width: 100%; border-radius: 14px; }
.expression-items { display: grid; gap: 0; }
.expression-items article { display: grid; grid-template-columns: 36px 1fr; gap: 18px; padding: 4px 0 32px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.item-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-pale); color: var(--accent-deep); font-size: 10px; font-weight: 800; }
.expression-items img { max-height: 130px; width: auto; margin-top: 18px; border-radius: 10px; }
.mini-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 46px; }
.mini-card-grid article { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.mini-card-grid img { height: 84px; object-fit: contain; margin-bottom: 20px; }
.mini-card-grid h3 { font-size: 15px; }
.mini-card-grid p { font-size: 12px; }
.shortcut-card { display: grid; grid-template-columns: minmax(280px, .9fr) 1.1fr; gap: 50px; align-items: center; padding: 42px; border-radius: var(--radius-lg); background: var(--surface-strong); color: var(--bg); }
.dark-frame { border-color: color-mix(in srgb, var(--bg), transparent 82%); background: color-mix(in srgb, var(--surface-strong), #000 12%); }
.shortcut-copy .mini-label { color: var(--accent); }
.key-list { display: grid; gap: 14px; margin: 14px 0 28px; }
.key-display { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 20px; }
.key-display kbd { min-width: 38px; height: 38px; padding: 0 9px; border: 0; border-bottom: 3px solid #bb6a2d; background: var(--accent); color: #2c1c10; font-size: 13px; }
.key-display > kbd { justify-self: start; }
.key-display span { max-width: 170px; font-size: 15px; font-weight: 700; line-height: 1.45; }
.key-combo > div { display: flex; align-items: center; gap: 5px; }
.key-combo b { color: color-mix(in srgb, var(--bg), transparent 42%); font-size: 12px; }
.shortcut-copy .callout { border-color: color-mix(in srgb, var(--bg), transparent 82%); background: color-mix(in srgb, var(--surface-strong), var(--bg) 8%); color: var(--bg); }
.shortcut-copy .callout p { color: color-mix(in srgb, var(--bg), transparent 25%); }

.project-download { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.project-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--accent); color: #2c1c10; font-size: 22px; font-weight: 800; }
.project-copy { display: grid; gap: 3px; }
.project-copy strong { font-size: 17px; }
.project-copy > span:last-child { color: var(--text-soft); font-size: 12px; }
.project-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.project-files code { color: var(--text-soft); font-size: 10px; }
.project-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 9px; }
.project-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--text); font-size: 12px; font-weight: 700; text-decoration: none; transition: transform .2s, border-color .2s; }
.project-actions a:hover { transform: translateY(-1px); border-color: var(--accent); }
.project-actions a:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.project-actions a.primary { border-color: var(--accent); background: var(--accent); color: #2c1c10; }

.timeline { margin-top: 54px; }
.timeline-step { position: relative; display: grid; grid-template-columns: 64px 1fr; column-gap: 24px; padding-bottom: 76px; }
.timeline-step::before { content: ""; position: absolute; top: 46px; bottom: 0; left: 23px; width: 1px; background: var(--line); }
.timeline-marker { grid-row: 1 / span 2; z-index: 1; }
.timeline-marker span { display: grid; place-items: center; width: 47px; height: 47px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--accent-deep); font-size: 13px; font-weight: 800; }
.timeline-copy { max-width: 760px; margin-bottom: 24px; }
.timeline-copy > p:last-child { color: var(--text-soft); }
.timeline-step > figure, .timeline-step > .figure-pair, .timeline-step > .tutorial-gallery { grid-column: 2; }
.timeline-step > .image-frame img { aspect-ratio: 2.05 / 1; object-fit: cover; }
.figure-pair.balanced { grid-template-columns: 1.7fr .7fr; align-items: stretch; }
.figure-pair.balanced .image-frame { display: flex; flex-direction: column; }
.figure-pair.balanced .image-frame img { width: 100%; height: clamp(260px, 32vw, 380px); object-fit: cover; }
.tutorial-gallery { display: grid; grid-template-columns: .7fr .7fr 1.6fr; gap: 14px; align-items: stretch; }
.tutorial-gallery .image-frame { display: flex; flex-direction: column; }
.tutorial-gallery img { flex: 1; height: 250px; object-fit: contain; background: #2d2d2d; }
.tutorial-gallery .gallery-large img { object-fit: cover; object-position: center; }
.final-step { padding-bottom: 0; }
.final-step::before { display: none; }
.final-step .timeline-marker span { border-color: var(--accent); background: var(--accent); color: #2c1c10; }
.mode-toggle-figure { width: fit-content; margin: -18px 0 24px; }
.mode-toggle-figure img { width: 182px; border-radius: 8px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mode-card { display: flex; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.mode-number { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--accent-pale); color: var(--accent-deep); font-size: 11px; font-weight: 800; }
.mode-card h3, .obs-copy h3 { margin: 2px 0 9px; font-size: 21px; line-height: 1.4; }
.mode-card p, .obs-copy > p:last-child { margin: 0; color: var(--text-soft); font-size: 13px; }
.obs-guide { display: grid; grid-template-columns: .8fr 1.2fr; gap: 46px; align-items: center; margin-top: 18px; padding: 42px; border-radius: var(--radius-lg); background: var(--surface-strong); color: var(--bg); }
.obs-copy .mini-label { color: var(--accent); }
.obs-copy > p:last-child { color: color-mix(in srgb, var(--bg), transparent 22%); }
.obs-guide .image-frame { max-width: 560px; justify-self: end; }
.obs-guide .image-frame img { width: 100%; max-height: 560px; object-fit: contain; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.faq-list details[open] { border-color: color-mix(in srgb, var(--accent), var(--line) 45%); }
.faq-list summary { position: relative; padding: 20px 56px 20px 22px; cursor: pointer; font-size: 15px; font-weight: 700; line-height: 1.55; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; top: 50%; right: 22px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-soft); color: var(--accent-deep); font-size: 18px; transform: translateY(-50%); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list summary:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: -3px; }
.faq-answer { padding: 0 56px 22px 22px; color: var(--text-soft); font-size: 13px; line-height: 1.8; }
.faq-answer .text-link { font-size: inherit; }
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 15px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.checklist li > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--green), transparent 82%); color: var(--green); font-size: 12px; font-weight: 800; }
.checklist strong { font-size: 14px; }
.checklist p { margin: 3px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.6; }
footer { width: min(100% - 80px, 1080px); display: flex; align-items: center; justify-content: space-between; margin: 0 auto; padding: 46px 0 60px; color: var(--text-soft); font-size: 12px; }
footer strong { color: var(--text); font-size: 14px; }
footer p { margin: 0; }
footer a { color: var(--accent-deep); font-weight: 700; text-decoration: none; }

.lightbox { width: min(92vw, 1180px); max-height: 92vh; padding: 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 20px; background: #161310; color: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.48); }
.lightbox::backdrop { background: rgba(18, 13, 10, .82); backdrop-filter: blur(8px); }
.lightbox img { max-height: calc(86vh - 70px); width: 100%; object-fit: contain; }
.lightbox button { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0,0,0,.68); color: #fff; cursor: pointer; font-size: 24px; }
.lightbox p { margin: 10px 4px 0; color: #cdbfb5; font-size: 12px; text-align: center; }

@media (max-width: 1100px) {
  :root { --sidebar: 230px; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-block: 70px; }
  .hero-visual { min-height: 430px; width: min(100%, 720px); }
  .step-card { grid-template-columns: 42px 1fr; }
  .step-card figure, .step-card .figure-pair { grid-column: 2; }
}

@media (max-width: 800px) {
  .topbar { padding: 0 18px; }
  .topbar-tools { gap: 8px; }
  .menu-button { display: flex; }
  .page-shell { display: block; }
  .sidebar { position: fixed; top: 68px; left: 0; width: min(84vw, 320px); height: calc(100vh - 68px); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.16); }
  .menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 68px 0 0; z-index: 70; background: rgba(22,16,12,.48); backdrop-filter: blur(2px); }
  .menu-open .sidebar-backdrop { display: block; }
  .menu-open .menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-button span:nth-child(2) { opacity: 0; }
  .menu-open .menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 66px 28px; }
  .hero h1 { font-size: clamp(43px, 12vw, 68px); }
  .hero-visual { min-height: 330px; }
  .manual-section, footer { width: min(100% - 40px, 680px); }
  .manual-section { padding: 80px 0; }
  .route-grid, .feature-grid, .mini-card-grid, .mode-grid, .checklist { grid-template-columns: 1fr; }
  .step-card { grid-template-columns: 34px 1fr; padding: 22px; }
  .anchor-guide, .shortcut-card, .obs-guide { grid-template-columns: 1fr; padding: 28px; }
  .expression-layout { grid-template-columns: 1fr; }
  .phone-figure { position: static; width: min(100%, 400px); margin: auto; }
  .tutorial-gallery { grid-template-columns: repeat(2, 1fr); }
  .tutorial-gallery .gallery-large { grid-column: 1 / -1; }
  .callout.tip { flex-wrap: wrap; }
  .callout.tip img { width: 100%; margin: 10px 0 0; }
}

@media (max-width: 520px) {
  .brand > span:last-child { display: none; }
  .lang-switcher { gap: 1px; padding: 2px; }
  .lang-switcher a { padding: 5px 8px; font-size: 12px; }
  .hero { padding-inline: 20px; }
  .hero-lead { font-size: 15px; }
  .hero-actions .button { flex: 1; }
  .hero-meta { gap: 18px; }
  .hero-visual { min-height: 260px; }
  .preview-main { width: 98%; }
  .preview-detail { width: 62%; }
  .manual-section, footer { width: calc(100% - 32px); }
  .section-heading h2 { font-size: 34px; }
  .step-card { display: block; }
  .step-index { margin-bottom: 8px; }
  .step-card figure, .step-card .figure-pair { margin-top: 22px; }
  .figure-pair, .figure-pair.balanced { grid-template-columns: 1fr; }
  .project-download { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .project-files { grid-column: 2 / -1; justify-content: flex-start; }
  .project-actions { grid-column: 1 / -1; }
  .project-actions a { flex: 1 1 130px; }
  .key-display { grid-template-columns: 160px minmax(0, 1fr); gap: 12px; }
  .detail-block { padding: 24px 18px; }
  .rule-row { grid-template-columns: 70px 1fr; gap: 8px; }
  .rule-row > span:last-child { grid-column: 2; color: color-mix(in srgb, var(--bg), transparent 40%); }
  .rule-head > span:last-child { display: none; }
  .anchor-guide, .shortcut-card, .obs-guide { padding: 22px 18px; }
  .timeline-step { grid-template-columns: 44px 1fr; gap: 12px; }
  .timeline-marker span { width: 36px; height: 36px; }
  .timeline-step::before { left: 17px; top: 36px; }
  .tutorial-gallery { grid-template-columns: 1fr; }
  .tutorial-gallery .gallery-large { grid-column: auto; }
  footer { align-items: flex-end; }
}

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