:root {
  --navy: #17375f;
  --navy-light: #1d3f6b;
  --paper: #fffef9;
  --background: #f2efe7;
  --ink: #26384a;
  --muted: #586778;
  --line: #c9c6b9;
  --blue: #075b9a;
  --gold: #a76800;
  --green: #237858;
  --stamp: #b3332f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
html[data-language="ja"] .lang-en,
html[data-language="en"] .lang-ja { display: none !important; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #924f00; }
button, input { font: inherit; }
button {
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #abb6bf;
  border-radius: 7px;
  background: var(--paper);
  color: var(--navy);
  cursor: pointer;
  line-height: 1.45;
  transition: background-color .16s ease, box-shadow .16s ease;
}
button:hover { background: #e9f0f4; box-shadow: 0 2px 7px #17375f18; }
button:active { background: #dde8ee; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, .table-wrap:focus-visible {
  outline: 3px solid #ba7a13;
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  top: -90px;
  left: 16px;
  z-index: 10;
  padding: 12px;
  background: var(--paper);
}
.skip-link:focus { top: 10px; }
.hero {
  background: linear-gradient(120deg, var(--navy), var(--navy-light));
  color: #fffef8;
  border-bottom: 4px solid #c6a258;
}
.hero-inner { max-width: 1280px; margin: auto; padding: 25px 38px 28px; }
.hero-links { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.hero-links > a { color: #fff6df; font-size: 14px; }
.hero .gtl-guide-return71 { color: #fff6df !important; }
.language-switch { display: flex; gap: 7px; }
.language-switch button { min-height: 38px; padding: 6px 13px; font-size: 14px; }
.language-switch button[aria-pressed="true"] { background: #f3dba4; border-color: #e8c777; }
h1 {
  margin: 28px 0 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: 55.2px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .02em;
}
html[data-language="en"] h1 { font-size: 52px; letter-spacing: 0; }
.edition { margin: 0 0 23px; font-size: 15px; color: #f2e6ce; }
.category-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 13px;
  color: #fffef8;
  border: 1px solid #7890a9;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}
.category-nav a:hover { background: #ffffff16; }
.category-nav a[aria-current="page"] { background: #fff9eb; color: var(--navy); border-color: #e1c783; font-weight: 700; }
.page-shell { max-width: 1280px; margin: 0 auto; padding: 30px 72px 0 38px; }
.warnings { padding: 19px 24px; background: #fff7e7; border: 1px solid #cbb486; border-radius: 10px; }
.warnings h2 { color: #865000; margin: 0 0 6px; font-size: 19px; }
.warnings ul { margin: 0; padding-left: 23px; }
.warnings li + li { margin-top: 6px; }
.reading-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 20px 0 14px; }
.progress-panel { background: #f9fcf8; border: 1px solid #a4bba8; border-radius: 10px; padding: 20px 24px; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.progress-heading h2 { margin: 0; color: var(--green); font-size: 21px; }
#progress-count { margin: 8px 0 6px; font-weight: 700; }
progress { width: 100%; height: 12px; accent-color: var(--green); vertical-align: middle; }
progress::-webkit-progress-bar { background: #e3e9e1; border-radius: 8px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 8px; transition: width .25s ease; }
#group-counts { display: flex; flex-wrap: wrap; gap: 5px 22px; margin-top: 9px; font-size: 14px; }
.storage-explanation { margin-top: 10px; font-size: 14px; color: var(--muted); }
.storage-explanation summary { width: fit-content; cursor: pointer; }
.storage-explanation p { margin: 7px 0 0; }
.save-warning { margin-top: 15px; background: #fff1df; border: 1px solid #c5a273; border-radius: 7px; padding: 12px; }
.save-warning p { margin: 0 0 8px; }
.search-panel { margin: 22px 0 32px; padding: 20px 24px; background: #fffef9; border: 1px solid #b7c4cf; border-radius: 10px; }
.search-panel h2 { margin: 0 0 8px; font-size: 21px; color: var(--navy); }
.search-panel label { display: block; margin-bottom: 5px; font-size: 14px; color: var(--muted); }
.search-controls { display: flex; gap: 9px; }
#search-input { flex: 1 1 0; width: 0; min-width: 0; padding: 10px 12px; border: 1px solid #a7b5bf; border-radius: 6px; background: white; color: var(--ink); }
.search-controls button { flex: 0 0 auto; white-space: nowrap; }
#search-count { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
#search-results { list-style: none; padding: 0; margin: 12px 0 0; }
#search-results:empty { display: none; }
#search-results li { padding: 12px 0; border-top: 1px solid #d7dedf; }
#search-results a { font-weight: 700; }
.result-category { display: inline-block; color: var(--gold); font-size: 13px; margin-right: 10px; }
.result-context { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.reading-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 34px; align-items: start; }
.toc { position: sticky; top: 20px; background: #f8f6ef; border: 1px solid var(--line); border-radius: 9px; padding: 19px 18px; max-height: calc(100vh - 42px); overflow: auto; }
.toc h2 { margin: 0 0 10px; font-size: 18px; color: var(--navy); }
.toc ol { padding-left: 22px; margin: 0; }
.toc li { margin: 8px 0; font-size: 14px; }
main { min-width: 0; }
.category-title { margin: 0 0 17px; font-size: 28px; color: var(--navy); }
.chart-tools { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 23px; }
.guide-section { margin: 0 0 38px; scroll-margin-top: 22px; }
.guide-section > h2 { margin: 0 0 17px; padding-bottom: 10px; border-bottom: 2px solid #b18b41; font-size: 24px; color: var(--navy); line-height: 1.55; }
.entries { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 17px; }
.entry { position: relative; min-width: 0; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 2px 5px #172d4010; scroll-margin-top: 22px; transition: border-color .2s ease, background-color .2s ease; }
.entry.checkable { padding-bottom: 58px; }
.entry.is-done { border-color: #4b916d; background: #f7fbf4; }
.entry-detail summary { cursor: pointer; color: var(--navy); }
.entry-detail h3 { display: inline; margin: 0; font-size: 20px; line-height: 1.6; }
.entry-body { margin-top: 14px; }
.steps { padding-left: 25px; margin: 0; }
div.steps { padding-left: 0; }
.steps li { padding-left: 3px; margin: 0 0 11px; }
.steps p { margin: 0 0 11px; }
.steps li:last-child, .steps p:last-child { margin-bottom: 0; }
.facts { display: grid; gap: 7px; margin: 0 0 15px; padding: 12px 14px; border: 1px solid #d5d9d6; border-radius: 6px; background: #f4f5ee; font-size: 14px; }
.facts > div { display: grid; grid-template-columns: minmax(85px,.28fr) 1fr; gap: 12px; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.note { padding: 10px 13px; border: 1px solid #cfbb94; border-radius: 6px; background: #fff6df; font-size: 14px; }
.references { margin: 15px 0 0; padding-left: 22px; font-size: 14px; }
.references li + li { margin-top: 6px; }
.check-line { display: flex; gap: 10px; align-items: center; width: fit-content; min-height: 44px; cursor: pointer; font-size: 14px; color: var(--green); font-weight: 700; margin-top: 14px; }
.check-line input { width: 21px; height: 21px; margin: 0; accent-color: var(--green); cursor: pointer; flex: 0 0 auto; }
.stamp { display: none; position: absolute; bottom: 12px; right: 15px; min-width: 62px; height: 31px; padding: 0 9px; border: 2px double var(--stamp); border-radius: 5px; color: var(--stamp); font-size: 17px; font-weight: 800; line-height: 27px; letter-spacing: .12em; text-align: center; transform: none; background: repeating-linear-gradient(0deg,transparent 0,transparent 5px,#b3332f09 5px,#b3332f09 6px); pointer-events: none; }
.is-done > .stamp, .is-done > .table-check > .stamp { display: inline-block; }
.just-checked > .stamp, .just-checked > .table-check > .stamp { animation: press .24s ease-out; }
@keyframes press { from { opacity: .1; transform: scale(1.2); } to { opacity: 1; transform: scale(1); } }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; margin: 0 0 20px; border: 1px solid #bbc7cb; border-radius: 7px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
caption { text-align: left; padding: 12px 15px; color: var(--navy); background: #f5f1e6; font-weight: 700; }
thead th { background: var(--navy); color: white; text-align: left; font-weight: 600; }
th, td { padding: 12px 14px; border: 1px solid #d4d9d8; vertical-align: top; }
thead th { border-color: #516780; }
tbody th { font-weight: 600; text-align: left; }
tbody tr:nth-child(even) { background: #f4f6f1; }
.comparison th:first-child { min-width: 145px; }
.comparison td { min-width: 110px; }
.data-table th:first-child { min-width: 75px; }
.data-table td { min-width: 145px; }
.table-entry.is-done { background: #eaf5e9; }
.table-check { position: relative; padding-bottom: 47px; min-width: 160px !important; }
.table-check .check-line { margin: 0; }
.table-check .stamp { min-width: 48px; height: 25px; font-size: 13px; line-height: 21px; bottom: 10px; right: 12px; }
footer { margin-top: 42px; border-top: 1px solid var(--line); padding: 27px 72px 80px 0; text-align: center; }
#back-to-top { position: fixed; z-index: 8; right: max(18px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); width: 46px; min-height: 46px; height: 46px; padding: 0; border: 1px solid #9eaeb7; border-radius: 50%; background: #fffdf5; color: var(--navy); font-size: 24px; line-height: 1; box-shadow: 0 3px 9px #17375f2b; }
@media (max-width: 850px) {
  .hero-inner { padding: 20px 24px 24px; }
  h1 { font-size: 39px; }
  html[data-language="en"] h1 { font-size: 37px; }
  .page-shell { padding: 24px 72px 0 24px; }
  .reading-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; }
  .toc ol { columns: 2; column-gap: 32px; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 520px) {
  body { font-size: 16px; line-height: 1.78; }
  .hero-inner { padding: 16px 18px 21px; }
  .hero-links { gap: 10px; align-items: flex-start; }
  .hero-links > a { font-size: 12px; padding-top: 7px; }
  .language-switch { gap: 4px; flex: 0 0 auto; }
  .language-switch button { font-size: 12px; min-height: 36px; padding: 6px 8px; }
  h1 { font-size: 27.3px; margin: 24px 0 8px; line-height: 1.55; }
  html[data-language="en"] h1 { font-size: 28.8px; line-height: 1.4; }
  .edition { font-size: 13px; margin-bottom: 18px; }
  .category-nav { gap: 6px; }
  .category-nav a { padding: 7px 9px; font-size: 12px; min-height: 38px; }
  .page-shell { padding: 20px 72px 0 16px; }
  .warnings { padding: 15px 17px; font-size: 14px; }
  .warnings h2 { font-size: 18px; }
  .warnings ul { padding-left: 19px; }
  .reading-tools { align-items: stretch; gap: 10px; }
  .reading-tools button { font-size: 13px; padding: 8px 10px; height: 100%; }
  .reading-tools > button { max-width: 53%; }
  .progress-panel { padding: 17px 16px; }
  .progress-heading { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .progress-heading h2 { font-size: 19px; }
  .progress-heading button { font-size: 12px; padding: 7px 10px; }
  #group-counts { display: block; font-size: 13px; }
  #group-counts p { margin: 4px 0; }
  .search-panel { padding: 17px 16px; }
  .search-panel h2 { font-size: 19px; }
  .search-controls { gap: 7px; }
  .search-controls button { padding: 8px 10px; font-size: 13px; }
  .toc { padding: 16px; }
  .toc ol { columns: 1; }
  .category-title { font-size: 25px; }
  .guide-section > h2 { font-size: 21px; }
  .entry { padding: 17px 16px; }
  .entry.checkable { padding-bottom: 57px; }
  .entry-detail h3 { font-size: 18px; }
  .steps { padding-left: 22px; }
  .facts { padding: 10px; }
  .facts > div { display: block; }
  .facts dd { margin-top: 1px; }
  .stamp { min-width: 54px; height: 28px; line-height: 24px; font-size: 15px; }
  th, td { padding: 10px 12px; }
  footer { padding-right: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: white; font-size: 11pt; }
  .hero { background: white; color: #17375f; border-bottom: 2px solid #17375f; }
  .hero-inner, .page-shell { padding: 0; max-width: none; }
  h1, html[data-language="en"] h1 { font-size: 24pt; margin: 0 0 8pt; }
  .edition { color: #26384a; }
  .hero-links, .category-nav, .reading-tools, .progress-panel, .search-panel,
  .toc, .chart-tools, footer, #back-to-top, .skip-link { display: none !important; }
  .reading-layout { display: block; }
  .entry { box-shadow: none; break-inside: avoid; }
  .entry-detail summary { list-style: none; }
  .table-wrap { overflow: visible; border-radius: 0; }
  table { font-size: 9pt; }
  thead { display: table-header-group; }
  th, td { min-width: 0 !important; padding: 5pt; }
  .entry-body, .steps { overflow: visible; }
  a { color: #17375f; }
  .check-line { pointer-events: none; }
}
