.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 540px) {
  body[data-theme="platform"] .composer-collapsed .composer-head > span:not(.avatar) {
    display: none;
  }
}

.workspace > .tabs {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

body[data-theme="platform"] .workspace > .tabs,
body[data-theme="directorate"] .workspace > .tabs {
  margin-bottom: 0;
}

body[data-theme="journal"] .workspace > .tabs {
  margin: 0;
  border: 1px solid #6d604e;
  border-bottom: 0;
}

.create-form .title-field,
.create-form .composer-quick {
  grid-column: 1 / -1;
}

body[data-theme="platform"] .create-form:not(.composer-collapsed) .composer-quick {
  order: initial;
  align-items: flex-start;
}

body[data-theme="platform"] .create-form:not(.composer-collapsed) .composer-quick textarea {
  min-height: 96px;
  height: 96px;
  max-height: 220px;
  resize: vertical;
  border-radius: 8px;
  background: var(--bg);
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.composer-bottom {
  grid-column: 1 / -1;
}

body[data-theme="platform"] .create-form:not(.composer-collapsed) .composer-bottom {
  align-items: flex-end;
}

body[data-theme="platform"] .create-form:not(.composer-collapsed) .audience-field {
  width: min(190px, 100%);
}

body[data-theme="platform"] .create-form:not(.composer-collapsed) .audience-field select {
  width: 100%;
  min-width: 0;
}

body[data-theme="platform"] .create-form:not(.composer-collapsed) .camera-button {
  display: none;
}

.cancel-composer {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 9px 16px;
  font-weight: 650;
}

.cancel-composer:hover {
  background: var(--soft);
}

.audience-readonly {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 9px;
}

.audience-readonly strong {
  color: var(--ink);
  font-weight: 650;
}

.entry-media-post {
  width: min(100%, 360px);
}

body[data-theme="journal"] .entry-media-post {
  margin-left: 0;
  margin-right: 0;
}

.media-open {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.media-open img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-open:hover img {
  filter: brightness(.92);
}

.media-open:focus-visible {
  outline-offset: -4px;
}

.image-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: clamp(18px, 4vw, 48px);
  background: transparent;
  color: #fff;
  overflow: auto;
}

.image-dialog[open] {
  display: grid;
  place-items: center;
}

.image-dialog::backdrop {
  background: #05070dcc;
  backdrop-filter: blur(3px);
}

.image-lightbox {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: min(94vw, 1200px);
  max-height: calc(100dvh - 36px);
}

.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 22px 70px #0009;
}

.image-lightbox p {
  margin: 0;
  color: #fff;
  font-weight: 650;
  text-align: center;
}

.image-dialog-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #ffffff70;
  border-radius: 7px;
  background: #111d;
  color: #fff;
  font-weight: 650;
}

.image-dialog-close:hover {
  background: #000;
}

.image-dialog-close:focus-visible {
  outline-color: #fff;
}

body[data-theme="directorate"] .image-dialog {
  border: 0;
}

body[data-theme="journal"][data-view="good"] .entry-media-post img,
body[data-theme="journal"][data-view="bad"] .entry-media-post img,
body[data-theme="journal"][data-view="good"] .image-lightbox img,
body[data-theme="journal"][data-view="bad"] .image-lightbox img {
  filter: grayscale(1);
}

body[data-theme="journal"][data-view="good"] .media-open:hover img,
body[data-theme="journal"][data-view="bad"] .media-open:hover img {
  filter: grayscale(1) brightness(.92);
}

body[data-theme="journal"] .cancel-composer,
body[data-theme="journal"] .edit {
  border-radius: 0;
}

body[data-theme="journal"] .composer-bottom {
  align-items: flex-end;
}

body[data-theme="directorate"] .cancel-composer,
body[data-theme="directorate"] .edit {
  border-radius: 0;
}

body[data-theme="directorate"] .composer-bottom {
  align-items: flex-end;
}

#edit-form .dialog-actions {
  flex-wrap: wrap;
}

#edit-form .dialog-actions .confirm {
  border-color: #111;
  background: #111;
  color: #fff;
}

#edit-form .dialog-actions .edit-delete {
  margin-right: auto;
  border-color: #b82934;
  background: #b82934;
  color: #fff;
}

body[data-theme="platform"] #db-rows table {
  min-width: 1040px;
}

body[data-theme="platform"] #db-rows th:nth-child(1) { width: 9%; }
body[data-theme="platform"] #db-rows th:nth-child(2) { width: 25%; }
body[data-theme="platform"] #db-rows th:nth-child(3) { width: 11%; }
body[data-theme="platform"] #db-rows th:nth-child(4) { width: 11%; }
body[data-theme="platform"] #db-rows th:nth-child(5) { width: 11%; }
body[data-theme="platform"] #db-rows th:nth-child(6) { width: 11%; }
body[data-theme="platform"] #db-rows th:nth-child(7) { width: 13%; }
body[data-theme="platform"] #db-rows th:nth-child(8) { width: 9%; }

.journal-database table {
  min-width: 1160px;
}

.journal-database th:nth-child(1) { width: 8%; }
.journal-database th:nth-child(2) { width: 24%; }
.journal-database th:nth-child(3) { width: 12%; }
.journal-database th:nth-child(4) { width: 9%; }
.journal-database th:nth-child(5) { width: 13%; }
.journal-database th:nth-child(6) { width: 13%; }
.journal-database th:nth-child(7) { width: 13%; }
.journal-database th:nth-child(8) { width: 8%; }

body[data-theme="platform"][data-view="ugly"] .workspace > .tabs {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  body[data-theme="directorate"] .workspace > .tabs {
    margin-bottom: 26px;
  }
}

@media (max-width: 800px) {
  body[data-theme="platform"] .workspace > .tabs {
    margin-bottom: 24px;
  }

  body[data-theme="platform"] #db-rows table {
    min-width: 0;
  }
}

@media (max-width: 540px) {
  .composer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .composer-actions {
    width: 100%;
  }

  #edit-form .dialog-actions .edit-delete {
    width: 100%;
    margin-right: 0;
  }
}
