/* Shared color and type tokens for the quiz, flag guide and navigation. */
:root {
  color-scheme: light;
  --paper: #f7f9f9;
  --surface: #fff;
  --ink: #102851;
  --muted: #475a70;
  --line: #bdc8d0;
  --blue: #244bc2;
  --blue-dark: #15389c;
  --blue-soft: #edf2ff;
  --signal: #ffde57;
  --stage: #eaf0f1;
  --good: #176144;
  --good-soft: #e6f3eb;
  --wrong: #873b26;
  --wrong-soft: #f9ece4;
  --display: "Arial Narrow", "Avenir Next Condensed", "Helvetica Neue", Arial, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
a, button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip { position: fixed; inset: 8px auto auto 8px; z-index: 3; padding: 12px; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }

:where(.game, #pair-drill) { min-width: 0; scroll-margin-block-start: 12px; }
:where(.game, #pair-drill, [data-focus]):focus { outline: none; }
:where(.choice, .result-country, .feedback-head) { min-width: 0; overflow-wrap: anywhere; }
:lang(zh), :lang(ja) { line-break: strict; }
.small, .result-history { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.center { text-align: center; }
.eyebrow, .result-kicker, .takeaway h3, .compare-label {
  font-size: .75rem; font-weight: 750; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase;
}

.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: space-between; gap: .8em;
  min-height: 52px; border: 2px solid var(--ink); border-radius: 2px; padding: 12px 18px;
  font-size: 1rem; line-height: 1.35; font-weight: 750; overflow-wrap: anywhere;
}
.primary { width: 100%; background: var(--signal); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.secondary { justify-content: center; color: var(--ink); background: white; }
.primary:disabled { opacity: .65; box-shadow: none; }
.button-icon { flex: none; font-size: 1.45em; line-height: 1; }
.text-button, .icon-button { min-height: 44px; min-width: 44px; border-radius: 2px; }
.text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: 8px 11px; border: 1px solid transparent; background: transparent; color: var(--blue-dark);
  font-size: .875rem; font-weight: 700; line-height: 1.32; overflow-wrap: anywhere;
}
.text-button svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (hover: hover) {
  .primary:not(:disabled):hover { background-color: #ffeb92; }
  .secondary:hover, .text-button:hover { background: var(--blue-soft); border-color: var(--blue); }
  .choice:hover { border-color: var(--blue); box-shadow: inset 3px 0 var(--blue); background: var(--blue-soft); }
}
.primary:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.choice:active, .secondary:active, .text-button:active { background-color: #dce7ff; }
:where(button,a,summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.playing #game, #pair-drill:not([hidden]) {
  border: 2px solid var(--ink); border-radius: 3px; background: var(--surface);
  box-shadow: 5px 5px 0 #c6d1d9; padding: 0;
}
.round-meter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(114px, .28fr); align-items: center;
  gap: clamp(18px, 3vw, 45px); padding: 12px clamp(15px, 3vw, 30px); background: var(--ink); color: white;
}
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.progress-top strong { font: 750 .875rem/1.18 var(--display); letter-spacing: .065em; text-transform: uppercase; }
.round-count { flex: none; color: #b5c6da; font: 700 .94rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.round-count b { color: var(--signal); font-size: 1.6rem; }
.progress-track { display: flex; gap: 4px; min-width: 0; }
.progress-track > span { height: 7px; flex: 1; border: 1px solid #7990ad; }
.progress-track .current { border-color: var(--signal); background: var(--signal); }
.progress-track .done { border-color: #91dbbe; background: #91dbbe; }
.progress-track .miss { border-color: #f7bfac; background: repeating-linear-gradient(135deg, #f7bfac 0 2px, transparent 2px 4px); }

.question-board, .feedback-board, .result-body { padding: clamp(18px, 3vw, 32px); }
.question-board {
  display: grid; grid-template-areas: "plate title" "plate answers"; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: start; align-content: start; column-gap: clamp(18px, 3vw, 34px); row-gap: 18px;
}
.question-title, .feedback-head h2, .score-title h2, dialog h2 {
  font: 750 clamp(1.75rem, 3.3vw, 2.65rem)/1.06 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere;
}
.question-title { grid-area: title; align-self: end; text-wrap: balance; }
.flag-panel { grid-area: plate; min-width: 0; }
.choices { grid-area: answers; display: grid; grid-template-columns: 1fr; gap: 8px; min-width: 0; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 54px; min-width: 0; padding: 8px 13px;
  text-align: left; border: 1.5px solid #8799ae; border-radius: 2px;
  color: var(--ink); background: white; font: inherit; font-weight: 650; line-height: 1.35;
}
.key {
  display: grid; flex: none; width: 23px; height: 24px; place-items: center; border: 1px solid var(--line);
  color: var(--muted); font: 700 .82rem/1 var(--display); font-variant-numeric: tabular-nums;
}
.flag-stage, .confirmed-stage {
  display: grid; place-items: center; position: relative; min-width: 0;
  height: clamp(210px, 34vh, 306px); padding: clamp(18px, 3vw, 32px);
  border: 1px solid #aebdc6;
  background-color: var(--stage);
  background-image: linear-gradient(90deg, #10285108 1px, transparent 1px), linear-gradient(#10285108 1px, transparent 1px);
  background-size: 24px 24px;
}
.flag-stage::before, .flag-stage::after, .confirmed-stage::before, .confirmed-stage::after {
  content: ""; position: absolute; height: 10px; width: 10px; pointer-events: none; border: solid #6d8397;
}
.flag-stage::before, .confirmed-stage::before { inset: 8px auto auto 8px; border-width: 1px 0 0 1px; }
.flag-stage::after, .confirmed-stage::after { inset: auto 8px 8px auto; border-width: 0 1px 1px 0; }
.flag-stage img, .correct-flag, .compare-image img, .zoom-item img {
  display: block; width: 100%; height: 100%; max-height: 100%; min-height: 0; min-width: 0; object-fit: contain;
}
.utility-row {
  display: flex; justify-content: space-between; gap: 8px; align-items: stretch; flex-wrap: wrap;
  padding: 2px 4px; border: 1px solid #aebdc6; border-top: 0; background: #f7f9fa;
}
#hint::before { content: "+"; font: 700 1.15rem/1 var(--display); }
#hint[aria-expanded="true"]::before { content: "−"; }
#hint-text { margin-top: 8px; padding: 9px 12px; color: var(--ink); background: #fff8d4; border-left: 3px solid #bb9100; }

.feedback-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.feedback-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.feedback-head .small { margin-top: 6px; color: var(--ink); }
.status-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border: 1px solid currentColor; color: var(--good); background: var(--good-soft); font-size: 1.3rem; font-weight: 750;
}
.status-icon.wrong { color: var(--blue-dark); background: var(--blue-soft); }
.comparison, .zoom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(9px, 1.8vw, 19px); }
.compare-card {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: white;
  padding: 0 14px 10px; overflow-wrap: anywhere;
}
.compare-label {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px; margin: 0 -14px;
  border-bottom: 1px solid var(--line); font-size: .73rem; letter-spacing: .035em;
}
.compare-label > span { font: 800 1rem/1 var(--display); }
.compare-label.correct { color: var(--good); background: var(--good-soft); }
.compare-label.wrong { color: var(--wrong); background: var(--wrong-soft); }
.compare-image {
  display: grid; place-items: center; width: 100%; height: clamp(100px, 17vw, 155px); min-height: 0;
  margin: 12px 0; padding: 8px; background: var(--stage);
}
.compare-card h3, .zoom-item h3 { font: 750 clamp(1.05rem, 2.3vw, 1.5rem)/1.18 var(--display); overflow-wrap: anywhere; }
.cue, .zoom-item p { margin-top: 5px; color: var(--muted); font-size: .95rem; line-height: 1.47; }
.compare-card .text-button { align-self: flex-start; margin: auto 0 -4px -6px; padding-inline: 5px; text-align: left; }
/* Both flags start at the same height when one language needs a two-line label. */
@supports (grid-template-rows: subgrid) {
  .comparison { row-gap: 0; }
  .compare-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-items: start; }
  .compare-label { align-self: stretch; }
  .compare-card .text-button { justify-self: start; align-self: end; }
}
#both-shields { width: 100%; margin-top: 8px; border: 1px solid var(--blue); background: var(--blue-soft); }
.confirmation { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 22px; }
.confirmed-stage { height: clamp(140px, 23vh, 198px); }
.takeaway { padding: 3px 0 3px 13px; border-left: 3px solid var(--blue); }
.takeaway h3 { color: var(--blue-dark); }
.takeaway p { margin-top: 5px; line-height: 1.45; font-size: 1.05rem; }
.feedback-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 20px; }
.feedback-actions .small { margin-right: auto; }
.feedback-actions .primary { width: min(100%, 270px); }

.result-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(20px, 3.5vw, 36px);
  background: var(--ink); color: white; border-bottom: 5px solid var(--blue);
}
.score-title { min-width: 0; }
.result-kicker { color: #c8d7f3; }
.score-title h2 { margin-top: 8px; font-size: clamp(1.65rem, 3.3vw, 2.5rem); }
.result-score { flex: none; font: 800 clamp(3.75rem, 8vw, 6.25rem)/.96 var(--display); font-variant-numeric: tabular-nums; color: var(--signal); white-space: nowrap; letter-spacing: -.035em; }
.result-score span { font-size: .42em; color: white; }
.result-copy { color: var(--muted); line-height: 1.5; }
.result-history { margin-top: 5px; color: var(--ink); }
.result-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.result-copy + .result-actions, .result-history + .result-actions { margin-top: 15px; }
.result-actions .primary { flex: 1 1 230px; }
.result-actions .secondary { flex: 0 1 auto; }
.result-list { padding: 0; margin: 0; list-style: none; border-top: 2px solid var(--ink); }
.result-list li {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; min-height: 56px;
  padding-block: 7px; border-bottom: 1px solid var(--line);
}
.result-list img { width: 46px; height: 32px; padding: 2px; background: var(--stage); object-fit: contain; }
.result-country { font-weight: 700; line-height: 1.35; }
.result-pick { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); font-size: .85rem; }
.result-status { color: var(--good); font-size: .85rem; font-weight: 650; text-align: right; }
.result-status.missed { color: var(--wrong); }

dialog {
  width: min(680px, calc(100% - 24px)); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px);
  padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 2px solid var(--ink); border-radius: 3px;
  background: var(--surface); color: var(--ink); box-shadow: 5px 5px 0 #0b142661;
}
dialog::backdrop { background: #0a172bc9; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--ink); color: white; }
dialog h2 { font-size: clamp(1.35rem, 4vw, 1.9rem); }
.icon-button { display: grid; place-items: center; flex: none; background: white; color: var(--ink); border: 0; font-size: 1.65rem; line-height: 1; }
.icon-button:hover { background: var(--signal); }
#zoom-content { padding: 18px 18px 0; }
.zoom-grid.single { grid-template-columns: 1fr; }
.zoom-item { min-width: 0; }
.zoom-item img { width: 100%; height: clamp(150px, 29vh, 260px); padding: 12px; border: 1px solid var(--line); background-color: var(--stage); }
.zoom-item h3 { margin-top: 10px; }
#zoom-caption { padding: 12px 18px 16px; color: var(--muted); }
.noscript { padding: 20px; }
:is(:lang(zh), :lang(ja)) :is(.question-title, .score-title h2, .feedback-head h2, dialog h2) { letter-spacing: 0; line-height: 1.28; }

@media (max-width: 760px) {
  .round-meter { gap: 14px; grid-template-columns: 1fr 75px; }
  .question-board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "plate" "answers"; gap: 13px; }
  .question-title { font-size: 1.8rem; }
  .flag-stage { height: clamp(154px, 26vh, 215px); padding: 16px 20px; }
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .compare-image { height: clamp(82px, 21vw, 132px); padding: 5px; margin-block: 10px; }
  .cue, .zoom-item p { font-size: .9rem; }
  .feedback-actions { margin-top: 14px; }
  .feedback-actions .primary { width: min(100%, 225px); }
}
@media (max-width: 540px) {
  .round-meter { padding: 10px 14px; }
  .round-count b { font-size: 1.38rem; }
  .progress-top strong { font-size: .78rem; }
  .question-board, .feedback-board, .result-body { padding: 14px; }
  .choice { padding-inline: 9px; min-height: 52px; }
  .choice .key { display: none; }
  .compare-card { padding: 0 9px 8px; }
  .compare-label { margin-inline: -9px; padding: 6px 8px; font-size: .68rem; }
  .compare-card .text-button { padding-inline: 4px; margin-inline-start: -4px; font-size: .82rem; }
  .feedback-actions { flex-direction: column; align-items: stretch; gap: 7px; }
  .feedback-actions .primary { width: 100%; }
  .feedback-actions .small { margin-right: 0; }
  .confirmation { grid-template-columns: 1fr; gap: 10px; }
  .confirmed-stage { height: 143px; padding: 14px; }
  .status-icon { width: 29px; height: 29px; font-size: 1rem; }
  .feedback-head { gap: 8px; margin-bottom: 13px; }
  .result-banner { gap: 12px; padding: 17px 14px; }
  .result-actions { display: grid; grid-template-columns: 1fr; }
  .result-list li { grid-template-columns: 36px minmax(0, 1fr) minmax(0, auto); gap: 7px; }
  .result-list img { width: 36px; height: 28px; }
  .dialog-top { padding: 9px 12px; }
  #zoom-content { padding: 12px 12px 0; }
  #zoom-caption { padding-inline: 12px; }
}
@media (max-width: 340px) {
  .round-meter { grid-template-columns: 1fr; gap: 6px; }
  .round-meter, .question-board, .feedback-board, .result-body { padding-inline: 10px; }
  .compare-label { font-size: .65rem; }
  .zoom-item img { padding: 8px; }
}
@media (max-width: 299px) { .choices, .comparison, .zoom-grid { grid-template-columns: 1fr; } }
@media (max-height: 480px) and (orientation: landscape) {
  .flag-stage, .confirmed-stage { height: 135px; }
  .zoom-item img { height: 110px; }
}
@media (pointer: coarse) { .choice .key { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .primary, .secondary, .choice, .text-button { transition: background-color .15s ease, border-color .15s ease; }
}
@media (forced-colors: active) {
  .round-meter, .result-banner, .status-icon { border: 1px solid CanvasText; }
  .progress-track > span { border: 1px solid CanvasText; }
  .progress-track .current { background: Highlight; }
  .progress-track .miss { border-style: dashed; }
}

/* The home plate, comparison index and illustrated guides use the same print rules. */
.site-main { width: 100%; min-width: 0; }
.game-layout, .guide-layout, .pair-page {
  --plate-ink: #102851;
  --plate-blue: #244bc2;
  --plate-yellow: #ffde57;
  --plate-line: #aeb8ca;
  --plate-heading: var(--display, "Arial Narrow", Arial, sans-serif);
  width: min(calc(100% - 64px), 1160px);
  margin-inline: auto;
  color: var(--plate-ink);
}
.game-layout { padding-block: clamp(24px, 4vw, 54px) 54px; }
.playing .game-layout { width: min(calc(100% - 40px), 940px); padding-block: 24px 38px; }
body.playing .home-discover { display: none; }

.hero-mast { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .85fr); align-items: end; gap: clamp(30px, 5.5vw, 80px); margin-bottom: 26px; }
.hero-title, .hero-actions { min-width: 0; }
.round-spec { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; font-size: 14px; font-weight: 700; letter-spacing: .012em; line-height: 1.4; }
.round-bars { flex: none; width: 29px; height: 13px; color: var(--plate-blue); background: repeating-linear-gradient(90deg,currentColor 0 4px,transparent 4px 6px); transform: skew(-12deg); }
.hero-title h1, .guide-intro h1, .pair-intro h1, .shelf-heading h2, .guide-shields h2, .detail-country h2, .board-country, .board-value, .guide-card-title {
  font-family: var(--plate-heading);
  font-weight: 800;
  letter-spacing: -.028em;
  overflow-wrap: anywhere;
}
.hero-title h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(54px, 6.4vw, 90px);
  line-height: .97;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero-actions > p { max-width: 38ch; margin: 0 0 17px; color: #334662; font-size: 16px; line-height: 1.5; }
button.start-quiz, #pair-start {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(100%, 330px);
  min-height: 54px;
  padding: 9px 10px 9px 18px;
  border: 2px solid var(--plate-ink);
  border-radius: 2px;
  background: var(--plate-yellow);
  color: var(--plate-ink);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 750;
}
.start-quiz .link-arrow, #pair-start .link-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 31px;
  flex: none;
  border-left: 1px solid var(--plate-ink);
  font: 22px/1 Arial, sans-serif;
}
@media (hover: hover) {
  button.start-quiz:not(:disabled):hover, #pair-start:not(:disabled):hover { border-color: var(--plate-ink); background: #ffe77f; color: var(--plate-ink); }
}

.recognition-board { margin: 0; color: #fff; background: var(--plate-blue); border: 2px solid var(--plate-ink); }
.board-legend { display: flex; align-items: center; gap: 10px; padding: 9px clamp(12px, 2vw, 24px); border-bottom: 1px solid #ffffff70; font-size: 13px; line-height: 1.4; font-weight: 650; }
.scale-key { flex: none; width: 9px; height: 15px; border: 2px solid var(--plate-yellow); border-left: 0; }
.scale-ticks { flex: 1; min-width: 8px; height: 6px; margin-left: 6px; background: repeating-linear-gradient(90deg,#ffffff70 0 1px, transparent 1px 12px); }
.board-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); container-type: inline-size; }
.board-case {
  --flag-height: clamp(42px, 16cqi, 154px);
  --white-band: 33.333333%;
  --flag-ratio: 1.5;
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin: 0;
}
.board-case-lv { --flag-ratio: 2; --white-band: 20%; border-left: 1px solid #ffffff70; }
.study-face {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3.1vw, 38px) 0;
  background-image: linear-gradient(#ffffff11 1px,transparent 1px),linear-gradient(90deg,#ffffff11 1px,transparent 1px);
  background-size: 24px 24px;
}
.study-face::before {
  position: absolute;
  z-index: -1;
  content: "";
  top: 50%;
  inset-inline: 6%;
  height: var(--flag-height);
  transform: translateY(-50%);
  border-block: 1px dashed #ffffff82;
  box-sizing: border-box;
}
.measured-flag { position: relative; width: auto; height: var(--flag-height); aspect-ratio: var(--flag-ratio); }
.measured-flag img { display: block; width: 100%; height: 100%; object-fit: contain; outline: 1px solid #10285188; }
.band-mark {
  position: absolute;
  top: 50%;
  left: calc(100% + 3px);
  transform: translateY(-50%);
  width: clamp(6px, 1vw, 14px);
  height: var(--white-band);
  border: 2px solid var(--plate-yellow);
  border-left: 0;
}
.board-case figcaption { display: flex; align-items: stretch; justify-content: space-between; margin-top: auto; border-top: 1px solid #ffffff70; }
.board-country { align-self: center; min-width: 0; padding: 6px clamp(10px, 2vw, 24px); font-size: clamp(17px, 2.35vw, 32px); line-height: 1.2; }
.board-value { display: grid; place-items: center; min-width: clamp(45px, 8vw, 94px); padding: 5px 10px; color: var(--plate-ink); background: var(--plate-yellow); font-size: clamp(20px, 2.7vw, 38px); line-height: 1.05; font-variant-numeric: tabular-nums; }

.home-discover { margin-top: clamp(30px, 4.5vw, 62px); }
.shelf-heading { margin-bottom: 14px; }
.shelf-heading p { max-width: 70ch; margin-top: 6px; line-height: 1.5; color: var(--muted); }
.shelf-heading h2, .guide-shields h2 { font-size: clamp(27px, 3vw, 40px); line-height: 1.08; }
.shelf-heading h2 > a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; text-decoration: none; }
.guide-index-link { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--plate-blue); font: 650 14px/1.4 system-ui, sans-serif; letter-spacing: 0; }
.guide-list { list-style: none; margin: 0; padding: 0; border-block: 2px solid var(--plate-ink); }
.guide-list li + li { border-top: 1px solid var(--plate-line); }
.guide-card {
  display: grid;
  grid-template-columns: minmax(130px, .62fr) minmax(0, 1.45fr) minmax(0, 1.25fr) 30px;
  align-items: center;
  gap: clamp(14px, 2.5vw, 38px);
  min-height: 80px;
  padding: 9px clamp(8px, 1.5vw, 18px);
  color: var(--plate-ink);
  text-decoration: none;
}
.guide-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 10px; width: min(100%, 155px); }
.guide-samples > span { display: grid; place-items: center; min-width: 0; height: 45px; }
.guide-samples img, .detail-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; outline: 1px solid #8b98ad; }
.guide-card-title { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.12; }
.guide-card p { color: #43546c; font-size: 15px; line-height: 1.45; }
.guide-card .link-arrow { justify-self: end; font: 24px/1 Arial, sans-serif; color: var(--plate-blue); }
@media (hover: hover) {
  .shelf-heading a:hover > span:first-child { text-decoration: underline; text-underline-offset: .12em; }
  .guide-card:hover { background: #eaf0fd; }
  .guide-card:hover .guide-card-title { color: var(--plate-blue); }
}

.breadcrumbs { margin-bottom: 10px; color: #43546c; font-size: 14px; line-height: 1.4; }
.breadcrumbs ol { display: flex; align-items: center; flex-wrap: wrap; gap: 0 9px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.breadcrumbs li + li::before { content: ""; width: 5px; height: 5px; flex: none; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--plate-blue); }
.breadcrumbs [aria-current] { overflow-wrap: anywhere; }
.guide-layout, .pair-page { padding-block: 18px 50px; }
.guide-intro, .pair-intro { margin-bottom: clamp(22px, 3vw, 38px); }
.guide-intro h1, .pair-intro h1 { max-width: 24ch; margin: 0; font-size: clamp(42px, 5.4vw, 76px); line-height: .99; text-wrap: balance; }
.guide-intro p, .pair-intro p { max-width: 68ch; margin-top: 12px; color: #334662; font-size: 18px; line-height: 1.53; }
.pair-intro #pair-start { margin-top: 16px; }
.pair-reading-end {
  margin-top: 12px;
  padding-inline: 12px;
  gap: 12px;
  color: var(--plate-blue);
  border: 1px solid currentColor;
}
#pair-comparison { scroll-margin-top: 12px; }
#pair-comparison:focus-visible { outline: 3px solid var(--plate-blue); outline-offset: 3px; }
.pair-plates, .shield-plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--plate-ink); }
.pair-page figure { min-width: 0; margin: 0; }
.pair-plates figure + figure, .shield-plates figure + figure { border-left: 1px solid var(--plate-ink); }
.detail-stage, .shield-plates figure > div {
  display: grid;
  place-items: center;
  height: clamp(110px, 20vw, 230px);
  padding: clamp(9px, 2.5vw, 30px);
  background-color: #edf2fa;
  background-image: linear-gradient(#1028510b 1px,transparent 1px), linear-gradient(90deg,#1028510b 1px,transparent 1px);
  background-size: 20px 20px;
  border-bottom: 1px solid var(--plate-line);
}
.detail-country figcaption, .shield-plates figcaption { padding: 12px clamp(10px, 1.6vw, 20px) 16px; }
.detail-country h2 { font-size: clamp(21px, 2.7vw, 36px); line-height: 1.15; }
.detail-country p { margin-top: 4px; color: #334662; font-size: 16px; line-height: 1.5; }
.guide-shields { margin-top: clamp(22px, 3.5vw, 40px); }
.guide-shields h2 { margin-bottom: 12px; }
.shield-plates { max-width: 620px; }
.shield-plates figure > div { height: clamp(144px, 18vw, 200px); }
.shield-plates img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.shield-plates figcaption { font-size: 15px; font-weight: 700; line-height: 1.35; }
.pair-practice { max-width: 940px; margin-inline: auto; scroll-margin-top: 8px; }
#pair-return { margin-bottom: 8px; gap: 8px; }
#pair-drill:focus { outline: none; }
.guide-sources { margin-top: 30px; padding-top: 14px; border-top: 2px solid var(--plate-ink); }
.guide-sources h2 { font-size: 17px; font-weight: 750; }
.guide-sources ul { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.guide-sources small { margin-left: 2px; color: #43546c; font-size: .9em; }
.guide-sources a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--plate-blue); font-size: 14px; }

:is(:lang(zh), :lang(ja)) :is(.hero-title h1, .guide-intro h1, .pair-intro h1) { max-width: none; }
.pair-intro .country-name { display: inline-block; max-width: 100%; }
.home-study { margin-top: clamp(44px, 6vw, 84px); border-top: 3px solid var(--plate-ink); }
.study-intro, .study-lesson, .study-review {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.65fr);
  gap: 16px clamp(28px, 5vw, 96px);
  padding-block: clamp(24px, 3.2vw, 42px);
  border-bottom: 1px solid var(--plate-line);
}
.study-intro h2, .study-lesson h3, .study-review h3 { margin: 0; font-family: var(--plate-heading); line-height: 1.12; text-wrap: balance; }
.study-intro h2 { max-width: 18ch; font-size: clamp(31px, 3.8vw, 49px); }
.study-lesson h3, .study-review h3 { font-size: clamp(24px, 2.5vw, 33px); }
.home-study p { max-width: 69ch; margin: 0; font-size: 16px; line-height: 1.62; color: #334662; }
.home-study p + p { margin-top: .8em; }
.study-samples { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; max-width: 270px; margin-top: 14px; }
.study-samples figure { display: grid; grid-template-rows: 60px auto; align-items: center; gap: 5px; margin: 0; }
.study-samples img { display: block; width: auto; height: auto; max-width: 100%; max-height: 58px; outline: 1px solid #8b98ad; }
.study-samples figcaption { align-self: start; color: #43546c; font-size: 14px; line-height: 1.35; }
.study-shield-samples figure { grid-template-rows: 104px auto; }
.study-shield-samples img { max-height: 100px; outline: 0; }
.study-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; margin-top: 10px; }
.study-practice, .study-sources a { display: inline-flex; align-items: center; min-height: 44px; color: var(--plate-blue); text-underline-offset: 3px; }
.study-practice { gap: 7px; font-size: 15px; font-weight: 700; }
.study-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; color: #43546c; font-size: 14px; }
.study-sources ul { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0; padding: 0; list-style: none; }
.study-sources a { display: inline-block; align-content: center; padding-block: 8px; overflow-wrap: anywhere; }
.study-sources small { font-size: .93em; }
.study-review { border-bottom: 0; }
.study-back { margin-top: 10px; }
@media (max-width: 760px) {
  .study-intro, .study-lesson, .study-review { grid-template-columns: 1fr; }
  .study-intro h2 { max-width: none; }
  .study-samples { max-width: 240px; margin-top: 10px; }
}
:is(:lang(zh), :lang(ja)) :is(.hero-title h1,.guide-intro h1,.pair-intro h1,.shelf-heading h2,.guide-shields h2,.board-country,.guide-card-title,.detail-country h2) { letter-spacing: 0; line-height: 1.16; }
@media (max-width: 760px) {
  .hero-mast { grid-template-columns: 1fr; align-items: start; gap: 10px; margin-bottom: 18px; }
  .hero-title h1 { max-width: none; font-size: clamp(40px, 8vw, 60px); }
  .round-spec { margin-bottom: 7px; }
  .hero-actions > p { max-width: 58ch; margin-bottom: 13px; }
  .guide-card { grid-template-columns: minmax(95px,.6fr) minmax(0,1.8fr) 21px; gap: 3px 14px; min-height: 78px; }
  .guide-samples { grid-column: 1; grid-row: 1 / 3; }
  .guide-card-title { grid-column: 2; grid-row: 1; align-self: end; }
  .guide-card p { grid-column: 2; grid-row: 2; align-self: start; }
  .guide-card .link-arrow { grid-column: 3; grid-row: 1 / 3; }
  .guide-index-label { display: none; }
}
@media (max-width: 680px) {
  .game-layout, .guide-layout, .pair-page { width: calc(100% - 32px); }
  .game-layout { padding-block: 19px 32px; }
  .playing .game-layout { width: calc(100% - 24px); padding-block: 12px 24px; }
  button.start-quiz, #pair-start { width: 100%; }
  .shelf-heading { margin-bottom: 8px; }
  .guide-layout, .pair-page { padding-block: 8px 32px; }
  .guide-intro h1, .pair-intro h1 { font-size: clamp(33px, 6.8vw, 43px); }
  .guide-intro p, .pair-intro p { margin-top: 10px; font-size: 16px; }
  .detail-country figcaption, .shield-plates figcaption { padding: 9px; }
  .detail-country p { font-size: 15px; }
}
@media (max-width: 420px) {
  .guide-card { grid-template-columns: 75px minmax(0,1fr) 16px; padding-inline: 0; column-gap: 10px; }
  .guide-samples { gap: 5px; }
  .guide-samples > span { height: 31px; }
  .guide-card-title { font-size: 20px; }
  .guide-card p { font-size: 14px; }
  .guide-card .link-arrow { font-size: 20px; }
  .board-value { min-width: 41px; padding: 4px 7px; }
}
@media (max-width: 300px) {
  .guide-card { grid-template-columns: 55px minmax(0,1fr) 14px; }
  .pair-plates, .shield-plates { grid-template-columns: 1fr; }
  .pair-plates figure + figure, .shield-plates figure + figure { border-left: 0; border-top: 1px solid var(--plate-ink); }
}

@font-face {
  font-family: "Archivo Narrow";
  src: url("/assets/fonts/archivo-narrow-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  --site-width: 1160px;
  --page-gutter: 32px;
}

body.site-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

.site-header, .site-footer {
  width: 100%;
  margin: 0;
  padding-inline: max(var(--page-gutter), calc((100% - var(--site-width)) / 2), env(safe-area-inset-left)) max(var(--page-gutter), calc((100% - var(--site-width)) / 2), env(safe-area-inset-right));
}
.site-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  min-height: 65px;
  padding-block: 5px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: white;
  color: var(--ink);
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font: 700 32px/1 var(--display);
  text-decoration: none;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.brand img { width: 34px; height: 34px; display: block; }
.main-nav { display: flex; align-items: center; margin-left: auto; gap: clamp(4px, 1vw, 14px); font-size: .94rem; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  text-underline-offset: 5px;
}
.main-nav .current { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.language-picker, .language-fallback { position: relative; flex: none; color: var(--ink); font-size: .875rem; }
.language-picker {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 6px 5px 6px 14px;
  gap: 7px;
  font-weight: 650;
}
.language-picker::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  border-left: 1px solid #adb8c8;
}
.language-picker svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.language-picker::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); }
.language-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 1rem; cursor: pointer; }
.language-fallback summary { display: list-item; min-height: 44px; padding: 12px 4px; cursor: pointer; }
.language-fallback ul {
  position: absolute;
  right: 0;
  z-index: 5;
  margin: 0;
  min-width: 140px;
  padding: 3px 16px;
  list-style: none;
  border: 2px solid var(--ink);
  background: white;
}
.language-fallback li + li { border-top: 1px solid var(--line); }
.language-fallback a, .language-list a { display: inline-flex; align-items: center; min-height: 44px; }
.language-picker:focus-within, .language-fallback summary:focus-visible, .feedback-form :focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
  background: white;
  border-top: 2px solid var(--ink);
  padding-block: 10px max(10px, env(safe-area-inset-bottom));
  color: var(--ink);
  font-size: .875rem;
}
.site-footer > span { padding: 0; font: 700 22px/1 var(--display); letter-spacing: -.02em; text-transform: uppercase; }
.site-footer nav { display: flex; gap: 0 20px; flex-wrap: wrap; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.site-footer a[aria-current] { color: var(--blue); text-decoration: underline; }

.document {
  width: min(calc(100% - 2 * var(--page-gutter)), 704px);
  margin: clamp(24px, 4vw, 58px) auto clamp(40px, 7vw, 84px);
  line-height: 1.65;
}
.document h1, .document h2 { font-family: var(--display); font-weight: 700; text-wrap: balance; }
.document h1 {
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.document h2 { margin: 30px 0 8px; font-size: clamp(1.48rem, 3vw, 1.9rem); line-height: 1.18; letter-spacing: 0; }
.document p { margin-block: .6em; }
.document li { margin-block: .35em; }
.document a { color: var(--blue); overflow-wrap: anywhere; }
.document :is(ul,ol) { padding-inline-start: 1.3em; }
.document .brand { margin-bottom: 22px; color: var(--ink); }
.feedback-form { display: grid; gap: 12px; padding-block: 14px 22px; }
.feedback-form label { font-weight: 700; }
.feedback-form textarea { width: 100%; padding: 12px; border: 1px solid #77869a; border-radius: 0; color: var(--ink); background: white; font: inherit; resize: vertical; }
.feedback-form .primary { width: fit-content; min-width: 150px; }
.feedback-form p { margin: 0; }
.feedback-receipt { display: none; }
.feedback-receipt:target { display: block; color: var(--good); }
.document .language-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 0 20px; padding: 0; list-style: none; }
.language-list li { border-bottom: 1px solid var(--line); }

@media (hover: hover) {
  .main-nav a:hover, .site-footer a:hover { color: var(--blue); text-decoration: underline; }
  .language-picker:hover { background: var(--blue-soft); }
}
@media (max-width: 680px) {
  :root { --page-gutter: 16px; }
  .site-header { min-height: 57px; gap: 4px 6px; flex-wrap: wrap; }
  .brand { gap: 6px; font-size: 26px; }
  .brand img { width: 28px; height: 28px; }
  .main-nav { gap: 4px; font-size: .875rem; }
  .main-nav a { padding-inline: 5px; }
  .language-picker { padding-left: 10px; gap: 5px; }
  .site-footer { justify-content: flex-start; }
  .site-footer nav { gap: 0 15px; }
}
@media (max-width: 500px) {
  .main-nav a.current { display: none; }
  .site-footer { gap: 4px 20px; }
  .site-footer nav { flex: 1 1 245px; }
}
@media (max-width: 360px) {
  .site-header { column-gap: 4px; }
  .site-header .brand { font-size: 23px; }
  .site-header .brand img { width: 25px; height: 25px; }
}
