* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #a0a0a0;
  background: #1e1e1e;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.25;
}

header {
  width: 100%;
  max-width: 60rem;
  padding: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

main {
  width: 100%;
  max-width: 60rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 8px;
}

a.title {
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
}

a.title img {
  width: 100%;
  max-width: 32rem;
  height: auto;
}

a {
  color: #c0c0c0;
}

a:hover {
  color: #f0f0f0;
}

code {
  font-family: monospace;
  background: #1a1a1a;
}

ol li,
ul li {
  margin-left: 2ch;
}

hr {
  border: none;
  background: #282828;
  width: 100%;
  height: 1px;
}

div#posts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

div#posts > br {
  display: none;
}

.post {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.post.reply {
  padding: 8px;
  margin-left: 2rem;
  background: #2e2e2e;
  border: 1px solid #4e4e4e;
}

.post.highlight {
  background: #4e2e2e;
}

.post img {
  max-width: 100%;
  max-height: 100%;
  width: 16rem;
  cursor: pointer;
}

.post img.expanded {
  width: 48rem;
}

.post img.emoji {
  width: 1lh;
  height: 1lh;
  vertical-align: bottom;
  cursor: auto;
}

.post-name,
.post-tripcode {
  color: #00a000;
}

.post-tripcode {
  font-weight: 600;
}

.post-quote {
  color: #60a060;
}

.post-link {
  color: #4040a0;
}

.post-fish-container {
  display: inline-block;
  vertical-align: bottom;
  position: relative;
  width: 4rem;
  height: 1lh;
  margin-inline: 1rem;
}

@keyframes post-fish-animation {
  0% {
    left: 0%;
    transform: translateX(-50%) scaleX(100%);
    color: #60a060;
  }

  40% {
    transform: translateX(-50%) scaleX(100%);
    color: #60a060;
  }

  50% {
    left: 100%;
    transform: translateX(-50%) scaleX(-100%);
    color: #a1a1a1;
  }

  90% {
    transform: translateX(-50%) scaleX(-100%);
    color: #a1a1a1;
  }

  100% {
    left: 0%;
    transform: translateX(-50%) scaleX(100%);
    color: #60a060;
  }
}

.post-fish {
  white-space: nowrap;
  position: absolute;
  transform-origin: 50% 0%;
  animation: post-fish-animation 3s linear infinite;
}

button,
input,
textarea {
  font: inherit;
  font-weight: 400;
  padding-inline: 4px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 4px;
}

.post-grid {
  width: 100%;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-grid > .row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4px;
}

.post-grid > .row > * {
  background: #2e2e2e;
}

.post-grid > .row > :nth-child(odd) {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: baseline;
}

.post-grid > .row > * summary {
  padding-block: 8px;
}

.post-grid textarea {
  width: 100%;
  height: 12ch;
  resize: vertical;
}

.post-grid input[type="file"] {
  padding-inline: 0;
}

div#emojiPicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

div#emojiPicker > button {
  height: 2rem;
  padding: 2px;
  background: #2e2e2e;
  border: 1px solid #4e4e4e;
  cursor: pointer;
}

div#emojiPicker > button > img {
  display: block;
  height: 100%;
}
