:root {
  --navy: #17375f;
  --navy-light: #1d3f6b;
  --paper: #fffef9;
  --ink: #172438;
  --muted: #46536a;
  --blue: #075b9a;
  --gold: #946100;
  --green: #237858;
  --red: #b3332f;
  --line: #b9ad99;
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  line-height: 1.78;
  color-scheme: light;
}
* {
   box-sizing: border-box;
   }
html {
   scroll-behavior: smooth;
   scroll-padding-top: 24px;
   }
body {
   margin: 0;
   background: linear-gradient(#e9e2d4, #f2efe7 560px);
   }
button, input {
   font: inherit;
   }
button {
   cursor: pointer;
   }
a {
   color: var(--blue);
   text-underline-offset: .22em;
   }
button, input {
   min-height: 42px;
   }
button {
   border: 1px solid #8b7e6c;
   border-radius: 9px;
   background: var(--paper);
   color: var(--ink);
   padding: 7px 13px;
   }
button:hover {
   border-color: var(--blue);
   background: #f1ece0;
   }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
   outline: 3px solid #bf851c;
   outline-offset: 3px;
   }
.language-bar {
   background: #eee8dc;
   border-bottom: 1px solid var(--line);
   display: flex;
   gap: 8px;
   justify-content: flex-end;
   padding: 8px max(100px, calc((100vw - 1400px) / 2 + 100px)) 8px 18px;
   }
.language-bar button {
   border-radius: 24px;
   min-height: 34px;
   padding: 4px 14px;
   font-size: .82rem;
   }
.language-bar button[aria-pressed="true"] {
   background: var(--navy);
   color: white;
   border-color: var(--navy);
   }
.hero {
   background: linear-gradient(118deg, var(--navy), var(--navy-light));
   color: #fff;
   }
.hero-inner {
   max-width: 1440px;
   margin: auto;
   padding: 32px clamp(22px, 5vw, 76px) 34px;
   padding-right: 130px;
   }
.edition {
   margin: 0 0 7px;
   color: #e6e0d1;
   font-size: .86rem;
   font-weight: 700;
   }
h1 {
   font-family: YuMincho, "Yu Mincho", serif;
   font-size: clamp(2rem, 4.1vw, 3.45rem);
   line-height: 1.25;
   margin: 0;
   text-wrap: balance;
   }
html[lang="en"] h1 {
   font-size: clamp(1.8rem,3.7vw,3.25rem);
   }
.category-nav {
   overflow-x: auto;
   background: #fffdf8;
   border-bottom: 1px solid #aeb8c7;
   box-shadow: 0 3px 12px #14233c13;
   }
.nav-inner {
   display: flex;
   gap: 24px;
   width: max-content;
   min-width: min(100%, 1400px);
   margin: auto;
   padding: 12px 26px;
   }
.category-nav a {
   color: var(--blue);
   font-size: .92rem;
   font-weight: 850;
   text-decoration: none;
   white-space: nowrap;
   border-bottom: 2px solid transparent;
   }
.category-nav a[aria-current="page"] {
   color: var(--navy);
   border-color: var(--gold);
   }
.utility {
   max-width: 1400px;
   margin: auto;
   padding: 14px 26px;
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   }
.actions {
   display: flex;
   flex-wrap: wrap;
   gap: 9px;
   }
.all-guides {
   font-weight: 750;
   }
.search-panel {
   max-width: 1348px;
   margin: 0 auto 20px;
   padding: 16px;
   border: 1px solid #aeb8c7;
   border-radius: 12px;
   background: #f8f5ed;
   }
.search-row {
   display: flex;
   gap: 10px;
   align-items: end;
   }
.search-field {
   flex: 1;
   min-width: 0;
   }
.search-field label {
   display: block;
   font-weight: 750;
   margin-bottom: 4px;
   font-size: .88rem;
   }
.search-field input {
   width: 100%;
   border: 1px solid #7f91ad;
   border-radius: 7px;
   background: white;
   padding: 10px 12px;
   min-width: 0;
   }
.search-results:empty {
   display: none;
   }
.search-results {
   max-height: 520px;
   overflow: auto;
   padding: 10px 4px 0;
   }
.search-results ul {
   padding-left: 22px;
   }
.search-results li {
   margin: 0 0 14px;
   }
.search-results small {
   color: var(--muted);
   display: block;
   }
.search-results p {
   margin: 3px 0 10px;
   }
.page-intro {
   max-width: 1348px;
   margin: auto;
   padding-bottom: 20px;
   }
.notice {
   border: 1px solid #9c6757;
   background: #f5e8df;
   border-radius: 12px;
   padding: 16px 20px;
   margin: 0 0 14px;
   }
.notice h2 {
   font-size: 1rem;
   margin: 0 0 6px;
   }
.notice p {
   margin: 4px 0;
   }
.progress-panel {
   border: 1px solid var(--line);
   border-radius: 15px;
   background: linear-gradient(135deg, #fffefa, #f7f1e5);
   padding: 18px 22px;
   display: grid;
   grid-template-columns: minmax(0, 1fr) auto;
   gap: 18px;
   align-items: center;
   box-shadow: 0 8px 22px #40301a12;
   }
.progress-panel h2 {
   margin: 0 0 4px;
   font-size: 1rem;
   color: var(--navy);
   }
.progress-panel p {
   margin: 0 0 8px;
   color: var(--muted);
   font-size: .85rem;
   }
.progress-count {
   color: var(--gold);
   font-size: 1.25rem;
   font-weight: 850;
   white-space: nowrap;
   }
.progress-actions {
   display: grid;
   justify-items: end;
   gap: 9px;
   }
progress {
   display: block;
   width: 100%;
   height: 14px;
   accent-color: var(--green);
   }
.storage-message {
   margin: 0;
   font-size: .85rem;
   color: #883d25;
   }
.retry-storage {
   margin-top: 7px;
   }
.floating-progress {
   position: fixed;
   z-index: 200;
   top: 14px;
   right: 16px;
   width: 72px;
   height: 72px;
   display: grid;
   place-items: center;
   border: 3px solid var(--navy-light);
   border-radius: 50%;
   background: #fffdf8f7;
   box-shadow: 0 8px 24px #09182c35, inset 0 0 0 4px #fff;
   color: var(--green);
   font-weight: 900;
   pointer-events: none;
   }
.floating-progress.bump {
   animation: progress-bump .64s ease;
   }
.layout {
   display: grid;
   grid-template-columns: 250px minmax(0,1fr);
   gap: 34px;
   max-width: 1400px;
   padding: 4px 26px 90px;
   margin: auto;
   }
.toc {
   align-self: start;
   position: sticky;
   top: 20px;
   max-height: calc(100vh - 40px);
   overflow: auto;
   border: 1px solid var(--line);
   border-radius: 16px;
   background: var(--paper);
   padding: 16px;
   box-shadow: 0 12px 32px #40301a13;
   }
.toc summary {
   cursor: pointer;
   font-weight: 850;
   color: var(--gold);
   font-size: .86rem;
   }
.toc a {
   display: block;
   color: var(--muted);
   text-decoration: none;
   padding: 7px 5px;
   font-size: .86rem;
   line-height: 1.4;
   }
.toc a:hover {
   color: var(--blue);
   background: #f2ebdd;
   border-radius: 5px;
   }
main {
   min-width: 0;
   }
h2 {
   color: var(--navy);
   font-size: 1.45rem;
   line-height: 1.45;
   }
.page-heading {
   margin: 0 0 8px;
   }
.intro-copy {
   color: var(--muted);
   margin: 0 0 22px;
   }
.section-controls {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   margin-bottom: 18px;
   }
.chapter {
   border: 1px solid var(--line);
   border-radius: 16px;
   background: #eae2d3;
   margin: 0 0 20px;
   overflow: clip;
   box-shadow: 0 8px 24px #2b231812;
   }
.chapter > summary {
   list-style: none;
   cursor: pointer;
   background: var(--paper);
   padding: 20px 22px;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
   color: var(--navy);
   font-size: 1.15rem;
   font-weight: 850;
   line-height: 1.5;
   }
.chapter > summary::-webkit-details-marker {
   display: none;
   }
.chapter > summary::after {
   content: "+";
   border: 1px solid var(--line);
   border-radius: 50%;
   width: 30px;
   height: 30px;
   flex: 0 0 30px;
   text-align: center;
   line-height: 28px;
   color: var(--gold);
   }
.chapter[open] > summary::after {
   content: "−";
   }
.chapter-body {
   padding: 12px 20px 22px;
   }
.chapter-intro {
   margin: 4px 0 14px;
   color: #374151;
   font-size: .92rem;
   }
.step {
   position: relative;
   border: 1px solid #c4b8a4;
   border-radius: 13px;
   background: var(--paper);
   margin-top: 12px;
   padding: 18px 20px 18px 62px;
   }
.step h3 {
   margin: 0 0 10px;
   font-size: 1.06rem;
   line-height: 1.5;
   }
.step ol {
   margin: 0;
   padding-left: 22px;
   }
.step li + li {
   margin-top: 9px;
   }
.step input[type="checkbox"] {
   position: absolute;
   left: 18px;
   top: 20px;
   width: 24px;
   height: 24px;
   min-height: 24px;
   accent-color: var(--green);
   cursor: pointer;
   }
.step.checked {
   border-color: var(--green);
   padding-bottom: 58px;
   box-shadow: 0 6px 18px #18574218;
   }
.stamp {
   display: none;
   }
.checked > .stamp {
   position: absolute;
   bottom: 12px;
   right: 15px;
   display: grid;
   place-items: center;
   width: 62px;
   height: 31px;
   border: 2px solid var(--red);
   border-radius: 4px 6px 5px 3px;
   color: var(--red);
   background: radial-gradient(circle at 16% 28%, #fffdf8dc 0 1px, transparent 1.35px) 0 0 / 9px 8px, #fffdf8dc;
   font-size: .85rem;
   font-weight: 900;
   letter-spacing: .09em;
   line-height: 1;
   }
.step.bump {
   animation: card-bump .58s ease;
   }
.step.bump > .stamp {
   animation: stamp-pop .58s ease;
   }
.reference-link {
   display: inline-block;
   margin-top: 11px;
   font-size: .88rem;
   }
.panel {
   border: 1px solid var(--line);
   border-radius: 15px;
   background: var(--paper);
   padding: 20px;
   margin-bottom: 20px;
   box-shadow: 0 8px 24px #2b231812;
   }
.panel h2 {
   margin-top: 0;
   }
.table-wrap {
   width: 100%;
   overflow: auto;
   border: 1px solid #aeb8c7;
   border-radius: 9px;
   }
table {
   border-collapse: collapse;
   width: 100%;
   min-width: 740px;
   font-size: .9rem;
   line-height: 1.65;
   }
th {
   background: #223f67;
   color: #fff;
   text-align: left;
   padding: 11px;
   vertical-align: top;
   }
td {
   padding: 11px;
   border-top: 1px solid #c5cfde;
   border-right: 1px solid #d8dfea;
   vertical-align: top;
   min-width: 100px;
   }
td:first-child {
   min-width: 160px;
   font-weight: 650;
   }
td:last-child {
   min-width: 220px;
   }
tr:nth-child(even) {
   background: #eef2f6;
   }
.table-note {
   color: var(--muted);
   font-size: .85rem;
   margin-bottom: 12px;
   }
.cards {
   display: grid;
   grid-template-columns: repeat(2,minmax(0,1fr));
   align-items: start;
   gap: 16px;
   }
.cards .panel {
   margin: 0;
   }
.cards details > summary {
   font-weight: 800;
   color: var(--navy);
   cursor: pointer;
   }
.cards p {
   margin-bottom: 0;
   }
.back-top {
   position: fixed;
   right: 18px;
   bottom: 18px;
   z-index: 300;
   display: grid;
   place-items: center;
   width: 46px;
   height: 46px;
   min-height: 46px;
   padding: 0;
   border-radius: 50%;
   border: 1px solid #7e8998;
   background: #fffdf8;
   color: var(--navy);
   box-shadow: 0 8px 22px #09182c35;
   font-size: 1.15rem;
   font-weight: 900;
   }
.step, .panel, .chapter, tr {
   scroll-margin-top: 20px;
   }
footer {
   padding: 25px 80px 35px 24px;
   border-top: 1px solid var(--line);
   background: #eee8dc;
   text-align: center;
   }
.skip {
   position: absolute;
   left: 15px;
   top: -100px;
   z-index: 600;
   padding: 12px;
   background: white;
   }
.skip:focus {
   top: 12px;
   }
[hidden] {
   display: none !important;
   }
@keyframes card-bump {
   0%,100% {
   transform: scale(1);
   }
 36% {
   transform: scale(1.012);
   }
 68% {
   transform: scale(.997);
   }
 }
@keyframes stamp-pop {
   0% {
   opacity: 0;
   transform: scale(1.35);
   }
 60% {
   opacity: 1;
   transform: scale(.94);
   }
 100% {
   opacity: 1;
   transform: scale(1);
   }
 }
@keyframes progress-bump {
   0%,100% {
   transform: scale(1);
   }
 35% {
   transform: scale(1.15);
   }
 65% {
   transform: scale(.95);
   }
 }
@media (max-width: 760px) {
  .language-bar {
   padding-right: 18px;
   }
  .hero-inner {
   padding: 25px 20px;
   }
  h1 {
   font-size: clamp(1.65rem,7vw,2.15rem);
   }
  html[lang="en"] h1 {
   font-size: 1.8rem;
   }
  .floating-progress { top: 10px; right: 10px; bottom: auto; left: auto; width: 58px; height: 58px; border-width: 2px; font-size: .9rem; }
  .nav-inner {
   padding: 11px 20px;
   gap: 20px;
   }
  .category-nav a {
   font-size: .85rem;
   }
  .utility {
   padding: 13px 16px;
   }
  .search-panel, .page-intro {
   margin-left: 15px;
   margin-right: 15px;
   }
  .search-panel {
   padding: 13px;
   }
  .search-row {
   flex-wrap: wrap;
   }
  .search-field {
   flex-basis: 100%;
   }
  .notice {
   padding: 14px 16px;
   }
  .progress-panel {
   grid-template-columns: 1fr;
   padding: 16px;
   }
  .progress-actions {
   display: flex;
   justify-content: space-between;
   align-items: center;
   flex-wrap: wrap;
   }
  .layout {
   grid-template-columns: 1fr;
   gap: 20px;
   padding: 0 15px 90px;
   }
  .toc {
   position: static;
   max-height: none;
   padding: 14px 16px;
   }
  .chapter > summary {
   padding: 17px;
   font-size: 1.05rem;
   }
  .chapter-body {
   padding: 12px 10px 18px;
   }
  .step {
   padding: 18px 14px;
   }
  .step h3 {
   padding-top: 38px;
   }
  .step input[type="checkbox"] {
   left: 14px;
   top: 17px;
   }
  .step ol {
   padding-left: 22px;
   }
  .cards {
   grid-template-columns: 1fr;
   }
  .panel {
   padding: 16px;
   }
  .back-top {
   right: max(18px, env(safe-area-inset-right));
   bottom: max(18px, env(safe-area-inset-bottom));
   }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
   animation: none !important;
   transition: none !important;
   scroll-behavior: auto !important;
   }
}
@media print {
  body {
   overflow: visible;
   }
  body::after {
   display: none;
   }
  #app {
   height: auto;
   overflow: visible;
   }
  .language-bar, .category-nav, .utility, .search-panel, .toc, .section-controls, .back-top, .floating-progress, .progress-actions, footer, .reference-link {
   display: none !important;
   }
  body, .hero, .chapter {
   background: white;
   color: #000;
   }
  .hero {
   border-bottom: 1px solid #777;
   }
  .hero-inner {
   padding: 15px 0;
   }
  h1 {
   font-size: 24pt;
   }
  .edition {
   color: #222;
   }
  .layout {
   display: block;
   padding: 0;
   }
  .page-intro {
   margin: 10px 0;
   }
  .chapter, .panel, .step {
   box-shadow: none;
   }
  .step {
   break-inside: avoid;
   }
  .table-wrap {
   overflow: visible;
   }
  table {
   min-width: 0;
   font-size: 8pt;
   }
  td {
   min-width: 0 !important;
   }
  th {
   background: #ddd;
   color: #000;
   }
}
.reference-link {
   margin-right: 14px;
   }
.table-wrap{
  border:0;
  border-top:1px solid #ccd5d5;
  border-radius:0}
.table-selector{
  display:grid;
  gap:8px;
  margin:0 0 20px}
.table-selector label{
  font-weight:700;
  color:#183349}
.table-selector select{
  width:100%;
  min-height:46px;
  padding:10px;
  background:#fffdf5;
  border:1px solid #849da5;
  border-radius:6px;
  color:#183349;
  font:inherit}
.mode-group{
  margin-bottom:20px;
  border:1px solid #b9c9c8;
  border-radius:7px;
  background:#fffdf6}
.mode-group>summary{
  padding:17px;
  font-weight:700;
  color:#234e65;
  cursor:pointer}
.mode-body{
  padding:0 16px 16px}
.battle-info{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 18px;
  margin:12px 0 18px;
  font-size:.88rem}
.battle-info>div{
  min-width:0}
.battle-info dt{
  font-weight:750;
  color:#17375f}
.battle-info dd{
  margin:2px 0;
  overflow-wrap:anywhere}
.check-row input[type="checkbox"]{
  width:24px;
  height:24px;
  min-height:24px;
  accent-color:#237858}
td.progress-cell{
  min-width:90px;
  width:90px;
  vertical-align:middle;
  text-align:center;
  font-weight:400}
.check-row.checked{
  background:#eef7f0}
.check-row.checked .stamp{
  display:grid;
  position:static;
  place-items:center;
  width:58px;
  height:28px;
  border:2px solid #b3332f;
  border-radius:4px;
  color:#b3332f;
  font-weight:900;
  font-size:.8rem;
  margin:8px auto 0;
  line-height:1;
  background:#fffef9}
.check-row.bump .stamp{
  animation:stamp-pop .58s ease}
.check-row td:nth-child(2){
  min-width:180px}
@media(max-width:760px){
  .battle-info{
  grid-template-columns:1fr}
}
@media print{
  td.progress-cell{
  min-width:50px!important}
.check-row input{
  display:none}
}

select:focus-visible { outline: 3px solid #bf851c; outline-offset: 3px; }
#sound-toggle[aria-pressed="true"] { background: #e6f4ed; border-color: #237858; color: #155a42; }
.panel p + p { margin-top: 12px; }
.step, .panel { overflow-wrap: anywhere; }
footer { padding-right: 84px; padding-left: 84px; }

body { overflow: hidden; }
#app { height: calc(100dvh - 76px); overflow: auto; scroll-behavior: smooth; }
body::after { content: ""; position: fixed; inset: auto 0 0; height: 76px; border-top: 1px solid var(--line); background: #f2efe7; pointer-events: none; z-index: 250; }
.floating-progress { z-index: 300; top: auto; bottom: 8px; left: 18px; right: auto; width: 58px; height: 58px; border-width: 2px; }
.language-bar { padding-right: max(18px, calc((100vw - 1400px) / 2 + 18px)); }
.hero-inner { padding-right: clamp(22px,5vw,76px); }
@media (max-width:760px) { .language-bar { padding-right: 18px; } .hero-inner { padding-right:20px; } }
@media (prefers-reduced-motion:reduce) { #app { scroll-behavior:auto!important; } }
@media print { body { overflow:visible; } body::after { display:none; } #app { height:auto; overflow:visible; } }
