:root {
  color-scheme: light;
  --bg: #fff; --heading: #20252b; --text: #39414a; --muted: #68717c;
  --border: #e3e6e9; --link: #245bb0;
  font: 16px/1.75 Arial, Helvetica, sans-serif;
  background: var(--bg); color: var(--text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1722; --heading: #f1f5f9; --text: #d3deea;
  --muted: #a3b3c7; --border: #2d3b4d; --link: #8ab9f6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0f1722; --heading: #f1f5f9; --text: #d3deea;
    --muted: #a3b3c7; --border: #2d3b4d; --link: #8ab9f6;
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
section { scroll-margin-top: 100px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 5; background: var(--bg); padding: 12px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--border); }
.site-header nav { max-width: 1100px; min-height: 72px; margin: auto; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--heading); }
.brand strong { display: block; font-size: 18px; line-height: 1.3; }
.brand small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.button:hover { border-color: var(--link); }
.guide-layout { display: grid; grid-template-columns: 185px minmax(0, 680px); gap: 64px; max-width: 1100px; margin: auto; padding: 48px 28px 64px; }
main { min-width: 0; }
.contents { align-self: start; position: sticky; top: 110px; font-size: 14px; }
.contents-title { margin: 0 0 12px; color: var(--heading); font-weight: 600; }
.contents nav { display: grid; border-left: 1px solid var(--border); }
.contents nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 0 8px 16px; color: var(--muted); text-decoration: none; }
.contents nav a:hover { color: var(--link); text-decoration: underline; }
h1, h2 { color: var(--heading); line-height: 1.35; }
h1 { font-size: clamp(27px, 3.5vw, 34px); font-weight: 600; margin: 0 0 20px; }
h2 { font-size: 22px; font-weight: 600; margin: 0 0 16px; }
p { margin: 0 0 20px; }
.page-label { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.hero { padding: 0 0 28px; }
.hero > p:last-child { margin-bottom: 0; }
.panel { padding: 32px 0; border-top: 1px solid var(--border); }
.panel p + h2 { margin-top: 32px; }
.panel > :last-child { margin-bottom: 0; }
.tip { border-left: 3px solid var(--border); padding: 4px 0 4px 18px; font-size: 15px; }
.steps { margin: 20px 0 0; padding-left: 24px; }
.steps li { padding-left: 8px; margin-bottom: 20px; }
.steps li:last-child { margin-bottom: 0; }
.steps li::marker { color: var(--muted); }
.steps strong { color: var(--heading); }
code { font-size: .9em; }
.file-list { display: grid; grid-template-columns: 64px minmax(0, 1fr); margin: 20px 0 0; font-size: 15px; }
.file-list dt, .file-list dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.file-list dt { color: var(--heading); }
details { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; min-height: 48px; padding: 16px 0; color: var(--heading); font-size: 16px; font-weight: 400; }
summary::marker { color: var(--muted); }
details[open] summary { font-weight: 600; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
details[open] .answer { animation: faq-open 160ms ease-out; }
.button, .contents nav a { transition: color 140ms ease, border-color 140ms ease; }
@media (prefers-reduced-motion: reduce) {
  details[open] .answer { animation: none; }
  .button, .contents nav a { transition: none; }
}
.answer { padding: 0 0 4px 20px; font-size: 15px; overflow-wrap: anywhere; }
.answer p { margin-bottom: 16px; }
.closing { padding-top: 24px; font-size: 14px; }
.note { color: var(--muted); }
footer { padding: 24px; border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--muted); }
@media (max-width: 800px) {
  .guide-layout { grid-template-columns: 1fr; gap: 28px; padding: 24px 20px 40px; }
  .contents { position: static; }
  .contents nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contents nav a { padding: 8px 12px; }
  .site-header nav { padding: 12px 20px; }
  .panel { padding-block: 28px; }
  .tip a { display: inline-block; padding-block: 8px; }
  .answer { padding-left: 0; }
  footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .brand small { display: none; }
  .brand img { width: 32px; height: 32px; }
  h2 { font-size: 21px; }
}
@media (max-width: 800px) and (max-height: 500px) {
  .site-header { position: static; }
  section { scroll-margin-top: 16px; }
}
@media print {
  .site-header, .contents, .button { display: none; }
  .guide-layout { display: block; padding: 0; }
  details::details-content { content-visibility: visible; }
}
