.notice-board {
  padding-top: 24px;
}

.notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.notice-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.4px;
}

.notice-count {
  font-size: 12px;
  color: var(--subtext);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface);
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-item {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
}

.notice-item.pin {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line) 65%);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface) 90%);
}

.notice-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.notice-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  color: var(--subtext);
  font-size: 12px;
  flex: 0 0 auto;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  height: 22px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 700;
  background: var(--badge-bg);
  color: var(--text);
}

.notice-badge.new {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface) 82%);
  color: var(--accent);
}

.notice-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.notice-section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notice-admin-record {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 16px;
}

.notice-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.notice-admin-record-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.notice-admin-record-item em {
  font-style: normal;
  font-size: 12px;
  color: var(--subtext);
}

.notice-admin-record-item strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notice-history-wrap {
  margin-top: 14px;
}

.notice-history-wrap h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--subtext);
  font-weight: 700;
}

.notice-history-help {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--subtext);
}

.notice-history-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  table-layout: fixed;
}

.notice-history-table th,
.notice-history-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
}

.notice-history-table th {
  background: color-mix(in srgb, var(--surface) 70%, var(--bg) 30%);
  color: var(--subtext);
  font-weight: 700;
}

.notice-history-table .notice-col-select,
.notice-history-table th:first-child,
.notice-history-table td:first-child {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
}

.notice-history-table td {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-history-table .notice-col-category,
.notice-history-table .notice-col-status {
  width: 100px;
}

.notice-history-table .notice-col-status {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.notice-history-table .notice-col-content {
  width: auto;
}

.notice-history-table .notice-col-author {
  width: 220px;
}

.notice-history-table .notice-col-created,
.notice-history-table .notice-col-updated {
  width: 138px;
}

.notice-history-table th:nth-child(1),
.notice-history-table td:nth-child(1),
.notice-history-table th:nth-child(2),
.notice-history-table td:nth-child(2) {
  padding-left: 8px;
  padding-right: 8px;
}

.notice-history-row.active td {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface) 92%);
}

.notice-history-table.is-delete-mode tbody tr.notice-history-row:hover td {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface) 88%);
}

.notice-history-row.delete-selected td {
  background: color-mix(in srgb, var(--danger) 16%, var(--surface) 84%);
}

.notice-history-row.delete-selected:hover td {
  background: color-mix(in srgb, var(--danger) 20%, var(--surface) 80%);
}

.notice-history-select-cell {
  text-align: center;
}

.notice-history-row .notice-history-content-cell {
  transition: background-color 120ms ease;
  position: relative;
}

.notice-history-delete-order {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--danger) 45%, white 55%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.notice-history-select-box {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.notice-history-table .notice-col-subtitle {
  width: 220px;
}

.notice-history-visibility-select {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 13px;
  text-align: center;
  text-align-last: center;
}

.notice-subtitle {
  margin: 4px 0 0;
  color: var(--subtext);
  font-size: 15px;
  line-height: 1.4;
}

.notice-history-select-box:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, white 45%);
  outline-offset: 2px;
}

.notice-history-visibility-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.notice-history-visibility-badge.is-visible {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface) 86%);
  color: var(--accent);
}

.notice-history-visibility-badge.is-hidden {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface) 88%);
  color: var(--danger);
}

.notice-author {
  font-size: 12px;
  color: var(--subtext);
}

.notice-history-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
}

.notice-history-author-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  position: relative;
  overflow: visible !important;
}

.notice-history-author-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-history-editors-btn {
  flex: 0 0 auto;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line) 72%);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface) 88%);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  cursor: pointer;
}

.notice-history-editors-btn:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface) 82%);
}

.notice-history-editors-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notice-history-editors-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--bg) 10%);
  padding: 6px 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  z-index: 30;
}

.notice-history-editors-popover {
  position: absolute;
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--bg) 10%);
  padding: 8px 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  z-index: 1000;
}

.notice-history-editors-origin {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--subtext);
}

.notice-history-editors-panel strong {
  display: block;
  font-size: 13px;
  color: var(--subtext);
  margin-bottom: 4px;
}

.notice-history-editors-panel ul {
  margin: 0;
  padding-left: 14px;
}

.notice-history-editors-panel li {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.notice-history-editors-popover strong {
  display: block;
  font-size: 13px;
  color: var(--subtext);
  margin-bottom: 4px;
}

.notice-history-editors-popover ul {
  margin: 0;
  padding-left: 14px;
}

.notice-history-editors-popover li {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.notice-history-select {
  padding-right: 6px;
}

.notice-badge.notice-badge-status {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface) 86%);
  color: var(--accent);
}

.notice-history-table tbody tr:hover td {
  background: color-mix(in srgb, var(--surface) 72%, var(--bg) 28%);
}

.notice-history-table tbody tr:active td {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface) 90%);
}

.notice-history-row {
  cursor: pointer;
}

.notice-history-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 780px) {
  .notice-head h2 {
    font-size: 22px;
  }

  .notice-admin-record {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .notice-form-grid {
    grid-template-columns: 1fr;
  }

  .notice-history-table {
    display: block;
    overflow-x: auto;
  }

  .notice-admin-record-item {
    width: auto;
  }

  .notice-admin-record-item strong {
    max-width: none;
  }

  @media (max-width: 520px) {
    .notice-admin-record {
      grid-template-columns: 1fr;
    }
  }
}
