:root {
  color-scheme: light;
  --ink: #202a32;
  --ink-deep: #151c21;
  --muted: #5e666b;
  --line: #d5d9dc;
  --surface: #eceeef;
  --accent: #a6462d;
  --accent-dark: #7e321f;
  --blue: #2f5b82;
  --gold: #c79a3b;
  --warning-bg: #fff9e9;
  --review-bg: #eef3f7;
  --white: #ffffff;
  --shadow: 0 12px 34px rgba(32, 42, 50, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); line-height: 1.75; }
a { color: var(--accent-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
img, iframe { max-width: 100%; }
button, input { font: inherit; }
button, a.action { min-height: 44px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 30; padding: 10px 14px; background: var(--ink); color: var(--white); }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 5vw; border-bottom: 4px solid var(--gold); background: var(--ink); position: sticky; top: 0; z-index: 20; }
.brand { color: var(--white); font-size: 1.15rem; font-weight: 800; text-decoration: none; }
.brand:hover { color: var(--gold); }
.brand::before { content: ""; display: inline-block; width: 12px; height: 20px; margin-right: 9px; border-left: 5px solid var(--accent); border-bottom: 5px solid var(--gold); vertical-align: -3px; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.header-actions a { color: var(--white); font-weight: 700; text-decoration: none; }
.header-actions a:hover { color: var(--gold); }

.mobile-tools { display: none; }
.search-results { position: fixed; top: 76px; left: 50%; z-index: 25; width: min(720px, calc(100% - 32px)); max-height: min(70vh, 620px); overflow: auto; transform: translateX(-50%); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.search-results[hidden] { display: none; }
.search-results a { display: grid; gap: 3px; padding: 15px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.search-results a:hover { background: var(--surface); }
.search-result-category { color: var(--accent); font-size: 0.75rem; font-weight: 800; }
.search-results strong { font-size: 1rem; }
.search-results a > span:last-child { color: var(--muted); font-size: 0.88rem; }
.search-empty { margin: 0; padding: 24px; color: var(--muted); }

.manual-shell { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: clamp(30px, 5vw, 72px); width: min(1360px, 100%); margin: 0 auto; padding: 32px clamp(20px, 4vw, 58px) 80px; }
.sidebar { align-self: start; position: sticky; top: 100px; max-height: calc(100vh - 125px); overflow: auto; border-right: 2px solid var(--ink); padding-right: 24px; }
.desktop-search { display: grid; gap: 6px; margin-bottom: 24px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.desktop-search input, .hero-search input, .mobile-tools input { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #8b949a; border-radius: 4px; background: var(--white); color: var(--ink); }
.nav-group { margin: 0 0 24px; }
.nav-group h2 { margin: 0 0 7px; color: var(--muted); font-size: 0.76rem; }
.nav-group ul { margin: 0; padding: 0; list-style: none; }
.nav-group a { display: block; padding: 7px 9px; border-left: 3px solid transparent; color: var(--ink); font-size: 0.88rem; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.nav-group a:hover, .nav-group a[aria-current="page"] { border-left-color: var(--accent); background: var(--surface); color: var(--ink); }

.manual-main { min-width: 0; width: 100%; max-width: 880px; overflow-wrap: anywhere; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; color: var(--muted); font-size: 0.84rem; }
.article-header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 0.84rem; font-weight: 800; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.25; }
h2 { margin: 42px 0 14px; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.4; }
h3 { line-height: 1.45; }
.lead { max-width: 720px; margin: 20px 0 0; color: #424e54; font-size: 1.08rem; }
.verified { margin: 14px 0 0; color: var(--muted); font-size: 0.8rem; }
.summary-block { padding: 2px 0 4px; }
.summary-block ul { padding-left: 1.35em; }

.steps { counter-reset: manual-step; }
.manual-step { margin-top: 48px; padding-top: 4px; border-top: 4px solid var(--ink); }
.manual-step h2 { margin-top: 8px; }
.step-number { margin: 14px 0 0; color: var(--accent); font-size: 0.78rem; font-weight: 900; }
.video-frame { aspect-ratio: 16 / 9; margin: 24px 0 14px; background: #dfe3e5; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-pending { padding: 16px; border-left: 4px solid var(--blue); background: var(--review-bg); }
.action { display: inline-flex; align-items: center; justify-content: center; padding: 9px 17px; border: 2px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--white); font-weight: 800; text-decoration: none; }
.action:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.action.secondary { background: var(--white); color: var(--accent-dark); }

.notice { margin: 32px 0; padding: 20px 22px; border-left: 5px solid; }
.notice > strong { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.notice ul { margin-bottom: 0; }
.notice-important { border-color: var(--gold); background: var(--warning-bg); }
.notice-review { border-color: var(--blue); background: var(--review-bg); }
.review-inline { color: var(--blue); }

.related-faq details, .faq-list details { border-top: 1px solid var(--line); }
.related-faq details:last-child, .faq-list details:last-child { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; min-height: 50px; padding: 13px 36px 13px 4px; font-weight: 800; }
details > p { padding: 0 4px 16px; }
.related-manuals ul, .category-list ul { margin: 0; padding: 0; list-style: none; }
.related-manuals li { padding: 16px 0; border-top: 1px solid var(--line); }
.related-manuals li p { margin: 4px 0 0; color: var(--muted); }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
.pager a { display: grid; gap: 4px; min-height: 84px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager span { color: var(--muted); font-size: 0.78rem; }
.back-link { margin-top: 30px; }

.home-intro { margin: 12px 0 56px; padding: clamp(28px, 5vw, 54px); border-left: 8px solid var(--gold); background: var(--ink); color: var(--white); }
.home-intro .eyebrow { color: var(--gold); }
.home-intro .lead { color: #dce1e3; }
.home-intro .hero-search { color: var(--white); }
.hero-search { display: grid; gap: 8px; max-width: 620px; margin-top: 28px; font-weight: 800; }
.getting-started { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0 0 28px; }
.getting-started ol { display: grid; gap: 10px; padding-left: 1.4em; }
.category-list > section { padding: 10px 0 24px; border-top: 1px solid var(--line); }
.category-list h3 { margin: 18px 0 8px; color: var(--accent-dark); }
.category-list li + li { border-top: 1px dotted var(--line); }
.category-list li a { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.5fr); gap: 20px; padding: 15px 4px; color: var(--ink); text-decoration: none; }
.category-list li span { color: var(--muted); }
.home-links { margin-top: 36px; padding: 4px 0 28px; border-top: 5px solid var(--gold); }
.home-links .action { margin: 0 8px 8px 0; }

.faq-list section { margin-bottom: 46px; }
.support-page .manual-main > section:not(.article-header) { padding: 4px 0 20px; border-bottom: 1px solid var(--line); }
.not-found { min-height: 58vh; display: grid; align-content: center; justify-items: start; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px 5vw; border-top: 4px solid var(--gold); background: var(--ink-deep); color: var(--white); font-size: 0.84rem; }
.site-footer a { color: var(--gold); }

@media (max-width: 760px) {
  .site-header { min-height: 60px; padding: 0 18px; }
  .header-actions { display: none; }
  .mobile-tools { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .mobile-tools button { padding: 8px 12px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--white); font-weight: 800; }
  .manual-shell { grid-template-columns: 1fr; gap: 0; padding: 22px 18px 60px; }
  .sidebar { display: none; position: static; max-height: none; margin: 0 0 26px; padding: 8px 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar.is-open { display: block; }
  .desktop-search { display: none; }
  .search-results { top: 125px; }
  h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  .home-intro { margin-top: 0; padding: 26px 20px; }
  .hero-search { display: none; }
  .category-list li a { grid-template-columns: 1fr; gap: 4px; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child { text-align: left; }
  .site-footer { display: grid; gap: 2px; padding: 22px 18px; }
}

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