/* 运营台视觉收敛：暖白编辑部，不使用渐变、玻璃或装饰性动效。 */
:root {
  --bg0: #f4f0e8;
  --bg1: #f4f0e8;
  --panel: #fffdf8;
  --panel-2: #f7f1e7;
  --line: #ded5c7;
  --text: #292722;
  --muted: #756f66;
  --accent: #a83f2a;
  --accent-2: #356a55;
  --warn: #a16207;
  --danger-ink: #8f2f24;
  --ok-ink: #285b46;
  --info-ink: #385c72;
  --shadow: 0 10px 28px rgba(62, 48, 35, 0.09);
  --radius: 18px;
  --focus: 0 0 0 3px rgba(168, 63, 42, 0.22);
}

html, body { background: var(--bg0); color: var(--text); }
.bg-atmosphere { background: #f4f0e8; }
.bg-atmosphere::after { display: none; }
.topbar {
  background: #fffdf8;
  border-bottom-color: var(--line);
  backdrop-filter: none;
  padding: 18px 26px;
}
.side-nav { background: #eee7dc; border-right-color: var(--line); padding: 22px 14px; }
.nav-item { color: #49443d; min-height: 44px; font-weight: 600; }
.nav-item:hover { background: #fff8ed; border-color: #d8cabb; transform: none; }
.nav-item.active { color: #fff; background: #963a28; border-color: #963a28; }
.view-root { padding: 30px clamp(22px, 3vw, 48px) 48px; }
.view-root > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.card { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.card:hover { border-color: #cfc3b3; }
.btn { background: #963a28; color: #fff; border-color: #963a28; min-height: 44px; }
.btn:hover:not(:disabled) { background: #7e3022; border-color: #7e3022; transform: translateY(-1px); }
.btn.secondary { background: #fffdf8; color: #3d3933; border-color: #cfc3b3; }
.btn.secondary:hover:not(:disabled) { background: #f4ede2; border-color: #b6a895; }
input, select, textarea { background: #fff; color: var(--text); border-color: #cfc3b3; min-height: 44px; }
.chip { background: #f1eadf; color: #575047; border-color: #d9cfc0; }
.chip-ok { background: #e5efe8; color: #285b46; border-color: #bad1c2; }
.chip-info { background: #e8eff2; color: #385c72; border-color: #c0d0d7; }
.chip-warn { background: #f7ecd1; color: #865707; border-color: #e3c982; }
.delivery-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border: 1px solid; border-radius: 999px; font-size: .76rem; font-weight: 850; }
.delivery-chip.is-unsent { color: #8a4b14; border-color: #dfbd8f; background: #fff2de; }
.delivery-chip.is-sent { color: #245a42; border-color: #a9cbb8; background: #e5f2ea; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.entry-card { min-height: 172px; display: flex; flex-direction: column; justify-content: space-between; }
.entry-kicker { color: var(--accent); font-weight: 700; font-size: .78rem; letter-spacing: .08em; }
.entry-card .btn { align-self: flex-start; }
.readiness-strip { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; }
.metric-box { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #faf6ef; }
.metric-box strong { display: block; margin-top: 4px; font-size: 1.55rem; }
.output-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.output-script-review { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.output-script-review summary { color: var(--brand, #8d3828); font-weight: 700; cursor: pointer; }
.output-script-review[open] summary { margin-bottom: 12px; }
.output-script-headline { margin: 4px 0 0; font-size: 1.05rem; font-weight: 800; line-height: 1.45; }
.output-script-lines { display: grid; gap: 9px; margin: 6px 0 0; padding-left: 22px; }
.output-script-lines li { padding-left: 3px; }
.output-script-lines strong, .output-script-lines span { display: block; }
.output-script-lines span { margin-top: 2px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.output-material-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 62px; gap: 8px; overflow-x: auto; padding: 3px 0 7px; }
.output-material-strip img { width: 62px; height: 82px; border-radius: 9px; object-fit: cover; background: #eee6da; }
.output-thumb { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #e8e0d4; border-radius: 13px; border: 1px solid var(--line); }
.output-placeholder { display: grid; place-items: center; color: var(--muted); }
.output-meta { overflow-wrap: anywhere; }
.admin-publish-card { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border: 1px solid #dfd2c1; border-radius: 14px; background: #faf4e9; }
.admin-publish-card .eyebrow { margin: 0 0 3px; }
.admin-publish-body { margin: 0; color: var(--text); line-height: 1.65; white-space: pre-wrap; user-select: text; }
.admin-publish-tags { margin: 0; color: var(--accent-2); font-weight: 700; line-height: 1.6; user-select: text; }
.admin-bgm-summary { margin: 10px 0 0; color: var(--accent-2); line-height: 1.5; }
.batch-callout { border-left: 4px solid var(--accent); }
.entry-card-featured {
  min-height: 210px;
  border-top: 5px solid var(--accent);
  background: #fffaf2;
}
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-number { margin-bottom: 7px; color: var(--accent); font: 700 .72rem/1.2 var(--font-display); letter-spacing: .14em; }
.text-btn { min-height: 36px; padding: 0; color: var(--accent); text-align: left; border: 0; background: transparent; cursor: pointer; font-weight: 600; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; color: var(--text); border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 1.6rem; }
@media (max-width: 980px) {
  .entry-grid, .readiness-strip { grid-template-columns: 1fr; }
  .shell-body { grid-template-columns: 190px 1fr; }
}
@media (max-width: 720px) {
  .app-shell { height: 100dvh; max-height: 100dvh; }
  .topbar { padding: 12px 14px; align-items: flex-start; }
  .topbar-meta { justify-content: flex-end; }
  .shell-body { display: flex; flex-direction: column; }
  .side-nav {
    flex: 0 0 auto;
    width: 100%;
    min-height: 60px;
    padding: 8px 10px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin;
  }
  .nav-item { flex: 0 0 auto; min-width: max-content; min-height: 44px; padding: 9px 14px; text-align: left; white-space: nowrap; }
  .view-root { flex: 1 1 auto; width: 100%; padding: 18px 14px 40px; }
  .section-heading { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.admin-material-thumb { width: 58px; height: 76px; padding: 0; overflow: hidden; border: 1px solid var(--line, #ddd2c2); border-radius: 10px; background: #eee6da; cursor: pointer; }
.admin-material-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.admin-material-head { align-items: end; }
.admin-material-toolbar { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(180px, 1.5fr) repeat(3, minmax(130px, .8fr)); gap: 12px; align-items: end; }
.admin-material-toolbar label { min-width: 0; }
.admin-material-summary, .admin-material-batch { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-material-upload { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(150px, .7fr) minmax(220px, 1.2fr) auto; gap: 12px; align-items: end; }
.admin-material-upload .form-msg { grid-column: 1 / -1; }
.admin-material-batch { position: sticky; top: 74px; z-index: 5; padding: 12px 16px; background: rgba(255,253,248,.94); backdrop-filter: blur(12px); }
.admin-material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.admin-material-card { padding: 0; overflow: hidden; }
.admin-material-card.is-recycled { opacity: .72; background: #f3eee7; }
.admin-material-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #201a16; cursor: pointer; aspect-ratio: 16 / 10; overflow: hidden; }
.admin-material-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.admin-material-preview:hover img { transform: scale(1.025); }
.admin-material-preview > span:last-child:not(.admin-material-placeholder) { position: absolute; right: 10px; bottom: 10px; padding: 4px 7px; border-radius: 7px; background: rgba(20,16,13,.76); color: #fff; font-size: .72rem; font-weight: 700; }
.admin-material-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #c7bcae; }
.admin-material-card-body { display: grid; gap: 11px; padding: 15px; }
.admin-material-card-body h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.admin-material-select { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; }
.admin-material-select input { width: 18px; height: 18px; }
.admin-material-stats { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; background: #f7f1e8; color: var(--muted); font-size: .75rem; }
.admin-material-stats strong { color: var(--text); }
.btn.danger { background: #fff5f2; color: #9b2f23; border-color: #e7b6ae; }
.btn.danger:hover:not(:disabled) { background: #fce7e2; border-color: #d99084; }
.admin-material-dialog { width: min(560px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 20px; background: transparent; }
.admin-material-dialog::backdrop { background: rgba(31,24,19,.48); backdrop-filter: blur(4px); }
.admin-material-dialog .card { margin: 0; max-height: min(760px, calc(100vh - 40px)); overflow-y: auto; }
.admin-material-dialog fieldset { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.admin-material-dialog .chip input { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .admin-material-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-material-summary, .admin-material-batch { align-items: flex-start; flex-direction: column; }
  .admin-material-upload { grid-template-columns: 1fr 1fr; }
  .admin-material-batch { top: 62px; }
}

@media (max-width: 560px) {
  .admin-material-toolbar { grid-template-columns: 1fr; }
  .admin-material-upload { grid-template-columns: 1fr; }
  .admin-material-grid { grid-template-columns: 1fr; }
  .admin-material-batch .actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}
