:root {
  color-scheme: light;
  --navy: #17375f;
  --navy-light: #1d3f6b;
  --paper: #f2efe7;
  --panel: #fffef9;
  --ink: #14243b;
  --muted: #536071;
  --line: #bcb09c;
  --blue: #075b9a;
  --gold: #986300;
  --green: #237858;
  --red: #b3332f;
  --soft-red: #f7e9e2;
  --soft-blue: #e9f0f7;
  --soft-green: #e7f2ec;
  --shadow: 0 7px 24px rgb(34 45 58 / 8%);
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.78;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 22px; }
body { margin: 0; overflow-wrap: anywhere; }
button, input, select { font: inherit; }
button, select { touch-action: manipulation; }
button, input[type="checkbox"], summary { cursor: pointer; }
button { color: var(--ink); }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #bd852d; outline-offset: 4px; }
button:focus-visible, input:focus-visible { outline-offset: 2px; }
[hidden] { display: none !important; }
html[lang="ja"] [data-lang="en"], html[lang="en"] [data-lang="ja"] { display: none !important; }
p { margin: .65em 0; }
h1, h2, h3, h4 { line-height: 1.45; }
h2 { margin: 0 0 16px; color: var(--navy); font-size: 1.4rem; }
h3 { margin: 0 0 12px; color: var(--navy); font-size: 1.12rem; }
h4 { margin: 0 0 9px; font-size: 1.04rem; }
ul, ol { margin: .7em 0; padding-left: 1.4em; }
li + li { margin-top: .4em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 900; padding: 10px; background: white; }
.skip-link:focus { top: 10px; }
.utility { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; max-width: 1440px; margin: auto; padding: 10px 116px 10px 32px; min-height: 58px; }
.guide-link { font-size: .88rem; font-weight: 700; white-space: nowrap; }
.title-part { display: inline-block; white-space: nowrap; }
.language-switch { display: flex; gap: 6px; }
.language-switch button { min-height: 34px; padding: 4px 13px; border: 1px solid #8394a7; border-radius: 20px; background: var(--panel); color: var(--navy); font-size: .77rem; }
.language-switch button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.hero { background: linear-gradient(116deg, var(--navy), var(--navy-light)); color: white; }
.hero-inner { max-width: 1440px; margin: auto; padding: 30px 54px 32px; }
.edition { display: block; margin-bottom: 7px; font-size: .77rem; font-weight: 700; letter-spacing: .11em; color: #e1d8c0; }
.hero h1 { margin: 0; font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(2rem, 3.85vw, 3.45rem); font-weight: 700; letter-spacing: .025em; line-height: 1.25; }
html[lang="en"] .hero h1 { font-size: clamp(1.9rem, 3.6vw, 3.25rem); }
.category-nav { background: var(--panel); border-bottom: 1px solid #a8b4c2; box-shadow: 0 3px 12px rgb(20 35 60 / 6%); }
.category-nav-inner { display: flex; gap: 25px; align-items: stretch; max-width: 1440px; margin: auto; padding: 0 38px; overflow-x: auto; }
.category-nav a { display: flex; align-items: center; min-height: 52px; padding: 10px 2px 8px; border-bottom: 2px solid transparent; color: var(--blue); text-decoration: none; white-space: nowrap; font-size: .91rem; font-weight: 800; }
.category-nav a[aria-current="page"] { color: var(--navy); border-color: var(--gold); }
.category-nav a:hover { border-color: var(--gold); }
.workbar { max-width: 1440px; margin: 0 auto; padding: 15px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.workbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 42px; border: 1px solid #a28e71; border-radius: 10px; background: var(--panel); padding: 7px 13px; text-decoration: none; color: var(--navy); font-size: .85rem; font-weight: 700; }
.button:hover { background: #eee8d9; }
.search-form { flex: 1 1 420px; max-width: 690px; display: flex; align-items: center; gap: 7px; }
.search-label { font-size: .85rem; font-weight: 800; white-space: nowrap; }
.search-form input, .table-filter input, .table-filter select { min-width: 0; min-height: 42px; border: 1px solid #a4adba; border-radius: 8px; background: var(--panel); padding: 8px 11px; }
.search-form input { flex: 1; width: 100%; }
.search-results { max-width: 1376px; margin: 0 auto 18px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.search-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.search-heading h2 { margin: 0; font-size: 1.1rem; }
.search-result-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.search-result-list li { margin: 0; padding: 12px 16px; border: 1px solid #d5ccb9; border-radius: 9px; }
.search-result-list a { font-weight: 800; }
.result-category { display: block; color: var(--gold); font-size: .76rem; margin-bottom: 3px; }
.search-result-list p { font-size: .85rem; margin: 6px 0 0; color: var(--muted); }
.critical { max-width: 1376px; margin: 0 auto 22px; padding: 17px 22px; background: var(--soft-red); border: 1px solid #ae7665; border-radius: 12px; }
.critical h2 { font-size: 1rem; margin: 0 0 5px; }
.critical p { font-size: .9rem; margin: 0; }
.layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 28px; max-width: 1440px; margin: auto; padding: 0 32px 30px; align-items: start; }
.toc { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-y: auto; padding: 18px 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); }
.toc h2 { font-size: .89rem; color: var(--gold); margin-bottom: 10px; }
.toc a { display: block; padding: 6px 5px; font-size: .84rem; text-decoration: none; color: #425069; }
.toc a:hover { color: var(--blue); background: #f3eddf; border-radius: 6px; }
.toc .toc-section { padding-top: 11px; margin-top: 10px; border-top: 1px solid #d3c9b5; }
main { min-width: 0; max-width: 1500px; margin: 0 auto; padding-right: 64px; }
.search-results { width: calc(100% - 128px); max-width: 1312px; }
.section { margin-bottom: 28px; scroll-margin-top: 22px; }
.panel { border: 1px solid var(--line); border-radius: 15px; padding: 22px 25px; background: var(--panel); box-shadow: var(--shadow); }
.progress-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; background: linear-gradient(112deg, #fffef9, #f8f2e6); }
.progress-panel h2 { font-size: 1rem; margin: 0 0 4px; }
.progress-panel p { font-size: .83rem; color: var(--muted); margin: 0; }
.progress-numbers { color: var(--gold); font-size: 1.3rem; font-weight: 800; white-space: nowrap; text-align: right; }
.progress-summary { display: grid; gap: 8px; justify-items: end; }
.progress-track { height: 10px; margin-top: 12px; border: 1px solid #b9a887; border-radius: 10px; background: #e9e2d2; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .35s ease; }
.save-status { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.save-status.is-error { background: var(--soft-red); border: 1px solid #bb7f6a; border-radius: 8px; padding: 10px 13px; color: #753727; }
.notice-grid, .summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.notice { padding: 18px 20px; border: 1px solid #b49b79; border-radius: 12px; background: #f2ead8; }
.notice h3 { font-size: .98rem; margin-bottom: 7px; }
.notice p, .notice li { font-size: .9rem; }
.notice p:last-child { margin-bottom: 0; }
.notice.danger { border-color: #b07968; background: var(--soft-red); }
.notice.info { border-color: #8199b1; background: var(--soft-blue); }
.notice.success { border-color: #7a9d8b; background: var(--soft-green); }
.chapter-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.chapter { border: 1px solid var(--line); background: #ebe5d8; border-radius: 13px; margin-bottom: 17px; overflow: clip; }
.chapter > summary { padding: 18px 21px; font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.chapter > summary h3 { display: inline; color: inherit; font: inherit; margin: 0; }
.chapter > summary:hover { background: #e4dccb; }
.chapter-label { color: var(--gold); font-size: .8rem; display: block; margin-bottom: 3px; }
.chapter-body { padding: 0 14px 14px; }
.chapter-intro { margin: 0 5px 16px; font-size: .9rem; }
.route-card { position: relative; border: 1px solid #c3b397; border-radius: 12px; background: var(--panel); padding: 21px 23px; margin-bottom: 12px; box-shadow: 0 3px 9px rgb(46 40 31 / 4%); scroll-margin-top: 26px; }
.route-head { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: start; gap: 10px; }
.route-head h4 { margin: 0; }
.route-check { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--green); }
.step-label { color: var(--gold); font-size: .74rem; margin-bottom: 4px; letter-spacing: .03em; }
.route-card ol { margin-top: 14px; }
.route-card li { font-size: .96rem; }
.route-card .tip { padding: 11px 14px; border: 1px solid #c8b99e; border-radius: 8px; background: #f3ecdc; font-size: .86rem; }
.route-card .warning { padding: 11px 14px; border: 1px solid #b98570; border-radius: 8px; background: var(--soft-red); font-size: .86rem; }
.route-card .refs, .entry-detail .refs { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .84rem; margin-top: 13px; }
.route-card.is-complete { border-color: var(--green); padding-bottom: 62px; box-shadow: 0 5px 15px rgb(35 120 88 / 8%); }
.route-card.is-complete::after { content: "完了"; position: absolute; right: 16px; bottom: 13px; display: grid; place-items: center; width: 62px; height: 31px; border: 2px solid var(--red); border-radius: 4px 6px 5px 3px; background: radial-gradient(circle at 20% 30%, #fffef9 0 1px, transparent 1.4px) 0 0 / 10px 8px, #fffdf8d9; color: var(--red); font-size: .91rem; font-weight: 900; letter-spacing: .1em; line-height: 1; transform: none; text-shadow: .4px 0 rgb(120 25 23 / 35%); }
html[lang="en"] .route-card.is-complete::after { content: "DONE"; letter-spacing: .07em; }
.route-card.is-bumping { animation: card-bump .58s cubic-bezier(.22, 1.3, .36, 1); }
.route-card.is-bumping::after { animation: stamp-pop .58s cubic-bezier(.22, 1.3, .36, 1); }
@keyframes card-bump { 0% { transform: scale(1); } 36% { transform: scale(1.012); } 68% { transform: scale(.997); } 100% { transform: scale(1); } }
@keyframes stamp-pop { 0% { opacity: 0; transform: scale(1.35); } 58% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
.floating-progress { position: fixed; z-index: 80; top: 14px; right: 17px; display: grid; place-items: center; width: 70px; height: 70px; border: 3px solid var(--navy); border-radius: 50%; box-shadow: 0 5px 16px rgb(20 40 65 / 18%), inset 0 0 0 4px white; background: #fffef9f5; color: #194a3c; font-weight: 900; font-variant-numeric: tabular-nums; pointer-events: none; }
.floating-progress.is-bumping { animation: progress-bump .64s cubic-bezier(.22, 1.3, .36, 1); }
@keyframes progress-bump { 0%, 100% { transform: scale(1); } 34% { transform: scale(1.14); } 62% { transform: scale(.96); } }
.back-top { position: fixed; z-index: 90; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid #7e8998; border-radius: 50%; background: #fffdf8; color: var(--navy); box-shadow: 0 6px 18px rgb(20 40 65 / 18%); font-weight: 900; font-size: 1.15rem; }
.table-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin: 17px 0 12px; }
.table-filter label { font-size: .86rem; font-weight: 700; }
.table-filter input { flex: 1 1 200px; }
.table-filter select { max-width: 100%; }
.table-count { font-size: .84rem; color: var(--muted); margin-bottom: 8px; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #adbac8; border-radius: 10px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; text-align: left; line-height: 1.65; }
caption { text-align: left; padding: 12px 14px; font-weight: 800; color: var(--navy); background: #faf6eb; }
th { padding: 11px 13px; background: var(--navy); color: #fff; font-weight: 700; white-space: nowrap; }
td { padding: 12px 13px; border-top: 1px solid #d4dce3; vertical-align: top; }
tbody tr:nth-child(even) { background: #edf2f7; }
td.name { min-width: 125px; font-weight: 700; }
td.effect { min-width: 220px; }
td.location { min-width: 170px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price { display: block; font-weight: 700; white-space: nowrap; }
.item-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 13px; }
.entry-detail { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 0 18px; scroll-margin-top: 25px; }
.entry-detail > summary { padding: 15px 0; color: var(--navy); font-weight: 800; }
.entry-detail > div { padding-bottom: 15px; font-size: .9rem; }
.data-pairs { margin: 10px 0; display: grid; grid-template-columns: minmax(85px, .4fr) minmax(0, 1fr); gap: 5px 14px; }
.data-pairs dt { color: var(--muted); }
.data-pairs dd { margin: 0; }
.form-check { display: flex; align-items: center; gap: 7px; min-height: 26px; font-size: .82rem; white-space: nowrap; }
.entry-detail th, .entry-detail td { overflow-wrap: normal; word-break: normal; padding: 7px 8px; }
.form-check input { width: 19px; height: 19px; accent-color: var(--green); flex-shrink: 0; }
.tag { display: inline-block; margin: 0 5px 5px 0; padding: 1px 8px; border: 1px solid #a99879; border-radius: 20px; color: var(--gold); background: #fffdf4; font-size: .73rem; white-space: nowrap; }
.boss-card { scroll-margin-top: 26px; }
.boss-heading { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.boss-heading h3 { margin: 0; }
.boss-stats { display: flex; flex-wrap: wrap; gap: 6px 17px; font-size: .84rem; margin-bottom: 15px; color: var(--muted); }
.boss-strategy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.boss-strategy h4 { font-size: .94rem; }
.boss-strategy p, .boss-strategy li { font-size: .91rem; }
.empty-results { padding: 20px 4px; color: var(--muted); }
.footer { border-top: 1px solid #c1b69f; padding: 25px 85px 84px 30px; text-align: center; }
.footer a { font-size: .92rem; font-weight: 800; }
.original-name { display: block; color: var(--muted); font-weight: 400; font-size: .76rem; }
.noscript { max-width: 1376px; margin: 18px auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }

@media (max-width: 1000px) {
  .layout { grid-template-columns: 196px minmax(0, 1fr); gap: 20px; padding-right: 22px; padding-left: 22px; }
  .hero-inner { padding-left: 32px; }
  .critical, .search-results { margin-left: 22px; margin-right: 22px; }
  .toc { padding: 15px 12px; }
  .progress-panel { grid-template-columns: 1fr; }
  .progress-summary { grid-template-columns: 1fr auto; justify-items: start; align-items: center; }
  .item-details, .boss-strategy { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .utility { padding: 10px 84px 10px 17px; gap: 5px; min-height: 81px; }
  .guide-link { font-size: .76rem; }
  .language-switch button { padding: 3px 11px; font-size: .72rem; min-height: 31px; }
  .floating-progress { width: 58px; height: 58px; top: 11px; right: 12px; border-width: 2px; font-size: .9rem; }
  .hero-inner { padding: 24px 20px 25px; }
  .hero h1 { font-size: clamp(1.52rem, 7.1vw, 2.15rem); }
  html[lang="en"] .hero h1 { font-size: clamp(1.47rem, 6.8vw, 2.1rem); }
  .edition { font-size: .7rem; letter-spacing: .05em; }
  .category-nav-inner { padding: 0 18px; gap: 19px; }
  .category-nav a { font-size: .81rem; min-height: 48px; }
  .workbar { padding: 13px 17px; gap: 11px; }
  .search-form { flex-basis: 100%; gap: 6px; }
  .search-label { font-size: .78rem; }
  .search-form input { padding: 8px; font-size: .85rem; }
  .search-form .button { font-size: .75rem; padding: 6px 9px; }
  .workbar-actions { width: 100%; justify-content: flex-end; }
  .workbar-actions .button { min-height: 37px; font-size: .78rem; }
  .search-results { padding: 17px; margin: 0 15px 17px; }
  .search-results { width: auto; margin-right: 79px; }
  .search-result-list { grid-template-columns: 1fr; }
  .critical { margin: 0 15px 18px; padding: 14px 16px; }
  .critical p { font-size: .86rem; }
  .layout { display: block; padding: 0 15px 22px; }
  .toc { position: static; max-height: none; margin-bottom: 22px; padding: 17px; }
  .toc-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; }
  .toc a { padding: 5px 3px; font-size: .81rem; }
  .toc .toc-section { grid-column: 1 / -1; display: contents; }
  .section { margin-bottom: 22px; }
  .panel { padding: 19px 17px; border-radius: 13px; }
  h2 { font-size: 1.2rem; }
  .progress-numbers { font-size: 1.15rem; }
  .progress-summary { gap: 10px; }
  .progress-summary .button { font-size: .75rem; padding: 6px 9px; }
  .notice-grid, .summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .notice { padding: 16px 17px; }
  .chapter > summary { padding: 16px; font-size: 1rem; }
  .chapter-body { padding: 0 9px 9px; }
  .chapter-intro { font-size: .87rem; }
  .route-card { padding: 18px 15px; }
  .route-head { gap: 8px; }
  .route-head h4 { font-size: 1rem; }
  .route-card li { font-size: .94rem; line-height: 1.85; }
  .route-card .tip, .route-card .warning { padding: 10px 12px; font-size: .84rem; }
  .route-card.is-complete { padding-bottom: 60px; }
  .table-filter { gap: 8px; }
  .table-filter input { width: 100%; flex-basis: 100%; }
  .table-filter select { min-width: 0; flex: 1 1 130px; font-size: .84rem; }
  table { font-size: .82rem; }
  th, td { padding: 10px 11px; }
  td.name { min-width: 135px; }
  td.effect { min-width: 210px; }
  .item-details { grid-template-columns: 1fr; }
  .entry-detail { padding: 0 16px; }
  .back-top { right: 15px; bottom: max(17px, env(safe-area-inset-bottom)); }
}

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

@media print {
  @page { margin: 14mm 12mm; }
  :root, body { background: #fff; color: #111; font-size: 10pt; }
  .no-print, .utility, .category-nav, .workbar, .toc, .floating-progress, .back-top, .footer, .search-results, .table-filter, .chapter-controls, .save-status, .progress-summary button { display: none !important; }
  .hero { background: #fff !important; color: #111; border-bottom: 1px solid #555; }
  .hero-inner { padding: 0 0 12px; }
  .hero h1, html[lang="en"] .hero h1 { font-size: 24pt; color: #111; }
  .edition { color: #444; }
  .layout { display: block; padding: 0; }
  main { max-width: none; padding-right: 0; }
  .critical { margin: 15px 0; }
  .panel, .route-card, .chapter, .notice, .entry-detail { box-shadow: none; }
  .route-card, .notice, .entry-detail, .boss-card { break-inside: avoid; }
  .chapter { background: #fff; overflow: visible; }
  .table-wrap { overflow: visible; }
  table { font-size: 7.5pt; }
  th { background: #e4e8ed !important; color: #111 !important; }
  td.name, td.effect, td.location { min-width: 0; }
  th, td { padding: 6px; white-space: normal; }
  .item-details { display: block; }
  .entry-detail { margin-bottom: 12px; }
  .route-card.is-complete::after { print-color-adjust: exact; }
}
