:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #20242c;
  --muted: #7b8492;
  --line: #c7cbd2;
  --blue: #2f8fe8;
  --discord: #5865f2;
  --gold: #f6c64b;
  --shadow: rgba(18, 26, 36, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 16px 16px, rgba(20, 30, 45, .06) 1px, transparent 1.5px) 0 0 / 18px 18px,
    linear-gradient(180deg, #fff, #eef6ff 46%, #fff);
}
a { color: inherit; }
.page { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, .92);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .05);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span, .icon-tile {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  background: var(--gold);
  border: 2px solid #5b341c;
  box-shadow: 3px 3px 0 #704121;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 10px; }
.topbar nav a { text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.topbar nav a:hover { background: #eaf4ff; }
.hero { text-align: center; padding: 54px 0 30px; }
.hero h1 { font-size: clamp(34px, 6vw, 68px); line-height: 1.05; margin: 0; letter-spacing: -.05em; }
.hero h1 span { display: block; color: var(--blue); }
.search {
  width: min(760px, 100%);
  margin: 22px auto 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--shadow);
}
.search input { border: 0; border-radius: 0; padding: 15px; background: #fff; }
.search button { border: 0; border-left: 2px solid var(--line); border-radius: 0; padding: 15px 24px; background: var(--blue); color: #fff; box-shadow: none; }
.buttons, .official-buttons, .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0,0,0,.15);
}
.btn.primary, button.primary { background: var(--blue); color: #fff; }
.btn.discord { background: var(--discord); color: #fff; }
.section { margin: 32px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section h2 { margin: 0; font-size: 24px; }
.panel, .card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.panel { padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { min-height: 160px; padding: 18px; display: grid; gap: 12px; align-content: space-between; text-decoration: none; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tag { padding: 4px 8px; border: 1px solid #704121; background: #fff6df; border-radius: 3px; font-size: 12px; }
.card h3 { margin: 0; font-size: 18px; }
.card p, .muted { color: var(--muted); line-height: 1.55; margin: 0; }
.list { display: grid; gap: 16px; }
.article-row {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--card);
  border-radius: 18px;
  text-decoration: none;
}
.article-row img { width: 100%; height: 160px; object-fit: cover; border-radius: 9px; background: #dce4ed; }
.article-row h3 { margin: 0 0 10px; font-size: 22px; }
.article-body {
  padding: 26px;
  background: var(--card);
  border-radius: 16px;
  line-height: 1.8;
}
.article-body p { margin: 0 0 12px; }
.guide-image { margin: 18px 0; }
.guide-image img { display: block; width: min(900px, 100%); height: auto; border-radius: 12px; }
.video-box { aspect-ratio: 16 / 9; background: #111; border-radius: 14px; overflow: hidden; }
.video-box iframe { width: 100%; height: 100%; border: 0; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.side { background: #172033; color: #fff; padding: 18px; display: grid; align-content: start; gap: 8px; }
.side-title { font-weight: 700; font-size: 20px; margin-bottom: 12px; }
.side a, .link-btn { color: #fff; text-decoration: none; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.08); box-shadow: none; border: 0; justify-content: flex-start; width: 100%; }
.admin-main { padding: 28px; }
.admin-card {
  max-width: 1080px;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); background: #fff; padding: 28px; border-radius: 18px; box-shadow: 0 16px 45px rgba(0,0,0,.12); }
.field { display: grid; gap: 7px; margin: 12px 0; }
.field span { font-weight: 600; }
input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c8d0da;
  border-radius: 10px;
  font: inherit;
}
textarea { min-height: 180px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.table th, .table td { border-bottom: 1px solid #edf0f4; padding: 10px; text-align: left; vertical-align: top; }
.toolbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.error { color: #c83232; }
.ok { color: #198754; }
@media (max-width: 820px) {
  .topbar, .article-row { grid-template-columns: 1fr; flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .search { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .side { position: static; }
}
