:root {
  color-scheme: light;
  --ink: #233044;
  --muted: #526174;
  --navy: #183d68;
  --blue: #276a9d;
  --pale-blue: #eaf2f8;
  --paper: #f4f7fa;
  --white: #fff;
  --line: #cbd5df;
  --gold: #a87b24;
  --shadow: 0 5px 18px rgb(24 49 75 / 8%);
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.75; }
a { color: #145b91; text-underline-offset: .18em; }
a:hover { color: #0d3f68; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #e0a83b; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; z-index: 20; top: .5rem; left: .5rem; padding: .6rem 1rem; color: #fff; background: var(--navy); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { color: #fff; background: var(--navy); }
.return-bar, .title-row, .section-nav { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.return-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; }
.guide-return { color: #fff; font-weight: 700; }
.guide-return:hover { color: #e4eff8; }
.header-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.small-button, .quiet-button, .outline-button { min-height: 42px; padding: .45rem .8rem; border: 1px solid #fff; border-radius: 8px; color: #fff; background: #244c77; }
.small-button:hover, .quiet-button:hover { background: #315e8e; }
.title-row { padding: clamp(2.2rem, 7vw, 5rem) 0 2rem; }
.platform-label, .eyebrow { margin: 0; color: #d2e0ee; font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
h1 { max-width: 900px; margin: .25rem 0 0; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.2; }
.english-title { margin: .55rem 0 0; color: #dce8f3; font-size: clamp(1rem, 2.3vw, 1.4rem); letter-spacing: .04em; }
.section-nav { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 0 1rem; }
.section-nav a { padding: .35rem .7rem; border: 1px solid #718ba6; border-radius: 999px; color: #fff; text-decoration: none; }
.section-nav a:hover { background: #315e8e; }
main { width: min(1120px, calc(100% - 2rem)); margin: 1.5rem auto 4rem; }
.opening-note, .progress-panel, .content-section, .page-footer { border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.opening-note { margin-bottom: 1rem; padding: 1rem 1.2rem; background: #fff8e8; border-color: #e4cf9e; }
.note-heading { display: flex; align-items: center; gap: .65rem; }
.note-heading h2 { margin: 0; font-size: 1.15rem; }
.note-mark { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border: 1px solid #a87b24; border-radius: 50%; color: #735318; font-weight: 900; }
.opening-note p { margin: .45rem 0 0; }
.progress-panel { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 2fr) auto; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1rem 1.2rem; }
.progress-copy h2 { margin: 0; font-size: 1rem; }
.progress-copy p { margin: .2rem 0 0; }
#progressCount { color: var(--navy); font-weight: 800; font-variant-numeric: tabular-nums; }
.storage-status { color: var(--muted); font-size: .82rem; }
.progress-track { height: 14px; overflow: hidden; border: 1px solid #c2ced9; border-radius: 999px; background: #e8edf2; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #4b8a70; transition: width .28s ease; }
.quiet-button { border-color: #9aa9b8; color: var(--navy); background: #fff; }
.quiet-button:hover { color: #102e4d; background: #edf3f8; }
.content-section { margin-top: 1.2rem; padding: clamp(1rem, 3vw, 2rem); scroll-margin-top: 1rem; }
.section-heading { max-width: 850px; margin-bottom: 1.35rem; }
.section-heading .eyebrow { color: #63758a; }
h2 { line-height: 1.35; }
.section-heading h2 { margin: .25rem 0 .55rem; color: var(--navy); font-size: clamp(1.45rem, 3vw, 2rem); }
.section-heading p:last-child { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.info-card, .callout { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.info-card { padding: 1rem 1.1rem; }
.info-card h3, .callout h3 { margin: 0 0 .5rem; color: var(--navy); font-size: 1.08rem; }
.info-card ul, .callout ol { margin: .4rem 0 0; padding-left: 1.35rem; }
.info-card li + li, .callout li + li { margin-top: .35rem; }
.callout { margin-top: 1rem; padding: 1rem 1.1rem; background: var(--pale-blue); }
.callout p { margin: .45rem 0 0; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #fff; background: var(--navy); }
td { background: #fff; }
.mission-tools { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #f6f9fc; }
.mission-tools > label { display: block; margin-bottom: .35rem; font-weight: 700; }
#missionSearch { width: 100%; min-height: 46px; padding: .55rem .7rem; border: 1px solid #9cabb9; border-radius: 8px; background: #fff; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: .8rem; }
.filter-row > label:not(.checkbox-filter) { font-weight: 700; }
#worldFilter { min-height: 42px; max-width: 100%; padding: .4rem .6rem; border: 1px solid #9cabb9; border-radius: 8px; background: #fff; }
.checkbox-filter { display: inline-flex; align-items: center; gap: .45rem; }
.checkbox-filter input { width: 1.15rem; height: 1.15rem; }
.result-count { margin: .55rem 0 0; color: var(--muted); font-size: .9rem; }
.outline-button { margin: 0 0 1rem; border-color: var(--blue); color: var(--navy); background: #fff; }
.outline-button:hover { background: var(--pale-blue); }
.mission-list { display: grid; gap: .65rem; }
.mission-card { position: relative; overflow: clip; border: 1px solid #cbd5df; border-radius: 10px; background: #fff; }
.mission-card.is-complete { background: #f2f8f4; }
.mission-card.just-completed { animation: mission-complete .58s ease-out; }
@keyframes mission-complete {
  0% { box-shadow: 0 0 0 0 rgb(57 126 84 / 0%); }
  35% { box-shadow: 0 0 0 4px rgb(57 126 84 / 24%); }
  100% { box-shadow: 0 0 0 0 rgb(57 126 84 / 0%); }
}
.mission-card summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .75rem; padding: .85rem .95rem; cursor: pointer; list-style: none; }
.mission-card summary::-webkit-details-marker { display: none; }
.mission-card summary::after { content: "+"; color: var(--navy); font-size: 1.2rem; font-weight: 800; }
.mission-card[open] summary::after { content: "−"; }
.mission-card.is-complete:not([open]) summary::after { content: "✓"; color: #28724a; }
.mission-id { min-width: 3.4rem; padding: .12rem .4rem; border: 1px solid #b8c8d7; border-radius: 6px; color: var(--navy); background: #eef4f8; font-size: .82rem; font-weight: 800; text-align: center; }
.mission-title { min-width: 0; }
.mission-title strong { display: block; color: var(--navy); }
.mission-meta { display: block; color: var(--muted); font-size: .88rem; }
.mission-body { padding: .2rem 1rem 3.8rem; border-top: 1px solid #d6dee6; }
.mission-route, .mission-tip { margin: .7rem 0 0; }
.mission-route b, .mission-tip b { color: var(--navy); }
.mission-check { display: inline-flex; align-items: center; gap: .5rem; margin-top: .85rem; padding: .35rem .55rem; border: 1px solid #b7c8d7; border-radius: 8px; background: #f5f8fa; }
.mission-check input { width: 1.15rem; height: 1.15rem; }
.completion-stamp { display: none; position: absolute; right: .9rem; bottom: .55rem; padding: .08rem .62rem; border: 2px solid #b3332f; border-radius: 4px; color: #b3332f; font-size: .92rem; font-weight: 900; line-height: 1.45; letter-spacing: .04em; transform: rotate(-3deg); }
.mission-card.is-complete[open] .completion-stamp { display: block; }
.empty-state { padding: 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.page-footer { display: flex; justify-content: center; margin: 1.5rem auto 0; padding: 1rem; }
.page-footer .guide-return { padding: .55rem .9rem; border-radius: 8px; color: #fff; background: var(--navy); }
.back-to-top { position: fixed; right: max(1rem, calc((100vw - 1120px)/2)); bottom: 1rem; z-index: 10; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #17334f; border-radius: 50%; color: #fff; background: #183d68; box-shadow: 0 3px 12px rgb(0 0 0 / 20%); font-size: 1.25rem; }
.back-to-top:hover { background: #315e8e; }
@media (max-width: 720px) {
  .return-bar { align-items: flex-start; flex-direction: column; }
  .header-tools { justify-content: flex-start; }
  .progress-panel { grid-template-columns: 1fr auto; }
  .progress-track { grid-column: 1 / -1; grid-row: 2; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  main, .return-bar, .title-row, .section-nav { width: min(100% - 1rem, 1120px); }
  .section-nav { gap: .3rem; }
  .section-nav a { padding: .25rem .5rem; font-size: .9rem; }
  .progress-panel { padding: .8rem; }
  .mission-card summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: .45rem; padding: .75rem .65rem; }
  .mission-id { min-width: 2.9rem; }
  .mission-body { padding-inline: .75rem; }
  .filter-row { align-items: flex-start; }
  #worldFilter { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body { color: #000; background: #fff; font-size: 10.5pt; }
  .site-header, main, .page-footer { width: 100%; }
  .site-header { color: #000; background: #fff; }
  .return-bar, .header-tools, .section-nav, .progress-panel button, .mission-tools, #toggleAllMissions, .mission-check, .back-to-top, .skip-link { display: none !important; }
  .title-row { padding: 1rem 0; }
  .platform-label, .english-title { color: #333; }
  .content-section, .opening-note, .progress-panel, .page-footer { box-shadow: none; break-inside: avoid; }
  .mission-card { break-inside: avoid; }
  .mission-card:not([open]) > .mission-body { display: block !important; }
  .mission-card summary::after { display: none; }
  a { color: #000; text-decoration: none; }
  a[href]::after { content: ""; }
}
