:root {
  --bg: #fff7fb;
  --paper: #ffffff;
  --text: #2f2732;
  --muted: #756475;
  --pink: #ff74ad;
  --line: rgba(255, 116, 173, .25);
  --dark: #2f2732;
  --shadow: 0 16px 50px rgba(255, 116, 173, .16);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-rounded, "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #ffd2e5, transparent 34rem), linear-gradient(180deg, #fff7fb, #fff);
}
a { color: inherit; }
.admin-app { width: min(1220px, 94vw); margin: 0 auto; padding: 28px 0 60px; }
.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.admin-head h1 { font-size: clamp(2rem, 5vw, 4rem); margin: 0; letter-spacing: -.04em; }
.admin-head p { color: var(--muted); margin: 8px 0 0; }
.eyebrow { color: var(--pink); font-size: .82rem; font-weight: 900; letter-spacing: .18em; margin: 0 0 8px; }
.panel {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.login-panel { max-width: 560px; }
code { background: #fff1f8; color: #b82364; padding: 2px 6px; border-radius: 8px; }
.btn {
  border: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
  color: var(--text);
}
.btn.primary { background: linear-gradient(135deg, var(--pink), #ff9bc5); color: white; border-color: transparent; }
.btn.danger { background: #2f2732; color: white; border-color: transparent; }
.btn.ghost { text-decoration: none; display: inline-flex; }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.head-actions, .row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.toolbar p { margin: 4px 0 0; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.tabs button {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}
.tabs button.active { color: white; background: var(--pink); border-color: var(--pink); }
.tab { display: none; }
.tab.active { display: block; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid { grid-template-columns: 280px 1fr; align-items: start; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}
textarea { resize: vertical; line-height: 1.7; }
input:focus, textarea:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 116, 173, .12); }
.list { display: grid; gap: 8px; }
.list button {
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  color: var(--text);
}
.list button.active { background: #fff1f8; border-color: var(--pink); }
.edit-box, .item-card, .upload-box {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  padding: 18px;
}
.item-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.item-card .fields { display: grid; gap: 10px; }
.character-row { border: 1px dashed var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 10px; }
.msg { color: #b82364; font-weight: 800; }
#jsonEditor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
@media (max-width: 840px) {
  .admin-head, .toolbar, .row-between { align-items: flex-start; flex-direction: column; }
  .grid.two, .admin-grid { grid-template-columns: 1fr; }
}
