[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  color: #2c241c;
  background: #f4efe4;
}

.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 20px 64px;
  box-sizing: border-box;
}

header {
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2c241c;
  font-size: 28px;
  font-weight: normal;
}

header a,
.gallery_item,
footer a {
  color: inherit;
  text-decoration: none;
}

.user_bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.user_bar #userStatus {
  margin-right: auto;
}

#authForm {
  gap: 14px;
  margin-top: 24px;
}

.auth_buttons {
  gap: 10px;
}

.section_title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: normal;
}

#galleryList {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  border-top: 1px solid #cfc3b0;
}

.gallery_item {
  padding: 10px 4px;
  border-bottom: 1px solid #cfc3b0;
}

.gallery_item:hover {
  background: #ebe3d4;
}

.gallery_heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.gallery_heading .section_title {
  margin: 0;
}

#emptyGallery {
  margin-top: 24px;
  color: #6b5f50;
}

.comment_content {
  overflow-wrap: anywhere;
}

footer {
  margin-top: 48px;
  padding-top: 8px;
  border-top: 1px solid #cfc3b0;
  font-size: 14px;
}

footer a {
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 4px 12px;
  background: #f4efe4;
  border: 1px solid #2c241c;
  cursor: pointer;
}

button:disabled {
  color: #9a8d7c;
  border-color: #cfc3b0;
  cursor: default;
}

input,
textarea {
  width: 220px;
  box-sizing: border-box;
  padding: 4px 6px;
  background: #fbf8f2;
  border: 1px solid #2c241c;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.row_text {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.col_text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.col_text_right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}

.col_text_left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
}

.file_picker {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
}

#picture_name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#upLoad {
  width: 100%;
  margin-top: 16px;
  padding: 16px 0;
  border-top: 1px solid #cfc3b0;
  border-bottom: 1px solid #cfc3b0;
}

#error_box {
  margin: 8px 0 0;
  color: #8a2b2b;
}

#currentImage {
  width: 100%;
  margin-top: 28px;
  animation: fade-in 0.6s ease both;
}

#currentTitle,
#currentAuthor {
  width: min(100%, 460px);
}

#currentTitle {
  font-size: 22px;
}

#currentAuthor {
  margin-bottom: 10px;
}

.image_format {
  width: min(100%, 460px);
  height: 300px;
  object-fit: cover;
  background: #e7dfd1;
  border: 1px solid #2c241c;
  padding: 8px;
}

#commentList {
  width: 100%;
  margin-top: 20px;
}

#commentList .col_text_left {
  width: min(100%, 460px);
  margin-top: 12px;
  padding-bottom: 8px;
  animation: fade-in 0.4s ease both;
}

#commentList .row_text {
  justify-content: flex-start;
}

.hr {
  width: min(100%, 460px);
  margin: 4px 0 0;
  border: 0;
  border-top: 1px solid #cfc3b0;
}

.comment_form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(100%, 460px);
  margin-top: 16px;
}

.comment_fields {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.comment_form textarea {
  width: 260px;
}

#submit_comment {
  margin-top: 10px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
