:root {
  --testh: #ffffff;
  --test0: #b3b3b3;
  --test1: #dc9d9d;
  --test2: #dcb29d;
  --test3: #dcc79d;
  --test4: #dcdc9d;
  --test5: #c7dc9d;
  --test6: #b2dc9d;
  --test7: #9ddc9d;
  --test8: #9ddcb2;
  --test9: #9ddcc7;
  --test10: #9ddcdc;
  --test11: #9dc7dc;
  --test12: #9db2dc;
  --test13: #9d9ddc;
  --test14: #b29ddc;
  --test15: #c79ddc;
  --test16: #dc9ddc;
  --test17: #dc9dc7;
  --test18: #dc9db2;
  --test19: #808080;
  --testbad: #ff8787;
  --bg0: #161b22;
  --bg0inv: #e9e4dd;
  --bg1: #f09b9b;
  --bg2: #f0b89b;
  --bg3: #f0d49b;
  --bg4: #f0f09b;
  --bg5: #d4f09b;
  --bg6: #b8f09b;
  --bg7: #9bf09b;
  --bg8: #9bf0b8;
  --bg9: #9bf0d4;
  --bg10: #9bf0f0;
  --bg11: #9bd4f0;
  --bg12: #9bb8f0;
  --bg13: #9b9bf0;
  --bg14: #b89bf0;
  --bg15: #d49bf0;
  --bg16: #f09bf0;
  --bg17: #f09bd4;
  --bg18: #f09bb8;
  --bg99: #808080;
  --jstring: #ff7de9;
  --jstring2: #e17dff;
  --jboolean: #86de74;
  --jnull: #939395;
  --jkey: #75bfff;
  --link: #9db2dc;
  --bg42: rgb(36, 48, 60);
  --bgmid: rgb(29, 38, 47);
}

.hsk1,
.hsk1 a {
  color: var(--test7);
}
.hsk2,
.hsk2 a {
  color: var(--test4);
}
.hsk3,
.hsk3 a {
  color: var(--test3);
}
.hsk4,
.hsk4 a {
  color: var(--test2);
}
.hsk5,
.hsk5 a {
  color: var(--test1);
}
.hsk6,
.hsk6 a {
  color: var(--test10);
}
.hsk7,
.hsk7 a {
  color: var(--test13);
}

body {
  background-color: var(--bg0);
  font-family: "DejaVu Sans", monospace;
  color: var(--test0);
  max-width: 900px;
  margin: 0 auto;
  padding: 0.5em;
}
@media (max-width: 768px) {
  body {
    max-width: 100%;
    padding: 0.25em;
  }
}
a {
  color: var(--link);
}

.char {
  font-size: 4em;
  text-align: center;
  margin: 0;
}

.def {
  font-size: 1.5em;
  text-align: center;
  margin: 0;
  display: block;
}
.notes {
  font-size: 1.2em;
  text-align: center;
}
.logo {
  font-size: 2em;
}

.index-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 95vh;
  font-size: 3rem;
}
@media (max-width: 700px) {
  .index-body {
    height: unset !important;
  }
}

.component {
  display: flex;
  flex-direction: row;
}

.c-pinyin {
  color: var(--test19);
}

.component > .c-info {
  display: flex;
  flex-direction: column;
}

.component > .c-char {
  font-size: 3em;
  margin-right: 0.2em;
}

.definition {
  display: flex;
  flex-direction: column;
}
span.d-char {
  font-size: 2em;
}
.top-words {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  margin-bottom: 2em;
}

td.freq {
  width: 8em !important;
}
td.freq .bar {
  height: 1em;
  background-color: var(--test5) !important;
}

td a,
.char-link {
  /* color: var(--test0); */
  text-decoration: none;
  font-size: 1.4em;
}

tr {
  text-transform: lowercase;
  background-color: unset !important;
  color: var(--test3);
  border-left: 1px dotted var(--testh) !important;
}

tr th {
  color: var(--jboolean) !important;
  border-right: 1px dotted var(--testh) !important;
}

tbody tr:first-of-type {
  border-bottom: solid 2px var(--testh) !important;
}

td {
  border-right: 1px dotted var(--testh) !important;
  border-bottom: 1px dotted var(--testh) !important;
  color: var(--test3) !important;
  background: var(--bg0);
}

th {
  border-bottom: 1px dotted var(--testh) !important;
}

input {
  background: var(--bg42) !important;
  color: var(--testh);
  border: 1px dotted var(--link);
  border-right: 1px solid var(--link);
  height: 3rem;
}
button {
  background-color: var(--bg0);
  border: 1px dotted var(--link);
  color: var(--testh);
  height: 3rem;
  min-width: 3rem;
}

@media (max-width: 600px) {
  .site-header button {
    min-width: 2rem;
  }
  .site-header input {
    max-width: 8rem;
  }
}

.hsk-label {
  border-radius: 0.3rem;
  text-align: right;
}
.audio-player {
  display: inline-block;
  vertical-align: super;
  font-size: 0.8em;
}
.def > p {
  display: inline-block;
}

.images {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  /* height: calc((92px * 2) + 1rem); */
  justify-content: space-around;
  overflow-x: scroll;

  width: 100%;
}
.images img {
  filter: invert(1);
  /* display: block; */
}
.evolution-stage {
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.evolution-images .evolution-stage img {
  width: 92px;
  min-height: 92px;
  filter: invert(1);
  display: block;
}
.evolution-images .caption {
  text-align: center;
  color: var(--test4);
}

table.results {
  min-width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  margin-bottom: 2em;
}
.result-word {
  display: flex;
  flex-direction: column;
}

.result-word .pinyin {
  color: var(--test19) !important;
  font-size: 0.9em;
}

.sentence {
  display: flex;
  flex-direction: column;
}

.s-entry {
  display: flex;
  flex-direction: row;
  border: 1px dotted var(--test3);
  padding: 1em;
}
.s-entry a.analyze {
  margin-left: auto;
  font-size: 0.8em;
  align-self: flex-start;
}
.s-word {
  display: flex;
  flex-direction: column;
  min-width: 14em;
  border-right: 1px solid var(--test2);
  max-width: 14em;
  padding-right: 1em;
}
@media (max-width: 600px) {
  .s-word {
    min-width: 8em;
    max-width: 8em;
  }
}

.word-chars {
  font-size: 1.5em;
}
.word-gloss {
  align-content: center;
  padding-left: 1em;
}

.searches {
  display: flex;
  flex-direction: row;
  gap: 1em;
}
@media (max-width: 600px) {
  .searches {
    flex-direction: column;
    align-items: center;
  }
}

.searches > .search-box {
  font-size: 1rem;
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-evenly;
  margin: 0;
}
footer p {
  margin: 0;
}
