* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.5 "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; color: #1f2329; background: #fff; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:root { --side-w: 220px; --accent: #ff5c33; --soft: #fff1eb; }
html.side-mini { --side-w: 72px; }
::selection { background: #ffd9cc; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(20, 22, 26, .35); z-index: 25; }
.side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); background: #fff; border-right: 1px solid #f0f1f3; display: flex; flex-direction: column; z-index: 30; transition: width .2s ease; overflow: hidden; }
.logo { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 16px; text-decoration: none; flex: none; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.logo-name { font-weight: 800; font-size: 18px; letter-spacing: .04em; }
.logo-name small { display: block; font-size: 11px; color: #8b919a; font-weight: 600; letter-spacing: 0; }
.side nav { overflow: auto; flex: 1; padding: 4px 10px 20px; }
.side a, .side summary { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; text-decoration: none; color: #3a4048; cursor: pointer; }
.side a.on, .side summary:hover, .side a:hover { background: var(--soft); color: var(--accent); }
.side svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.dotwrap { width: 20px; display: grid; place-items: center; flex: none; }
.dotwrap i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.group-label { margin: 16px 10px 4px; font-size: 12px; color: #9aa0a6; }
.pub { margin: 0; }
.pub summary { list-style: none; }
.pub summary::-webkit-details-marker { display: none; }
.pub-sub { padding: 0 0 4px 30px; }
.pub-sub a { min-height: 32px; font-size: 13px; }
.side-foot { margin: 8px 12px 12px; height: 36px; border: 0; background: #f6f7f8; border-radius: 10px; cursor: pointer; }
html.side-mini .word, html.side-mini .group-label, html.side-mini .pub-sub, html.side-mini .logo-name, html.side-mini .side-foot span { display: none; }
html.side-mini .side-foot::before { content: "›"; font-size: 18px; }
.main { margin-left: var(--side-w); min-height: 100vh; transition: margin-left .2s ease; }
.top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 22px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid #f3f4f6; }
.icon-btn { width: 36px; height: 36px; border: 0; background: #f3f4f6; border-radius: 10px; cursor: pointer; }
.search { flex: 1; max-width: 560px; }
.search input { width: 100%; height: 40px; border: 0; background: #f3f4f6; border-radius: 999px; padding: 0 16px; }
.search input:focus { outline: 2px solid #ffd5c8; background: #fff; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-actions > a, .name { text-decoration: none; font-weight: 650; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 650; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: #f4f5f7; text-decoration: none; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: #fff; color: #d92d20; border-color: #ffd2d2; }
.langs { display: inline-flex; border: 1px solid #eee; border-radius: 999px; overflow: hidden; }
.langs a { padding: 4px 8px; text-decoration: none; color: #8b919a; font-size: 12px; font-weight: 700; }
.langs a.on { background: var(--soft); color: var(--accent); }
.content { padding: 22px 28px 72px; }
.alert { background: #fff1f0; color: #b42318; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.alert.ok { background: #eefbf3; color: #067647; }
.hero { position: relative; height: 320px; border-radius: 16px; overflow: hidden; margin-bottom: 18px; background: #f3f4f6; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .45s; color: #fff; display: flex; align-items: flex-end; padding: 36px 64px; text-decoration: none; }
.slide.on { opacity: 1; z-index: 1; }
.slide em { font-style: normal; letter-spacing: .12em; font-size: 12px; }
.slide strong { display: block; margin-top: 8px; font-size: 32px; line-height: 1.25; max-width: 14em; }
.slide span { display: block; margin-top: 8px; max-width: 34em; }
.hero .nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); cursor: pointer; }
.hero .prev { left: 12px; }
.hero .next { right: 12px; }
.dots { position: absolute; left: 64px; bottom: 18px; z-index: 2; display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); padding: 0; cursor: pointer; }
.dot.on { background: #fff; width: 18px; border-radius: 99px; }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tile { min-height: 96px; border-radius: 14px; padding: 14px 16px; color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; }
.tile b { font-size: 28px; line-height: 1; }
.tile span { margin-top: 6px; }
.tile small { opacity: .85; font-size: 12px; }
.tabs { display: flex; gap: 6px; margin: 22px 0 18px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; border-radius: 999px; text-decoration: none; color: #5c6370; }
.tabs a.on { background: var(--soft); color: var(--accent); font-weight: 750; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.card { display: block; text-decoration: none; }
.cover { position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .cover img { transform: scale(1.04); }
.ribbon { position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,.92); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.card h3 { margin: 10px 2px 8px; font-size: 15px; line-height: 1.45; height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta { display: flex; align-items: center; gap: 8px; color: #8b919a; font-size: 12px; padding: 0 2px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.author { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #f4f5f7; color: #5c6370; font-size: 12px; font-style: normal; }
.chip.hot { background: var(--soft); color: var(--accent); }
.chip.warn { background: #fff6e8; color: #9a6700; }
.page-head h1 { font-size: 28px; margin: 0 0 6px; }
.lead, .muted { color: #6b7280; }
.page-head { margin-bottom: 16px; }
.empty, .empty-page { padding: 56px 0; text-align: center; color: #8b919a; }
.empty-page h1 { color: #1f2329; font-size: 28px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.crumb { color: #8b919a; font-size: 13px; }
.detail h1 { font-size: 32px; line-height: 1.3; margin: 8px 0; }
.summary { font-size: 16px; color: #3c424b; margin-top: 0; }
.hero-cover { border-radius: 16px; overflow: hidden; margin: 8px 0 12px; aspect-ratio: 16/8; }
.hero-cover img, .hero-cover .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.actions form { margin: 0; }
.act { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #eee; background: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.act.on { background: var(--soft); border-color: #ffd7c8; color: var(--accent); }
.block { margin: 22px 0; }
.block h2 { font-size: 18px; margin: 0 0 8px; }
.md { line-height: 1.75; font-size: 15px; }
.md p { margin: 0 0 10px; }
.md pre { background: #1f2329; color: #f6f7f9; padding: 14px 16px; border-radius: 12px; overflow: auto; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md p code, .md li code { background: #f4f5f7; padding: 1px 5px; border-radius: 6px; }
.md a { color: var(--accent); }
.side-card { border: 1px solid #f0f1f3; border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.who { display: flex; gap: 10px; align-items: center; }
.who .avatar { width: 40px; height: 40px; font-size: 16px; }
.rel { display: flex; gap: 10px; margin-top: 12px; text-decoration: none; }
.rel img, .rel .ph { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.rel b { display: block; font-size: 13px; line-height: 1.4; }
.comment { padding: 12px 0; border-top: 1px solid #f2f3f5; }
.comment .name { font-weight: 750; margin-right: 8px; }
.stack { display: grid; gap: 14px; max-width: 760px; }
label.f { display: grid; gap: 6px; font-size: 13px; color: #4b5563; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=file], textarea, select {
  width: 100%; border: 1px solid #e6e8ee; border-radius: 10px; padding: 10px 12px; background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid #ffd5c8; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.colors { display: flex; gap: 8px; }
.colors input[type=color] { width: 48px; height: 40px; padding: 4px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; }
.admin-nav a { text-decoration: none; color: #5c6370; padding: 6px 10px; border-radius: 8px; }
.admin-nav a.on { background: var(--soft); color: var(--accent); font-weight: 750; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fafafa; border-radius: 14px; padding: 16px; }
.stat b { display: block; font-size: 28px; }
.admin-row, .user-row, .banner-card, .cat-card { padding: 14px 0; border-top: 1px solid #f2f3f5; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.row-actions, .inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions input[type=text] { width: 180px; }
.banner-card .stack, .cat-card .stack { max-width: none; }
.comment-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #f2f3f5; }
@media (min-width: 1560px) { .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  html, html.side-mini { --side-w: 220px; }
  .side { transform: translateX(-105%); }
  html.nav-open .side { transform: none; }
  html.nav-open .scrim { display: block; }
  .main { margin-left: 0; }
  .cards, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { height: 240px; }
  .slide { padding: 24px; }
  .slide strong { font-size: 24px; }
  .content { padding: 16px; }
  .top { padding: 0 12px; }
  .name { display: none; }
}
@media (max-width: 560px) {
  .cards, .tiles, .stats, .two, .admin-row { grid-template-columns: 1fr; }
}
