/* 舌尖上的中国 · 数字地图内容管理 */
body { background: #f4f0e7; }

#gate { position: fixed; inset: 0; z-index: 3000; background: rgba(28,25,22,.9); display: flex; align-items: center; justify-content: center; }
#gate .box { width: min(420px, calc(100vw - 40px)); background: #fbf8f1; border: 1px solid #ddd4c3; border-radius: 14px; padding: 36px 34px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
#gate .seal { width: 56px; height: 56px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; background: var(--red); color: #fff8ec; border-radius: 8px; font-family: var(--serif); font-size: 24px; font-weight: 900; }
#gate h2 { font-family: var(--serif); font-size: 25px; margin: 0 0 8px; letter-spacing: 2px; }
#gate p { color: var(--ink-soft); font-size: 13px; margin: 0 0 20px; }
#gate input { width: 100%; border: 1px solid #c9bda6; background: #fff; padding: 12px 14px; border-radius: 7px; font-size: 15px; text-align: center; letter-spacing: 3px; }
#gate button { width: 100%; margin-top: 14px; border: 0; background: var(--red); color: #fff; padding: 12px; border-radius: 7px; font-size: 15px; letter-spacing: 4px; cursor: pointer; }
#gate .err { min-height: 20px; margin-top: 8px; color: var(--red); font-size: 12.5px; }

#admin-toolbar { position: sticky; top: 76px; z-index: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px clamp(16px, 3vw, 42px); background: #fffdf8; border-bottom: 1px solid var(--line); }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: 8px 13px; font-size: 12.5px; cursor: pointer; }
.btn:hover { border-color: var(--gold); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; }
.sp { flex: 1; }
#save-state { color: var(--ink-soft); font-size: 12px; }

#admin-main { display: grid; grid-template-columns: minmax(300px, 40%) 1fr; gap: 0; min-height: calc(100vh - 150px); }
#list-col { border-right: 1px solid var(--line); background: #fffdf8; display: flex; flex-direction: column; max-height: calc(100vh - 150px); position: sticky; top: 150px; }
#list-toolbar { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
#list-toolbar input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; font-size: 13px; }
#season-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
#season-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
#season-tabs button.active { background: var(--red); border-color: var(--red); color: #fff; }
#list-stats { padding: 10px 16px 6px; font-size: 12px; color: var(--ink-soft); }
#node-list { overflow-y: auto; flex: 1; }
.node-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 11px 16px; border-bottom: 1px solid #eee8dc; cursor: pointer; }
.node-item:hover { background: #f6efe1; }
.node-item.active { background: #efe4d0; box-shadow: inset 3px 0 0 var(--red); }
.node-item b { font-size: 14px; }
.node-item small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 11.5px; }
.node-item .tag { font-size: 11px; color: var(--gold); white-space: nowrap; }

#edit-col { padding: 18px clamp(16px, 2.5vw, 34px) 50px; }
#form-title { font-family: var(--serif); font-size: 20px; margin: 4px 0 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; max-width: 900px; }
.f-item { display: flex; flex-direction: column; gap: 5px; }
.f-item.full { grid-column: 1 / -1; }
.f-item label { font-size: 12px; color: var(--red); letter-spacing: .5px; }
.f-item input, .f-item select, .f-item textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.f-item textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.f-item input:disabled { background: #f1ece2; color: #8a7f70; }
.hint { color: var(--ink-soft); font-size: 11.5px; }
#mini-map { height: 220px; border: 1px solid var(--line); border-radius: 8px; background: #e9e3d6; }
#edit-actions { display: flex; gap: 8px; margin-top: 20px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(18px); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 20px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 2500; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#site-footer { background: #252525; color: #9a9a9a; text-align: center; padding: 18px 20px; font-size: 12px; line-height: 1.8; }

@media (max-width: 900px) {
  #admin-toolbar { top: 64px; }
  #admin-main { grid-template-columns: 1fr; }
  #list-col { position: static; max-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
}
