:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #fbfcfb;
  --surface-strong: #eef4f0;
  --line: #d9e2dc;
  --line-strong: #bdcbc2;
  --text: #25302a;
  --muted: #637168;
  --soft: #77857c;
  --accent: #1f7a4d;
  --accent-deep: #155c39;
  --accent-soft: #e3f3e9;
  --warning: #9a6a13;
  --radius: 8px;
  --shadow: 0 18px 55px rgba(43, 69, 54, 0.12);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(227, 243, 233, 0.68), rgba(245, 247, 246, 0) 310px),
    var(--bg);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 10px 0;
  background: rgba(245, 247, 246, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 226, 220, 0.86);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: #f8fbf9;
  background: var(--accent);
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(31, 122, 77, 0.24);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.icon-button,
.avatar-button,
.ghost-button,
.primary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.icon-button:active,
.avatar-button:active,
.ghost-button:active,
.primary-button:active,
.text-button:active {
  transform: translateY(1px);
}

.icon-button {
  width: 40px;
  height: 40px;
  color: var(--muted);
  background: var(--surface);
  border-color: var(--line);
}

.icon-button:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

.avatar-button {
  width: 40px;
  height: 40px;
  color: #f8fbf9;
  background: #33443a;
  font-weight: 700;
}

.ghost-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  font-weight: 650;
  white-space: nowrap;
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.ghost-button.active {
  color: var(--accent);
  border-color: rgba(31, 122, 77, 0.34);
  background: var(--accent-soft);
}

.ghost-button.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.primary-button {
  min-height: 42px;
  padding: 0 16px;
  color: #f8fbf9;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 750;
  white-space: nowrap;
}

.primary-button:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.primary-button.full {
  width: 100%;
}

.text-button {
  min-height: 30px;
  padding: 0 4px;
  color: var(--accent);
  background: transparent;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 312px;
  gap: 18px;
  align-items: start;
  padding: 22px 0 44px;
}

.detail-view {
  display: grid;
  gap: 16px;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 22px 0 52px;
}

.detail-view[hidden] {
  display: none;
}

.back-button {
  justify-self: start;
}

.detail-shell {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 252, 251, 0.94);
  padding: 22px;
}

.detail-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.detail-head h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: 0;
}

.detail-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  padding: 2px 0 4px;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.content-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel,
.post-card,
.toolbar,
.board-strip,
.empty-state,
.modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 252, 251, 0.92);
}

.panel {
  padding: 16px;
}

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

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 15px;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.category-list {
  display: grid;
  gap: 6px;
}

.category-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.category-button i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 18px;
}

.category-button strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-button span {
  color: var(--muted);
  font-size: 12px;
}

.category-button:hover,
.category-button.active {
  border-color: var(--line);
  background: var(--surface-strong);
}

.rule-panel ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.search-box {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #6e7b73;
}

.sort-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.sort-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}

.sort-tabs button:hover,
.sort-tabs button.active {
  color: var(--text);
  background: var(--surface);
}

.board-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
}

.board-strip div {
  display: grid;
  gap: 2px;
}

.board-strip strong {
  font-size: 15px;
}

.board-strip span {
  color: var(--muted);
  font-size: 13px;
}

.post-list {
  display: grid;
  gap: 10px;
}

.post-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.post-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 34px rgba(43, 69, 54, 0.08);
  transform: translateY(-1px);
}

.post-card:focus-visible {
  border-color: rgba(31, 122, 77, 0.66);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.14);
  outline: 0;
}

.post-card button,
.post-card a,
.post-card input,
.post-card select,
.post-card textarea {
  cursor: pointer;
}

.vote-box {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 7px;
}

.vote-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-strong);
}

.vote-button:hover,
.vote-button.liked {
  color: var(--accent);
  border-color: rgba(31, 122, 77, 0.34);
  background: var(--accent-soft);
}

.vote-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.post-main {
  min-width: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pin-badge,
.category-chip,
.state-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.pin-badge {
  color: var(--warning);
  background: #fff4d6;
  border: 1px solid #ead59b;
}

.category-chip {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(31, 122, 77, 0.18);
}

.state-chip {
  color: #5d5e69;
  background: #eceef2;
  border: 1px solid #d9dde3;
}

.post-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.42;
  letter-spacing: 0;
}

.post-title button {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.post-title button:hover {
  color: var(--accent);
}

.post-excerpt {
  display: -webkit-box;
  margin: 9px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-attachment {
  width: 100%;
  max-width: min(720px, 100%);
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-strong);
}

.post-attachment img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
}

.mini-action:hover {
  color: var(--accent);
  border-color: rgba(31, 122, 77, 0.28);
}

.notice {
  padding: 12px;
  border: 1px solid rgba(31, 122, 77, 0.18);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.notice strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 42px 22px;
  text-align: center;
}

.empty-state i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 28px;
}

.empty-state h2 {
  margin: 0;
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(28, 39, 33, 0.34);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  padding: 18px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.28;
}

.modal-head p,
.modal-kicker {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.modal-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 750;
}

.draft-form,
.comment-form {
  display: grid;
  gap: 14px;
}

.draft-form label,
.comment-form {
  display: grid;
  gap: 7px;
}

.draft-form label span,
.comment-form label {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.draft-form input,
.draft-form select,
.draft-form textarea,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  color: var(--text);
  background: var(--surface-strong);
}

.draft-form input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.image-picker {
  position: relative;
}

.image-picker-box {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-strong);
}

.image-picker-box i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 24px;
}

.image-picker-box strong,
.image-picker-box small {
  display: block;
}

.image-picker-box strong {
  color: var(--text);
  font-size: 14px;
}

.image-picker-box small {
  margin-top: 3px;
  font-size: 12px;
}

.image-picker:hover .image-picker-box {
  border-color: rgba(31, 122, 77, 0.48);
}

.image-preview {
  display: grid;
  gap: 10px;
}

.image-preview[hidden] {
  display: none;
}

.image-preview img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: auto;
  object-fit: contain;
  background: var(--surface-strong);
}

.draft-form input,
.draft-form select {
  min-height: 42px;
  padding: 0 12px;
}

.draft-form textarea,
.comment-form textarea {
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.55;
}

.draft-form input:focus,
.draft-form select:focus,
.draft-form textarea:focus,
.comment-form textarea:focus {
  border-color: rgba(31, 122, 77, 0.66);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.14);
}

.form-error {
  margin: 0;
  color: #9a261f;
  font-size: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.thread-detail {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.thread-detail p {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.78;
  white-space: pre-wrap;
}

.thread-attachment[hidden] {
  display: none;
}

.thread-attachment img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: auto;
  object-fit: contain;
  background: var(--surface);
}

.comments-section {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: #f8fbf9;
  background: #405248;
  font-weight: 750;
}

.comment strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.comment p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(31, 122, 77, 0.26);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.toast[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .post-card,
  .panel,
  .toolbar,
  .board-strip {
    animation: enter 420ms ease both;
  }

  .post-card:nth-child(2) {
    animation-delay: 35ms;
  }

  .post-card:nth-child(3) {
    animation-delay: 70ms;
  }

  .post-card:nth-child(4) {
    animation-delay: 105ms;
  }

  @keyframes enter {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .right-rail {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 22px, 720px);
  }

  .top-actions {
    justify-content: flex-end;
  }

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

  .detail-shell {
    padding: 16px;
  }

  .detail-actions {
    justify-content: stretch;
  }

  .detail-actions .ghost-button {
    flex: 1 1 150px;
  }

  .left-rail,
  .right-rail {
    position: static;
    grid-template-columns: 1fr;
  }

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

  .sort-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .sort-tabs button {
    flex: 1 0 auto;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 16px, 520px);
  }

  .topbar {
    min-height: auto;
  }

  .brand small,
  .top-actions .icon-button {
    display: none;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .vote-box {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
  }

  .post-footer,
  .board-strip,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .post-actions {
    width: 100%;
  }

  .mini-action,
  .board-strip .ghost-button,
  .form-actions .ghost-button,
  .form-actions .primary-button {
    width: 100%;
  }

  .modal {
    padding: 14px;
  }
}

/* Dark channel-style theme */
:root {
  color-scheme: dark;
  --bg: #070b10;
  --surface: #0b1118;
  --surface-strong: #101923;
  --surface-raised: #141f2a;
  --line: #1d2a36;
  --line-strong: #2d4150;
  --text: #e9f2f8;
  --muted: #94a5b3;
  --soft: #728493;
  --accent: #2aa8ff;
  --accent-deep: #1688da;
  --accent-soft: rgba(42, 168, 255, 0.14);
  --warning: #ffd166;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 72% 18%, rgba(42, 168, 255, 0.08), transparent 26rem),
    linear-gradient(180deg, #070b10 0%, #08111b 100%);
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(1640px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  border-inline: 1px solid var(--line);
  background: #070b10;
}

.topbar {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  min-height: 100dvh;
  padding: 28px 22px;
  background: #05090e;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  backdrop-filter: none;
}

.brand {
  justify-content: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  color: #eaf7ff;
  background:
    linear-gradient(135deg, rgba(42, 168, 255, 0.92), rgba(27, 213, 176, 0.86));
  box-shadow: 0 0 28px rgba(42, 168, 255, 0.28);
}

.brand strong,
.brand small {
  display: none;
}

.side-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 36px;
}

.side-nav a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: #d6e1ea;
  font-size: 18px;
  font-weight: 760;
}

.side-nav a i {
  color: #e9f2f8;
  font-size: 22px;
}

.side-nav a:hover,
.side-nav a.active {
  color: #f7fbff;
  background: rgba(42, 168, 255, 0.12);
}

.side-nav a.active i {
  color: var(--accent);
}

.top-actions {
  display: grid;
  gap: 18px;
  justify-content: stretch;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0f6fb;
  font-weight: 800;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}

.user-chip:hover {
  border-color: rgba(42, 168, 255, 0.18);
  background: rgba(42, 168, 255, 0.08);
}

.user-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-meta strong,
.user-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  color: #f0f6fb;
  font-size: 13px;
}

.user-meta small {
  color: #8fa0ae;
  font-size: 12px;
  font-weight: 700;
}

.avatar-button {
  background: #182330;
  border: 1px solid var(--line-strong);
}

.top-actions .ghost-button {
  min-height: 52px;
  border-radius: 999px;
  color: #f8fbff;
  background: var(--accent);
  border-color: var(--accent);
  font-size: 17px;
  font-weight: 850;
  box-shadow: 0 16px 42px rgba(42, 168, 255, 0.22);
}

.top-actions .ghost-button:hover {
  background: var(--accent-deep);
}

.layout {
  grid-column: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 0;
  min-height: 100dvh;
  padding: 0;
}

.left-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 12px;
  min-height: 100dvh;
  padding: 20px 12px;
  background: #0a0f16;
  border-right: 1px solid var(--line);
}

.right-rail {
  display: none;
}

.content-column {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 100dvh;
  padding: 0 18px 18px;
  background:
    radial-gradient(circle, rgba(114, 132, 147, 0.12) 1px, transparent 1px) 0 0 / 22px 22px,
    #0d151f;
}

.panel,
.toolbar,
.board-strip,
.empty-state,
.modal,
.detail-shell {
  border-color: var(--line);
  background: var(--surface);
}

.panel {
  padding: 12px;
}

.left-rail .panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.panel-title {
  color: var(--muted);
}

.panel-title h2,
.panel-title h3 {
  color: #dce7ef;
  font-size: 15px;
}

.category-list {
  gap: 8px;
}

.category-button {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted);
}

.category-button i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #eaf7ff;
  background: #101923;
  border: 1px solid var(--line);
}

.category-button strong {
  color: #dfeaf2;
  font-size: 15px;
}

.category-button:hover,
.category-button.active {
  border-color: rgba(42, 168, 255, 0.18);
  background: rgba(42, 168, 255, 0.13);
}

.category-button.active strong,
.category-button.active i {
  color: var(--accent);
}

.rule-panel {
  margin-top: 8px;
  padding-top: 16px !important;
  border-top: 1px solid var(--line) !important;
}

.rule-panel ul {
  color: var(--muted);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(8, 13, 20, 0.88);
  backdrop-filter: blur(16px);
}

.search-box {
  min-height: 38px;
  border-color: transparent;
  background: #111b26;
}

.search-box input {
  color: var(--text);
}

.search-box input::placeholder {
  color: #7d8d9a;
}

.sort-tabs {
  border-color: var(--line);
  background: #0b121a;
}

.sort-tabs button {
  color: var(--muted);
}

.sort-tabs button:hover,
.sort-tabs button.active {
  color: var(--accent);
  background: rgba(42, 168, 255, 0.14);
}

.room-notice {
  margin: 16px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 15, 22, 0.82);
}

.room-notice strong {
  color: #eef6fc;
}

.room-notice p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.board-strip {
  margin: 10px 0 12px;
  border-color: transparent;
  background: transparent;
}

.board-strip strong {
  color: #eef6fc;
}

.post-list {
  gap: 2px;
  padding-bottom: 84px;
}

.post-card {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 12px;
  border-color: transparent;
  background: transparent;
}

.post-card:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  transform: none;
}

.post-card:focus-visible {
  border-color: rgba(42, 168, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(42, 168, 255, 0.12);
}

.vote-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
  background: #111b26;
  border-color: var(--line);
}

.vote-button:hover,
.vote-button.liked {
  color: #e9f8ff;
  border-color: rgba(42, 168, 255, 0.48);
  background: rgba(42, 168, 255, 0.16);
}

.vote-count {
  color: var(--muted);
}

.post-meta {
  gap: 8px;
  color: var(--muted);
}

.pin-badge {
  color: #2b2206;
  background: var(--warning);
  border-color: var(--warning);
}

.category-chip,
.tag {
  color: #71c9ff;
  background: rgba(42, 168, 255, 0.12);
  border-color: rgba(42, 168, 255, 0.2);
}

.state-chip {
  color: #bec9d3;
  background: #17212d;
  border-color: #273646;
}

.post-title button {
  color: #f3f8fc;
}

.post-title button:hover {
  color: var(--accent);
}

.post-excerpt,
.notice p,
.comment p {
  color: #a8b6c2;
}

.post-attachment {
  border-color: var(--line);
  background: #070b10;
}

.mini-action {
  color: var(--muted);
  background: #0b121a;
  border-color: var(--line);
}

.mini-action:hover {
  color: var(--accent);
  border-color: rgba(42, 168, 255, 0.34);
}

.detail-view {
  grid-column: 2;
  width: min(980px, calc(100% - 36px));
  padding: 22px 0 52px;
}

.detail-shell {
  background:
    radial-gradient(circle, rgba(114, 132, 147, 0.10) 1px, transparent 1px) 0 0 / 22px 22px,
    #0d151f;
}

.detail-head {
  border-bottom-color: var(--line);
}

.detail-head h1,
.thread-detail p {
  color: #f3f8fc;
}

.thread-detail,
.comment,
.image-picker-box {
  border-color: var(--line);
  background: rgba(10, 15, 22, 0.78);
}

.thread-attachment img,
.image-preview img {
  border-color: var(--line);
  background: #070b10;
}

.comment-avatar {
  color: #eaf7ff;
  background: #152231;
}

.comment strong,
.comment-form label,
.draft-form label span {
  color: #edf5fb;
}

.comment-form textarea,
.draft-form input,
.draft-form select,
.draft-form textarea {
  color: var(--text);
  background: #111b26;
  border-color: var(--line);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.modal {
  background: #0b1118;
}

.auth-modal {
  width: min(520px, 100%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b121a;
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.auth-tabs button.active,
.auth-tabs button:hover {
  color: var(--accent);
  background: rgba(42, 168, 255, 0.14);
}

.form-note {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(42, 168, 255, 0.16);
  border-radius: var(--radius);
  color: #aab8c4;
  background: rgba(42, 168, 255, 0.08);
  font-size: 13px;
  line-height: 1.55;
}

.slider-captcha {
  user-select: none;
}

.slider-track {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111b26;
}

#sliderProgress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(42, 168, 255, 0.18);
}

#sliderHandle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  border: 0;
  border-right: 1px solid rgba(42, 168, 255, 0.24);
  border-radius: 7px;
  color: #eaf7ff;
  background: var(--accent);
  font-size: 20px;
  touch-action: none;
}

#sliderText {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 48px;
  color: #9fb0bd;
  font-size: 13px;
  font-weight: 780;
  pointer-events: none;
}

.slider-captcha[data-verified="true"] .slider-track {
  border-color: rgba(42, 168, 255, 0.42);
  background: rgba(42, 168, 255, 0.12);
}

.slider-captcha[data-verified="true"] #sliderHandle {
  background: #1bd5b0;
  border-color: rgba(27, 213, 176, 0.34);
}

.slider-captcha[data-verified="true"] #sliderText {
  color: #dffbf6;
}

.toast {
  color: var(--text);
  background: #111b26;
  border-color: var(--line-strong);
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .topbar {
    padding-inline: 14px;
  }

  .side-nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
    font-size: 0;
  }

  .user-chip span {
    display: none;
  }

  .layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .shell {
    display: block;
    width: 100%;
  }

  .topbar {
    position: static;
    min-height: auto;
    grid-template-rows: auto;
    gap: 14px;
  }

  .brand {
    justify-content: flex-start;
  }

  .side-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding-top: 0;
  }

  .side-nav a {
    min-height: 42px;
  }

  .top-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

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

  .left-rail {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .detail-view {
    width: min(100% - 24px, 900px);
  }
}

[hidden] {
  display: none !important;
}

.content-column {
  color: #eaf2f8;
}

.left-rail {
  color: #dbe6ee;
}

.panel-title h2,
.board-strip strong,
.room-notice strong,
.post-title button {
  color: #f2f8fd;
}

.panel-title span,
.board-strip span,
.post-meta,
.post-excerpt,
.rule-panel ul,
.category-button span {
  color: #a8b7c5;
}

.category-button {
  background: rgba(255, 255, 255, 0.012);
}

.category-button:not(.active):hover {
  background: rgba(255, 255, 255, 0.055);
}

.category-button strong {
  color: #dce7ef;
}

.category-button i {
  color: #b9c8d5;
}

.post-card {
  border-bottom: 1px solid rgba(45, 65, 80, 0.46);
  background: rgba(7, 12, 18, 0.34);
}

.post-card:hover {
  background: rgba(17, 27, 38, 0.72);
}

.post-card + .post-card {
  margin-top: 2px;
}

.post-excerpt {
  color: #b7c4cf;
}

.room-notice,
.thread-detail,
.comment,
.modal,
.detail-shell {
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

.room-notice p {
  color: #b5c4cf;
}

.vote-count,
.mini-action,
.tag {
  color: #b3c1cc;
}

.post-attachment {
  background: #05090e;
}

.empty-state {
  background: #0b1118;
}

/* Forum-dark refinement: borrow the dark mood without copying a chat-room layout. */
.shell {
  grid-template-columns: 232px minmax(0, 1fr);
  border-inline-color: rgba(29, 42, 54, 0.72);
}

.topbar {
  padding: 24px 18px;
  gap: 26px;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(10, 15, 22, 0.98), rgba(5, 9, 14, 0.98)),
    #05090e;
}

.brand {
  justify-content: flex-start;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #f4f9fd;
  font-size: 15px;
}

.brand small {
  color: #8193a1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.side-nav {
  gap: 6px;
  padding-top: 8px;
  align-content: start;
  align-self: start;
}

.side-nav a {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: #b9c7d3;
  font-size: 15px;
  font-weight: 760;
}

.side-nav a i {
  color: #8da0af;
  font-size: 20px;
}

.side-nav a:hover,
.side-nav a.active {
  border-color: rgba(42, 168, 255, 0.18);
  background: rgba(42, 168, 255, 0.10);
}

.top-actions {
  display: flex;
  align-items: center;
  align-self: end;
  justify-content: flex-start;
  padding-top: 14px;
  border-top: 1px solid rgba(29, 42, 54, 0.82);
}

.user-chip {
  min-width: 0;
  color: #cbd8e2;
  font-size: 13px;
}

.layout {
  grid-template-columns: 286px minmax(0, 1fr);
}

.left-rail {
  gap: 18px;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(11, 17, 24, 0.98), rgba(7, 12, 18, 0.98)),
    #0a0f16;
}

.left-rail .panel {
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(29, 42, 54, 0.9);
}

.left-rail .panel:last-child {
  border-bottom: 0;
}

.category-list {
  gap: 5px;
}

.category-button {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 6px 8px;
  border-color: transparent;
  background: transparent;
}

.category-button i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(16, 25, 35, 0.86);
}

.category-button:hover,
.category-button.active {
  background: rgba(42, 168, 255, 0.10);
}

.content-column {
  gap: 14px;
  padding: 0 20px 24px;
  background:
    linear-gradient(180deg, rgba(9, 15, 23, 0.42), rgba(13, 21, 31, 0)),
    radial-gradient(circle, rgba(114, 132, 147, 0.08) 1px, transparent 1px) 0 0 / 24px 24px,
    #0d151f;
}

.toolbar {
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.1fr) auto auto;
  margin-inline: -20px;
  padding: 12px 20px;
  background: rgba(8, 13, 20, 0.92);
}

.forum-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #f0f7ff;
}

.forum-title i {
  color: var(--accent);
  font-size: 24px;
}

.forum-title strong,
.forum-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-title strong {
  font-size: 16px;
  font-weight: 850;
}

.forum-title span {
  margin-top: 2px;
  color: #8da0af;
  font-size: 12px;
}

.primary-button.compact {
  min-height: 38px;
  padding: 0 13px;
  font-size: 14px;
}

.room-notice {
  margin: 4px 0 0;
  border-color: rgba(42, 168, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(42, 168, 255, 0.10), rgba(12, 20, 30, 0.82) 42%),
    rgba(10, 15, 22, 0.82);
}

.board-strip {
  margin: 0;
  padding-inline: 2px;
}

.post-list {
  gap: 12px;
  padding-bottom: 44px;
}

.post-card {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(29, 42, 54, 0.88);
  border-radius: var(--radius);
  background: rgba(11, 17, 24, 0.78);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
}

.post-card + .post-card {
  margin-top: 0;
}

.post-card:hover {
  border-color: rgba(42, 168, 255, 0.28);
  background: rgba(15, 24, 35, 0.95);
  transform: translateY(-1px);
}

.vote-button {
  border-radius: 10px;
}

.post-title {
  font-size: 17px;
}

.post-meta {
  margin-bottom: 7px;
}

.post-excerpt {
  margin-bottom: 13px;
}

.post-attachment {
  max-width: min(620px, 100%);
  border-color: rgba(45, 65, 80, 0.92);
  border-radius: var(--radius);
}

.mini-action {
  background: rgba(16, 25, 35, 0.9);
}

.mini-action.saved,
.detail-actions .ghost-button.active {
  color: #eaf7ff;
  border-color: rgba(42, 168, 255, 0.42);
  background: rgba(42, 168, 255, 0.16);
}

.detail-view {
  grid-column: 2;
}

.detail-shell {
  border-color: rgba(29, 42, 54, 0.92);
  background:
    linear-gradient(180deg, rgba(12, 20, 30, 0.96), rgba(9, 15, 23, 0.96)),
    #0d151f;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .brand strong,
  .brand small {
    display: none;
  }

  .brand {
    justify-content: center;
  }

  .topbar {
    padding-inline: 14px;
  }

  .side-nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
    font-size: 0;
  }

  .layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }

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

.utility-view {
  grid-column: 2;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 100dvh;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(9, 15, 23, 0.42), rgba(13, 21, 31, 0)),
    radial-gradient(circle, rgba(114, 132, 147, 0.08) 1px, transparent 1px) 0 0 / 24px 24px,
    #0d151f;
}

.utility-view[hidden] {
  display: none !important;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(29, 42, 54, 0.82);
}

.view-head p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.view-head h1 {
  margin: 0;
  color: #f2f8fd;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-grid,
.settings-grid,
.metric-grid {
  display: grid;
  gap: 14px;
}

.section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-card,
.settings-card,
.admin-panel,
.metric-card,
.notice-item {
  border: 1px solid rgba(29, 42, 54, 0.9);
  border-radius: var(--radius);
  background: rgba(11, 17, 24, 0.82);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
}

.section-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(42, 168, 255, 0.18);
  border-radius: var(--radius);
  color: var(--accent);
  background: rgba(42, 168, 255, 0.10);
  font-size: 23px;
}

.section-card h2 {
  margin: 0;
  color: #f2f8fd;
  font-size: 18px;
}

.section-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: #aab8c4;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.section-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.section-meta strong {
  color: #f4f9fd;
  font-size: 24px;
}

.section-meta span {
  color: #8798a7;
  font-size: 12px;
}

.section-card .ghost-button {
  grid-column: 2 / -1;
  justify-self: start;
}

.compact-list {
  gap: 10px;
}

.post-card.compact-card {
  grid-template-columns: 48px minmax(0, 1fr);
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.notice-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 6px;
  color: #b9c7d3;
  background: #111b26;
  font-size: 13px;
  font-weight: 800;
}

.notice-item.unread {
  border-color: rgba(42, 168, 255, 0.3);
  background: rgba(16, 25, 35, 0.92);
}

.notice-item.unread > span {
  color: #eaf7ff;
  background: rgba(42, 168, 255, 0.16);
}

.notice-item strong,
.notice-item small {
  display: block;
}

.notice-item strong {
  color: #edf5fb;
  font-size: 15px;
}

.notice-item small {
  margin-top: 4px;
  color: #8fa0ae;
  font-size: 12px;
}

.settings-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.settings-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.settings-card label {
  display: grid;
  gap: 7px;
}

.settings-card label span {
  color: #edf5fb;
  font-size: 13px;
  font-weight: 760;
}

.settings-card input:not([type="checkbox"]),
.settings-card select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  color: var(--text);
  background: #111b26;
}

.toggle-row {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.server-spec {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid rgba(42, 168, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(42, 168, 255, 0.08);
}

.server-spec strong {
  color: #f2f8fd;
}

.server-spec p,
.deploy-notes p {
  margin: 0;
  color: #b7c4cf;
  line-height: 1.68;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  color: #c0ccd6;
  font-size: 14px;
  line-height: 1.58;
}

.check-list i {
  color: var(--accent);
  font-size: 18px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.metric-card span {
  color: #92a3b0;
  font-size: 13px;
}

.metric-card strong {
  color: #f4f9fd;
  font-size: 30px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.admin-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-panel.wide {
  grid-row: span 2;
}

.user-admin-panel {
  grid-column: 1 / -1;
}

.admin-table {
  display: grid;
  gap: 8px;
}

.admin-inline-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(29, 42, 54, 0.72);
  border-radius: var(--radius);
  background: rgba(16, 25, 35, 0.5);
}

.admin-inline-form label {
  display: grid;
  gap: 7px;
}

.admin-inline-form label span {
  color: #edf5fb;
  font-size: 13px;
  font-weight: 760;
}

.admin-inline-form input,
.admin-inline-form select,
.admin-inline-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  color: var(--text);
  background: #111b26;
}

.admin-inline-form input,
.admin-inline-form select {
  min-height: 40px;
  padding: 0 11px;
}

.admin-inline-form textarea {
  resize: vertical;
  min-height: 84px;
  padding: 10px 11px;
  line-height: 1.55;
}

.admin-inline-form input:focus,
.admin-inline-form select:focus,
.admin-inline-form textarea:focus {
  border-color: rgba(31, 122, 77, 0.66);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.14);
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(29, 42, 54, 0.72);
  border-radius: var(--radius);
  background: rgba(16, 25, 35, 0.58);
}

.admin-row.user-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-row.category-row,
.admin-row.notice-admin-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-row.category-row strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-row.notice-admin-row span,
.admin-row.notice-admin-row small {
  white-space: normal;
}

.admin-row.notice-admin-row small {
  display: block;
  margin-top: 4px;
  color: #708493;
  font-size: 12px;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.admin-row strong,
.admin-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row strong {
  color: #edf5fb;
  font-size: 14px;
}

.admin-row span {
  margin-top: 4px;
  color: #8fa0ae;
  font-size: 12px;
}

.ghost-button.danger {
  color: #ffb4a8;
  border-color: rgba(255, 120, 100, 0.28);
}

.ghost-button.danger:hover {
  color: #ffd4cc;
  background: rgba(255, 88, 72, 0.12);
}

.security-list {
  display: grid;
  gap: 11px;
}

.security-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
}

.security-item i {
  color: var(--accent);
  font-size: 22px;
}

.security-item strong {
  color: #edf5fb;
  font-size: 14px;
}

.security-item p {
  margin: 5px 0 0;
  color: #aab8c4;
  font-size: 13px;
  line-height: 1.55;
}

.risk-log {
  display: grid;
  gap: 8px;
}

.risk-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border-radius: var(--radius);
  background: rgba(16, 25, 35, 0.62);
}

.risk-item span {
  display: grid;
  place-items: center;
  min-height: 26px;
  border-radius: 6px;
  color: #07101a;
  background: #ffd166;
  font-size: 12px;
  font-weight: 850;
}

.risk-item strong {
  color: #dce7ef;
  font-size: 13px;
}

.risk-item small {
  color: #8395a3;
}

.deploy-notes {
  display: grid;
  gap: 14px;
}

.reference-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reference-row a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(42, 168, 255, 0.22);
  border-radius: var(--radius);
  color: #87d3ff;
  background: rgba(42, 168, 255, 0.08);
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .metric-grid,
  .section-grid,
  .settings-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel.wide {
    grid-row: auto;
  }

  .admin-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .utility-view {
    grid-column: 1;
    padding: 18px 16px;
  }

  .view-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .notice-item,
  .section-card {
    grid-template-columns: 1fr;
  }

  .section-card .ghost-button {
    grid-column: auto;
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .top-actions {
    border-top: 0;
    padding-top: 0;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand strong,
  .brand small {
    display: block;
  }

  .side-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .side-nav a {
    font-size: 0;
  }

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

  .left-rail {
    padding-inline: 16px;
  }

  .toolbar {
    margin-inline: -20px;
  }
}

@media (max-width: 620px) {
  .content-column {
    padding-inline: 14px;
  }

  .toolbar {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .forum-title span {
    white-space: normal;
  }

  .post-card {
    grid-template-columns: 1fr;
  }
}
