:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #e6e8ee;
  --bg: #f3f5f8;
  --card: #fff;
  --nav: #101828;
  --nav-soft: #1d2939;
  --accent: #0f766e;
  --danger: #b42318;
  --shadow: 0 12px 32px #10182814;
  --font: "display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 0.9fr);
}
.gate-brand {
  color: #f8fafc;
  background:
    radial-gradient(500px 280px at 20% 10%, #134e4a, transparent 60%),
    var(--nav);
  padding: 4.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gate-brand img { width: 48px; height: 48px; border-radius: 12px; background: #fff; }
.gate-brand p { margin: 1.4rem 0 0; letter-spacing: 0.18em; font-size: 12px; color: #99f6e4; }
.gate-brand h1 { margin: 0.4rem 0 1rem; font-size: 2rem; font-weight: 650; }
.gate-brand ul { margin: 0; padding: 0; list-style: none; color: #cbd5e1; }
.gate-brand li { padding: 0.35rem 0 0.35rem 0.9rem; border-left: 2px solid #14b8a6; }
.gate-card {
  margin: auto;
  width: min(420px, calc(100% - 3rem));
  display: grid;
  gap: 0.85rem;
}
.gate-card h2 { margin: 0; font-size: 1.6rem; }
.gate-card > p { margin: 0 0 0.4rem; color: var(--muted); }
.gate-error { margin: 0; color: var(--danger); }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.rail {
  color: #e5e7eb;
  background: var(--nav);
  padding: 1.1rem 0.85rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  text-decoration: none;
  padding: 0.35rem 0.55rem 1.1rem;
}
.rail-brand img { width: 32px; height: 32px; border-radius: 8px; background: #fff; }
.rail-brand span { display: grid; font-weight: 650; }
.rail-brand small { color: #98a2b3; font-weight: 400; }
.rail nav { display: grid; gap: 0.35rem; }
.rail button {
  text-align: left;
  color: #d0d5dd;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
}
.rail button b, .rail button span { display: block; }
.rail button span { color: #98a2b3; font-size: 12px; margin-top: 0.1rem; }
.rail button.is-on { color: #fff; background: var(--nav-soft); }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 5;
}
.crumb { margin: 0; color: var(--muted); font-size: 12px; }
.topbar h1 { margin: 0; font-size: 1.15rem; }
.top-actions, .page-actions, .row-actions { display: flex; align-items: center; gap: 0.5rem; }
.who {
  background: #f2f4f7;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 13px;
}
.stage { padding: 1.25rem 1.5rem 2.5rem; }
.subnav { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.subnav button, .editor-tabs button, .filter-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}
.subnav button.is-on, .editor-tabs button.is-on, .filter-btn.is-on {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.toolbar, .card, .table-wrap, .editor, .repeat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.toolbar {
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input, .toolbar select { width: auto; min-width: 10rem; }
.card { padding: 1rem 1.1rem 1.15rem; margin-bottom: 0.9rem; }
.card h2 { margin: 0 0 0.2rem; font-size: 1rem; }
.card-head p, .lede, .empty { color: var(--muted); margin: 0.2rem 0 0.8rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field { display: grid; gap: 0.3rem; color: var(--muted); font-size: 12px; }
.field.wide { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
.admin-btn, .ghost-btn, .text-btn {
  border-radius: 8px;
  padding: 0.48rem 0.85rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.admin-btn { color: #fff; background: var(--accent); }
.ghost-btn { background: #fff; border-color: #d0d5dd; }
.text-btn { color: var(--danger); background: transparent; border-color: transparent; }
.slots { display: grid; gap: 0.7rem; }
.slot {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}
.slot b { color: var(--muted); font-weight: 600; }
.editor { padding: 1rem; }
.editor-tabs { display: flex; gap: 0.4rem; margin: 0.8rem 0; }
.stack { display: grid; gap: 0.75rem; }
.repeat { padding: 0.85rem; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0.8rem; }
.shot-frame, .upload-row img {
  width: 140px; height: 88px; object-fit: cover; border-radius: 8px; background: #f2f4f7;
  display: grid; place-items: center; color: var(--muted); overflow: hidden;
}
.upload-row { display: flex; gap: 0.45rem; align-items: center; }
.upload-row input { flex: 1; }
.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}
.composer textarea[name="body"] { min-height: 280px; }
.side-card { position: sticky; top: 5.2rem; }
.toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  box-shadow: var(--shadow);
  z-index: 20;
}
@media (max-width: 900px) {
  .gate, .shell, .fields, .composer, .repeat { grid-template-columns: 1fr; }
  .gate-brand { display: none; }
  .rail { position: static; height: auto; }
  .shell { grid-template-columns: 1fr; }
}

/* 关于我们 - 媒体配置 */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; }
.media-slot { border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem; background: #fff; display: grid; gap: 0.5rem; }
.media-slot__label { font-size: 13px; font-weight: 600; color: var(--ink); }
.media-slot__preview { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #f2f4f7; display: grid; place-items: center; }
.media-slot__preview img, .media-slot__preview video { width: 100%; height: 100%; object-fit: cover; }
.media-empty { color: var(--muted); font-size: 12px; }
.media-slot__actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.media-slot__kind { color: var(--muted); font-size: 12px; margin-left: auto; }
.admin-btn.sm, .ghost-btn.sm { padding: 0.32rem 0.6rem; font-size: 12px; }
