.game-nav-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 2px solid #07142e; border-radius: 0; background: #fffaf1; box-shadow: 2px 3px 0 #07142e; color: #07142e; font: 800 14px/1.3 system-ui,sans-serif; text-decoration: none; cursor: pointer; }
.game-nav-button:hover,.game-nav-button:focus-visible { outline: 3px solid #123bee; outline-offset: 3px; }
.game-nav-button:active { transform: translate(2px,2px); box-shadow: none; }
.game-nav-button.selected,.game-nav-button[aria-pressed="true"] { background: #123bee; color: #fff; }
.world-puzzle-entry { position: fixed; z-index: 74; top: 16px; right: 116px; background: #a8e6cf; }
.world-page:has(#worldEntry:not([hidden])) > .world-puzzle-entry { display: none; }
.game-mode-switch { position: absolute; z-index: 3; top: 80px; left: 16px; }
.game-frame-open .game-mode-switch,.route-board-open .game-mode-switch { display: none; }
.puzzle-page,.puzzle-page * { box-sizing: border-box; }
.puzzle-page { margin: 0; background: #fff7e8; color: #07142e; font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif; }
.puzzle-page [hidden] { display: none; }
.puzzle-page.postcard-puzzle-open { overflow: hidden; }
.puzzle-hub-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px max(20px, calc((100vw - 1320px)/2)); padding-right: max(120px, calc((100vw - 1320px)/2)); border-bottom: 3px solid #07142e; background: #fffaf1; }
.puzzle-hub-header nav { display: flex; gap: 10px; }
.puzzle-hub { max-width: 1360px; margin: auto; padding: 36px 24px 48px; }
.puzzle-hub-intro { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-bottom: 28px; }
.game-eyebrow { margin: 0 0 8px; color: #123bee; font: 800 12px/1.4 system-ui,sans-serif; letter-spacing: .08em; }
.puzzle-hub h1 { margin: 0; font-size: clamp(32px,4vw,54px); }
.puzzle-hub-intro p:not(.game-eyebrow),.puzzle-hub-tip { color: #627087; line-height: 1.6; }
.puzzle-hub-score { min-width: 180px; display: grid; gap: 6px; padding: 18px 24px; border: 3px solid #07142e; background: #a8e6cf; box-shadow: 4px 5px 0 #07142e; text-align: center; }
.puzzle-hub-score strong { font-size: 36px; }
.puzzle-hub-score span { font-weight: 800; }
.puzzle-city-tabs { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 22px; border-bottom: 2px solid #07142e; }
.puzzle-hub-notice { margin: 20px 0; color: #536177; font-size: 14px; }
.puzzle-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.puzzle-hub-card { min-width: 0; border: 3px solid #07142e; background: #fffaf1; box-shadow: 4px 5px 0 #07142e; }
.puzzle-hub-card > img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 3px solid #07142e; image-rendering: pixelated; }
.puzzle-hub-card.locked > img { opacity: .5; filter: grayscale(.7); }
.puzzle-hub-card-copy { padding: 16px; }
.puzzle-hub-card h2 { margin: 0; font-size: 20px; }
.puzzle-card-state { min-height: 36px; color: #627087; font-size: 12px; line-height: 1.5; }
.puzzle-hub-card .game-nav-button { width: 100%; }
.puzzle-hub-card:not(.locked) .game-nav-button { background: #123bee; color: #fff; }
.puzzle-hub-tip { padding: 24px 0 0; font-size: 13px; }
/* The city map and dossiers can scroll independently on compact displays. */
.game-page { min-width: 0; }
.game-page .city-map-inspector { overflow: auto; grid-template-rows: minmax(150px,30svh) auto auto auto auto; }
.game-page .city-route-dossier { overflow: auto; }
@media (max-width: 1000px) {
 .puzzle-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .game-page:not(.game-frame-open) { height: auto; min-height: 100svh; overflow: auto; }
 .game-page .city-map-shell { height: auto; min-height: 100svh; grid-template-columns: 1fr; }
 .game-page .city-map-surface { min-height: 430px; height: 55svh; border-right: 0; }
 .game-page .city-map-inspector { grid-template-rows: 220px auto auto auto auto; padding: 22px 20px; gap: 16px; }
 .game-page .city-route-board { height: auto; min-height: 100svh; padding: 12px; }
 .game-page .city-route-board-header { grid-template-columns: auto 1fr; gap: 14px; }
 .game-page .city-route-board-title { flex-wrap: wrap; gap: 6px; }
 .game-page .city-route-board-actions { grid-column: 1 / -1; flex-wrap: wrap; }
 .game-page .city-route-board-layout { grid-template-columns: 1fr; }
 .game-page .city-route-stage-map { min-height: 330px; overflow-x: auto; }
 .game-page .city-route-stages { min-width: 640px; padding-top: 28px; }
 .game-page .city-route-dossier { padding: 20px; }
}
@media (max-width: 560px) {
 .puzzle-hub-header { flex-wrap: wrap; padding: 14px; padding-top: 72px; }
 .puzzle-hub-header nav { width: 100%; }
 .puzzle-hub-header nav > * { flex: 1; }
 .puzzle-hub { padding: 24px 16px; }
 .puzzle-hub-intro { display: grid; gap: 18px; }
 .puzzle-hub-score { grid-template-columns: auto 1fr; text-align: left; padding: 12px 16px; min-width: 0; }
 .puzzle-hub-score strong { grid-row: span 2; padding-right: 12px; }
 .puzzle-city-tabs { gap: 10px; }
 .puzzle-city-tabs .game-nav-button { padding: 10px 12px; }
 .puzzle-card-grid { grid-template-columns: 1fr; gap: 20px; }
 .game-page .city-map-heading { left: 16px; right: 16px; bottom: 18px; }
 .game-page .city-map-heading h1 { font-size: 24px; }
 .game-page .city-route-board-progress { min-width: 0; flex: 1; }
 .game-page .city-route-collection-open { min-width: 0; }
}
