:root {

  --page-background: #e9f6ff;
  --header-color: hsl(140, 37%, 49%);
  --header-text: #ffffff;
  --card-color: #ffffff;
  --text-color: #1b1b1b;
  --text-soft: #4a5566;
  --accent: #ffcd03;
  --button-color: #00852b;
  --button-edge: #005c1e;
  --footer-color: #0057a8;

  --font: 'Geist Pixel', monospace;
  --title-size: 32px;

  --roundness: 0px;
  --shadow: 0 0px 0 rgba(0, 0, 0, 0.12);
  --border: 0px solid #000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-background);
  color: var(--text-color);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: var(--header-color);
  color: var(--header-text);
}
.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  color: var(--header-text);
  text-decoration: none;
}
.logo i {
  width: 30px;
  height: 22px;
  background: var(--accent);
  border-radius: 0;
  position: relative;
}
.logo i::before, .logo i::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 9px;
  height: 6px;
  background: var(--accent);
}
.logo i::before { left: 4px; }
.logo i::after { right: 4px; }
nav { margin-left: auto; }
nav a {
  color: var(--header-text);
  text-decoration: none;
  padding: 8px 14px;
  font-weight: 500;
}

.hero {
  display: grid;
  grid-template-columns:1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
}
.thumb {
  border-radius: var(--roundness);
  border: var(--border);
  box-shadow: none;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.thumb svg { display: block; width: 100%; height: 100%; }
.tag {
  display: inline-block;
  background: var(--accent);
  border-radius: 0;
  padding: 3px 12px;
  font-size: 14px;
  font-weight: 500;
}
h1 {
  font-size: var(--title-size);
  line-height: 1.05;
  margin: 12px 0 10px;
}
.lead {
  color: var(--text-soft);
  font-size: 17px;
  margin: 0 0 22px;
}
.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  background: var(--button-color);
  text-decoration: none;
  border-radius: var(--roundness);
  border: var(--border);
  padding: 12px 36px;
  box-shadow: 0 0px 0 var(--button-edge);
}
.play:active { transform: translateY(4px); box-shadow: 0 0px 0 var(--button-edge); }
.play svg { width: 20px; height: 20px; }

h2 { font-size: 28px; margin: 0 0 16px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}
.game {
  background: var(--card-color);
  border-radius: var(--roundness);
  border: var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
}
a.game:hover { transform: translateY(-4px); }
.game .pic { aspect-ratio: 16 / 10; display: grid; place-items: center; }
.game .pic svg { width: 100%; height: 100%; display: block; }
.game .txt { padding: 12px 16px 16px; }
.game b { font-size: 19px; display: block; }
.game span { color: var(--text-soft); font-size: 15px; }
.locked .pic { background: #d9e4ef; color: var(--text-soft); font-size: 42px; font-weight: 700; }

footer {
  background: var(--footer-color);
  color: #fff;
  padding: 22px 0;
  font-size: 14px;
}

@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
}

.note { margin-top: 18px; font-size: 14px; color: var(--text-soft); }
.note a, .steps a { color: inherit; }
.steps-title { margin-top: 40px; }
.steps { line-height: 2; padding-left: 22px; }

.account { display: inline-flex; gap: 14px; margin-left: 14px; }
.account span { opacity: .8; }
.account a { color: var(--header-text); text-decoration: none; }
.form { max-width: 360px; }
.form input { display: block; width: 100%; font-family: var(--font); font-size: 14px; padding: 12px; margin-bottom: 12px; border: 3px solid #1b1b1b; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.buttons .play { font-size: 14px; padding: 12px 16px; }
.play.second { background: var(--footer-color); }

.players { padding: 48px 0; }
.profile .online { color: #00852b; font-weight: 700; }
.profile .offline { color: var(--text-soft); }

a.profile { display: block; }
.profile-card { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.avatar { width: 140px; height: 140px; background: var(--header-color); color: #fff; font-size: 64px; display: grid; place-items: center; }
.profile-card .online { color: #00852b; font-weight: 700; }
.profile-card .offline { color: var(--text-soft); }
.form h2 { font-size: 18px; margin-top: 28px; }

.bar { flex-wrap: nowrap; }
nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
nav a, .account a, .account span { white-space: nowrap; padding: 8px 10px; }
.account { margin-left: 8px; gap: 0; align-items: center; }
@media (max-width: 900px) { .logo { font-size: 18px; } nav a, .account a, .account span { font-size: 12px; padding: 6px 6px; } }

.play.small { font-size: 13px; padding: 10px 18px; margin-top: 4px; }

/* avatars */
.avatar.fig { background: none; width: auto; height: auto; }
.avatar-fig { position: relative; flex: none; }
.avatar-fig > div { position: absolute; box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.avatar-fig .head { border-radius: 30% / 22%; overflow: hidden; }
.avatar-fig canvas { position: absolute; left: 12%; top: 4%; width: 76%; height: 92%; image-rendering: pixelated; }
.avatar-editor { display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-start; }
.avatar-editor h2 { font-size: 18px; margin: 22px 0 10px; }
.avatar-editor h2:first-child { margin-top: 0; }
.avatar-editor .avatar-fig > div { cursor: pointer; }
.avatar-editor .avatar-fig > div.picked { outline: 3px solid var(--text-color); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font-family: var(--font); font-size: 13px; padding: 8px 10px; border: 2px solid var(--text-color); background: #fff; cursor: pointer; }
.chips button.on { background: var(--text-color); color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(8, 32px); gap: 6px; }
.swatches button { width: 32px; height: 32px; border: 2px solid rgba(0,0,0,.2); cursor: pointer; padding: 0; }
.faces { display: flex; flex-wrap: wrap; gap: 8px; }
.faces button { width: 64px; height: 64px; border: 3px solid transparent; cursor: pointer; padding: 6px; }
.faces button.on { border-color: var(--text-color); }
.faces canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
#custom { width: 70px; height: 34px; margin-top: 10px; border: 2px solid var(--text-color); padding: 0 2px; }
