@font-face { font-family: "Guide Sans"; src: url("/assets/fonts/guide-sans-400.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Guide Sans"; src: url("/assets/fonts/guide-sans-600.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Guide Sans"; src: url("/assets/fonts/guide-sans-700.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Guide Sans JP"; src: url("/assets/fonts/guide-sans-jp-400.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Guide Sans JP"; src: url("/assets/fonts/guide-sans-jp-600.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Guide Sans JP"; src: url("/assets/fonts/guide-sans-jp-700.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Guide Sans SC"; src: url("/assets/fonts/guide-sans-sc-400.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Guide Sans SC"; src: url("/assets/fonts/guide-sans-sc-600.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Guide Sans SC"; src: url("/assets/fonts/guide-sans-sc-700.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fff;
  --ink: #1b302e;
  --muted: #516562;
  --line: #d8dfd7;
  --teal: #17634f;
  --teal-dark: #104b3c;
  --wash: #eaf0e4;
  --orange: #9b421c;
  --orange-wash: #f5e9da;
  --radius: 12px;
  font-family: "Guide Sans", "Guide Sans JP", "Guide Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--teal);
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: #c9dfad; color: var(--ink); }
html { scroll-behavior: smooth; scroll-padding-top: 24px; scrollbar-color: #879a8d var(--paper); }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
button, input, select { font: inherit; }
input, select { caret-color: var(--teal); }
button, .file-label { cursor: pointer; }
button { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 48px; padding: 11px 20px; border: 1px solid var(--teal); border-radius: 7px; background: var(--teal); color: white; font-weight: 650; transition: background .18s ease-out; }
button:hover { background: var(--teal-dark); }
button:disabled { opacity: .65; cursor: wait; }
img { display: block; max-width: 100%; height: auto; }
.icon { display: inline-block; flex-shrink: 0; vertical-align: -.15em; }
h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.2; text-wrap: balance; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.9rem); max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { max-width: 70ch; margin: 16px 0; }
[hidden] { display: none !important; }
.site-header, main, footer { width: min(1140px, calc(100% - 80px)); margin-inline: auto; }
.site-header { min-height: 100px; display: flex; align-items: center; gap: 38px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 1.2rem; font-weight: 750; text-decoration: none; white-space: nowrap; letter-spacing: -.03em; }
.game-nav { display: flex; gap: 28px; margin-left: auto; font-size: .9rem; }
.game-nav a { text-decoration: none; }
.game-nav [aria-current] { text-decoration: underline; }
.languages { display: flex; font-size: .85rem; }
.skip-link { position: fixed; z-index: 5; top: -100px; left: 12px; padding: 12px 18px; background: var(--ink); color: white; }
.skip-link:focus { top: 8px; }
.home-intro { padding: 68px 0 50px; }
.home-intro h1 { max-width: 19ch; }
.home-intro p { font-size: 1.15rem; max-width: 56ch; color: var(--muted); margin-top: 24px; }
.game-collection { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.game-feature { overflow: hidden; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.game-art { background: var(--wash); height: 220px; display: flex; justify-content: center; align-items: center; gap: 20px; padding: 24px 32px; overflow: hidden; }
.colony-flow .game-art { background: var(--orange-wash); }
.game-art img { width: min(28%, 115px); height: 170px; object-fit: contain; filter: drop-shadow(0 7px 9px #1b302e12); }
.game-art img:nth-child(2) { height: 190px; }
.game-feature-content { padding: 30px 32px 34px; }
.game-feature h2 a { text-decoration: none; }
.game-feature p { color: var(--muted); }
.number-search { margin: 26px 0 20px; }
.number-search label, form > label:not(.file-label) { display: block; font-size: .86rem; font-weight: 650; margin-bottom: 8px; }
.input-row { display: flex; gap: 8px; }
.input-row input { width: 100px; min-width: 0; flex: 1; }
input[type=number], select { min-height: 49px; border: 1px solid #a4b3ab; border-radius: 7px; background: var(--white); color: var(--ink); padding: 10px 14px; }
input::placeholder { color: #667970; opacity: 1; }
.text-link { display: inline-flex; align-items: center; gap: 14px; font-weight: 650; color: var(--teal); }
.form-message { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.form-message:empty { display: none; }
.form-message.error { color: #9c2f20; }
.how { padding: 68px 0 56px; }
.how ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 0; margin: 32px 0 0; list-style: none; }
.how li { padding-top: 22px; border-top: 1px solid var(--line); }
.how p { font-size: .95rem; color: var(--muted); }
.screenshot-search { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 60px; padding: 36px; border-radius: var(--radius); background: var(--wash); margin: 36px 0 64px; }
.screenshot-search h2 { max-width: 20ch; }
.screenshot-search p { color: var(--muted); }
.screenshot-search form { min-width: 0; }
.screenshot-search .dropdown { margin-bottom: 18px; }
.file-label { display: block; font-weight: 650; margin-bottom: 10px; }
input[type=file] { display: block; width: 100%; color: var(--muted); font-size: .85rem; }
input[type=file]::file-selector-button { padding: 10px 14px; background: var(--white); border: 1px solid #a4b3ab; border-radius: 6px; color: var(--ink); margin-right: 12px; font: inherit; cursor: pointer; }
.muted { color: var(--muted); font-size: .82rem; line-height: 1.6; }
.recognition-results { grid-column: 1 / -1; border-top: 1px solid #c5d3bd; padding-top: 28px; }
.recognition-results ul { padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.recognition-results li { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.recognition-results img { max-height: 180px; width: 100%; object-fit: contain; margin-bottom: 18px; }
.recognition-results li a { display: block; margin: 10px 0; overflow-wrap: anywhere; }
.breadcrumbs { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: .85rem; padding-top: 30px; color: var(--muted); }
.breadcrumbs a { text-decoration: none; }
.catalog-intro { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 80px; padding: 46px 0; }
.catalog-intro h1 { font-size: clamp(2.2rem, 4.3vw, 3.8rem); }
.catalog-intro h1 span { color: var(--teal); }
.catalog-intro p { color: var(--muted); }
.catalog { padding: 35px 0 0; border-top: 1px solid var(--line); }
.catalog > p { color: var(--muted); }
.level-numbers { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; margin-top: 28px; }
.level-numbers a { padding: 14px 6px; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: var(--white); text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 650; }
.level-numbers a:hover { background: var(--wash); border-color: var(--teal); }
.level-intro { padding: 35px 0 26px; }
.level-intro h1 { max-width: none; font-size: clamp(2rem, 4vw, 3.2rem); }
.level-intro p { color: var(--muted); max-width: 76ch; }
.board-picker { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 30px; }
.board-picker a { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 18px 10px 12px; background: var(--white); text-decoration: none; font-size: .9rem; font-weight: 650; }
.board-picker img { height: 48px; width: 42px; object-fit: contain; }
.board-picker a:hover, .board-picker a[aria-current] { border-color: var(--teal); background: var(--wash); }
.board-solution { margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); scroll-margin-top: 24px; }
.board-solution > summary { padding: 18px 24px; cursor: pointer; font-weight: 650; }
.board-solution > summary > span:last-child { margin-left: 18px; color: var(--teal); font-size: .88rem; font-weight: 500; }
.board-solution[open] > summary { border-bottom: 1px solid var(--line); }
.solution-layout { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.65fr); gap: 40px; padding: 30px; }
.board-figure { margin: 0; background: var(--paper); border-radius: 8px; padding: 22px 18px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.board-figure img { max-height: 370px; max-width: 100%; object-fit: contain; width: auto; }
figcaption { margin-top: 18px; font-size: .8rem; color: var(--muted); text-align: center; }
.video-guide { min-width: 0; }
.video-guide h2 { font-size: 1.2rem; margin-bottom: 18px; }
.video-shell { position: relative; overflow: hidden; border-radius: 6px; }
.video-frame { display: block; width: 100%; height: auto; min-height: 200px; aspect-ratio: 16 / 9; border: 0; background: #142824; }
.video-poster { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; background: #142824; color: var(--white); text-decoration: none; }
.video-poster img { height: 60%; width: 60%; min-height: 0; object-fit: contain; }
.video-poster span { display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 650; }
.video-poster:hover { color: #d9efc6; background: #1d3a32; }
.video-credit { display: flex; gap: 20px; justify-content: space-between; align-items: baseline; margin: 14px 0 8px; font-size: .8rem; color: var(--muted); }
.video-credit a { overflow-wrap: anywhere; }
.video-credit span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.video-guide > .text-link { font-size: .88rem; }
.other-videos { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.other-videos summary { cursor: pointer; font-size: .9rem; }
.other-videos ul { padding-left: 20px; font-size: .85rem; }
.other-videos li { padding: 6px 0; overflow-wrap: anywhere; }
.other-videos a span { white-space: nowrap; color: var(--muted); }
.source-reference { margin: 0; border-top: 1px solid var(--line); padding: 12px 24px; font-size: .8rem; color: var(--muted); }
.source-note { font-size: .84rem; color: var(--muted); margin-top: 24px; }
.pagination { display: flex; flex-wrap: wrap; gap: 16px 30px; justify-content: space-between; padding: 24px 0; margin: 30px 0; border-block: 1px solid var(--line); font-size: .9rem; }
.pagination a { display: inline-flex; align-items: center; gap: 8px; }
.prose { max-width: 72ch; min-height: 55vh; padding: 68px 0; }
.prose h1 { font-size: 2.6rem; }
.prose p { margin: 26px 0; line-height: 1.8; }
footer { border-top: 1px solid var(--line); padding-block: 32px 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-top nav { display: flex; gap: 24px; font-size: .85rem; }
footer > p { color: var(--muted); font-size: .8rem; max-width: 95ch; }
:lang(ja) { font-family: "Guide Sans JP", "Guide Sans", sans-serif; }
:lang(zh-CN) { font-family: "Guide Sans SC", "Guide Sans", sans-serif; }
:lang(ja) h1, :lang(ja) h2 { letter-spacing: 0; line-height: 1.4; }
@media (max-width: 900px) {
  .site-header, main, footer { width: calc(100% - 48px); }
  .site-header { flex-wrap: wrap; gap: 12px 24px; padding: 22px 0; min-height: auto; }
  .game-nav { order: 3; width: 100%; margin-left: 0; }
  .languages { margin-left: auto; }
  .game-feature-content { padding: 24px; }
  .game-art { gap: 12px; padding-inline: 18px; }
  .input-row { flex-wrap: wrap; }
  .input-row button { flex: 1; }
  .catalog-intro { gap: 32px; }
  .solution-layout { gap: 24px; padding: 24px; }
  .screenshot-search { gap: 28px; padding: 28px; }
  .how ol { gap: 24px; }
}
@media (max-width: 600px) {
  .site-header, main, footer { width: calc(100% - 36px); }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .language-dropdown { width: 126px; }
  .game-nav { gap: 24px; font-size: .84rem; }
  .home-intro { padding: 28px 0 18px; }
  .home-intro h1 { font-size: 1.85rem; max-width: 22ch; }
  .home-intro p { font-size: .93rem; margin-top: 14px; margin-bottom: 12px; }
  .game-collection { grid-template-columns: 1fr; gap: 14px; }
  .game-feature { display: grid; grid-template-columns: 82px minmax(0, 1fr); }
  .game-art { height: 100%; padding: 12px; }
  .game-art img { width: 100%; height: auto; max-height: 120px; }
  .game-art img:not(:first-child) { display: none; }
  .game-feature-content { padding: 16px; }
  .game-feature h2 { font-size: 1.15rem; }
  .game-feature-content > p { display: none; }
  .game-feature .number-search { margin: 12px 0 8px; }
  .game-feature .number-search label { font-size: .76rem; margin-bottom: 6px; }
  .game-feature .text-link { font-size: .8rem; gap: 8px; }
  .game-feature .input-row button { padding-inline: 10px; font-size: .76rem; gap: 8px; }
  .game-feature input[type=number] { padding-inline: 10px; }
  .input-row { flex-wrap: nowrap; }
  .input-row button { flex: 0 1 auto; gap: 12px; padding-inline: 14px; font-size: .9rem; }
  .how { padding: 44px 0 18px; }
  .how ol { grid-template-columns: 1fr; margin-top: 24px; gap: 12px; }
  .how li { padding-top: 18px; }
  .how p { margin-top: 10px; }
  .screenshot-search { grid-template-columns: 1fr; padding: 24px; gap: 14px; margin-bottom: 40px; }
  .screenshot-search h2 { max-width: none; }
  .screenshot-search > div p { margin-bottom: 8px; }
  .recognition-results ul { grid-template-columns: 1fr; }
  .catalog-intro { grid-template-columns: 1fr; padding: 30px 0; gap: 0; }
  .catalog-intro h1 { font-size: 2.5rem; }
  .catalog-intro .number-search { margin-bottom: 0; }
  .catalog { padding-top: 28px; }
  .level-numbers { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .level-numbers a { padding: 12px 3px; }
  .level-intro { padding-top: 26px; }
  .level-intro h1 { font-size: 2rem; }
  .level-intro p { font-size: .95rem; }
  .board-picker { gap: 8px; }
  .board-picker a { padding: 8px 12px; gap: 8px; }
  .board-picker img { height: 40px; width: 32px; }
  .board-solution > summary { padding: 16px 18px; }
  .board-solution > summary > span:last-child { margin-left: 10px; font-size: .8rem; }
  .solution-layout { grid-template-columns: 1fr; padding: 18px; gap: 24px; }
  .board-figure { padding: 18px; }
  .board-figure img { max-height: 240px; }
  .video-credit { gap: 12px; }
  .source-reference { padding: 12px 18px; }
  .pagination { gap: 14px; font-size: .85rem; }
  .prose { padding-top: 40px; }
  .prose h1 { font-size: 2.1rem; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-top nav { flex-wrap: wrap; gap: 12px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button { transition: none; }
}

.level-ranges { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px; }
.level-ranges a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); font-variant-numeric: tabular-nums; text-decoration: none; }
.level-ranges [aria-current] { color: var(--white); background: var(--teal); border-color: var(--teal); }

.catalog > .dropdown { max-width: 260px; margin: 24px 0; }
.range-directory { margin-top: 24px; }
.range-directory summary { cursor: pointer; color: var(--teal); text-decoration: underline; text-underline-offset: .22em; }
