html {
  font-family: "Open Sans", -apple-system, "BlinkMacSystemFont", "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --page-bg: #1f317b;
  --text-accent: #ffdd46;
  background-color: var(--page-bg);
}

body {
  margin: 0;
  padding: 0;
  font-size: 1.0rem;
  line-height: 1.5;
}

h1, h2, h3 {
  font-weight: 300;
  color: var(--page-bg);
}

.margin {
  margin: 0.5rem;
  padding: 0.5rem;
  background-color: white;
}

details {
  margin: 0.5rem;
  padding: 0.5rem;
  background-color: white;
}

summary {
  padding: 0.5rem;
  background-color: var(--text-accent);
}

summary + * {
  margin-top: 0.5rem;
}

blockquote.warning {
  margin: 0.5rem;
  padding: 0.5rem;
  background-color: white;
  border: 0.5rem solid orangered;
}

blockquote.warning > b:first-child {
  display: block;
  background: black;
  font-size: 1.5rem;
  margin: -0.5rem;
  padding: 0.5rem;
  color: white;
}

.ipa {
  font-family: "Gentium Plus", serif;
}

button,
input,
textarea {
  font-size: inherit;
  font-family: inherit;
  border-radius: 0.25rem;
}

button {
  background-color: lightgray;
  color: black;
}

input[type="text"], textarea {
  width: 100%;
  box-sizing: border-box;
  background-color: white;
  border: 2px inset lightgray;
  color: black;
}

textarea {
  min-height: 6rem;
}

.wordCarousel {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  border: 0.0625rem solid var(--text-accent);
  padding: 0.25rem;
}

img.bigIT {
  width: 3rem;
  height: 3rem;
}

img.inlineIT {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
  display: inline;
  mix-blend-mode: multiply;
  transform: scale(1);
  transition: transform 200ms;
}

img.inlineIT:hover, img.inlineIT:focus {
  mix-blend-mode: normal;
  transform: scale(2);
  transition: transform 200ms;
}

#words {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  margin: 0;
  padding: 0.25rem;
  row-gap: 0.25rem;
  column-gap: 0.25rem;
  max-height: calc(100svh - 8rem);
  overflow-y: auto;
  background-color: var(--page-bg);
}

@media screen and (min-width: 500px) {
  #words {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 750px) {
  #words {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (min-width: 1000px) {
  #words {
    grid-template-columns: repeat(4, 1fr);
    width: 800px;
  }
}

#words > li {
  display: block;
  margin: 0;
  padding: 0.375rem;
  background: white;
  border: 0.125rem solid white;
}

#words > li.noIkamaTasuwi {
  border-color: red;
}

#words > li span.wip {
  font-weight: bold;
  display: inline-block;
  padding: 0 0.125rem;
  border: 0.125rem solid #ac0000;
  color: black;
  background: white;
}

.wordHead {
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
}

.wordHead > div {
  display: flex;
  flex-direction: column;
  align-self: center;
}

.wordHead strong {
  font-size: 1.15rem;
}

.wordHead > img {
  width: 3rem;
  height: 3rem;
  align-self: flex-start;
}

.wordIT {
  background-color: var(--text-accent);
  margin-block: 0.5rem;
  padding: 0.5rem;
}

.wordBody {
  clear: both;
}

.wordBody > ul {
  padding-left: 0.5rem;
  list-style-type: none;
}

.wordEtym {
  margin-top: 0.5rem;
}

#wordsFilter {
  background-color: white;
}

#wordsFilter > label {
  display: inline-block;
  margin: 0.125rem;
  border-radius: 0.25rem;
  padding: 0.125rem;
  border: 0.125rem solid lightgray;
}

#wordsFilter > label:has(:checked) {
  border-color: var(--text-accent);
}

#wordsFilter:has(#showOnlyMissing:checked) + #words > li:not(.noIkamaTasuwi) {
  display: none;
}

#wordsFilter:has(#showSimple:checked) + #words > li ul.wordDef > :not(.antonym),
#wordsFilter:has(#showSimple:checked) + #words > li ul.wordDef:not(:has(.antonym)),
#wordsFilter:has(#showSimple:checked) + #words > li ul.wordEtym {
  display: none;
}

.itPreview {
  border: 0.0625rem solid var(--text-accent);
  color: var(--page-bg);
  font-size: 1.5rem;
  line-height: 2.5rem;
  white-space-collapse: collapse;
}

.itPreview > img {
  width: 2.5rem;
  height: auto;
  display: inline;
  vertical-align: middle;
}

.itPreview.centered {
  text-align: center;
}