/* the pixel maps (index.html = the world, japan.html = Japan): one look, one engine (worldmap.js) */
/* the same look as the quest style of the park maps: deep-blue sea with faint scan lines, navy boxes with a white edge */
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: "DotGothic16", "Hiragino Sans", monospace; color: #fff; -webkit-tap-highlight-color: transparent;
  background: #1c46b8 repeating-linear-gradient(0deg, transparent 0 22px, rgba(255,255,255,.06) 22px 24px); }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.box { background: #101c48; border: 3px solid #fff; border-radius: 6px; box-shadow: 0 0 0 2px #101c48, 4px 4px 0 rgba(0,0,0,.35); }
.title { position: fixed; left: max(14px, env(safe-area-inset-left)); top: max(14px, env(safe-area-inset-top)); padding: 10px 14px; max-width: calc(100% - 60px); }
.title h1 { margin: 0; font-size: 18px; font-weight: 400; }
.title p { margin: 4px 0 0; font-size: 12px; opacity: .85; }
.legend { position: fixed; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); padding: 8px 12px; font-size: 12px; line-height: 1.7; }
.legend b { color: #f8d030; font-weight: 400; }
.legend i { color: #9fb0d8; font-style: normal; }
.card { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 78px); width: min(320px, calc(100% - 28px)); padding: 12px 14px 14px; box-sizing: border-box; }
.card h2 { margin: 0 0 2px; font-size: 16px; font-weight: 400; }
.card h2::before { content: "▶ "; color: #f8d030; }
.card .where { margin: 0 0 8px; font-size: 12px; color: #f8d030; }
.card .note { margin: 0 0 12px; font-size: 13px; line-height: 1.6; }
.card .count { margin: -6px 0 12px; font-size: 12px; color: #bfe8ff; }
.card .go { display: inline-block; padding: 7px 12px; background: #f8d030; color: #101c48; border: 2px solid #fff; border-radius: 4px; text-decoration: none; font-size: 14px; }
.card .soon { display: inline-block; padding: 6px 10px; border: 1px solid #9fb0d8; color: #9fb0d8; border-radius: 3px; font-size: 13px; }
.card .x { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: #fff; font: inherit; font-size: 18px; cursor: pointer; }
.credit { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: max(6px, env(safe-area-inset-bottom)); font-size: 10px; color: #c8d4f8; opacity: .8; }
/* the start button: big, at the bottom, one wide bar on a phone */
.start { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100% - 28px)); height: 60px;
  font: 22px "DotGothic16", "Hiragino Sans", monospace; letter-spacing: .08em; color: #101c48; background: #f8d030; border: 3px solid #fff; border-radius: 6px; cursor: pointer;
  box-shadow: 0 0 0 2px #101c48, 0 6px 0 2px #a07818, 0 10px 0 2px rgba(0,0,0,.35); }
.start::before { content: "▶ "; animation: blink 1s steps(2, start) infinite; }
.start:active { transform: translate(-50%, 4px); box-shadow: 0 0 0 2px #101c48, 0 2px 0 2px #a07818, 0 4px 0 2px rgba(0,0,0,.35); }
@keyframes blink { to { visibility: hidden; } }
@media (max-width: 640px) { .title h1 { font-size: 15px; } .legend { display: none; } .start { height: 64px; font-size: 21px; }
  .credit { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 80px); } }

/* the scope: the same orange HUD as the park maps' current-location view; it turns green while locked on a place that has a map */
:root { --hud: #ffa53d; --hud-bg: rgba(20, 8, 0, .62); }
.hud.map { --hud: #6cf08a; --hud-bg: rgba(0, 16, 6, .62); }
body.hud-on #world { filter: grayscale(1) contrast(1.9) brightness(.82); } /* the flat pixel world needs more contrast than a park map to read under the tint */
body.hud-on .title, body.hud-on .legend, body.hud-on .card, body.hud-on .start, body.hud-on .credit { visibility: hidden; }
.hud { position: fixed; inset: 0; pointer-events: none; overflow: hidden; color: var(--hud); font: 11px/1.5 "DotGothic16", ui-monospace, monospace; letter-spacing: .06em;
  text-shadow: 0 0 6px color-mix(in srgb, var(--hud) 70%, transparent); }
.hud .tint { position: absolute; inset: 0; background: var(--hud); mix-blend-mode: multiply; opacity: .85; }
.hud .lines { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px); }
.hud .vig { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,8,4,.72) 100%); }
.hud .rule { position: absolute; opacity: .9; }
.hud .rule.x { left: 0; right: 0; bottom: 0; height: 20px; background-image: linear-gradient(to right, var(--hud) 1px, transparent 1px), linear-gradient(to right, var(--hud) 1px, transparent 1px); background-size: 50px 12px, 10px 6px; background-position: 0 100%, 0 100%; background-repeat: repeat-x; border-bottom: 1px solid var(--hud); }
.hud .rule.y { top: 0; bottom: 0; right: 0; width: 20px; background-image: linear-gradient(to bottom, var(--hud) 1px, transparent 1px), linear-gradient(to bottom, var(--hud) 1px, transparent 1px); background-size: 12px 50px, 6px 10px; background-position: 100% 0, 100% 0; background-repeat: repeat-y; border-right: 1px solid var(--hud); }
.hud .ret { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; }
.hud .ret.snap { animation: retsnap .32s ease-out; }
@keyframes retsnap { 0% { transform: scale(1.35); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
/* the readout sits right under the reticle (which is 120 px tall, centred), so the eye stays in one place */
.hud .read { position: absolute; top: calc(50% + 70px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 56px); box-sizing: border-box;
  text-align: center; padding: 8px 16px 10px; background: var(--hud-bg); border: 1px solid var(--hud); }
.hud .read b:empty, .hud .read div:empty { display: none; } /* while flying, the plate shrinks to the counter */
.hud .read b { display: block; font-size: 20px; font-weight: 400; letter-spacing: .04em; margin: 2px 0; }
.hud .read .rec { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--hud); margin-right: 6px; vertical-align: 1px; animation: blink 1.2s steps(2, start) infinite; }
.hud .read .st { display: inline-block; margin-top: 6px; padding: 1px 6px; border: 1px solid var(--hud); }
.hud .bye { position: absolute; left: 0; right: 0; bottom: max(34px, env(safe-area-inset-bottom)); text-align: center; font-size: 12px; opacity: .85; }
/* phones: the readout plate keeps one width (side margins only), so it doesn't jump with every name */
@media (max-width: 640px) { .hud .read { width: auto; max-width: none; left: 24px; right: 32px; transform: none; } }
@media (prefers-reduced-motion: reduce) { .start::before, .hud .read .rec, .hud .ret.snap { animation: none; } }
/* a link back to the world map, inside the title box (japan.html) */
/* links under the title: the maps' own (◀ 世界地図), then whatever the site that serves the map adds (siteNav) */
.title .links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; }
.title .links:empty { display: none; }
.title .links a { color: #f8d030; text-decoration: none; }
.title .links a:hover { text-decoration: underline; }
