/* DWAPPS (dwapps.online): a pixel site. 1 art pixel = 4 CSS px for frames, sprites drawn x4 (16 px -> 64 px). */

@font-face {
  font-family: "VT323";
  src: url(assets/fonts/vt323-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
    U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url(assets/fonts/vt323-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

:root {
  --ink: #2b1a10;
  --wood: #8b5a2b;
  --wood-d: #5c3817;
  --wood-l: #b27a42;
  --paper: #fdf6e4;
  --paper-2: #f0e2c2;
  --text: #2b1a10;
  --muted: #6d5640;
  --accent: #c2501a;
  --accent-d: #8a3410;
  --accent-l: #e0703a;
  --on-accent: #fff8ec;
  --live: #3f9b4a;
  --gold: #f2c14e;
  --bg: #8cc85a;
  --bg-2: #82be50;
  --on-bg: #1e3a10;
  --shade: rgba(43, 26, 16, 0.4);
  --night-tint: transparent;
  color-scheme: light;
}
:root[data-theme="night"] {
  --ink: #0b0d18;
  --wood: #6b4524;
  --wood-d: #3d2410;
  --wood-l: #8b5a2b;
  --paper: #262c47;
  --paper-2: #1e2339;
  --text: #f4ead2;
  --muted: #b3a88f;
  --accent: #d9622a;
  --accent-d: #8f3812;
  --accent-l: #ef8450;
  --live: #57c464;
  --bg: #161b2e;
  --bg-2: #1a2036;
  --on-bg: #cfd6ee;
  --shade: rgba(0, 0, 0, 0.55);
  --night-tint: rgba(16, 20, 52, 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --ink: #0b0d18;
    --wood: #6b4524;
    --wood-d: #3d2410;
    --wood-l: #8b5a2b;
    --paper: #262c47;
    --paper-2: #1e2339;
    --text: #f4ead2;
    --muted: #b3a88f;
    --accent: #d9622a;
    --accent-d: #8f3812;
    --accent-l: #ef8450;
    --live: #57c464;
    --bg: #161b2e;
    --bg-2: #1a2036;
    --on-bg: #cfd6ee;
    --shade: rgba(0, 0, 0, 0.55);
    --night-tint: rgba(16, 20, 52, 0.5);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: "VT323", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
  background-color: var(--bg);
  /* a 64 px checker, like mown grass (night: a dim tiled floor) */
  background-image: conic-gradient(var(--bg-2) 25%, transparent 0 50%, var(--bg-2) 0 75%, transparent 0);
  background-size: 128px 128px;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
img,
svg {
  display: block;
}
img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}
a {
  color: inherit;
}
main {
  flex: 1 0 auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1;
}

.wrap {
  width: min(1184px, 100% - 32px);
  margin-inline: auto;
}

/* --- pixel primitives ------------------------------------------------------------------------- */
.ico {
  width: 24px;
  height: 24px;
  fill: currentColor;
  shape-rendering: crispEdges;
  flex: none;
}
.art {
  shape-rendering: crispEdges;
  flex: none;
}
/* the 4 px stepped corner of every small block */
.notch {
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
      100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%,
      4px calc(100% - 4px), 0 calc(100% - 4px));
}
.panel {
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 4px var(--wood), inset 0 0 0 8px var(--wood-l), 8px 8px 0 var(--shade);
  padding: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 20px 12px;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  color: var(--on-accent);
  background: var(--accent);
  border: 4px solid var(--ink);
  box-shadow: inset 0 -6px 0 var(--accent-d), inset 0 4px 0 var(--accent-l);
  cursor: pointer;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 6px 0 var(--accent-d);
}
.btn:focus-visible,
.chipbtn:focus-visible,
.nav a:focus-visible,
.game-cover:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 2px;
}
.btn-2 {
  color: var(--text);
  background: var(--paper);
  box-shadow: inset 0 -6px 0 var(--paper-2);
}
.btn-2:active {
  box-shadow: inset 0 6px 0 var(--paper-2);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- header ------------------------------------------------------------------------------------ */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  color: #fdf1d8;
  background-color: var(--wood);
  /* planks: a dark seam every 16 px */
  background-image: repeating-linear-gradient(to bottom, transparent 0 12px, var(--wood-d) 12px 16px);
  border-bottom: 4px solid var(--ink);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 80px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-size: 40px;
  letter-spacing: 2px;
  text-shadow: 4px 4px 0 var(--ink);
}
.brand .art {
  width: 64px;
  height: 64px;
  margin: -4px -4px -4px -12px;
}
.brand b {
  font-weight: 400;
  color: var(--gold);
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.nav a {
  padding: 6px 12px 8px;
  font-size: 26px;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--ink);
}
.nav a:hover {
  background: var(--wood-d);
}
.nav a[aria-current="page"] {
  color: var(--gold);
  box-shadow: inset 0 -4px 0 var(--gold);
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.chipbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  font: inherit;
  font-size: 22px;
  color: var(--text);
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: inset 0 -4px 0 var(--paper-2);
  cursor: pointer;
}
.chipbtn {
  text-decoration: none;
}
.chipbtn[aria-current="true"] {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: inset 0 -4px 0 var(--accent-d);
}
.lang {
  display: flex;
}
.lang .chipbtn + .chipbtn {
  margin-left: -4px;
}
#theme .ico-moon,
:root[data-theme="night"] #theme .ico-sun {
  display: none;
}
:root[data-theme="night"] #theme .ico-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) #theme .ico-sun {
    display: none;
  }
  :root:not([data-theme="day"]) #theme .ico-moon {
    display: block;
  }
}

/* --- hero -------------------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 504px;
  display: grid;
  align-items: center;
  padding: 40px 0;
  border-bottom: 4px solid var(--ink);
  background: #3b9fd6;
  overflow: hidden;
}
.hero-art {
  position: absolute;
  inset: 0;
  background: 30% 50% / auto 504px no-repeat;
  image-rendering: pixelated;
}
.hero-art.coral {
  background-image: url(assets/img/hero-coral.png);
}
.hero-art.grove {
  background-image: url(assets/img/hero-grove.png);
  background-size: auto 456px;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--night-tint);
}
.hero-in {
  position: relative;
}
.hero-card {
  max-width: 600px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 2px 10px 4px;
  font-size: 22px;
  color: var(--ink);
  background: var(--gold);
}
.hero h1 {
  font-size: 60px;
  margin-bottom: 14px;
}
.lead {
  font-size: 26px;
  color: var(--muted);
  margin-bottom: 22px;
}

/* --- sections ---------------------------------------------------------------------------------- */
.sec {
  padding: 56px 0 8px;
}
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-bottom: 24px;
}
.sign {
  display: inline-block;
  padding: 6px 20px 10px;
  font-size: 40px;
  color: #fdf1d8;
  text-shadow: 2px 2px 0 var(--ink);
  background: var(--wood);
  border: 4px solid var(--ink);
  box-shadow: inset 0 -6px 0 var(--wood-d), inset 0 4px 0 var(--wood-l);
}
.sec-note {
  font-size: 24px;
  color: var(--on-bg);
}
.muted {
  color: var(--muted);
}

/* --- game cards -------------------------------------------------------------------------------- */
.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
}
.game.feat {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
}
.game-cover {
  position: relative;
  display: block;
  border: 4px solid var(--ink);
  background: var(--ink);
}
.game-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px 4px 6px;
  font-size: 22px;
  color: #fff;
  background: var(--live);
  border: 4px solid var(--ink);
}
.badge.live .ico {
  animation: blink 1.2s steps(2, jump-none) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.2;
  }
}
.game-body {
  display: grid;
  gap: 16px;
  align-content: start;
}
.game-title {
  display: flex;
  align-items: center;
  gap: 16px;
}
.app-ico {
  width: 64px;
  height: 64px;
  border: 4px solid var(--ink);
  box-sizing: content-box;
  flex: none;
}
.game h3 {
  font-size: 40px;
}
.game-title p {
  font-size: 22px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 6px 8px;
  font-size: 20px;
  background: var(--paper-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}
.stats div {
  padding: 6px 10px 8px;
  text-align: center;
  background: var(--paper-2);
  border-bottom: 4px solid var(--wood-l);
}
.stats dt {
  font-size: 18px;
  color: var(--muted);
}
.stats dd {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.game.small h3 {
  font-size: 32px;
}
.game.small .game-cover img {
  filter: saturate(0.85);
}

/* --- changelog --------------------------------------------------------------------------------- */
.log {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.log li {
  display: grid;
  grid-template-columns: 76px 40px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 4px dotted var(--paper-2);
}
.log li:last-child {
  border-bottom: 0;
}
.log time {
  padding: 2px 0 4px;
  font-size: 22px;
  text-align: center;
  color: var(--on-accent);
  background: var(--wood);
}
.log img {
  width: 40px;
  height: 40px;
  border: 4px solid var(--ink);
  box-sizing: content-box;
}
.log b {
  display: block;
  font-weight: 400;
  color: var(--accent);
}
.log-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

/* --- about + footer ---------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}
.about p + p {
  margin-top: 12px;
}
.facts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.facts .ico {
  color: var(--accent);
}
.foot {
  margin-top: 64px;
  padding: 24px 0 28px;
  color: #fdf1d8;
  background-color: var(--wood);
  background-image: repeating-linear-gradient(to bottom, transparent 0 12px, var(--wood-d) 12px 16px);
  border-top: 4px solid var(--ink);
  font-size: 20px;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}
.foot .brand {
  font-size: 30px;
}
.foot .brand .art {
  width: 48px;
  height: 48px;
  margin: 0 0 0 -8px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-left: auto;
}

/* --- game page --------------------------------------------------------------------------------- */
.crumbs {
  padding: 20px 0 0;
  font-size: 22px;
  color: var(--on-bg);
}
.crumbs a {
  color: inherit;
}
.gp-hero {
  min-height: 456px;
}
.gp-hero .hero-card {
  display: grid;
  gap: 14px;
  max-width: 640px;
}
.gp-title {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gp-title h1 {
  font-size: 56px;
  margin: 0;
}
.gp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.gp-main {
  display: grid;
  gap: 28px;
}
.gp-main h2 {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--accent);
}
.gp-main p + p {
  margin-top: 10px;
}
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.spaced {
  margin-top: 16px;
}
.shots figure {
  margin: 0;
}
.shots a {
  display: block;
  border: 4px solid var(--ink);
}
.shots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.shots figcaption {
  padding-top: 6px;
  font-size: 20px;
  color: var(--muted);
}
.shots.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.shots.wide img {
  aspect-ratio: 844 / 390;
}
.fishdex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.fish {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  text-align: center;
  font-size: 18px;
  line-height: 1.05;
  background: var(--paper-2);
}
.fish-pic {
  display: grid;
  place-items: center;
  width: 80px;
  height: 64px;
  background: #3b9fd6;
  background-image: repeating-linear-gradient(to bottom, transparent 0 12px, rgba(255, 255, 255, 0.18) 12px 16px);
  border: 4px solid var(--ink);
  box-sizing: content-box;
}
.fish img {
  max-width: none;
}
.fish.legend img {
  filter: brightness(0);
  opacity: 0.75;
}
.fish.legend .fish-name {
  color: var(--accent);
}
.howto {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.howto > div {
  padding: 14px 16px;
  background: var(--paper-2);
}
.howto h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  margin-bottom: 10px;
}
.keys {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.keys li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
kbd {
  display: inline-block;
  min-width: 32px;
  padding: 0 6px 4px;
  font: inherit;
  font-size: 20px;
  text-align: center;
  color: var(--text);
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: inset 0 -4px 0 var(--paper-2);
}
.info {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 16px;
}
.info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0;
}
.info dt {
  color: var(--muted);
}
.info dd {
  margin: 0;
}
.info .btn {
  width: 100%;
}
.tip {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  font-size: 20px;
  background: var(--paper-2);
}
.tip .ico {
  color: var(--accent);
  margin-top: 2px;
}

/* --- guides, contact, 404 ------------------------------------------------------------------------ */
.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 20;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--gold);
}
.skip:focus {
  top: 8px;
}
.intro {
  max-width: 62ch;
  margin-bottom: 20px;
}
.guides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.guide {
  display: flex;
  gap: 14px;
  padding: 14px 16px 16px;
  background: var(--paper-2);
}
.guide h3 {
  font-size: 28px;
  margin-bottom: 6px;
}
.guide p {
  margin-bottom: 10px;
}
.guide-ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: inset 0 -4px 0 var(--accent-d);
}
.guide-ico .ico {
  width: 36px;
  height: 36px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 4px 8px;
  font-size: 19px;
  color: var(--muted);
  background: var(--paper);
}
.tag .ico {
  width: 18px;
  height: 18px;
}
.cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.cta .ico {
  color: var(--accent);
}
.hello {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--accent);
}
.contact-links {
  margin-top: 18px;
}
.contact-links .btn {
  font-size: 22px;
  min-height: 48px;
  padding: 6px 14px 10px;
}
.nf {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nf h1 {
  font-size: 48px;
  margin-bottom: 12px;
}
.nf p {
  margin-bottom: 8px;
}
.nf .actions {
  margin-top: 16px;
}
.nf-code {
  font-size: 120px;
  line-height: 1;
  color: var(--accent);
  text-shadow: 8px 8px 0 var(--shade);
}

/* --- responsive -------------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .game.feat {
    grid-template-columns: 1fr;
  }
  .gp-cols {
    grid-template-columns: 1fr;
  }
  .info {
    position: static;
  }
}
@media (max-width: 900px) {
  .top {
    position: static;
  }
  .top-in {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 6px;
  }
  .nav {
    order: 3;
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 4px solid var(--wood-d);
  }
  .nav a {
    padding: 8px 2px 10px;
    text-align: center;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 21px;
  }
  .brand {
    font-size: 34px;
  }
  .nav a {
    font-size: 20px;
  }
  .hero {
    padding: 252px 0 0;
    min-height: 0;
    align-items: end;
    background: none;
    border-bottom: 0;
  }
  .hero-art {
    bottom: auto;
    height: 252px;
    background-size: auto 252px;
    background-position: 28% 0;
    border-bottom: 4px solid var(--ink);
  }
  .hero-card,
  .panel {
    padding: 20px;
  }
  .hero-card {
    margin-top: -36px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .gp-title h1 {
    font-size: 42px;
  }
  .lead {
    font-size: 23px;
  }
  .sign {
    font-size: 34px;
  }
  .game {
    padding: 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .about,
  .guides,
  .howto,
  .shots,
  .shots.wide {
    grid-template-columns: 1fr;
  }
  .gp-hero {
    padding-top: 228px;
  }
  .hero-art.grove {
    height: 228px;
    background-size: auto 228px;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  .log li {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .log img {
    display: none;
  }
  .nf {
    flex-direction: column;
    align-items: flex-start;
  }
  .guide h3 {
    font-size: 25px;
  }
  .foot nav {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
