:root {
  --navy: #17375f;
  --paper: #fffef9;
  --ink: #111827;
  --muted: #46536a;
  --link: #075b9a;
  --gold: #a76800;
  --green: #237858;
  --red: #b3332f;
  --line: #b7a991;
  color-scheme: light;
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: #f2efe7;
  font-size: 16px;
  line-height: 1.78;
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow-wrap: anywhere;
}
a {
  color: var(--link);
  text-underline-offset: .2em;
}
button, input {
  font: inherit;
}
button {
  cursor: pointer;
}
button, .button {
  padding: 9px 15px;
  border: 1px solid #9c8a6e;
  border-radius: 10px;
  background: var(--paper);
  color: var(--navy);
  font-size: .88rem;
  font-weight: 700;
}
button:hover {
  background: #e7edf3;
}
:focus-visible {
  outline: 3px solid #b77719;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: white;
  padding: 8px;
}
.skip:focus {
  top: 5px;
}
.topbar {
  max-width: 1480px;
  margin: auto;
  padding: 8px 112px 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar a {
  font-size: .84rem;
}
.languages {
  display: flex;
  gap: 8px;
}
.languages button {
  padding: 6px 15px;
  border-radius: 999px;
  font-size: .78rem;
}
.languages button[aria-pressed="true"] {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.title-band {
  background: linear-gradient(118deg, #17375f, #1d3f6b);
  color: white;
}
.title-inner {
  max-width: 1480px;
  margin: auto;
  padding: 40px clamp(24px, 5.2vw, 80px) 31px;
}
h1 {
  margin: 0;
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 4.1vw, 3.45rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: .015em;
  text-wrap: balance;
}
.edition {
  margin: 9px 0 0;
  font-size: .84rem;
  color: #f1eadb;
}
html[lang="en"] h1 {
  font-size: clamp(2rem, 3.89vw, 3.25rem);
}
.nav {
  background: var(--paper);
  border-bottom: 1px solid #b6bdc8;
  box-shadow: 0 5px 13px #1328440b;
}
.nav-inner {
  max-width: 1480px;
  margin: auto;
  display: flex;
  gap: 24px;
  padding: 11px clamp(20px, 5.2vw, 76px);
  overflow-x: auto;
  white-space: nowrap;
}
.nav a {
  font-size: .92rem;
  font-weight: 850;
  text-decoration: none;
  padding: 0 0 3px;
}
.nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
}
.tools {
  max-width: 1440px;
  padding: 12px 5%;
  margin: auto;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.floating-progress {
  position: absolute;
  z-index: 100;
  right: 18px;
  top: 15px;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 3px solid #315783;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 5px #edf0f2, 0 7px 18px #152d4922;
  color: #185a45;
  font-weight: 800;
  pointer-events: none;
}
.notices {
  max-width: 1340px;
  margin: 12px auto 22px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 14px;
}
.notice {
  border: 1px solid #aa6a55;
  border-radius: 14px;
  background: #f5e8e0;
  padding: 16px 18px;
}
.notice p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.8;
}
.notice strong {
  display: block;
  color: var(--navy);
  margin-bottom: 5px;
}
.search-area {
  max-width: 1300px;
  margin: 14px auto 25px;
  padding: 0 20px;
}
.search-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.search-label {
  flex: 1;
  min-width: min(100%, 220px);
  font-size: .85rem;
  color: var(--navy);
  font-weight: 700;
}
.search-label input {
  width: 100%;
  margin-top: 5px;
  padding: 10px 13px;
  border: 1px solid #889db5;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}
.search-results {
  margin-top: 10px;
  border: 1px solid #b2bbc5;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--paper);
  max-height: 420px;
  overflow-y: auto;
}
.search-results:empty {
  display: none;
}
.search-count {
  color: var(--navy);
  margin: 0 0 10px;
  font-weight: 700;
}
.search-result {
  padding: 10px 0;
  border-bottom: 1px solid #ddd5c5;
}
.search-result:last-child {
  border: 0;
}
.search-result a {
  display: block;
  font-weight: 700;
}
.search-result p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .85rem;
}
.storage-warning {
  max-width: 1300px;
  margin: 15px auto;
  padding: 14px 20px;
  border: 1px solid #a94835;
  border-radius: 12px;
  background: #fff3e9;
}
.storage-warning p {
  margin: 0 0 8px;
}
.layout {
  max-width: 1440px;
  margin: auto;
  padding: 6px clamp(20px, 4vw, 56px) 80px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.contents {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  padding: 17px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  box-shadow: 0 14px 28px #332c1d12;
}
.contents summary {
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .09em;
  color: var(--gold);
  cursor: pointer;
}
.contents a {
  display: block;
  font-size: .84rem;
  line-height: 1.6;
  padding: 7px 5px;
  color: var(--muted);
  text-decoration: none;
}
.contents a:hover {
  color: var(--link);
  text-decoration: underline;
}
main {
  min-width: 0;
}
.progress-panel {
  border: 1px solid #c7b99c;
  border-radius: 18px;
  background: #faf5e9;
  padding: 21px 24px;
  margin-bottom: 25px;
}
.progress-panel h2 {
  font-size: 1rem;
  margin: 0;
}
.progress-panel p {
  margin: 7px 0;
  font-size: .83rem;
  color: var(--muted);
}
.progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.progress-summary strong {
  color: var(--gold);
  font-size: 1.2rem;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: var(--green);
  display: block;
  margin-top: 12px;
}
h2 {
  font-family: YuMincho, "Yu Mincho", serif;
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1.5;
}
h3 {
  color: var(--navy);
  line-height: 1.6;
}
.section {
  margin-bottom: 34px;
  scroll-margin-top: 18px;
}
.section > h2 {
  margin: 0 0 14px;
}
.lead {
  margin: 0 0 18px;
  color: var(--muted);
}
.chapter {
  margin-bottom: 26px;
}
.chapter > summary {
  color: var(--navy);
  font-family: YuMincho, "Yu Mincho", serif;
  font-weight: 800;
  font-size: 1.36rem;
  padding: 13px 0;
  cursor: pointer;
}
.chart-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}
.card {
  position: relative;
  border: 1px solid #bcad94;
  border-radius: 16px;
  background: var(--paper);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 5px 14px #30291c0b;
  scroll-margin-top: 20px;
}
.card h3 {
  font: 800 1rem/1.65 "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  margin: 0 0 11px;
}
.card p, .card li {
  margin: 8px 0;
  line-height: 1.78;
}
.card ol {
  padding-left: 1.45em;
  margin: 0;
}
.check-label {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  cursor: pointer;
}
.check-label input {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  accent-color: var(--green);
  margin: 3px 0 0;
}
.card.checked {
  border-color: var(--green);
  padding-bottom: 60px;
  box-shadow: 0 7px 18px #18574219;
}
.card.checked::after {
  position: absolute;
  right: 15px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 31px;
  border: 2px solid #b3332feb;
  border-radius: 4px 6px 5px 3px;
  background: radial-gradient(circle at 16% 28%, #fffdf8eb 0 1px, transparent 1.35px) 0 0 / 9px 8px, #fffdf8dc;
  color: var(--red);
  content: "完了";
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1;
  transform: none;
}
html[lang="en"] .card.checked::after {
  content: "DONE";
  letter-spacing: .04em;
}
.tip {
  border: 1px solid #c5b794;
  border-radius: 8px;
  background: #f4ecd9;
  padding: 10px 13px;
  margin-top: 13px;
  font-size: .88rem;
}
.references {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: .84rem;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #a9b7cc;
  border-radius: 12px;
  background: var(--paper);
  scroll-margin-top: 20px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
  font-size: .9rem;
  line-height: 1.7;
}
th {
  background: #203e65;
  color: white;
  text-align: left;
  font-size: .84rem;
}
th, td {
  border-right: 1px solid #ccd5e1;
  border-bottom: 1px solid #ccd5e1;
  padding: 10px 12px;
  vertical-align: top;
}
th:last-child, td:last-child {
  border-right: 0;
}
tr:last-child td {
  border-bottom: 0;
}
tr:nth-child(even) td {
  background: #eff3f6;
}
th:first-child, td:first-child {
  min-width: 150px;
  font-weight: 700;
}
td {
  min-width: 90px;
}
td p {
  margin: 5px 0;
}
tr:target td {
  background: #fff1c8;
}
.row-stamp {
  display: inline-block;
  margin: 10px 0 0 35px;
  padding: 3px 8px;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.2;
  transform: none;
}
[hidden] {
  display: none !important;
}
.table-note {
  font-size: .85rem;
  margin: 10px 0 20px;
  color: var(--muted);
}
.back-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  background: #fffdf8;
  border: 1px solid #7e8998;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 8px 22px #09182c38;
  z-index: 110;
}
footer {
  border-top: 1px solid #c8bcaa;
  padding: 23px 80px 70px 20px;
  text-align: center;
  background: var(--paper);
}
.bump {
  animation: card-bump .58s ease-out;
}
.card.checked.bump::after {
  animation: stamp-in .58s ease-out;
}
tr.checked.bump .row-stamp {
  animation: stamp-in .58s ease-out;
}
.floating-progress.bump {
  animation: progress-bump .64s ease-out;
}
@keyframes card-bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.012);
  }
  70% {
    transform: scale(.997);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes stamp-in {
  0% {
    transform: scale(1.42);
    opacity: .3;
  }
  55% {
    transform: scale(.92);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes progress-bump {
  0%, 100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.18);
  }
  55% {
    transform: scale(.94);
  }
  75% {
    transform: scale(1.04);
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 8px 87px 8px 18px;
    gap: 6px;
  }
  .topbar a {
    font-size: .72rem;
  }
  .languages {
    gap: 6px;
  }
  .languages button {
    padding: 5px 11px;
  }
  .title-inner {
    padding: 28px 20px 24px;
  }
  h1 {
    font-size: clamp(1.55rem, 7vw, 2.15rem);
    text-wrap: wrap;
  }
  html[lang="en"] h1 {
    font-size: clamp(1.6rem, 7.38vw, 2.2rem);
  }
  .edition {
    font-size: .75rem;
  }
  .nav-inner {
    gap: 20px;
    padding: 9px 20px;
  }
  .nav a {
    font-size: .84rem;
  }
  .floating-progress {
    width: 58px;
    height: 58px;
    top: 10px;
    right: 10px;
    font-size: .9rem;
  }
  .tools {
    padding: 11px 20px;
  }
  .notices {
    margin: 8px auto 19px;
    gap: 10px;
    padding-left: 15px;
    padding-right: 74px;
  }
  .notice {
    padding: 13px 15px;
  }
  .notice p {
    font-size: .84rem;
  }
  .layout {
    display: block;
    padding: 0 74px 80px 15px;
  }
  .contents {
    position: static;
    max-height: none;
    margin-bottom: 25px;
    padding: 14px 17px;
  }
  .contents a {
    padding: 8px 4px;
  }
  .progress-panel {
    padding: 17px 18px;
  }
  .progress-summary {
    align-items: flex-start;
  }
  .progress-summary strong {
    font-size: 1.08rem;
  }
  .card {
    padding: 17px 15px;
  }
  .card p, .card li {
    font-size: .96rem;
  }
  .card ol {
    padding-left: 1.35em;
  }
  .chapter > summary {
    font-size: 1.2rem;
  }
  .search-area {
    padding: 0 74px 0 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar, .nav, .tools, .contents, .search-area, .storage-warning, .floating-progress, .back-top, .chart-actions, footer, .progress-panel {
    display: none !important;
  }
  :root, body {
    background: white;
    color: black;
    font-size: 11pt;
  }
  .title-band {
    background: white;
    color: black;
  }
  .edition {
    color: black;
  }
  .title-inner {
    padding: 12px 0;
  }
  h1 {
    font-size: 23pt;
  }
  .layout {
    display: block;
    padding: 0;
  }
  .notices {
    display: block;
    padding: 0;
  }
  .notice {
    margin: 8px 0;
    background: white;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
  .table-wrap {
    overflow: visible;
  }
  table {
    min-width: 0;
    font-size: 8pt;
  }
  th, td {
    min-width: 0 !important;
    padding: 5px;
  }
  th {
    background: #ddd;
    color: black;
  }
  a {
    color: black;
  }
}
