:root {
  --brand-red: #c71f2d;
  --deep-red: #8f1720;
  --ink: #23262d;
  --ink-soft: #3f4652;
  --muted: #6d7480;
  --line: #e5e0dc;
  --paper: #ffffff;
  --soft: #f6f4f1;
  --warm: #fbf7f3;
  --rose: #fff3f1;
  --shadow: 0 18px 42px rgba(82, 34, 27, .08);
}

* { box-sizing: border-box; }

html { background: var(--soft); }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fff 0, var(--soft) 360px),
    var(--soft);
}

a {
  color: var(--deep-red);
  text-decoration: none;
}

a:hover { color: var(--brand-red); }

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(199, 31, 45, .2);
  box-shadow: 0 8px 28px rgba(54, 35, 32, .05);
  z-index: 3;
}

.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--brand-red);
}

.header-inner {
  min-height: 88px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 42px;
}

.brand {
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 310px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 3px;
  line-height: 1.12;
}

.brand-text strong {
  color: var(--brand-red);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text small {
  color: var(--deep-red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  font-weight: 700;
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand-red);
  background: var(--rose);
  border-color: var(--brand-red);
}

.page-shell {
  flex: 1 0 auto;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 76px;
}

.notice-page { padding-top: 40px; }

.hero-panel {
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .8fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 42px 46px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(143, 23, 32, .96), rgba(199, 31, 45, .88)),
    var(--brand-red);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 42px solid rgba(255, 255, 255, .08);
  transform: rotate(45deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, .82);
}

.hero-copy h1,
.page-heading h1,
.staff-toolbar h1,
.notice-card h1,
.notice-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero-copy h1 {
  position: relative;
  max-width: 720px;
  font-size: 36px;
  line-height: 1.18;
  font-weight: 800;
  word-break: keep-all;
}

.hero-copy p:last-child {
  position: relative;
  max-width: 56ch;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
  line-height: 1.8;
}

.trust-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.trust-panel span {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 18px;
  color: var(--deep-red);
  background: var(--warm);
  border: 1px solid #efe3dd;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
}

.notice-card,
.report-form,
.data-table {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-red);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.notice-card {
  padding: 34px;
}

.section-heading,
.page-heading,
.staff-toolbar {
  margin-bottom: 22px;
}

.section-heading h2,
.page-heading h1,
.staff-toolbar h1 {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.25;
}

.page-heading p:last-child {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.rules {
  margin: 0;
  padding-left: 24px;
  color: var(--ink-soft);
  line-height: 2;
}

.rules > li {
  margin: 0 0 14px;
}

.rules ol {
  margin-top: 8px;
  padding-left: 24px;
}

.chinese-rules {
  padding-left: 0;
  list-style: none;
}

.chinese-rules > li {
  position: relative;
}

.rule-prefix {
  color: var(--ink);
  font-weight: 800;
}

.inline-detail-button {
  display: inline;
  margin: 0 0 0 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-red);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inline-detail-button:hover {
  color: var(--deep-red);
  text-decoration: underline;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 24, .48);
}

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

.notice-dialog {
  width: min(760px, 100%);
  max-height: min(76dvh, 760px);
  overflow: auto;
  background: var(--paper);
  border-radius: 8px;
  border-top: 4px solid var(--brand-red);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .26);
}

.dialog-heading {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.dialog-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dialog-content {
  padding: 22px;
  color: var(--ink-soft);
  line-height: 1.9;
}

.dialog-content p {
  margin: 0;
  text-indent: 2em;
}

.notice-actions {
  margin-top: 30px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--warm);
  border: 1px solid #efe3dd;
  border-radius: 8px;
}

.confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.confirm input {
  width: auto;
  min-height: auto;
  accent-color: var(--brand-red);
}

.actions,
.admin-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--brand-red);
  border-radius: 4px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  color: #fff;
  background: var(--brand-red);
  box-shadow: 0 10px 22px rgba(199, 31, 45, .16);
}

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

.button.secondary {
  color: var(--brand-red);
  background: #fff;
}

.button.secondary:hover {
  background: var(--rose);
}

.is-disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
}

.form-page,
.admin-page,
.result-page {
  max-width: 1040px;
}

.report-form {
  display: grid;
  gap: 18px;
  padding: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6d2cd;
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(199, 31, 45, .12);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--brand-red);
  background: #fffafa;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

.helper,
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.file-manager {
  display: grid;
  gap: 10px;
}

.selected-files {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-files li {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.file-remove {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(199, 31, 45, .24);
  border-radius: 4px;
  color: var(--deep-red);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.rich-editor {
  display: grid;
  gap: 10px;
}

.rich-editor-label {
  color: var(--ink);
  font-weight: 800;
}

.editor-toolbar {
  position: sticky;
  top: 96px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"] {
  width: auto;
  min-height: 34px;
}

.editor-toolbar button {
  padding: 0 10px;
  border: 1px solid #d6d2cd;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.editor-toolbar button.is-active {
  color: #fff;
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.rich-editor-surface {
  min-height: 260px;
  padding: 14px 16px;
  border: 1px solid #d6d2cd;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  line-height: 1.9;
  outline: none;
}

.rich-editor-surface:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(199, 31, 45, .12);
}

.field-error {
  min-height: 20px;
  margin: -12px 0 0;
  color: var(--deep-red);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.error-box {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--brand-red);
  background: var(--rose);
  color: var(--deep-red);
  border-radius: 4px;
}

.success-box {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid #20835a;
  background: #eefaf4;
  color: #146443;
  border-radius: 4px;
}

.result-card {
  text-align: left;
}

.result-card h1 {
  color: var(--deep-red);
  font-size: 32px;
}

.result-card p {
  color: var(--ink-soft);
  line-height: 1.8;
}

.content-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-list-item {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.content-list-item:last-child {
  border-bottom: 0;
}

.content-list-item a {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.content-list-item span {
  color: var(--muted);
  font-size: 14px;
}

.article-body {
  margin-top: 22px;
  color: var(--ink-soft);
  line-height: 2;
}

.article-body p,
.article-body div,
.article-body blockquote,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body ul,
.article-body ol {
  margin: 0 0 16px;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--ink);
  line-height: 1.45;
}

.article-body blockquote {
  padding-left: 16px;
  border-left: 4px solid var(--line);
}

.staff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--deep-red);
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin: 22px 0 18px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--deep-red);
  background: var(--warm);
  font-size: 14px;
  font-weight: 800;
}

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

.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.row-actions form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--deep-red);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.link-button:hover {
  color: var(--brand-red);
}

.link-button.danger {
  color: var(--brand-red);
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: var(--deep-red);
  background: var(--rose);
  border: 1px solid rgba(199, 31, 45, .2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.query-result {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0;
  margin: 0 0 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-red);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.query-result dt,
.query-result dd {
  margin: 0;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.query-result dt {
  color: var(--muted);
  background: var(--warm);
  font-weight: 800;
}

.query-result dd {
  color: var(--ink-soft);
  line-height: 1.8;
}

.query-result dt:last-of-type,
.query-result dd:last-of-type {
  border-bottom: 0;
}

.attachments {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.attachments li {
  color: var(--ink-soft);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(199, 31, 45, .18);
  background: #fff;
}

.footer-inner {
  width: min(1160px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .header-inner {
    min-height: auto;
    padding: 16px 22px;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .brand { min-width: 0; }

  .site-nav {
    margin-left: 0;
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .trust-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 28px, 1160px);
    padding: 28px 0 52px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-text strong { font-size: 19px; }

  .site-nav a {
    padding: 0 10px;
    min-height: 38px;
    font-size: 14px;
  }

  .hero-copy {
    min-height: 0;
    padding: 30px 24px;
  }

  .hero-copy h1 {
    font-size: 29px;
    word-break: normal;
  }

  .hero-copy p:last-child {
    font-size: 16px;
  }

  .trust-panel,
  .filters,
  .query-result {
    grid-template-columns: 1fr;
  }

  .trust-panel span {
    min-height: 76px;
  }

  .notice-card,
  .report-form {
    padding: 22px;
  }

  .notice-actions,
  .staff-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .footer-inner {
    width: min(100% - 28px, 1160px);
    justify-content: flex-start;
  }
}
