:root { color-scheme: light; --ink: #3f3540; --muted: #786875; --accent: #a33665; --line: #ecdce4; --paper: #fff; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body { margin: 0; color: var(--ink); background: #fff8fb; font: 15px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "PingFang SC", sans-serif; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #ba5b88; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 8px 16px; background: white; }
.skip-link:focus { top: 8px; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 78px; padding: 12px max(20px, calc((100vw - 1040px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255, 251, 253, .97); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 750; text-decoration: none; line-height: 1.4; }
.brand img { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.language-control select, .top-nav summary, .top-link { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--accent); text-decoration: none; }
.top-nav { position: relative; }
.top-nav nav { position: absolute; right: 0; top: calc(100% + 12px); width: min(340px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 16px 45px #63324920; }
.top-nav nav a { display: block; padding: 6px 9px; text-decoration: none; border-radius: 8px; }
.top-nav nav a:hover { background: #fff1f7; }
.page { width: min(960px, calc(100% - 40px)); margin: 32px auto 0; }
.hero, .doc-section { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 32px; margin-bottom: 24px; }
.hero { background: linear-gradient(140deg, #fff, #fff0f5); }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .08em; font-weight: 700; }
h1 { font-size: clamp(25px, 4vw, 38px); line-height: 1.4; margin: 10px 0 16px; }
h2 { font-size: 23px; line-height: 1.5; margin: 0 0 24px; color: #8f2d58; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
h3 { font-size: 18px; line-height: 1.6; margin: 28px 0 12px; }
p { margin: 12px 0; }
.meta { color: var(--muted); font-size: 12px; }
.guide-search { position: relative; margin: 24px 0; }
.search-box { position: relative; }
.search-box input { width: 100%; min-height: 48px; padding: 11px 45px 11px 16px; border: 1px solid #dfbcca; border-radius: 12px; background: white; color: var(--ink); }
.search-box button { position: absolute; right: 8px; top: 7px; border: 0; background: #faeaf1; border-radius: 8px; width: 34px; height: 34px; color: var(--accent); }
.search-results { position: absolute; top: calc(100% + 8px); width: 100%; max-height: 420px; overflow-y: auto; padding: 8px; z-index: 10; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px #63324920; }
.search-result { display: block; width: 100%; text-align: left; border: 0; border-radius: 8px; padding: 10px; background: white; color: var(--ink); }
.search-result:hover { background: #fff3f8; }
.search-result-title { display: block; color: var(--accent); font-weight: 700; }
.search-result-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; }
.search-empty { padding: 12px; color: var(--muted); }
.search-hit { background: #ffe0a1 !important; border-radius: 5px; }
.quick-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.quick-nav a { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 13px; text-decoration: none; }
.quick-nav span { color: #aa788e; font-size: 11px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.doc-section, .doc-section h3 { scroll-margin-top: 105px; }
ol, ul { padding-left: 1.55em; }
li { margin: 9px 0; padding-left: 3px; }
li::marker { color: var(--accent); font-weight: 650; }
.notice { background: #fff5e9; border-left: 3px solid #d8a467; border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 20px 0; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .88em; background: #f6eef3; border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
pre { padding: 18px; border-radius: 12px; background: #f7f3f6; white-space: pre-wrap; border: 1px solid var(--line); }
pre code { padding: 0; background: none; }
.table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th { background: #fff0f6; color: #843652; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 100px; }
tr:last-child td { border-bottom: 0; }
td:last-child { min-width: 250px; }
.recommend { display: inline-block; border: 2px solid #b74777; border-radius: 5px; padding: 0 8px; white-space: nowrap; font-weight: 700; color: #9f315f; }
.recommend.circle { border-radius: 50%; }
dt { font-weight: 750; color: #874360; margin-top: 20px; }
dd { margin: 6px 0 0; }
footer { padding: 16px 0 90px; text-align: center; color: var(--muted); font-size: 12px; }
.back-to-top { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 15; padding: 10px 17px; border: 1px solid #d8b2c5; border-radius: 999px; background: #fff; color: var(--accent); box-shadow: 0 5px 18px #63324918; font-size: 13px; }
@media (max-width: 640px) {
  .topbar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .brand { font-size: 17px; }
  .brand img { width: 32px; height: 32px; }
  .top-actions { gap: 6px; margin-left: auto; }
  /* Anchor the mobile menu to the full header so it stays inside both edges. */
  .top-nav { position: static; }
  .top-nav nav { left: 12px; right: 12px; top: calc(100% + 8px); width: auto; max-height: min(70vh, calc(100dvh - 140px)); overscroll-behavior: contain; }
  .language-control select, .top-nav summary, .top-link { padding: 6px 8px; font-size: 12px; }
  .page { width: calc(100% - 24px); margin-top: 16px; }
  .hero, .doc-section { padding: 22px 18px; border-radius: 16px; }
  h2 { font-size: 20px; }
  .quick-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .topbar, .guide-search, .back-to-top, .skip-link { display: none; }
  body { background: white; font-size: 11pt; }
  .page { width: 100%; margin: 0; }
  .hero, .doc-section { border: 0; padding: 0; }
  h2, h3 { break-after: avoid; }
  tr, pre, .notice { break-inside: avoid; }
}
