:root {
  --bg: #fff8fd;
  --panel: #ffffff;
  --panel-2: #fff0f9;
  --text: #2b2230;
  --muted: #7a6478;
  --line: #efcfe7;
  --accent: #ff6fb0;
  --accent-2: #ffb3d6;
  --danger: #d0005f;
  --code-bg: #f8e4f1;
  --post-no-color: var(--accent);
  --post-author-color: var(--text);
  --post-bg: transparent;
  --font-main: 'Segoe UI', Tahoma, sans-serif;
  --table-scroll-bg: var(--panel);
  --table-sticky-bg: var(--panel-2);
}

html[data-theme='makaba'] {
  --bg: #f4f4ee;
  --panel: #f7f6f1;
  --panel-2: #f1eee4;
  --text: #2b2417;
  --muted: #6e624c;
  --line: #d7cebb;
  --accent: #FF6600;
  --accent-2: #e2ae7f;
  --danger: #a8392c;
  --code-bg: #ece4d2;
}

html[data-theme='re-l'] {
  --bg: #0e1118;
  --panel: #141924;
  --panel-2: #1d2433;
  --text: #dce4f2;
  --muted: #9fb0c9;
  --line: #2a3448;
  --accent: #5fc7ff;
  --accent-2: #82f0ff;
  --danger: #ff5f87;
  --code-bg: #1c2330;
}

html[data-theme='nyu'] {
  --bg: #111014;
  --panel: #1a1720;
  --panel-2: #231f2b;
  --text: #f4e8ef;
  --muted: #c8aebe;
  --line: #3d3042;
  --accent: #ff6a8f;
  --accent-2: #ffa0b8;
  --danger: #ff2e63;
  --code-bg: #281f2d;
}

html[data-theme='futaba'] {
  --bg: #f0f0e0;
  --panel: #f0e0d6;
  --panel-2: #f8ece5;
  --text: #2b1a1a;
  --muted: #7f5858;
  --line: #c8b9ac;
  --accent: #0000ee;
  --accent-2: #ddb8a3;
  --danger: #b3261e;
  --code-bg: #efe4d8;
  --post-no-color: #b11b1b;
  --post-author-color: #117743;
  --post-bg: #f7e8de;
  --font-main: Tahoma, Verdana, Arial, sans-serif;
}

html[data-theme='yotsuba'] {
  --bg: #eef2ff;
  --panel: #d6daf0;
  --panel-2: #dbe1f7;
  --text: #000;
  --muted: #5c6a99;
  --line: #b7c5d9;
  --accent: #34345c;
  --accent-2: #b7c5d9;
  --danger: #d00;
  --code-bg: #cdd8ee;
  --post-no-color: #000;
  --post-author-color: #117743;
  --post-bg: #d6daf0;
  --font-main: Arial, Helvetica, sans-serif;
}

html[data-theme='lelouch'] {
  --bg: #0a0d18;
  --panel: #12162a;
  --panel-2: #1a1f35;
  --text: #e7e9f5;
  --muted: #9aa3c7;
  --line: #2b3252;
  --accent: #b89a56;
  --accent-2: #5f4a86;
  --danger: #d64a5e;
  --code-bg: #1a2038;
  --post-no-color: #f05a74;
  --post-author-color: #d5c18a;
  --post-bg: #141a2d;
  --font-main: 'Segoe UI', Tahoma, sans-serif;
  --table-scroll-bg: #161b30;
  --table-sticky-bg: #1a1f35;
}

html[data-theme='virus'] {
  --bg: #010303;
  --panel: #041010;
  --panel-2: #061515;
  --text: #9eff8f;
  --muted: #57c46e;
  --line: #0f3d22;
  --accent: #4ce36b;
  --accent-2: #1f8d4f;
  --danger: #ff4668;
  --code-bg: #031009;
  --post-no-color: #4ce36b;
  --post-author-color: #7ef7a6;
  --post-bg: #04120d;
  --font-main: Consolas, 'Courier New', monospace;
  --table-scroll-bg: #041010;
  --table-sticky-bg: #061515;
}

html[data-theme='virus'] body {
  text-shadow: 0 0 0.35px rgba(76, 227, 107, 0.2);
}

html[data-theme='virus'] .card {
  box-shadow: inset 0 0 0 1px rgba(76, 227, 107, 0.05);
}

html[data-theme='virus'] button:not(.secondary):not(.danger),
html[data-theme='virus'] .button:not(.secondary):not(.danger) {
  background: #0b2614;
  color: #baffbd;
  border-color: #1f8d4f;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(76, 227, 107, 0.12);
}

html[data-theme='virus'] button.secondary,
html[data-theme='virus'] .button.secondary {
  background: #041010;
  color: #7ef7a6;
  border-color: #1b6f41;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
html[data-theme='virus'] button.danger,
html[data-theme='virus'] .button.danger {
  background: #2a1015;
  color: #ff9ab0;
  border-color: #7b2f3e;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 70, 104, 0.14);
}

html[data-theme='virus'] input,
html[data-theme='virus'] select,
html[data-theme='virus'] textarea {
  background: #03110a;
  color: #9eff8f;
  border-color: #1a6b3d;
}

html[data-theme='virus'] input:focus,
html[data-theme='virus'] select:focus,
html[data-theme='virus'] textarea:focus,
html[data-theme='virus'] button:focus,
html[data-theme='virus'] .button:focus {
  outline: none;
  border-color: #4ce36b;
  box-shadow: 0 0 0 2px rgba(76, 227, 107, 0.22);
}

html[data-theme='virus'] input:focus-visible,
html[data-theme='virus'] select:focus-visible,
html[data-theme='virus'] textarea:focus-visible,
html[data-theme='virus'] button:focus-visible,
html[data-theme='virus'] .button:focus-visible {
  outline: none;
  border-color: #66f08a;
  box-shadow: 0 0 0 2px rgba(102, 240, 138, 0.28);
}

html[data-theme='virus'] .spoiler {
  background: #1bff6a;
  color: #1bff6a;
}

html[data-theme='virus'] .spoiler:hover {
  color: #0b1b0e;
}

html[data-theme='virus'] .post-meta {
  color: #7ef7a6;
  gap: .35rem;
  letter-spacing: .02em;
}

html[data-theme='virus'] .post-meta .post-no::before {
  content: "[";
  color: #12b36d;
}

html[data-theme='virus'] .post-meta .post-no::after {
  content: "]";
  color: #12b36d;
}

html[data-theme='virus'] .post-meta .post-time::before {
  content: "@ ";
  color: #12b36d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--code-bg); padding: .15rem .35rem; border-radius: 4px; }

.container {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}
.stack > * + * { margin-top: 1rem; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
}
.thread-card {
  border-left: 4px solid var(--accent-2);
}
.preview-list > li p {
  margin-top: .35rem;
}
.op-preview {
  margin: 1rem .75rem;
  background: var(--panel-2);
  border: 1px solid var(--accent-2);
  border-radius: 10px;
  padding: .35rem 0;
}
.op-preview .post-meta,
.op-preview p {
  margin: 1rem .75rem;
}
.list > li.op-preview,
.preview-list > li.op-preview {
  border-top: 0;
}
.post-meta {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: .95rem;
}
.post-no {
  font-weight: 700;
  color: var(--post-no-color);
}
.post-author {
  color: var(--post-author-color);
  font-weight: 600;
}
.post-identity {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.post-tripcode {
  color: var(--muted);
  font-weight: 700;
}
.post-time {
  color: var(--muted);
  font-size: .88rem;
  white-space: nowrap;
}
.post-sage {
  color: #c62828 !important;
  font-size: .85rem;
  text-transform: lowercase;
  font-weight: 700;
}
.post-link {
  color: var(--muted);
  font-size: .85rem;
  margin-left: .25rem;
}
.panel { background: var(--panel-2); }
.muted { color: var(--muted); }
.row { display: flex; gap: 1rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .row.mobile-col { flex-direction: column; align-items: flex-start; }
}

.topbar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  flex-wrap: nowrap;
}
.topbar-left,
.topbar-controls {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0;
}
.topbar-left form {
  margin: 0;
}
.topbar .topbar-field,
.topbar label {
  margin: 0;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.brand-logo,
.topbar-left > a,
.topbar button.secondary,
.topbar select {
  height: 2.05rem;
  display: inline-flex;
  align-items: center;
}
.brand-logo {
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.brand-logo:hover {
  text-decoration: none;
}
.topbar button.secondary,
.topbar select {
  padding-top: 0;
  padding-bottom: 0;
}
.topbar .topbar-select {
  width: auto;
  max-width: none;
  padding-left: .6rem;
  padding-right: 1.7rem;
}
.topbar .topbar-select-theme {
  min-width: calc(6ch + 2rem);
}
.topbar .topbar-select-locale {
  min-width: calc(3ch + 2rem);
}
.board-nav {
  padding: 0 0 .55rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}
.board-nav a {
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 980px) {
  .topbar-inner {
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
  }
  .topbar-left {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .55rem;
  }
  .topbar-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: .55rem;
    row-gap: .4rem;
    align-items: center;
  }
  .topbar-controls .topbar-field {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }
  .topbar-controls .topbar-field:first-of-type {
    grid-column: 1;
    grid-row: 1;
  }
  .topbar-controls .topbar-field:last-of-type {
    grid-column: 1;
    grid-row: 2;
  }
  .topbar-controls .topbar-apply {
    grid-column: 2;
    grid-row: 1 / span 2;
    white-space: nowrap;
    align-self: stretch;
  }
}
@media (max-width: 560px) {
  .topbar {
    font-size: .98rem;
  }
  .topbar-left { gap: .45rem; }
  .topbar-left .topbar-logout { margin-left: auto; }
  .topbar-left .topbar-logout button.secondary {
    border: 0;
    background: none;
    color: var(--accent);
    padding: 0;
    height: auto;
    line-height: 1.25;
    border-radius: 0;
  }
  .topbar-controls {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1.35fr);
    grid-template-rows: auto auto;
    column-gap: .8rem;
    row-gap: .4rem;
  }
  .topbar-controls .topbar-field {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }
  .topbar-controls .topbar-field:first-of-type {
    grid-column: 1;
    grid-row: 1;
  }
  .topbar-controls .topbar-field:last-of-type {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    gap: .35rem;
  }
  .topbar-controls .topbar-field .muted {
    white-space: nowrap;
  }
  .topbar-controls .topbar-apply {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
  }
  .topbar .topbar-select-theme {
    min-width: calc(5ch + 2rem);
    padding-right: 2rem;
  }
  .topbar .topbar-select-locale {
    min-width: 6rem;
    width: auto;
    max-width: 100%;
    padding-right: 2.35rem;
  }
}

@media (max-width: 390px) {
  .topbar-controls {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: .45rem;
  }
  .topbar-controls .topbar-field:first-of-type,
  .topbar-controls .topbar-field:last-of-type {
    grid-column: 1;
    justify-content: space-between;
  }
  .topbar-controls .topbar-field:first-of-type { grid-row: 1; }
  .topbar-controls .topbar-field:last-of-type { grid-row: 2; }
  .topbar-controls .topbar-apply {
    grid-column: 1;
    grid-row: 3;
  }
  .topbar .topbar-select-theme,
  .topbar .topbar-select-locale {
    width: auto;
    min-width: 5.4rem;
    max-width: 9.5rem;
  }
}

/* iOS WebKit: native select arrow area is wider; avoid clipping current value */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 560px) {
    .topbar .topbar-select-locale {
      min-width: 6.4rem;
      padding-right: 2.6rem;
    }
  }
}
.theme-list a {
  display: inline-block;
  margin-right: .5rem;
  margin-bottom: .25rem;
  padding: .25rem .45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.theme-list a.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

h1, h2, h3 { margin: 0 0 .6rem; }
p { margin: 0 0 .75rem; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: .6rem .7rem;
  font: inherit;
}
textarea { min-height: 8rem; resize: vertical; }
label { font-weight: 600; display: block; margin-bottom: .25rem; }

input:focus,
textarea:focus,
select:focus,
button:focus,
.button:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-2);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
.button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-2);
}


button, .button {
  display: inline-block;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: .52rem .86rem;
  cursor: pointer;
  font: inherit;
}
button.secondary, .button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
button.danger, .button.danger {
  background: var(--danger);
}
.reply-details > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
}
.reply-details > summary::-webkit-details-marker {
  display: none;
}
.reply-details:not(.board-search-details)[open] > summary.button,
.reply-details:not(.board-search-details)[open] > summary {
  margin-bottom: .75rem;
  background: var(--accent-2) !important;
  color: #1a2433 !important;
  border-color: var(--accent) !important;
  text-shadow: none !important;
}
.thread-form-card {
  position: relative;
}
.thread-reply-details {
  display: block;
  width: 100%;
}
.thread-down-button {
  position: absolute;
  top: .75rem;
  right: .75rem;
  white-space: nowrap;
}
.thread-down-label-mobile {
  display: none;
}
.board-search-form {
  margin-top: .7rem;
  gap: .5rem;
  align-items: center;
}
.board-description {
  margin: 0;
  flex: 1 1 auto;
}
.board-search-details {
  width: 100%;
}
.board-search-details > .board-search-summary {
  list-style: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.board-search-summary::-webkit-details-marker {
  display: none;
}
.board-search-label {
  pointer-events: none;
}
.board-search-trigger {
  flex: 0 0 auto;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  width: 2.65rem;
  min-width: 2.65rem;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  font-size: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.board-search-trigger::before {
  content: "";
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask: url("../icons/search.svg") center / contain no-repeat;
  mask: url("../icons/search.svg") center / contain no-repeat;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.board-search-form input[type="search"] {
  flex: 1 1 14rem;
  min-width: 0;
}
.board-search-caption {
  margin: .5rem 0 0;
}
.file-picker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.file-picker > label.button {
  display: inline-block;
  margin-bottom: 0;
  font-weight: 400;
}
.file-input-native {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-input-native:focus + .button,
.file-input-native:focus-visible + .button {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-2);
}
.file-picker-hint {
  font-size: .92rem;
}
.board-search-details[open] > .board-search-summary {
  margin-bottom: .65rem;
  background: transparent;
  border-color: transparent;
  color: inherit;
}
.create-thread-summary {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (max-width: 560px) {
  .thread-down-button {
    min-width: 2.5rem;
    padding-left: .75rem;
    padding-right: .75rem;
    text-align: center;
  }
  .thread-down-label-full {
    display: none;
  }
  .thread-down-label-mobile {
    display: inline;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
  }
  .board-search-form {
    align-items: stretch;
  }
  .board-search-form button,
  .board-search-form .button {
    width: 100%;
    text-align: center;
  }
}

.error { color: var(--danger); font-size: .9rem; margin-top: .25rem; }
.notice {
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

.auth-box {
  width: min(540px, calc(100% - 2rem));
  margin: 2rem auto;
}
.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.login-submit {
  padding: .72rem 1.25rem;
  font-weight: 700;
}
.login-recover {
  margin-left: auto;
}
@media (max-width: 560px) {
  .login-actions {
    flex-wrap: wrap;
    row-gap: .6rem;
  }
  .login-recover {
    width: 100%;
    text-align: right;
  }
}
.list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.list > li {
  border-top: 1px solid var(--line);
  padding: .75rem 0;
  background: var(--post-bg);
}
.list > li:first-child { border-top: 0; }
.list > li[id^='p'] {
  scroll-margin-top: 1rem;
}

@keyframes post-target-flash {
  0% {
    background: var(--panel-2);
    outline: 2px solid var(--accent);
    outline-offset: 0;
  }
  100% {
    background: var(--post-bg);
    outline: 2px solid transparent;
    outline-offset: 0;
  }
}

.list > li[id^='p']:target {
  border-radius: 10px;
  animation: post-target-flash 1.4s ease-out 1;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.stats-table th,
.stats-table td {
  border: 1px solid var(--line);
  padding: .5rem .55rem;
  text-align: left;
}
.stats-table th {
  background: var(--panel-2);
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-scroll-bg);
}
.table-scroll .stats-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.table-scroll .stats-table th:first-child,
.table-scroll .stats-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--table-sticky-bg);
}
.table-scroll .stats-table th:first-child {
  z-index: 3;
}
.table-scroll .stats-table td:first-child {
  z-index: 2;
}
.table-scroll .stats-table th:first-child,
.table-scroll .stats-table td:first-child {
  box-shadow: 1px 0 0 var(--line);
}
@media (max-width: 820px) {
  .table-scroll .stats-table {
    min-width: 42rem;
  }
}











.attachment-block {
  margin: .5rem 0 .8rem;
}
.attachment-link {
  display: inline-block;
  font-size: .9rem;
  margin-bottom: .4rem;
}
.post-image {
  display: block;
  max-width: min(460px, 100%);
  max-height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.post-image-preview {
  max-width: min(220px, 100%);
  max-height: 180px;
}
@media (max-width: 980px) {
  .topbar-left .topbar-logout {
    margin-left: auto;
  }
}


input[type='checkbox'],
input[type='radio'] {
  width: auto;
  height: 1rem;
  padding: 0;
  accent-color: var(--accent);
}
input[type='checkbox']:focus-visible,
input[type='radio']:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.thread-post .attachment-block {
  float: left;
  width: 230px;
  margin: .2rem .9rem .5rem 0;
}
.thread-post .attachment-link {
  display: block;
  margin-bottom: .35rem;
}
.thread-post .post-image {
  width: 100%;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.thread-post::after {
  content: '';
  display: block;
  clear: both;
}
@media (max-width: 820px) {
  .thread-post .attachment-block {
    float: none;
    width: auto;
    margin: .5rem 0 .8rem;
  }
}


.post-body {
  margin: .45rem 0 .2rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.post-body p {
  margin: 0;
}
.greentext {
  color: #4f8a10;
}
.post-quote-link {
  color: var(--accent);
  font-weight: 600;
}
.spoiler {
  background: var(--text);
  color: var(--text);
  padding: 0 .2rem;
  border-radius: 3px;
}
.spoiler:hover {
  color: var(--panel);
}
.thread-post .attachment-block {
  float: left;
  width: 230px;
  margin: .2rem .9rem .5rem 0;
}
.thread-post .attachment-link {
  display: block;
  margin-bottom: .35rem;
}
.thread-post .post-image {
  width: 100%;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.thread-post::after {
  content: '';
  display: block;
  clear: both;
}
@media (max-width: 820px) {
  .thread-post .attachment-block {
    float: none;
    width: auto;
    margin: .5rem 0 .8rem;
  }
}


.post-reply {
  color: var(--muted);
  font-size: .9rem;
  margin-left: .2rem;
}
.post-fav-form {
  display: inline;
  margin: 0;
}
html[data-theme] .post-fav {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .95rem;
  line-height: 1;
  padding: 0;
  margin: 0 .1rem 0 0;
  cursor: pointer;
  box-shadow: none;
  border-radius: 0;
}
html[data-theme] .post-fav.is-active {
  color: var(--accent);
}
html[data-theme] .post-fav:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .post-meta {
    column-gap: .35rem;
    row-gap: .2rem;
    align-items: baseline;
    line-height: 1.25;
  }
  .post-meta .post-time {
    order: 99;
    flex-basis: 100%;
    margin-top: .1rem;
    font-size: .83rem;
    white-space: normal;
  }
}



.op-preview .post-body {
  margin: 1rem .75rem;
}

.preview-list > li .post-meta,
.preview-list > li .post-body,
.preview-list > li.mod-deleted .mod-actions {
  margin: 1rem .75rem;
}


.post-quote-broken {
  color: var(--muted);
}
.format-help {
  font-size: .9rem;
  margin-top: .35rem;
}
.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .55rem;
}
.mod-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.mod-inline input {
  width: auto;
  min-width: 9rem;
}


.mod-thread-actions {
  padding: .85rem 1rem;
}
.mod-actions-inline {
  display: flex;
  flex-wrap: nowrap;
  gap: .6rem;
  align-items: center;
  margin-top: .7rem;
  padding-top: .4rem;
}
.mod-inline {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: .45rem;
  align-items: center;
  margin: 0;
}
.mod-inline input[type='text'] {
  width: 12.5rem;
  min-width: 12.5rem;
}
.mod-inline input[type='number'] {
  width: 4.8rem;
  min-width: 4.8rem;
}
.mod-inline-wide input[type='text'] {
  width: 14rem;
  min-width: 14rem;
}
@media (max-width: 980px) {
  .mod-actions-inline {
    flex-wrap: wrap;
  }
  .mod-inline {
    flex-wrap: wrap;
  }
}

.mod-inline-combined {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: .45rem;
  align-items: center;
  margin: .2rem 0;
}
.mod-inline-combined input[type='text'] {
  width: 13rem;
  min-width: 13rem;
}
.mod-inline-combined input[type='number'] {
  width: 4.9rem;
  min-width: 4.9rem;
}
.reusable-invite-form {
  width: 100%;
  justify-content: flex-start;
}
.mod-inline-combined.reusable-invite-form input[type='number'].reusable-invite-input {
  width: 14rem;
  min-width: 14rem;
  flex: 0 1 14rem;
}
.mod-inline-combined.reusable-invite-form button {
  width: auto;
  min-width: 14rem;
}
.thread-card-actions {
  margin-top: .55rem;
  gap: .6rem;
  align-items: center;
}
@media (max-width: 980px) {
  .mod-inline-combined {
    flex-wrap: wrap;
  }
}
@media (max-width: 560px) {
  .mod-inline-combined {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto auto;
    gap: .45rem;
    align-items: center;
  }
  .mod-inline-combined input[type='text'] {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .mod-inline-combined input[type='number'] {
    width: 4.8rem;
    min-width: 4.8rem;
  }
  .mod-inline-combined button {
    width: 100%;
    white-space: nowrap;
  }
  .reusable-invite-form {
    grid-template-columns: 1fr 1fr;
  }
  .mod-inline-combined.reusable-invite-form input[type='number'].reusable-invite-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }
  .mod-inline-combined.reusable-invite-form button {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
}


.mod-deleted {
  margin: 1rem .75rem;
  padding: .35rem 0;
  border: 1px solid var(--danger);
  border-radius: 10px;
  background: rgba(168, 57, 44, 0.10);
}
.thread-post.mod-deleted .post-meta,
.thread-post.mod-deleted .post-body,
.thread-post.mod-deleted .mod-actions {
  margin: 1rem .75rem;
}
.preview-list > li.mod-deleted .post-meta,
.preview-list > li.mod-deleted .post-body {
  margin: 1rem .75rem;
}
.mod-deleted-note {
  color: var(--danger);
  font-weight: 700;
}






.op-preview .mod-actions {
  margin-left: .75rem;
  margin-right: .75rem;
}



.deleted-reason {
  font-style: italic;
}
.favorites-scroll {
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .25rem .75rem;
}
.pagination-nav {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: .5rem;
}
.pagination-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: .35rem;
  min-width: 0;
}
.pagination-edge {
  display: flex;
}
.pagination-edge-left {
  justify-content: flex-start;
}
.pagination-edge-right {
  justify-content: flex-end;
}
.pagination-link {
  display: inline-flex;
  min-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 .5rem;
  text-decoration: none;
}
.pagination-link.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.pagination-link.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}
.pagination-ellipsis {
  display: inline-flex;
  min-width: 1.35rem;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
}
.pagination-ellipsis:hover {
  text-decoration: underline;
}
@media (max-width: 560px) {
  .pagination-nav {
    column-gap: .3rem;
  }
  .pagination-list {
    gap: .25rem;
  }
  .pagination-link {
    min-width: 1.8rem;
    height: 1.8rem;
    border-radius: 7px;
    padding: 0 .42rem;
    font-size: .95rem;
  }
}
.mod-tabs {
  padding: .75rem 1rem;
}
.tab-link.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  text-decoration: none;
}

html[data-theme='virus'] .tab-link.is-active {
  background: #12311c;
  color: #baffbd;
  border-color: #31a55a;
  box-shadow: inset 0 0 0 1px rgba(76, 227, 107, 0.2);
}

.thread-post-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: .9rem;
  margin: 1rem .75rem;
}
.thread-post .post-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.attachments-grid {
  display: grid;
  grid-auto-flow: row;
  gap: .55rem;
  align-content: start;
}
.attachments-count-1 {
  grid-template-columns: 1fr;
  width: min(260px, 42vw);
}
.attachments-count-2 {
  grid-template-columns: 1fr;
  width: min(210px, 34vw);
}
.attachments-count-3,
.attachments-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(240px, 38vw);
}
.thread-post .attachments-grid .attachment-block {
  float: none;
  width: auto;
  margin: 0;
}
.thread-post .attachments-grid .attachment-link {
  display: block;
  margin-bottom: .3rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  font-size: .82rem;
}
.thread-post .attachments-grid .post-image {
  width: 100%;
  max-width: 100%;
  height: 220px;
  max-height: none;
  object-fit: contain;
}
.thread-post .attachments-count-2 .post-image {
  height: 150px;
}
.thread-post .attachments-count-3 .post-image,
.thread-post .attachments-count-4 .post-image {
  height: 108px;
}
.thread-post .post-main .post-body {
  margin: 1rem .75rem 0;
}
.thread-post .post-main .mod-actions-inline {
  margin-top: auto;
  margin-left: .75rem;
  margin-right: .75rem;
}
.op-preview .thread-post-layout,
.thread-post.mod-deleted .thread-post-layout {
  margin: 1rem .75rem;
}
@media (max-width: 820px) {
  .thread-post-layout {
    grid-template-columns: 1fr;
  }
  .attachments-count-1,
  .attachments-count-2,
  .attachments-count-3,
  .attachments-count-4 {
    width: 100%;
  }
  .thread-post .attachments-count-3,
  .thread-post .attachments-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .thread-post .post-main .mod-actions-inline {
    margin-top: .75rem;
  }
}

.error-page {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1.25rem;
}
.error-page h1 {
  font-size: 3rem;
  margin-bottom: .2rem;
  color: var(--accent);
}
.error-page h2 {
  margin-bottom: .65rem;
}

.rules-list {
  margin: 0;
  padding-left: 1.2rem;
}
.rules-list li + li {
  margin-top: .55rem;
}
.rules-note {
  margin-top: 1rem;
  font-style: italic;
}
.rules-figure {
  margin: 1.25rem 0 0;
}
.rules-image {
  display: block;
  width: min(600px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rules-caption {
  margin-top: .5rem;
  font-size: .92rem;
}

/* Futaba-specific look tuned to 2chan-like visuals. */
html[data-theme='futaba'] body {
  font-size: 15px;
  line-height: 1.35;
}
html[data-theme='futaba'] a {
  text-decoration: underline;
}
html[data-theme='futaba'] .card,
html[data-theme='futaba'] .op-preview,
html[data-theme='futaba'] .mod-deleted,
html[data-theme='futaba'] .notice,
html[data-theme='futaba'] button,
html[data-theme='futaba'] .button,
html[data-theme='futaba'] input,
html[data-theme='futaba'] textarea,
html[data-theme='futaba'] select {
  border-radius: 0;
}
html[data-theme='futaba'] .card {
  border-color: #c4b2a6;
  background: #f8f8ee;
}
html[data-theme='futaba'] .topbar,
html[data-theme='futaba'] .board-nav {
  background: #f0f0e0;
}
html[data-theme='futaba'] .brand-logo,
html[data-theme='futaba'] h1,
html[data-theme='futaba'] h2,
html[data-theme='futaba'] h3 {
  color: #a00000;
}
html[data-theme='futaba'] .thread-card {
  border-left-color: #e7b79c;
}
html[data-theme='futaba'] .list > li {
  background: #f7e9df;
}
html[data-theme='futaba'] .post-link,
html[data-theme='futaba'] .post-reply {
  color: #0000ee;
}
html[data-theme='futaba'] .post-quote-link {
  color: #d00000;
}
html[data-theme='futaba'] button,
html[data-theme='futaba'] .button {
  background: #e8e8e8;
  color: #111;
  border: 1px solid #8f8f8f;
}
html[data-theme='futaba'] button.secondary,
html[data-theme='futaba'] .button.secondary {
  background: #f4f4f4;
}
html[data-theme='futaba'] button.danger,
html[data-theme='futaba'] .button.danger {
  background: #c74b3b;
  color: #fff;
  border-color: #9f2f24;
}
html[data-theme='futaba'] .post-sage,
html[data-theme='futaba'] .mod-deleted-note {
  color: #b40000 !important;
}

/* Makaba refresh: closer to 2ch visual language. */
html[data-theme='makaba'] body {
  font-family: Tahoma, Verdana, Arial, sans-serif;
  background: #d8d8da;
  color: #262626;
}
html[data-theme='makaba'] .topbar {
  background: #e7e7e9;
  border-top-color: #c8c8ca;
  border-bottom-color: #c8c8ca;
}
html[data-theme='makaba'] .board-nav {
  background: #e7e7e9;
}
html[data-theme='makaba'] .card,
html[data-theme='makaba'] .notice,
html[data-theme='makaba'] .op-preview,
html[data-theme='makaba'] .mod-deleted {
  background: #dfdfe1;
  border-color: #c7c7c9;
  border-radius: 2px;
}
html[data-theme='makaba'] .thread-card {
  border-left: 0;
}
html[data-theme='makaba'] .list > li {
  background: #d3d3d5;
  border-top-color: #c4c4c6;
}
html[data-theme='makaba'] a,
html[data-theme='makaba'] .post-quote-link {
  color: #ff6600;
}
html[data-theme='makaba'] .post-no {
  color: #505050;
}
html[data-theme='makaba'] .post-author {
  color: #666;
}
html[data-theme='makaba'] h1,
html[data-theme='makaba'] h2,
html[data-theme='makaba'] h3 {
  color: #ff6600;
}
html[data-theme='makaba'] .brand-logo {
  color: #333;
}
html[data-theme='makaba'] .muted,
html[data-theme='makaba'] .post-link,
html[data-theme='makaba'] .post-reply {
  color: #7a7a7a;
}
html[data-theme='makaba'] .greentext {
  color: #789922;
}
html[data-theme='makaba'] button,
html[data-theme='makaba'] .button,
html[data-theme='makaba'] input,
html[data-theme='makaba'] textarea,
html[data-theme='makaba'] select {
  border-radius: 2px;
}
html[data-theme='makaba'] button,
html[data-theme='makaba'] .button {
  background: #f7f7f7;
  color: #ff6600;
  border: 1px solid #c0c0c0;
}
html[data-theme='makaba'] button:not(.secondary):not(.danger):not(.post-fav),
html[data-theme='makaba'] .button:not(.secondary):not(.danger):not(.post-fav) {
  background: #ff6600;
  color: #fff;
  border-color: #d95600;
}
html[data-theme='makaba'] button.danger,
html[data-theme='makaba'] .button.danger {
  background: #b34030;
  color: #fff;
  border-color: #8f2e22;
}

/* Yotsuba refresh: closer to 4chan classic. */
html[data-theme='yotsuba'] body {
  background: #eef2ff;
  color: #000;
}
html[data-theme='yotsuba'] .topbar {
  background: #d6daf0;
  border-top-color: #b7c5d9;
  border-bottom-color: #b7c5d9;
}
html[data-theme='yotsuba'] .board-nav {
  background: #d6daf0;
}
html[data-theme='yotsuba'] .card,
html[data-theme='yotsuba'] .notice {
  background: #d6daf0;
  border: 1px solid #b7c5d9;
  border-radius: 0;
}
html[data-theme='yotsuba'] .thread-card {
  border-left: 0;
}
html[data-theme='yotsuba'] .op-preview {
  background: #c7d2ee;
  border: 1px solid #8ea5c8;
  border-radius: 0;
  padding: .2rem 0;
}
html[data-theme='yotsuba'] .list > li.op-preview,
html[data-theme='yotsuba'] .preview-list > li.op-preview {
  background: #c7d2ee;
}
html[data-theme='yotsuba'] .list > li {
  background: #d6daf0;
  border-top-color: #b7c5d9;
}
html[data-theme='yotsuba'] .post-no {
  color: #000;
}
html[data-theme='yotsuba'] .post-author {
  color: #117743;
}
html[data-theme='yotsuba'] .post-link,
html[data-theme='yotsuba'] .post-reply {
  color: #34345c;
}
html[data-theme='yotsuba'] .post-quote-link {
  color: #d00;
}
html[data-theme='yotsuba'] .greentext {
  color: #789922;
}
html[data-theme='yotsuba'] .brand-logo,
html[data-theme='yotsuba'] h1,
html[data-theme='yotsuba'] h2,
html[data-theme='yotsuba'] h3 {
  color: #af0a0f;
}
html[data-theme='yotsuba'] a {
  color: #34345c;
}
html[data-theme='yotsuba'] button,
html[data-theme='yotsuba'] .button,
html[data-theme='yotsuba'] input,
html[data-theme='yotsuba'] textarea,
html[data-theme='yotsuba'] select {
  border-radius: 0;
  border-color: #9aaec6;
}
html[data-theme='yotsuba'] input,
html[data-theme='yotsuba'] textarea,
html[data-theme='yotsuba'] select {
  background: #f6f7fb;
  color: #000;
}
html[data-theme='yotsuba'] button,
html[data-theme='yotsuba'] .button {
  background: #f7f8fc;
  color: #34345c;
}
html[data-theme='yotsuba'] button:not(.secondary):not(.danger):not(.post-fav),
html[data-theme='yotsuba'] .button:not(.secondary):not(.danger):not(.post-fav) {
  background: #34345c;
  color: #fff;
  border-color: #2a2a4a;
}
html[data-theme='yotsuba'] button.danger,
html[data-theme='yotsuba'] .button.danger {
  background: #d44;
  color: #fff;
  border-color: #b33;
}

/* Lelouch: dark imperial style. */
html[data-theme='lelouch'] body {
  background: radial-gradient(circle at top, #141a33 0%, #0a0d18 58%);
  color: #e7e9f5;
}
html[data-theme='lelouch'] .topbar,
html[data-theme='lelouch'] .board-nav {
  background: #12162a;
  border-top-color: #2b3252;
  border-bottom-color: #2b3252;
}
html[data-theme='lelouch'] .card,
html[data-theme='lelouch'] .notice,
html[data-theme='lelouch'] .op-preview,
html[data-theme='lelouch'] .mod-deleted {
  background: #161b30;
  border-color: #2e3558;
}
html[data-theme='lelouch'] .thread-card {
  border-left-color: #5f4a86;
}
html[data-theme='lelouch'] .brand-logo,
html[data-theme='lelouch'] h1,
html[data-theme='lelouch'] h2,
html[data-theme='lelouch'] h3 {
  color: #d5c18a;
}
html[data-theme='lelouch'] a {
  color: #c6a86b;
}
html[data-theme='lelouch'] .post-quote-link {
  color: #f05a74;
}
html[data-theme='lelouch'] .greentext {
  color: #8fcb6a;
}
html[data-theme='lelouch'] button,
html[data-theme='lelouch'] .button {
  background: linear-gradient(180deg, #3c2f5f 0%, #2a2148 100%);
  color: #f5ebd1;
  border: 1px solid #5f4a86;
}
html[data-theme='lelouch'] button.secondary,
html[data-theme='lelouch'] .button.secondary {
  background: #171c32;
  color: #d3d9f4;
  border-color: #2e3558;
}
html[data-theme='lelouch'] button.danger,
html[data-theme='lelouch'] .button.danger {
  background: #8f1f36;
  color: #fff;
  border-color: #b4324d;
}




