:root {
  --blood: #ff1515;
  --blood-dim: #9d0000;
  --blood-dark: #310000;
  --void: #030000;
  --silver: #767676;
  --chrome-panel: #858585;
  --chrome-highlight: #aaa;
  --chrome-light: #909090;
  --chrome-shadow: #454545;
  --chrome-dark: #111;
  --taskbar-height: 34px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  background: #000;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(var(--taskbar-height) + 12px);
  overflow-x: hidden;
  color: var(--blood);
  background:
    radial-gradient(circle at 85% 72%, #100000 0, transparent 30%),
    #000;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.012) 1px, transparent 1px);
  background-size: 33px 33px;
  content: "";
}

button,
input,
select,
textarea,
code,
code * {
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

button {
  cursor: pointer;
}

a,
select,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea {
  cursor: text;
}

button,
input[type="reset"],
input[type="submit"] {
  background: var(--silver);
  box-shadow:
    inset -1px -1px var(--chrome-dark),
    inset 1px 1px var(--chrome-highlight),
    inset -2px -2px var(--chrome-shadow),
    inset 2px 2px var(--chrome-light);
  text-shadow: 0 0 #050505;
}

button.default,
input[type="reset"].default,
input[type="submit"].default {
  box-shadow:
    inset -2px -2px var(--chrome-dark),
    inset 1px 1px var(--chrome-dark),
    inset 2px 2px var(--chrome-highlight),
    inset -3px -3px var(--chrome-shadow),
    inset 3px 3px var(--chrome-light);
}

button:not(:disabled):active,
input[type="reset"]:not(:disabled):active,
input[type="submit"]:not(:disabled):active {
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-dark),
    inset -2px -2px var(--chrome-light),
    inset 2px 2px var(--chrome-shadow);
  text-shadow: 1px 1px #050505;
}

button:disabled {
  cursor: default;
}

a {
  color: #9d0000;
}

a:hover {
  color: #f00;
}

.noise-layer {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.2) 3px,
      rgba(255, 0, 0, 0.025) 4px
    );
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
  opacity: 0.62;
}

body.crt .noise-layer {
  display: block;
  animation: crt-drift 9s steps(2, end) infinite;
}

@keyframes crt-drift {
  0%,
  94%,
  100% {
    transform: translateY(0);
    opacity: 0.62;
  }
  95% {
    transform: translateY(1px);
    opacity: 0.48;
  }
  97% {
    transform: translateY(-1px);
    opacity: 0.7;
  }
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(260px, 2fr) minmax(160px, 1fr);
  align-items: start;
  min-height: 140px;
  padding: 12px 18px;
  color: var(--blood);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

.system-readout,
.account-readout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  line-height: 1.1;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.65);
}

.account-readout {
  align-items: flex-end;
  text-align: right;
}

.wordmark,
.text-command {
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: var(--blood);
  border: 0;
  background: none;
  box-shadow: none;
}

.wordmark {
  justify-self: center;
  margin-top: 3px;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: clamp(52px, 7vw, 90px);
  font-weight: normal;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-shadow: none;
}

.wordmark:active {
  box-shadow: none;
  text-shadow: none;
}

.text-command:active {
  box-shadow: none;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.45);
}

.wordmark:focus,
.text-command:focus {
  outline: 1px dotted var(--blood);
  outline-offset: 3px;
}

.text-command {
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 14px;
  text-decoration: underline;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.45);
}

.system-command {
  align-self: flex-start;
  font-size: 15px;
  line-height: 1.1;
  text-align: left;
}

.has-unread-notifications {
  animation: notification-flash 1s steps(1, end) infinite;
}

@keyframes notification-flash {
  0%,
  49% {
    color: #fff;
    text-shadow: 0 0 9px rgba(255, 255, 255, 0.8);
  }

  50%,
  100% {
    color: var(--blood);
    text-shadow: 0 0 12px rgba(255, 0, 0, 0.85);
  }
}

.desktop-shortcuts {
  position: fixed;
  z-index: 2;
  top: 145px;
  left: 12px;
  display: flex;
  width: 84px;
  flex-direction: column;
  gap: 14px;
}

.desktop-shortcut {
  display: flex;
  min-width: 72px;
  min-height: 66px;
  padding: 3px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--blood);
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  text-shadow: 1px 1px #000;
}

.desktop-shortcut:hover,
.desktop-shortcut:focus {
  color: #fff;
  border-color: var(--blood);
  background: rgba(128, 0, 0, 0.45);
  box-shadow: none;
  outline: 1px dotted #fff;
  outline-offset: -4px;
}

.desktop-shortcut:active {
  box-shadow: none;
  text-shadow: 1px 1px #000;
}

.desktop-shortcut img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.desktop-shortcut span {
  max-width: 78px;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

main {
  width: min(1320px, calc(100% - 128px));
  margin: 4px auto 80px;
}

.filter-strip {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 4px 5px 4px 10px;
  color: #050505;
  background: var(--silver);
  box-shadow:
    inset -1px -1px var(--chrome-dark),
    inset 1px 1px var(--chrome-highlight),
    inset -2px -2px var(--chrome-shadow),
    inset 2px 2px var(--chrome-light);
}

.filter-strip button {
  margin-left: 10px;
}

.mobile-archive-tabs[role="tablist"] {
  display: none;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: clamp(16px, 3vw, 42px);
  align-items: start;
}

.window {
  color: #050505;
  background: var(--silver);
  box-shadow:
    inset -1px -1px var(--chrome-dark),
    inset 1px 1px var(--chrome-light),
    inset -2px -2px var(--chrome-shadow),
    inset 2px 2px var(--chrome-highlight);
}

.title-bar {
  background: linear-gradient(90deg, #2b0000, #a80000 60%, #ff1f1f);
}

.title-bar.inactive {
  background: linear-gradient(90deg, #252525, #5a5a5a);
}

.title-bar-text {
  display: flex;
  align-items: center;
  gap: 5px;
}

.title-bar-text img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  image-rendering: pixelated;
}

.archive-window {
  min-width: 0;
  min-height: 365px;
  background: #090000;
  box-shadow:
    inset -1px -1px #340000,
    inset 1px 1px #ff3131,
    inset -2px -2px #720000,
    inset 2px 2px #a70000,
    0 0 30px rgba(255, 0, 0, 0.06);
}

.archive-window:nth-child(even) {
  margin-top: 18px;
}

.archive-window .title-bar {
  justify-content: center;
  background: #090000;
  border-bottom: 1px solid var(--blood-dim);
}

.archive-window .title-bar-text {
  color: var(--blood);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 23px;
  font-weight: normal;
  text-transform: lowercase;
}

.archive-body {
  min-height: 310px;
  margin: 3px;
  color: var(--blood);
  background: #020000;
  box-shadow:
    inset 1px 1px #1e0000,
    inset -1px -1px #650000;
}

.loading-line,
.empty-directory {
  padding: 18px 8px;
  color: #840000;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-style: italic;
  text-align: center;
}

.file-entry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 7px;
  min-height: 69px;
  padding: 8px 7px 7px;
  border-bottom: 1px dotted #4f0000;
}

.file-entry:last-child {
  border-bottom: 0;
}

.file-icon-button,
.file-title,
.author-link,
.metadata-button {
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: inherit;
  border: 0;
  background: none;
  box-shadow: none;
  text-shadow: none;
}

.file-icon-button:active,
.file-title:active,
.author-link:active,
.metadata-button:active {
  box-shadow: none;
  text-shadow: none;
}

.file-icon-button {
  width: 34px;
  height: 38px;
}

.file-icon-button img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.file-copy {
  min-width: 0;
}

.file-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.pin-badge {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
  image-rendering: pixelated;
}

.file-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--blood);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.05;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-title:hover,
.file-title:focus {
  color: #fff;
  outline: 1px dotted var(--blood);
}

.file-meta {
  margin-top: 5px;
  color: #ae0000;
  font-size: 10px;
  line-height: 1.35;
}

.author-link {
  color: inherit;
  text-decoration: underline;
}

.author-link:hover {
  color: #fff;
}

.file-stats {
  display: block;
  margin-top: 2px;
  color: #620000;
}

.admin-entry {
  background: linear-gradient(90deg, rgba(95, 0, 0, 0.15), transparent);
}

.pinned-entry {
  background:
    linear-gradient(90deg, rgba(175, 0, 0, 0.22), transparent 78%),
    #020000;
}

.admin-entry .file-title::after {
  margin-left: 5px;
  color: #730000;
  content: "[admin]";
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 9px;
}

.admin-separator {
  position: relative;
  height: 13px;
  border-top: 2px dotted var(--blood);
}

.admin-separator::after {
  position: absolute;
  top: -7px;
  left: 50%;
  padding: 0 5px;
  color: #790000;
  background: #020000;
  content: "other files";
  font-size: 9px;
  transform: translateX(-50%);
}

.archive-pagination {
  min-height: 24px;
  align-items: center;
  justify-content: center;
  color: var(--blood);
  background: #080000;
  border-top: 1px solid var(--blood-dim);
}

.archive-pagination button {
  min-width: 26px;
  margin: 2px;
  padding: 0 5px;
}

.archive-pagination .current-page {
  color: #fff;
  background: #790000;
}

#window-layer {
  position: fixed;
  z-index: 100;
  inset: 0 0 var(--taskbar-height);
  pointer-events: none;
}

.floating-window {
  position: absolute;
  display: flex;
  min-width: 280px;
  min-height: 160px;
  max-width: calc(100vw - 10px);
  max-height: calc(100vh - var(--taskbar-height) - 6px);
  flex-direction: column;
  overflow: hidden;
  resize: both;
  pointer-events: auto;
  filter: drop-shadow(9px 12px 18px rgba(0, 0, 0, 0.7));
}

.floating-window.is-unfocused {
  opacity: 0.68;
}

.floating-window.is-minimized {
  display: none;
}

.floating-window.is-maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  max-width: none;
  max-height: none;
  resize: none;
}

.floating-window > .title-bar {
  flex: 0 0 auto;
  cursor: move;
  touch-action: none;
}

.title-bar-controls button {
  min-width: 18px;
  min-height: 16px;
}

.floating-window.is-maximized > .title-bar {
  cursor: default;
}

.floating-window > .window-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.floating-window > .status-bar {
  flex: 0 0 auto;
}

.taskbar {
  position: fixed;
  z-index: 10000;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: var(--taskbar-height);
  align-items: center;
  gap: 4px;
  padding: 3px;
  color: #050505;
  background: var(--silver);
  box-shadow:
    inset 0 1px var(--chrome-highlight),
    inset 0 2px var(--chrome-light);
}

.start-button {
  display: flex;
  min-width: 76px;
  height: 28px;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}

.start-button img {
  width: 19px;
  height: 19px;
  image-rendering: pixelated;
}

.start-button.is-open {
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-dark),
    inset -2px -2px var(--chrome-light),
    inset 2px 2px var(--chrome-shadow);
}

.taskbar-divider {
  width: 4px;
  height: 25px;
  box-shadow:
    inset -1px 0 var(--chrome-highlight),
    inset 1px 0 var(--chrome-shadow);
}

.task-buttons {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 3px;
  overflow: hidden;
}

.task-button {
  display: flex;
  min-width: 80px;
  max-width: 170px;
  height: 26px;
  flex: 1;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 0 6px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-button.is-active {
  background-color: #666;
  background-image:
    linear-gradient(45deg, #595959 25%, transparent 25%),
    linear-gradient(-45deg, #595959 25%, transparent 25%);
  background-size: 2px 2px;
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-dark),
    inset -2px -2px var(--chrome-light),
    inset 2px 2px var(--chrome-shadow);
}

.task-button img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  image-rendering: pixelated;
}

.tray {
  display: flex;
  min-width: 86px;
  height: 25px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 7px;
  box-shadow:
    inset -1px -1px var(--chrome-light),
    inset 1px 1px var(--chrome-shadow);
}

.tray img {
  width: 16px;
  height: 16px;
}

.start-menu {
  position: fixed;
  z-index: 10001;
  bottom: var(--taskbar-height);
  left: 2px;
  display: flex;
  width: 245px;
  min-height: 254px;
  padding: 3px;
}

.start-rail {
  display: flex;
  width: 30px;
  align-items: flex-end;
  padding: 8px 5px;
  color: #ffb0b0;
  background: linear-gradient(#210000, #9b0000);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  text-orientation: mixed;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-items {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.start-items button {
  display: flex;
  width: 100%;
  min-height: 51px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.start-items button:hover,
.start-items button:focus {
  color: #fff;
  background: #740000;
  box-shadow: none;
}

.start-items button:active {
  box-shadow: none;
}

.start-items img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.start-items hr {
  width: calc(100% - 8px);
  margin: 1px 4px;
  border: 0;
  border-top: 1px solid grey;
  border-bottom: 1px solid #fff;
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-form .field-row-stacked label,
.dialog-form .field-row label {
  font-weight: bold;
}

.dialog-form input:not([type="checkbox"]):not([type="color"]),
.dialog-form select,
.dialog-form textarea {
  width: 100%;
}

.dialog-form textarea {
  min-height: 82px;
  resize: vertical;
}

.dialog-form .editor {
  min-height: 180px;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 3px;
}

.form-note {
  margin: 0;
  color: #444;
  font-size: 10px;
  line-height: 1.35;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.choice-button {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  text-align: left;
}

.choice-button img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.form-error {
  margin: 0;
  padding: 5px;
  color: #710000;
  border: 1px solid #910000;
  background: #ffd9d9;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  background: var(--silver);
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow);
}

.toolbar button {
  min-width: 31px;
  padding: 0 7px;
}

.vertical-bar,
legend,
table > thead > tr > *,
.field-border-disabled,
.status-field-border {
  background: var(--silver);
}

input[type="email"]:disabled,
input[type="email"]:read-only,
input[type="number"]:disabled,
input[type="number"]:read-only,
input[type="password"]:disabled,
input[type="password"]:read-only,
input[type="search"]:disabled,
input[type="search"]:read-only,
input[type="tel"]:disabled,
input[type="tel"]:read-only,
input[type="text"]:disabled,
input[type="text"]:read-only,
input[type="url"]:disabled,
input[type="url"]:read-only,
textarea:disabled {
  background-color: var(--silver);
}

::-webkit-scrollbar-corner {
  background: var(--chrome-light);
}

::-webkit-scrollbar-track {
  background-color: var(--silver);
  background-image:
    linear-gradient(45deg, var(--chrome-light) 25%, transparent 25%),
    linear-gradient(-45deg, var(--chrome-light) 25%, transparent 25%);
  background-size: 2px 2px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--chrome-light);
  box-shadow:
    inset -1px -1px var(--chrome-dark),
    inset 1px 1px var(--chrome-highlight),
    inset -2px -2px var(--chrome-shadow),
    inset 2px 2px var(--chrome-light);
}

.media-builder {
  padding: 7px;
  border: 1px dotted #555;
}

.media-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 5px;
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}

.media-list-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 3px;
  background: var(--chrome-panel);
}

.media-list-item code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-list-item button {
  min-width: 52px;
}

.auth-switch {
  display: flex;
  justify-content: center;
  margin-top: 7px;
}

.auth-switch button {
  min-width: 150px;
}

.post-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dotted #770000;
}

.post-heading > img {
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
}

.post-heading h1 {
  margin: 0;
  color: #600;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 27px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.post-heading p {
  margin: 5px 0 0;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.post-actions button {
  min-width: 72px;
}

.bookmark-button {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.bookmark-button img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
}

.rich-content {
  min-height: 100px;
  padding: 12px;
  overflow-wrap: anywhere;
  color: #111;
  background: #fff;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px grey,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  color: #570000;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

.rich-content h1 {
  font-size: 30px;
}

.rich-content h2 {
  font-size: 25px;
}

.rich-content h3 {
  font-size: 21px;
}

.rich-content h4 {
  font-size: 17px;
}

.rich-content blockquote {
  margin-left: 10px;
  padding-left: 12px;
  color: #570000;
  border-left: 3px solid #850000;
}

.rich-content img,
.rich-content video,
.comment-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px auto;
}

.external-media {
  display: grid;
  margin-top: 8px;
  gap: 8px;
}

.external-media img,
.external-media video {
  max-width: 100%;
  max-height: 520px;
  justify-self: center;
}

.comment-body img {
  width: auto;
  max-width: min(100%, 420px);
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

.external-media a {
  overflow-wrap: anywhere;
}

.artifact-notice {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0;
  padding: 7px;
  color: #670000;
  background: var(--chrome-panel);
  border: 1px dotted #670000;
}

.deleted-admin-note {
  margin: 8px 0;
  padding: 7px;
  color: #5a0000;
  background: var(--chrome-panel);
  border: 1px dotted #670000;
}

.artifact-notice img {
  width: 32px;
  height: 32px;
}

.comments-section {
  margin-top: 14px;
}

.comments-section h2 {
  margin: 0 0 7px;
  color: #500000;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 21px;
}

.comment-composer {
  margin-bottom: 12px;
  padding: 8px;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-shadow),
    inset 1px 1px var(--chrome-highlight);
}

.comment-composer textarea {
  width: 100%;
  min-height: 65px;
  resize: vertical;
}

.comment-composer .field-row {
  margin-top: 5px;
}

.comment-composer .field-row input,
.comment-composer .field-row select {
  min-width: 0;
}

.commenting-disabled {
  margin: 0;
  color: #4d0000;
}

.reply-target {
  margin: 0 0 5px;
  color: #680000;
}

.comment-list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
  margin: 0 0 9px;
  padding: 6px;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow);
}

.comment-filter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #2f0000;
}

.comment-filter select {
  min-width: 105px;
}

.comment-tree,
.comment-children {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.comment-children {
  margin: 7px 0 0 16px;
  padding-left: 10px;
  border-left: 1px dotted #680000;
}

.comment-children[hidden] {
  display: none;
}

.comment {
  padding: 7px;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow);
}

.comment.is-deleted {
  color: #272727;
  background: #6b6b6b;
  font-style: italic;
}

.comment.is-targeted {
  outline: 2px dotted var(--blood-dim);
  outline-offset: 2px;
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow),
    0 0 12px rgba(255, 0, 0, 0.75);
}

.comment-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding-bottom: 4px;
  border-bottom: 1px dotted #999;
}

.comment-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
  image-rendering: pixelated;
}

.comment-author {
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: #600;
  border: 0;
  background: none;
  box-shadow: none;
  font-weight: bold;
  text-decoration: underline;
}

.comment-author:active {
  box-shadow: none;
}

.author-badge {
  padding: 1px 4px;
  color: #fff;
  background: #780000;
}

.comment-date {
  margin-left: auto;
  color: #2b0000;
  font-size: 9px;
  font-weight: bold;
}

.comment-body {
  padding: 6px 2px;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.comment-body p:first-child {
  margin-top: 0;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-controls {
  display: flex;
  gap: 4px;
}

.comment-controls button {
  min-width: 46px;
  min-height: 19px;
  padding: 0 6px;
}

.profile-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow);
}

.profile-avatar {
  display: flex;
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--profile-color, #900);
  box-shadow:
    inset -2px -2px #111,
    inset 2px 2px #fff;
}

.profile-avatar img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

button.profile-avatar:hover,
button.profile-avatar:focus {
  outline: 1px dotted #fff;
  outline-offset: -5px;
}

.profile-card h1 {
  margin: 0;
  color: var(--profile-color, #700);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 27px;
}

.profile-card p {
  margin: 5px 0 0;
}

.profile-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.social-toolbar {
  display: flex;
  min-height: 34px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px;
  color: #180000;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-dark),
    inset 1px 1px var(--chrome-highlight);
}

.person-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.person-list-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px;
  color: #210000;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-shadow),
    inset 1px 1px var(--chrome-highlight);
}

.person-list-avatar {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}

.person-list-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.person-list-name {
  width: fit-content;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-weight: bold;
  text-align: left;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

span.person-list-name {
  text-decoration: none;
}

button.person-list-name:active {
  box-shadow: none;
}

.person-list-detail {
  color: #3f0000;
  font-size: 10px;
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.notification-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: #210000;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-shadow),
    inset 1px 1px var(--chrome-highlight);
}

.notification-item.is-unread {
  border-left: 5px solid var(--blood-dim);
  background: #929292;
}

.notification-item > img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.notification-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.notification-link {
  overflow-wrap: anywhere;
  font-weight: bold;
}

.notification-time {
  color: #3f0000;
  font-size: 10px;
}

.inbox-window,
.notifications-window {
  min-height: 100%;
}

.inbox-window {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.mail-toolbar {
  justify-content: flex-start;
}

.mail-search-form {
  display: flex;
  min-width: min(100%, 250px);
  margin-left: auto;
  gap: 4px;
}

.mail-search-form input {
  min-width: 100px;
  flex: 1 1 auto;
}

.mail-layout {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(225px, 0.42fr) minmax(0, 1fr);
  gap: 7px;
}

.mail-list,
.mail-viewer {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow),
    inset -2px -2px var(--chrome-light),
    inset 2px 2px var(--chrome-dark);
}

.mail-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px;
}

.mail-list-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px;
  color: #2d0000;
  border: 1px solid transparent;
  text-decoration: none;
}

.mail-list-item:hover,
.mail-list-item:focus {
  color: #fff;
  border-color: #340000;
  background: #790000;
  outline: 1px dotted #fff;
  outline-offset: -4px;
}

.mail-list-item.is-unread {
  color: #650000;
  background: #9b9b9b;
  border-left: 4px solid var(--blood-dim);
}

.mail-list-top {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 5px;
}

.mail-list-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-list-top time {
  flex: 0 0 auto;
  font-size: 9px;
}

.mail-list-subject {
  overflow: hidden;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-list-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #3f3f3f;
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mail-list-item:hover .mail-list-preview,
.mail-list-item:focus .mail-list-preview {
  color: #fff;
}

.mail-viewer {
  padding: 10px;
}

.mail-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.mail-heading img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.mail-heading h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #4d0000;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 22px;
}

.mail-meta {
  margin: 8px 0;
  padding-bottom: 7px;
  border-bottom: 1px dotted #4d0000;
}

.mail-content {
  min-height: 140px;
}

.mail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.mail-compose-form textarea {
  min-height: 180px;
  resize: vertical;
}

.profile-section-divider,
.post-section-divider {
  height: 1px;
  margin: 19px 2px;
  background: #4a4a4a;
  box-shadow: 0 1px var(--chrome-highlight);
}

.post-view > .comments-section {
  margin-top: 0;
}

.profile-files-header {
  display: flex;
  min-height: 27px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0 5px;
}

.profile-files-header h2 {
  margin: 0;
}

.profile-file-tools {
  display: flex;
  gap: 5px;
}

.profile-file-tools > button,
.profile-type-filter > button {
  min-width: 82px;
}

.profile-type-filter {
  position: relative;
}

.profile-type-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 2px);
  right: 0;
  min-width: 112px;
  padding: 3px;
  background: var(--silver);
  box-shadow:
    inset -1px -1px var(--chrome-dark),
    inset 1px 1px var(--chrome-highlight),
    inset -2px -2px var(--chrome-shadow),
    inset 2px 2px var(--chrome-light);
}

.profile-type-menu button {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.avatar-grid {
  display: grid;
  max-height: 335px;
  overflow: auto;
  margin-top: 8px;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}

.avatar-search {
  width: 100%;
  margin-top: 5px;
}

.avatar-grid .empty-directory {
  grid-column: 1 / -1;
}

.avatar-choice {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  justify-content: center;
}

.avatar-choice img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.avatar-choice.is-selected {
  background: #690000;
  outline: 1px dotted #fff;
  outline-offset: -5px;
}

.bookmark-list,
.profile-post-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-post {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background: var(--chrome-panel);
}

.mini-post-icons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.mini-post-icons > img:first-child {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.mini-post-icons .pin-badge {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.pinned-mini-post {
  background: linear-gradient(90deg, #741010, var(--chrome-panel) 72%);
}

.mini-post button {
  min-width: 0;
  padding: 0 5px;
}

.pin-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pin-button img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.post-heading h1 .pin-badge {
  margin-right: 6px;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-list .field-row {
  min-height: 23px;
}

.settings-group {
  margin-top: 9px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 9px 0 6px;
}

.admin-panel {
  min-height: 200px;
  padding: 8px;
  background: var(--chrome-panel);
  box-shadow:
    inset -1px -1px var(--chrome-highlight),
    inset 1px 1px var(--chrome-shadow),
    inset -2px -2px var(--chrome-light),
    inset 2px 2px var(--chrome-dark);
}

.admin-panel h2 {
  margin: 4px 0 8px;
  color: #600;
  font-size: 18px;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-panel-heading h2 {
  margin: 0;
}

.admin-table-wrap {
  max-height: 260px;
  overflow: auto;
}

.admin-table {
  width: 100%;
  table-layout: auto;
}

.admin-table td {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table button {
  min-width: 48px;
}

.message-layout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.message-layout img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.message-layout p {
  margin: 2px 0 12px;
  line-height: 1.4;
}

.compact .file-entry {
  min-height: 51px;
  padding-block: 5px;
}

.compact .file-entry img {
  width: 24px;
  height: 24px;
}

.compact .archive-body {
  min-height: 270px;
}

.compact .archive-window {
  min-height: 325px;
}

@media (max-width: 1120px) {
  .archive-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }

  .archive-window:nth-child(even) {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --taskbar-height: calc(52px + env(safe-area-inset-bottom, 0px));
  }

  html {
    scroll-padding-top: calc(58px + env(safe-area-inset-top, 0px));
    scroll-padding-bottom: calc(var(--taskbar-height) + 12px);
  }

  body {
    padding-bottom: calc(var(--taskbar-height) + 18px);
  }

  .site-header {
    display: grid;
    min-height: 0;
    padding:
      max(14px, env(safe-area-inset-top, 0px))
      12px
      12px;
    grid-template-areas:
      "wordmark wordmark"
      "system account";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: end;
    gap: 10px 14px;
  }

  .system-readout {
    position: static;
    grid-area: system;
    align-self: center;
    font-size: 10px;
    line-height: 1.25;
  }

  .account-readout {
    position: static;
    display: grid;
    grid-area: account;
    grid-template-columns: repeat(3, minmax(0, auto));
    align-items: center;
    justify-content: end;
    gap: 2px 5px;
    font-size: 10px;
  }

  .account-readout > span {
    max-width: 100%;
    grid-column: 1 / -1;
    justify-self: end;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .text-command {
    min-height: 32px;
    padding: 5px 4px;
    font-size: 11px;
  }

  .system-command {
    min-height: 0;
    padding: 0;
    font-size: 10px;
  }

  .wordmark {
    max-width: 100%;
    margin-top: 0;
    grid-area: wordmark;
    font-size: clamp(42px, 15vw, 58px);
    line-height: 0.9;
  }

  .desktop-shortcuts {
    position: static;
    display: grid;
    width: calc(100% - 16px);
    margin: 8px 8px 18px;
    padding: 6px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .desktop-shortcut {
    min-width: 0;
    min-height: 70px;
    padding: 6px 2px;
    gap: 5px;
    touch-action: manipulation;
  }

  .desktop-shortcut img {
    width: 30px;
    height: 30px;
  }

  .desktop-shortcut span {
    font-size: 10px;
    line-height: 1.2;
  }

  main {
    width: calc(100% - 12px);
    margin: 0 auto calc(var(--taskbar-height) + 24px);
  }

  .filter-strip {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px;
    line-height: 1.3;
  }

  .filter-strip button {
    min-height: 38px;
    flex: 0 0 auto;
    margin-left: 0;
  }

  menu.mobile-archive-tabs[role="tablist"] {
    display: flex;
  }

  .archive-grid {
    display: block;
  }

  .archive-window {
    display: none;
    min-height: 300px;
    margin-top: 0 !important;
  }

  .archive-window.is-mobile-active {
    display: block;
  }

  .archive-window .title-bar {
    min-height: 34px;
    padding: 5px 6px;
  }

  .archive-window .title-bar-text {
    margin-right: 0;
    font-size: 20px;
  }

  .archive-body {
    min-height: 245px;
  }

  .file-entry,
  .compact .file-entry {
    min-height: 76px;
    padding: 9px 8px 7px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    cursor: pointer;
    touch-action: manipulation;
  }

  .file-icon-button {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  .file-title {
    min-height: 30px;
    padding: 3px 0;
    font-size: 19px;
    line-height: 1.15;
    touch-action: manipulation;
  }

  .file-meta {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.45;
  }

  .author-link {
    min-height: 26px;
    padding: 4px 1px;
  }

  .file-stats {
    min-height: 28px;
    padding: 5px 0 3px;
    touch-action: manipulation;
  }

  .archive-pagination {
    min-height: 44px;
  }

  .archive-pagination button {
    min-width: 40px;
    min-height: 36px;
    padding-inline: 10px;
  }

  #window-layer {
    bottom: var(--taskbar-height);
  }

  .floating-window,
  .floating-window.is-maximized {
    top: env(safe-area-inset-top, 0px) !important;
    left: env(safe-area-inset-left, 0px) !important;
    width: calc(
      100vw -
      env(safe-area-inset-left, 0px) -
      env(safe-area-inset-right, 0px)
    ) !important;
    height: calc(
      100vh -
      var(--taskbar-height) -
      env(safe-area-inset-top, 0px)
    ) !important;
    height: calc(
      100dvh -
      var(--taskbar-height) -
      env(safe-area-inset-top, 0px)
    ) !important;
    max-width: none;
    max-height: none;
    resize: none;
  }

  .floating-window > .title-bar {
    min-height: 42px;
    padding: 5px 4px 5px 7px;
    cursor: default;
    touch-action: manipulation;
  }

  .floating-window > .title-bar .title-bar-text {
    min-width: 0;
    margin-right: 8px;
    font-size: 12px;
  }

  .floating-window > .title-bar .title-bar-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floating-window .title-bar-controls {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
  }

  .floating-window .title-bar-controls button {
    min-width: 34px;
    min-height: 32px;
    background-position: center !important;
    touch-action: manipulation;
  }

  .floating-window
    .title-bar-controls
    button:is([aria-label="Maximize"], [aria-label="Restore"]) {
    display: none;
  }

  .floating-window > .window-body {
    margin: 0 3px 3px;
    padding: 10px 7px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .floating-window > .status-bar {
    min-height: 28px;
  }

  .dialog-form {
    gap: 12px;
  }

  .dialog-form > .field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .dialog-form > .field-row > * + *,
  .settings-list .field-row > * + * {
    margin-left: 0;
  }

  .dialog-form > [class^="field-row"] + [class^="field-row"] {
    margin-top: 0;
  }

  .field-row-stacked {
    gap: 5px;
  }

  .field-row-stacked > * + * {
    margin-top: 0;
  }

  .dialog-form
    input:not([type="checkbox"]):not([type="color"]):not([type="submit"]),
  .dialog-form select,
  .dialog-form textarea,
  .avatar-search,
  .comment-filter select {
    min-height: 42px;
    padding: 7px 8px;
    font-size: 16px;
    line-height: 1.25;
  }

  .dialog-form input[type="color"] {
    width: 72px;
    min-height: 44px;
  }

  .floating-window input.avatar-search {
    height: 42px;
    line-height: 1.25;
  }

  .dialog-form select,
  .comment-filter select {
    padding-right: 40px;
    background-position: center right 4px;
  }

  .dialog-form .editor {
    min-height: 38dvh;
    font-size: 16px;
    line-height: 1.45;
  }

  .form-actions {
    gap: 7px;
  }

  .form-actions button {
    min-width: 0;
    min-height: 44px;
    flex: 1 1 0;
    padding-inline: 10px;
    touch-action: manipulation;
  }

  .settings-list .field-row {
    min-height: 44px;
    justify-content: flex-start;
    gap: 8px;
  }

  .settings-list .field-row label {
    min-width: 0;
    flex: 1;
    padding: 10px 0;
    line-height: 1.25;
  }

  .toolbar {
    padding: 5px;
  }

  .toolbar button {
    min-width: 44px;
    min-height: 40px;
    flex: 0 0 auto;
    touch-action: manipulation;
  }

  .media-builder {
    padding: 8px;
  }

  .media-row {
    grid-template-columns: minmax(88px, 0.35fr) minmax(0, 1fr);
    gap: 7px;
  }

  .media-row button {
    min-height: 42px;
    grid-column: 1 / -1;
  }

  .media-list-item {
    min-height: 42px;
    padding: 5px;
  }

  .media-list-item button {
    min-height: 36px;
  }

  .choice-button,
  .auth-switch button,
  .post-actions button,
  .profile-controls button,
  .social-toolbar button,
  .notification-item button,
  .mail-actions button,
  .person-list-item > button,
  .profile-file-tools button,
  .comment-controls button,
  .comment-list-controls button,
  .admin-tabs button,
  .admin-panel-heading button,
  .bookmark-button {
    min-height: 40px;
    touch-action: manipulation;
  }

  .post-heading {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 7px;
  }

  .post-heading > img {
    width: 34px;
    height: 34px;
  }

  .post-heading h1 {
    font-size: 24px;
    line-height: 1.1;
  }

  .post-actions {
    gap: 7px;
  }

  .post-actions button {
    flex: 1 1 105px;
  }

  .rich-content {
    padding: 12px 10px;
    font-size: 16px;
    line-height: 1.6;
  }

  .rich-content h1 {
    font-size: 26px;
  }

  .rich-content h2 {
    font-size: 23px;
  }

  .rich-content h3 {
    font-size: 20px;
  }

  .artifact-notice {
    align-items: flex-start;
  }

  .comment-composer {
    padding: 8px;
  }

  .comment-list-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .comment-list-controls > button {
    grid-column: 1 / -1;
  }

  .comment-filter select {
    width: 100%;
    min-width: 0;
  }

  .comment {
    padding: 8px;
  }

  .comment-children {
    margin-left: 5px;
    padding-left: 6px;
  }

  .comment-date {
    margin-left: 27px;
    flex-basis: 100%;
  }

  .comment-controls {
    flex-wrap: wrap;
    gap: 6px;
  }

  .comment-controls button {
    min-width: 58px;
    padding-inline: 8px;
  }

  .profile-card {
    padding: 8px;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
  }

  .profile-avatar {
    width: 46px;
    min-width: 46px;
    height: 46px;
  }

  .profile-card h1 {
    font-size: 23px;
    overflow-wrap: anywhere;
  }

  .profile-controls {
    gap: 7px;
  }

  .profile-controls button {
    flex: 1 1 135px;
  }

  .notification-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
  }

  .person-list-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .person-list-item > button {
    grid-column: 2;
    justify-self: start;
  }

  button.person-list-name {
    min-height: 40px;
    padding: 6px 0;
  }

  .notification-item > img {
    width: 28px;
    height: 28px;
  }

  .notification-item > button {
    grid-column: 2;
    justify-self: start;
  }

  .mail-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(150px, 0.7fr) minmax(220px, 1.3fr);
  }

  .mail-list-item {
    min-height: 74px;
    padding: 9px;
  }

  .mail-viewer {
    padding: 10px 8px;
  }

  .mail-toolbar button {
    flex: 1 1 95px;
  }

  .mail-search-form {
    width: 100%;
    margin-left: 0;
    flex-basis: 100%;
  }

  .mail-search-form button {
    flex: 0 0 auto;
  }

  .mail-compose-form textarea {
    min-height: 210px;
  }

  .profile-files-header {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-file-tools {
    width: 100%;
  }

  .profile-file-tools > * {
    min-width: 0;
    flex: 1;
  }

  .profile-file-tools button {
    width: 100%;
  }

  .profile-type-menu {
    right: auto;
    left: 0;
    width: 100%;
  }

  .mini-post {
    padding: 7px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 7px;
  }

  .mini-post > button {
    min-height: 38px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .mini-post > small {
    grid-column: 2;
  }

  .avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }

  .avatar-choice {
    min-height: 72px;
  }

  .admin-panel {
    padding: 6px;
  }

  .admin-table button {
    min-height: 38px;
  }

  .message-layout {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .start-menu {
    right: 4px;
    bottom: var(--taskbar-height);
    left: max(2px, env(safe-area-inset-left, 0px));
    width: min(300px, calc(100vw - 8px));
    min-height: 0;
    max-height: calc(100dvh - var(--taskbar-height) - 8px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .start-items button {
    min-height: 58px;
    touch-action: manipulation;
  }

  .taskbar {
    height: var(--taskbar-height);
    align-items: flex-start;
    gap: 3px;
    padding:
      4px
      max(4px, env(safe-area-inset-right, 0px))
      calc(4px + env(safe-area-inset-bottom, 0px))
      max(4px, env(safe-area-inset-left, 0px));
  }

  .start-button {
    min-width: 70px;
    height: 44px;
    padding: 0 7px;
    touch-action: manipulation;
  }

  .taskbar-divider {
    height: 42px;
  }

  .task-buttons {
    height: 44px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .task-buttons::-webkit-scrollbar {
    display: none;
  }

  .task-button {
    min-width: 96px;
    max-width: 150px;
    height: 44px;
    flex: 0 0 min(38vw, 140px);
    padding: 0 9px;
    touch-action: manipulation;
  }

  .tray {
    min-width: 70px;
    height: 44px;
    padding: 2px 6px;
    gap: 4px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .site-header {
    gap: 8px;
  }

  .desktop-shortcuts {
    padding-inline: 4px;
    gap: 3px;
  }

  .desktop-shortcut {
    padding-inline: 1px;
  }

  .desktop-shortcut span {
    font-size: 9px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-button {
    min-height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .noise-layer {
    animation: none !important;
  }

  .has-unread-notifications {
    color: #fff;
    animation: none;
  }
}
