:root {
  --cap: 1240px;
  --w: min(var(--cap), 100vw - 48px, (100vh - 300px) * 5);
  --s: 4;
  --veil: rgb(10 11 13 / .9);
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.scene { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; overflow: hidden; background: #4d6b45; }
.scene .mp { position: absolute; left: 50%; top: 50%; width: max(100vw, 100vh * var(--r)); filter: brightness(1.15) saturate(1.1); transform: translate(-50%, -50%) scale(1.14); animation: drift 90s ease-in-out infinite alternate; }
@supports (height: 100lvh) {
  .scene { height: 100lvh; }
  .scene .mp { width: max(100vw, 100lvh * var(--r)); }
}
@keyframes dusk { from { fill: rgb(10 11 13 / .4); } }
@keyframes drift {
  from { transform: translate(-53%, -52%) scale(1.14); }
  to { transform: translate(-47%, -48%) scale(1.14); }
}

.mp { display: block; overflow: hidden; }
.mp-in { position: absolute; overflow: hidden; }
.mp img { position: absolute; image-rendering: pixelated; }

.page { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; overflow: clip; }
main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; padding: 56px 20px 24px; }

.mark { position: relative; margin: calc(32px * var(--s)) 0 0; width: var(--w); aspect-ratio: 3864 / 698; }
.mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.veil { fill: var(--veil); transition: fill .5s; animation: dusk 1.6s ease-out backwards; }
.edge { fill: none; stroke: rgb(230 236 242 / .3); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.solid { fill: var(--text); }
body:has(.menu .map:hover) .veil, body:has(.menu .map:focus-visible) .veil { fill: rgb(10 11 13 / .5); }
.mark img { position: absolute; bottom: 100%; left: calc(100% * var(--x) - 15.5px * var(--s)); width: calc(32px * var(--s)); height: calc(32px * var(--s)); image-rendering: pixelated; }

.menu { position: relative; display: grid; grid-template-columns: 1.4fr .9fr .9fr 1.4fr 1.4fr; gap: 12px; width: var(--w); }
.menu a { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line2); background: var(--raised); font: 500 14px/1.25 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.menu a:hover { border-color: var(--text2); background: var(--surface); }
.menu .play { border-color: var(--text); background: var(--text); color: var(--bg); font-size: 18px; letter-spacing: .32em; text-indent: .32em; }
.menu .play:hover { border-color: var(--hover); background: var(--hover); }
.menu .play:active { border-color: var(--press); background: var(--press); }

.foot { position: relative; padding: 0 20px 22px; text-align: center; font-size: 12px; color: var(--mute); }

.langs { position: absolute; z-index: 5; top: 18px; right: 24px; }
.langs summary { list-style: none; cursor: pointer; height: 34px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line2); background: var(--raised); font: 500 12px var(--mono); letter-spacing: .1em; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { border-color: var(--text2); }
.langs div { position: absolute; right: 0; top: calc(100% + 4px); min-width: 180px; padding: 6px 0; background: var(--raised); border: 1px solid var(--line2); }
.langs a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 12px; color: var(--text2); font-size: 13px; }
.langs a:hover, .langs a[aria-current="true"] { color: var(--text); background: var(--surface); }
.langs a span + span { font: 11px var(--mono); color: var(--mute); }

@media (min-width: 1800px) and (min-height: 1000px) {
  :root { --cap: 1600px; --s: 5; }
  main { gap: 56px; }
  .menu a { min-height: 68px; font-size: 16px; }
  .menu .play { font-size: 22px; }
}
@media (max-width: 1099px), (max-height: 560px) {
  :root { --s: 3; }
  .menu { grid-template-columns: repeat(4, 1fr); }
  .menu a { grid-column: span 2; }
  .menu .wiki, .menu .map { grid-column: span 1; }
}
@media (max-width: 752px), (max-height: 430px) { :root { --s: 2; } }
@media (max-width: 620px) {
  :root { --w: min(var(--cap), 100vw - 40px); }
  main { gap: 32px; }
  .edge { fill: rgb(230 236 242 / .5); stroke: none; }
  .mark img:nth-of-type(2), .mark img:nth-of-type(5) { display: none; }
  .mark img:nth-of-type(4) { --x: .6659 !important; }
  .menu { grid-template-columns: 1fr 1fr; gap: 10px; }
  .menu a { grid-column: 1 / -1; }
  .menu .wiki, .menu .map { grid-column: auto; font-size: 15px; }
  .menu .play { min-height: 60px; font-size: 20px; }
  .langs { top: 12px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) { .scene .mp, .veil { animation: none; } }
