:root {
  --bg: #f5f1e8;
  --panel: #fffdf8;
  --ink: #1f2937;
  --muted: #667085;
  --line: #e9dcc7;
  --accent: #b45309;
  --accent-dark: #7c2d12;
  --shadow: 0 18px 40px rgba(110, 74, 28, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f2e8 0%, #f1ebe0 100%);
  min-height: 100vh;
}

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

.hero,
.page-shell,
.admin-shell,
.detail-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 32px 0 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 52px);
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.nav a,
.chip,
.primary-btn,
.link-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  padding: 10px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav a:hover,
.chip:hover,
.primary-btn:hover,
.link-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.page-shell,
.admin-shell {
  padding-bottom: 48px;
}

.section-block,
.panel,
.detail-card {
  background: var(--panel);
  border: 1px solid rgba(180, 83, 9, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-block {
  padding: 22px;
  margin-bottom: 22px;
}

.subsection-grid,
.content-list {
  display: grid;
  gap: 16px;
}

.subsection-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.subsection-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8ef 100%);
}

.content-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.content-item:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.content-item p {
  color: var(--muted);
  line-height: 1.6;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chip,
.link-btn,
.primary-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
}

.primary-btn {
  background: linear-gradient(135deg, #b45309, #c2410c);
  color: #fff;
  border: none;
  padding-inline: 18px;
}

.secondary-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
}

.danger-btn {
  border-color: #fda4af;
  color: #b42318;
}

.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.panel {
  padding: 22px;
}

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

.panel-head input {
  width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.board-filter {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.status-text {
  margin-top: 14px;
  color: var(--accent-dark);
  line-height: 1.6;
  word-break: break-all;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card,
.user-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8ef 100%);
}

.stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
}

.user-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.user-card__stats {
  min-width: 92px;
  text-align: right;
}

.user-card__stats strong {
  display: block;
  font-size: 30px;
}

.user-card__stats span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.empty {
  color: var(--muted);
}

.detail-shell {
  padding: 42px 0;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(180, 83, 9, 0.14);
}

.detail-card {
  padding: 28px;
}

.detail-meta {
  color: var(--muted);
  margin-bottom: 16px;
}

.detail-body {
  line-height: 1.8;
  white-space: pre-wrap;
}

.share-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  box-shadow: 0 18px 40px rgba(31, 41, 55, 0.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 99;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.share-toast.is-error {
  background: rgba(180, 35, 24, 0.94);
}

.share-guide {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}

.share-guide.is-visible {
  display: block;
}

.share-guide__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.share-guide__panel {
  position: relative;
  width: min(360px, calc(100vw - 24px));
  margin: 24px 16px 0 auto;
  padding: 22px 18px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffefb 0%, #fff8ef 100%);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
}

.share-guide__arrow {
  position: absolute;
  top: -12px;
  right: 28px;
  width: 22px;
  height: 22px;
  border-top: 4px solid var(--accent-dark);
  border-right: 4px solid var(--accent-dark);
  transform: rotate(-45deg);
}

.share-guide__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.share-guide__title {
  margin: 0 28px 8px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-dark);
}

.share-guide__desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 640px) {
  .hero,
  .page-shell,
  .admin-shell,
  .detail-shell,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .hero h1 {
    font-size: 34px;
  }

  .panel-head,
  .user-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-card__stats {
    text-align: left;
  }
}
