:root {
  --bg-color: #0a0c12;
  --body-color: #12141b;
  --title-color: #ebecf0;
  --text-color: #a8abb3;
  --border-color: #1e2127;
  --link-color: #3dbfd0;
  --group-bg-color: #1e2127;
  --disabled-bg-color: #555;
  --ribbon-bg-color: #066751;
}

.row,
.col {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
}

.row {
  flex-direction: row;
}
.col {
  flex-direction: column;
}

.group {
  position: relative;
  border: 3px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--group-bg-color);
  padding: 10px 10px 0 10px;
}

.button {
  display: inline-block;
  background-color: var(--link-color);
  filter: brightness(80%);
  border-radius: 6px;
  padding: 4px 18px;
  color: var(--body-color);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}

.button:hover {
  filter: brightness(100%);
}

.button.small {
  padding: 5px 6px 3px 6px;
}
.button.small img {
  vertical-align: text-bottom;
}

.nav.button {
  border-radius: 4px;
  padding: 2px 8px;
  position: relative;
  width: 32px;
}

.nav.button img {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 75%;
  height: 75%;
}

.italic {
  font-style: italic;
}
.bold {
  font-weight: 600;
}
.smaller {
  font-size: 0.8em;
}
.right {
  text-align: right;
}

.sup-label {
  font-size: 0.5em;
  vertical-align: top;
}

.ribbon {
  --f: 10px; /* control the folded part*/
  --r: 15px; /* control the ribbon shape */
  --t: 20px; /* the top offset */
  --p: 3px; /* vertical padding */

  position: absolute;
  inset: var(--t) calc(-1 * var(--f)) auto auto;
  padding: var(--p) 10px calc(var(--p) + var(--f)) calc(10px + var(--r));
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--f)),
    calc(100% - var(--f)) 100%,
    calc(100% - var(--f)) calc(100% - var(--f)),
    0 calc(100% - var(--f)),
    var(--r) calc(50% - var(--f) / 2)
  );
  background-color: var(--ribbon-bg-color);
  box-shadow: 0 calc(-1 * var(--f)) 0 inset #0005;
  color: var(--title-color);

  margin-right: -3px;
  font-size: 1.4em;
  font-weight: 600;
}

html {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Exo", sans-serif;
  font-optical-sizing: auto;
}

body {
  background-color: var(--body-color);
  max-width: 640px;
  margin: auto;
  padding: 20px;
}

body,
main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

header {
  color: var(--title-color);
}

main,
footer {
  line-height: 1.6;
}

main .row {
  flex-direction: row-reverse;
}

h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 600;
}

h2 {
  margin: 10px 0;
  font-size: 1.5rem;
  font-weight: 500;
  font-style: italic;
  filter: brightness(80%);
}

#desc {
  line-height: 1.4;
  font-size: 1.1rem;
  font-weight: 400;
  margin: -10px 0;
}

nav {
  height: 48px;
  line-height: 1.6;
}

a {
  color: var(--link-color);
}

a:hover {
  filter: brightness(120%);
}

figure {
  margin: 0;
}

figure.row {
  gap: 0;
}

figure img {
  border-radius: 5px;
  object-fit: cover;
}

figure div {
  flex-grow: 1;
}

main .row {
  flex-direction: column;
}

figcaption .row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

figcaption .row p {
  flex-grow: 1;
}

.game-title {
  position: absolute;
  margin-left: 10px;
  font-size: 2.2em;
  color: var(--title-color);
  font-weight: 600;
  text-shadow: var(--bg-color) 1px 1px 3px;
}

@media (max-width: 550px) {
  #top.row {
    flex-direction: column;
    align-items: flex-start;
  }
}
