/* EchoFriendly Games: a 2000s homepage, made with care. */

@font-face { font-family: "DotGothic16"; src: url("/fonts/dotgothic16.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/fonts/silkscreen.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Silkscreen"; font-weight: 700; src: url("/fonts/silkscreen-bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Michroma"; src: url("/fonts/michroma.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: light;
  --ink: #333344;
  --muted: #666688;
  --navy: #003366;
  --blue: #3366cc;
  --blue-hi: #6699ff;
  --line: #6699cc;
  --sky: #99ccff;
  --sky-pale: #ddeeff;
  --sky-mist: #f5faff;
  --pink: #ff6699;
  --pink-deep: #cc3366;
  --pink-pale: #ffeef5;
  --yellow: #ffff66;
  --link: #3366cc;
  --visited: #9966cc;
  --st-night: #07061a;
  --st-indigo: #1a1752;
  --st-accent: #00ffcc;
  --pixel: "DotGothic16", "Hiragino Kaku Gothic ProN", "MS PGothic", monospace;
  --body: Verdana, Tahoma, "Hiragino Kaku Gothic ProN", Meiryo, "MS PGothic", "Noto Sans JP", sans-serif;
  --tiny: "Silkscreen", "DotGothic16", monospace;
  --paws: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' shape-rendering='crispEdges'%3E%3Cdefs%3E%3Cpath id='p' d='M2 0h2v2H2zM5 0h2v2H5zM0 2h2v2H0zM7 2h2v2H7zM3 3h3v1H3zM2 4h5v1H2zM1 5h7v2H1zM2 7h2v1H2zM5 7h2v1H5z'/%3E%3C/defs%3E%3Cuse href='%23p' fill='%23c4e2ff' transform='translate(8 8) scale(2)'/%3E%3Cuse href='%23p' fill='%23c4e2ff' transform='translate(40 40) scale(2)'/%3E%3Cpath fill='%23fff' d='M47 12h2v6h-2zM45 14h6v2h-6zM15 47h2v2h-2z'/%3E%3C/svg%3E");
  scrollbar-color: var(--blue-hi) var(--sky-pale);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--sky-pale) var(--paws);
  color: var(--ink);
  font: 13px/1.8 var(--body);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }
p { margin: 0 0 0.85em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: var(--pink); }
:focus-visible { outline: 3px dashed var(--pink); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 8px 12px; background: #fff; border: 2px solid var(--navy); font-family: var(--pixel); }
.skip:focus { left: 12px; }

.page {
  max-width: 880px;
  margin: 16px auto 32px;
  background: var(--sky-mist);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- banner */

.banner {
  position: relative;
  height: 300px;
  overflow: hidden;
  isolation: isolate;
  /* Banded, like a gradient saved as a GIF. */
  background: linear-gradient(#5aaaff 0 14%, #66b2ff 14% 28%, #74baff 28% 42%, #84c4ff 42% 56%, #96ceff 56% 70%, #aad8ff 70% 84%, #c0e2ff 84%);
  border-bottom: 1px solid var(--line);
}
.banner::before {
  /* sunburst behind the logo */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(at 31% 46%, rgba(255, 255, 255, 0.24) 0 7.5deg, transparent 7.5deg 15deg);
  -webkit-mask-image: radial-gradient(circle at 31% 46%, #000 12%, transparent 72%);
  mask-image: radial-gradient(circle at 31% 46%, #000 12%, transparent 72%);
}

.banner-sky { position: absolute; inset: 0; z-index: -1; }
/* Clouds move in GIF-rate steps. */
.cloud { position: absolute; fill: #fff; animation: drift steps(140) infinite; }
.cloud-shade { fill: #d8eeff; }
.cloud-1 { width: 120px; top: 22px; animation-duration: 95s; animation-delay: -30s; }
.cloud-2 { width: 76px; top: 92px; animation-duration: 70s; animation-delay: -52s; opacity: 0.9; }
.cloud-3 { width: 160px; top: 150px; animation-duration: 120s; animation-delay: -8s; opacity: 0.75; }
@keyframes drift { from { transform: translateX(-180px); } to { transform: translateX(940px); } }

.twinkle { position: absolute; color: #fff; font-size: 14px; line-height: 1; animation: twinkle 2.4s steps(2, jump-none) infinite; }
.t1 { left: 62%; top: 18px; }
.t2 { left: 7%; top: 196px; animation-delay: -0.8s; font-size: 18px; }
.t3 { left: 52%; top: 132px; animation-delay: -1.6s; font-size: 10px; }
.t4 { left: 90%; top: 30px; animation-delay: -1.1s; }
@keyframes twinkle { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0.25; transform: scale(0.6); } }

.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 110px; }
.hill-back { fill: #a8e58c; }
.hill-front { fill: #5fc24e; }

.logo { position: absolute; left: 50px; top: 26px; z-index: 2; }
.logo-kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 9px 4px;
  font: 13px/1 var(--pixel);
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--navy);
}
/* The logo is a GIF (tools/render-logo.sh); its echo trail hangs off the left. */
.logo-mark { margin: 0; line-height: 0; }
.logo-img { display: block; width: 476px; height: auto; margin-left: -30px; image-rendering: pixelated; }
.logo-tag { display: inline-block; margin: 14px 0 0; padding: 2px 8px 1px; font: 14px/1.4 var(--pixel); letter-spacing: 0.04em; color: var(--navy); background: #fff; }

.dog {
  position: absolute;
  right: 0;
  bottom: 6px;
  z-index: 3;
  width: 288px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dog:hover { background: none; }
.dog:focus-visible { outline-offset: -8px; }
.dog img {
  display: block;
  width: 100%;
  height: auto;
}
/* A two-frame hop, like an animated GIF. */
.dog.is-patted img { animation: hop 0.3s steps(1); }
@keyframes hop { 0% { transform: translateY(-6px); } 50% { transform: none; } }

.bubble {
  position: absolute;
  top: 10px;
  left: -46px;
  padding: 5px 10px 4px;
  font: 16px/1.2 var(--pixel);
  color: var(--navy);
  white-space: nowrap;
  background: #fff;
  border: 2px solid var(--navy);
}
/* Tail: an outline triangle with a white one inside it. */
.bubble::before,
.bubble::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border-style: solid; }
.bubble::before { right: -12px; margin-top: -7px; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--navy); }
.bubble::after { right: -8px; margin-top: -5px; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent #fff; }
.dog.is-patted .bubble { animation: pop 0.3s steps(1); }
@keyframes pop { 0% { transform: translateY(-5px); } 50% { transform: none; } }

.heart {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  font: bold 20px/1 var(--body);
  color: var(--pink);
  animation: float-up 1.1s steps(6) forwards;
}
@keyframes float-up {
  from { opacity: 1; transform: translate(0, 0) scale(0.6); }
  to { opacity: 0; transform: translate(var(--dx, 0), -70px) scale(1.2); }
}

/* ---------------------------------------------------------------- menu + ticker */

.menu { background: #fff; border-bottom: 1px solid var(--line); }
.menu ul { display: flex; margin: 0; padding: 0; list-style: none; }
.menu li { flex: 1; }
.menu li + li { border-left: 1px dotted var(--line); }
.menu a {
  display: block;
  padding: 10px 4px 8px;
  text-align: center;
  font: 17px/1 var(--pixel);
  letter-spacing: 0.06em;
  color: var(--navy);
  text-decoration: none;
}
.menu a:visited { color: var(--navy); }
.menu a:hover,
.menu a:focus-visible { color: var(--pink-deep); background: #ffffcc; }
.menu-ic { margin-right: 5px; color: var(--pink); }
.menu small { display: block; margin-top: 5px; font-size: 11px; letter-spacing: 0.06em; color: var(--pink-deep); }

.ticker {
  overflow: hidden;
  padding: 7px 0 6px;
  font: 14px/1.2 var(--pixel);
  color: var(--yellow);
  white-space: nowrap;
  background: var(--navy);
}
/* 420 steps over 36s is one jump every ~86ms, the speed of an IE <marquee>. */
.ticker-text { display: inline-block; margin: 0; padding-left: 100%; animation: ticker 36s steps(420) infinite; }
.ticker:hover .ticker-text { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------------------------------------------------------------- layout + boxes */

.layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  grid-template-areas: "side main";
  gap: 18px;
  padding: 18px;
}
main { grid-area: main; display: grid; gap: 18px; align-content: start; }
main:focus { outline: none; }
.side { grid-area: side; display: grid; gap: 16px; align-content: start; align-self: start; }

.box { background: #fff; border: 1px solid var(--line); scroll-margin-top: 12px; }
.box-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 5px 8px 4px;
  font: 400 16px/1.2 var(--pixel);
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--blue);
  border-bottom: 1px solid var(--line);
}
.box-ic { color: var(--yellow); }
.box-sub { margin-left: auto; font-size: 12px; letter-spacing: 0.12em; color: #e3f1ff; }
.box-pink .box-h { background: var(--pink-deep); }
.box-pink .box-ic { color: #fff; }
.box-pink .box-sub { color: #ffe6f2; }
.box-b { padding: 14px 16px 16px; }
.side .box-b { padding: 12px; }
.side .box-h { font-size: 15px; }
@media (min-width: 761px) and (min-height: 820px) {
  .side { position: sticky; top: 16px; }
}

.note { font-size: 12px; color: var(--muted); }
.marker { background: linear-gradient(transparent 58%, var(--yellow) 58%); }
.sub-h {
  margin: 20px 0 10px;
  padding-left: 8px;
  font: 400 15px/1.3 var(--pixel);
  color: var(--navy);
  border-left: 4px solid var(--pink);
}
.sub-h span { font-size: 12px; color: var(--pink-deep); margin-left: 6px; }

/* welcome */
.lede { font-size: 14px; }
.sign { text-align: right; font: 15px var(--pixel); color: var(--pink-deep); }

/* news */
.news {
  max-height: 140px;
  margin: 0;
  padding: 0 8px 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: var(--pink) var(--pink-pale);
}
.news li { position: relative; padding: 6px 0 6px 18px; border-bottom: 1px dashed var(--sky); }
.news li:last-child { border-bottom: 0; }
.news li::before { content: "▶"; position: absolute; left: 0; top: 9px; font-size: 10px; color: var(--pink); }
.news time { margin-right: 6px; font-family: var(--pixel); color: var(--blue); }
.new {
  margin-right: 6px;
  padding: 0 4px;
  font: 11px/1.5 var(--tiny);
  color: #fff;
  background: #ff2d55;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { background: var(--pink-deep); color: var(--yellow); } }

/* ---------------------------------------------------------------- games */

.game {
  padding: 12px;
  color: #eef2f5;
  background: #0e0c33;
  border: 1px solid #000;
}
.game a:hover { background: none; }
.game-shot {
  position: relative;
  display: block;
  border: 1px solid #00cc99;
}
.game-shot img { display: block; width: 100%; height: auto; }
.game-shot-cap {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 5px 2px;
  font: 8px/1 var(--tiny);
  color: var(--st-night);
  background: var(--st-accent);
}
.shot-note { margin: 4px 0 0; font: 11px/1.4 var(--pixel); color: #8b8fb8; text-align: right; }
.game-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 16px 4px 4px; }
.game-title { margin: 0 0 8px; font-weight: 400; }
.st-mark { display: block; font: 26px/1.2 "Michroma", var(--body); letter-spacing: 0.02em; color: #fff; }
.st-rule { display: block; width: 92px; height: 2px; margin: 8px 0 7px; background: var(--st-accent); }
.game-blurb { grid-column: 1 / -1; margin-bottom: 14px; color: #d9def5; }
.game-blurb strong { color: var(--st-accent); font-weight: 400; font-family: var(--pixel); letter-spacing: 0.06em; }
.spec { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); margin: 0; border-top: 1px solid rgba(0, 255, 204, 0.3); }
.spec div { padding: 8px 12px 2px; border-left: 1px solid rgba(0, 255, 204, 0.3); }
.spec div:first-child { padding-left: 0; border-left: 0; }
.spec dt { font: 11px/1.4 var(--pixel); letter-spacing: 0.06em; color: #8b8fb8; }
.spec dd { margin: 0; font-size: 13px; white-space: nowrap; }
.spec a { color: var(--st-accent); }
.spec a:visited { color: var(--st-accent); }
.badge { padding: 1px 5px; margin-right: 3px; font: 11px/1.4 var(--pixel); color: var(--st-night); background: var(--yellow); }
.go {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  margin-top: 6px;
  display: inline-block;
  padding: 9px 14px 8px;
  font: 15px/1 var(--pixel);
  letter-spacing: 0.04em;
  color: var(--st-night);
  text-decoration: none;
  white-space: nowrap;
  background: var(--st-accent);
  border: 2px outset #99ffe6;
}
.go:visited { color: var(--st-night); }
.game .go:hover { color: var(--st-night); background: #66ffd9; }
.go:active { border-style: inset; }

/* ---------------------------------------------------------------- staff */

.profile { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile + .profile { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.portrait {
  margin: 4px 0 0;
  padding: 6px 6px 3px;
  background: #fff;
  border: 1px solid var(--line);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  background: repeating-linear-gradient(45deg, #ffe6f2 0 9px, #fff 9px 18px);
}
.portrait figcaption { padding-top: 3px; text-align: center; font: 12px/1.4 var(--pixel); letter-spacing: 0.2em; color: var(--muted); }
.pf { margin: 0 0 12px; }
.pf div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--sky); }
.pf dt { font: 13px/1.75 var(--pixel); color: var(--blue); }
.pf dd { margin: 0; }
.stats { display: grid; gap: 5px; margin: 0; padding: 10px 12px; list-style: none; background: var(--navy); border: 1px solid #000; }
.stats li { display: grid; grid-template-columns: 72px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font: 8px/1 var(--tiny); color: #fff; }
.stat-v { text-align: right; color: var(--yellow); }
.stat-bar { position: relative; height: 10px; background: repeating-linear-gradient(90deg, #3b4fa0 0 calc(10% - 2px), transparent calc(10% - 2px) 10%); }
.stat-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 10%);
  background: repeating-linear-gradient(90deg, var(--pink) 0 calc(100% / var(--v) - 2px), transparent calc(100% / var(--v) - 2px) calc(100% / var(--v)));
}
.stat-bar[data-v="10"] { --v: 10; }
.stat-bar[data-v="9"] { --v: 9; }
.stat-bar[data-v="8"] { --v: 8; }
.stat-bar[data-v="7"] { --v: 7; }
.stat-bar[data-v="6"] { --v: 6; }
.stat-bar[data-v="3"] { --v: 3; }
.stat-bar[data-v="2"] { --v: 2; }
.stat-bar[data-v="0"] { --v: 0; }
.stat-bar-inf::before {
  background: repeating-linear-gradient(90deg, transparent calc(10% - 2px) 10%), linear-gradient(90deg, #ff5ca8, #ffb347, #fff36b, #6fe3c6, #5aa2ff, #b07cff);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
  mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
}
/* Crashout: red, and blinking like it's about to. */
.stat-bar-crash::before {
  background: repeating-linear-gradient(90deg, #ff3333 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
  animation: crash 0.9s steps(1) infinite;
}
@keyframes crash { 50% { opacity: 0.35; } }
/* Mana: a full blue MP bar. */
.stat-bar-mana::before { background: repeating-linear-gradient(90deg, #3399ff 0 calc(10% - 2px), transparent calc(10% - 2px) 10%); }

/* ---------------------------------------------------------------- links */

.linkus { display: flex; gap: 16px; align-items: flex-start; }
.linkus > div { min-width: 0; flex: 1; }
.linkus-banner { flex: none; width: 176px; height: 62px; image-rendering: pixelated; }
.code {
  display: block;
  width: 100%;
  margin: 2px 0 8px;
  padding: 6px 8px;
  font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  background: var(--sky-mist);
  border: 1px solid #999;
  border-radius: 0;
  resize: none;
  field-sizing: content;
}

.buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.buttons li { display: block; width: 88px; height: 31px; }
.b88-img { display: block; image-rendering: pixelated; }
.b88 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 88px;
  height: 31px;
  overflow: hidden;
  font: 700 8px/1 var(--tiny);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #000;
  -webkit-font-smoothing: none;
}
.b88 small { font-size: 8px; font-weight: 400; }
a.b88:hover { filter: brightness(1.12); }
a.b88:active { transform: translate(1px, 1px); }

.b88-st { flex-direction: row; gap: 6px; background: #0e0c33; }
.b88-st-orbit {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--st-accent);
  border-radius: 50%;
}
.b88-st-orbit::before,
.b88-st-orbit::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; }
.b88-st-orbit::before { left: -3px; top: 6px; background: #78c4ff; }
.b88-st-orbit::after { right: -3px; top: 6px; background: #ffc45c; }
.b88-st-t { font: 7px/1.25 "Michroma", var(--tiny); letter-spacing: 0.08em; color: #fff; text-align: left; }

.b88-godot { color: #fff; background: #478cbf; font-size: 16px; gap: 2px; }
.b88-godot:visited, .b88-godot:hover { color: #fff; }
.b88-godot small { font-size: 8px; }

.b88-any { color: #000; background: #c3c3c3; border: 2px outset #f0f0f0; outline: 1px solid #000; outline-offset: -1px; }
.b88-any:visited, .b88-any:hover { color: #000; background: #c3c3c3; }
.b88-any small { color: #333; }

.b88-collie { color: #fff; background: linear-gradient(105deg, #111 0 4%, #fff 4% 11%, #111 11%); }
.b88-collie small { color: var(--pink); }

.b88-bpm {
  color: #7dff7a;
  background: repeating-linear-gradient(#0b1f0b 0 2px, #0f2a10 2px 3px);
}
.b88-bpm small { color: #4fb04d; }

.b88-free { color: #fff; background: var(--pink); }

.b88-track { color: var(--navy); background: #fff; }
.b88-track small { color: #e0002f; }

.b88-web1 {
  color: #fff;
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000;
  background: linear-gradient(90deg, #ff6699 0 17%, #ff9933 17% 33%, #ffff66 33% 50%, #66ff99 50% 67%, #6699ff 67% 83%, #9966ff 83%);
}

.ring {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 14px;
  font-family: var(--pixel);
  text-align: center;
  background: var(--pink-pale);
  border: 4px double var(--navy);
}
.ring p { margin: 0; }
.ring strong { font-weight: 400; color: var(--navy); }
.ring .note { font-family: var(--body); }
.ring a { white-space: nowrap; }

/* ---------------------------------------------------------------- mail form */

.mailform { display: grid; gap: 14px; margin-top: 14px; }
.field label { display: block; margin-bottom: 4px; font: 13px/1.3 var(--pixel); color: var(--navy); }
.field label span { margin-right: 4px; }
.field em { margin-left: 4px; font-style: normal; font-size: 12px; color: #e00; }
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  padding: 5px 6px;
  font: 14px/1.5 var(--body);
  color: var(--ink);
  background: #fff;
  border: 1px solid #999;
  border-radius: 0;
}
.field select {
  appearance: none;
  padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' shape-rendering='crispEdges'%3E%3Cpath fill='%23d92877' d='M0 0h12v2H0zM2 2h8v2H2zM4 4h4v2H4zM5 6h2v2H5z'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { background-color: #fffef0; outline: 3px dashed var(--pink); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.send {
  padding: 6px 18px 5px;
  font: 15px/1.2 var(--pixel);
  color: #fff;
  background: var(--pink-deep);
  border: 2px outset #ff99bb;
  cursor: pointer;
}
.send:hover { background: #dd4477; }
.send:active { border-style: inset; }
.send[disabled] { cursor: progress; opacity: 0.6; }
.form-status { flex: 1; min-width: 200px; margin: 0; font: 14px/1.5 var(--pixel); }
.form-status.is-ok { color: #11804a; }
.form-status.is-err { color: #c4003c; }

/* ---------------------------------------------------------------- sidebar */

.counter { text-align: center; }
.counter-k { margin: 0; font: 13px/1.5 var(--pixel); }
.counter-k .note { font-family: var(--body); font-size: 11px; }
.odometer { display: inline-block; margin: 6px 0 4px; padding: 2px; background: #000; border: 1px solid #666; }
.odo-digits { display: flex; gap: 2px; }
.odo-digit {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 28px;
  font: 22px/1 var(--pixel);
  color: #fff;
  background: #000;
  border: 1px solid #333;
}
.odo-digit:last-child { color: #ffb347; }
.odo-digit.is-rolling { animation: roll 0.12s steps(2) 3; }
@keyframes roll { 50% { transform: translateY(-3px); opacity: 0.4; } }
.since { margin: 8px 0 0; font: 12px var(--tiny); color: var(--muted); }
.kiriban {
  margin-top: 10px;
  padding: 8px;
  font-size: 12px;
  background: var(--yellow);
  border: 2px dashed var(--pink-deep);
  animation: kiriban 0.8s steps(1) infinite;
}
.kiriban p { margin: 0 0 4px; }
.kiriban strong { font: 400 15px var(--pixel); color: var(--pink-deep); }
@keyframes kiriban { 50% { border-color: var(--navy); } }
.kiriban-rule { margin: 10px 0 0; text-align: left; line-height: 1.5; }

.dogstat { position: relative; text-align: center; }
.kao { margin: 0 0 4px; font: 20px/1.2 var(--pixel); color: var(--navy); }
.dogstat #dog-mood { font-size: 12px; line-height: 1.5; min-height: 3em; }
.pats { margin: 6px 0 8px; font: 13px var(--pixel); }
.pats strong { font-weight: 400; font-size: 18px; color: var(--pink-deep); }
.pat-btn,
.toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 4px;
  font: 13px/1.2 var(--pixel);
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}
.pat-btn { justify-content: center; }
.pat-btn:hover, .toggle:hover { background: #ffffcc; }
.pat-btn:active, .toggle:active { background: #eeeeee; }
.settings { display: grid; gap: 8px; }
.toggle-v { padding: 2px 6px 1px; font: 8px/1.3 var(--tiny); color: #fff; background: #8a90b3; }
.toggle-v::before { content: "OFF"; }
.toggle[aria-pressed="true"] .toggle-v { background: var(--pink-deep); }
.toggle[aria-pressed="true"] .toggle-v::before { content: "ON"; }

.blinkies { display: grid; justify-items: center; gap: 6px; padding-top: 2px; }
.blinkie {
  display: grid;
  place-items: center;
  width: 150px;
  height: 20px;
  overflow: hidden;
  font: 700 8px/1 var(--tiny);
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid #000;
}
.blinkie-wip { color: var(--yellow); background: repeating-linear-gradient(-45deg, #ffd400 0 7px, #151515 7px 14px); }
.blinkie-wip .blinkie-t { padding: 2px 5px 3px; font-weight: 400; letter-spacing: 0; background: #151515; }
.blinkie-dog { color: var(--pink-deep); background: #ffe6f2; animation: blinkie-dog 1.2s steps(1) infinite; }
@keyframes blinkie-dog { 50% { color: #fff; background: var(--pink); } }
.blinkie-rhythm { color: #7df9ff; background: #0d1b4c; animation: blinkie-rhythm 0.9s steps(1) infinite; }
@keyframes blinkie-rhythm { 50% { color: var(--yellow); } }

/* ---------------------------------------------------------------- footer */

.foot { padding: 14px 16px 16px; text-align: center; font-size: 11px; background: #fff; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0 0; }
.pagetop { display: inline-block; margin-bottom: 6px; font: 13px var(--pixel); text-decoration: none; }
.copy { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- small pages (404, thanks) */

.plain { max-width: 520px; margin-top: 64px; padding: 18px; }
.plain .box-h { font-size: 18px; }
.lost { text-align: center; }
.lost-dog { display: block; width: 220px; height: auto; margin: 4px auto 6px; }
.lost-big { margin: 0 0 8px; font: 24px/1.2 var(--pixel); color: var(--pink-deep); }

/* ---------------------------------------------------------------- effects */

.sparkle {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  font-size: 14px;
  line-height: 1;
  animation: sparkle 0.9s steps(5) forwards;
}
@keyframes sparkle {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + 28px)) scale(0.2) rotate(90deg); }
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 760px) {
  body { font-size: 14px; }
  .page { margin: 0; border-width: 0 0 1px; }
  .banner { height: 420px; }
  .banner::before { background-position: 0 0; }
  .logo { left: 16px; right: 16px; top: 18px; }
  .logo-kicker { font-size: 12px; margin-bottom: 14px; }
  .logo-img { width: calc(100% + 20px); margin-left: -20px; image-rendering: auto; }
  .logo-tag { font-size: 12px; max-width: 15em; }
  .dog { width: 222px; bottom: 6px; }
  .bubble { left: -76px; top: 30%; font-size: 14px; }
  .menu a { padding: 9px 2px 7px; font-size: 14px; letter-spacing: 0.02em; }
  .menu-ic { display: none; }
  .menu small { font-size: 10px; letter-spacing: 0.04em; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; padding: 14px 12px; gap: 16px; }
  .box-b { padding: 12px 14px 14px; }
  .game-info { grid-template-columns: minmax(0, 1fr); }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec div, .spec div:first-child { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-left: 0; border-bottom: 1px solid rgba(0, 255, 204, 0.2); }
  .spec dt { min-width: 9em; }
  .go { grid-column: 1; grid-row: 4; justify-self: start; margin-top: 14px; }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: 160px; justify-self: center; }
  .pf div { grid-template-columns: 96px minmax(0, 1fr); }
  .linkus { flex-direction: column; }
  .buttons { justify-content: center; }
  .ring { padding: 10px 8px; }
  .ring strong { font-size: 13px; }
  .side { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker { white-space: normal; padding: 7px 12px 6px; }
  .ticker-text { padding-left: 0; }
}
