@font-face {
  font-family: 'Libertinus Serif';
  src: url('/static/fonts/LibertinusSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libertinus Serif';
  src: url('/static/fonts/LibertinusSerif-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Libertinus Serif';
  src: url('/static/fonts/LibertinusSerif-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libertinus Serif';
  src: url('/static/fonts/LibertinusSerif-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

html {
  font-family: "Libertinus Serif", georgia, serif;
  background-color: #f2f3f4;
  font-size: 12px;
}

body {
  margin: 0;
}

article {
  max-width: 45em;
  margin: 3em;
}

@media (max-width: 600px) {
  article {
    margin: 1.5em auto;
  }

  .txt {
    margin-bottom: 1.2em;
  }
}

.site-header {
  display: flex;
  align-items: center;
  margin-bottom: 2em;
}

.brand {
  display: flex;
  align-items: center;
}

.header-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-left: auto;
}

.site-header img {
  height: 16px;
  width: auto;
  object-fit: contain;
  margin-right: 0.5em;
}

.site-header h3,
.site-header h1 {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
}

.latest-box {
  position: fixed;
  top: 3em;
  right: 4em;
  width: 22em;
  border: 2px solid #ddd;
  background: #f2f3f4;
  padding: 0;
}

.expand-button {
  display: none;
}

.latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.latest-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3em 0.4em;
  text-decoration: none;
  color: #000;
}

.latest-item:hover {
  background: #e8e8e8;
}

.bullet {
  flex-shrink: 0;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
}

.event-text {
  flex: 1;
  white-space: nowrap;
}

.date {
  font-size: 0.75rem;
  color: #666;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .latest-box {
    position: static;
    width: 100%;
    margin: 1em 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }

  .expand-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5em;
    background: #f8f9fa;
    border: none;
    border-top: 1px solid #eee;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    color: #666;
    transition: background-color 0.2s ease;
  }

  .expand-button:hover {
    background: #e9ecef;
  }

  .chevron {
    width: 0.8em;
    height: 0.8em;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
  }

  .chevron.expanded {
    transform: rotate(-135deg);
  }

  .latest-list {
    max-height: 2.5em;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .latest-list.expanded {
    max-height: 15em;
    overflow-y: auto;
  }
}

.controls {
  display: inline-flex;
  gap: 0.3em;
  align-items: center;
  margin-left: 0.5em;
  visibility: visible;
  height: 1em;
}

.datetime {
  cursor: pointer;
  user-select: none;
}

.datetime:hover {
  background-color: #e8e8e8;
}

button {
  font-family: inherit;
  font-size: 1em;
  background: none;
  border: none;
  cursor: pointer;
}

.comments {
  display: none;
  margin-top: 0.5em;
  border-left: 2px solid #ddd;
  padding-left: 0.5em;
}

.comment-stats {
  margin-bottom: 0.5em;
  font-size: 0.9em;
  color: #666;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5em 0;
}

.comment-list li {
  margin-bottom: 0.3em;
  position: relative;
  padding-right: 1.5em;
}

.comment-list li:hover {
  background-color: #f8f8f8;
}

.comment-delete {
  position: absolute;
  right: 0.3em;
  top: 0;
  cursor: pointer;
  color: #888;
  visibility: hidden;
}

.comment-list li:hover .comment-delete {
  visibility: visible;
}

.comment-delete:hover {
  color: #ff4444;
}

.has-comments {
  color: #666;
}

input.comment-input {
  width: 80%;
  border: 1px solid #ccc;
  padding: 0.1em 0.3em;
  font-family: inherit;
}

.vote-sprite {
  position: absolute;
  font-size: 1.2em;
  font-weight: bold;
  pointer-events: none;
  z-index: 1000;
}

.like-sprite {
  color: #4CAF50;
  animation: flyUp 0.8s ease-out forwards;
}

.dislike-sprite {
  color: #f44336;
  animation: flyDown 0.8s ease-out forwards;
}

.neutral-sprite {
  color: #87CEEB;
  animation: flyNeutral 0.8s ease-out forwards;
}

@keyframes flyUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.8);
  }
}

@keyframes flyDown {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }
}

@keyframes flyNeutral {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  50% {
    opacity: 0.8;
    transform: translateY(-20px) scale(1.1);
  }

  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
}