/* ============ 热红玖文旅 · 景区管理后台 ============ */
:root {
  --wine: #7a1e28;        /* 酒红 */
  --wine-deep: #5c1219;
  --paper: #fbf8f5;       /* 宣纸 */
  --gold: #d4af37;        /* 赤金 */
  --cinnabar: #c0362c;    /* 朱砂 */
  --ink: #2b2320;
  --ink-2: #6b5e57;
  --line: #eadfd5;
  --ok: #2e7d4f;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 14px; }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 20% -10%, #93303a 0%, var(--wine) 45%, var(--wine-deep) 100%);
}
.login-card {
  width: 380px; background: var(--paper); border-radius: 14px; padding: 40px 36px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); border: 1px solid rgba(212,175,55,.4);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.brand-seal {
  width: 64px; height: 64px; margin: 0 auto 14px; padding: 0;
  background: radial-gradient(circle at 35% 30%, #fffdf8, var(--paper));
  border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25), inset 0 0 0 2px rgba(212,175,55,.3);
}
.brand-seal img { width: 66%; height: 66%; display: block; }
.brand-seal.small { width: 44px; height: 44px; margin: 0; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.login-brand h1 { font-family: var(--serif); font-size: 22px; color: var(--wine); letter-spacing: 1px; }
.login-brand .sub { margin-top: 6px; font-size: 11px; letter-spacing: 3px; color: var(--ink-2); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; letter-spacing: 1px; }
.login-card input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 12px; font-size: 14px; background: #fff; outline: none;
}
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
.login-err { background: #fdecea; color: var(--cinnabar); font-size: 12px; padding: 8px 10px; border-radius: 6px; margin-bottom: 12px; text-align: center; }
.login-tip { margin-top: 16px; text-align: center; font-size: 12px; color: var(--ink-2); }

/* ---------- 框架 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: linear-gradient(180deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: #f2e4cf; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 18px; border-bottom: 1px solid rgba(212,175,55,.25); }
.side-title { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.side-sub { font-size: 11px; color: rgba(242,228,207,.65); margin-top: 3px; letter-spacing: 1px; }
.side-nav { flex: 1; padding: 14px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 4px;
  border-radius: 8px; color: rgba(242,228,207,.85); cursor: pointer; font-size: 14px; letter-spacing: 1px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: rgba(212,175,55,.18); color: var(--gold); font-weight: 600; }
.nav-ico { font-size: 15px; width: 18px; text-align: center; }
.nav-section {
  margin: 14px 14px 6px; padding-top: 10px;
  border-top: 1px solid rgba(212,175,55,.18);
  font-size: 12px; color: rgba(242,228,207,.45); letter-spacing: 2px;
  text-transform: none; font-weight: 500;
}
.side-foot { padding: 16px; border-top: 1px solid rgba(212,175,55,.25); }
.whoami { font-size: 12px; color: rgba(242,228,207,.75); margin-bottom: 10px; }
.whoami b { color: var(--gold); }

.main { flex: 1; padding: 26px 30px 40px; min-width: 0; }
.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.view-head h2 { font-family: var(--serif); font-size: 22px; color: var(--wine); letter-spacing: 2px; }
.view-head h2::before { content: "◆ "; color: var(--gold); font-size: 14px; }
.view-date { font-size: 12px; color: var(--ink-2); }
.head-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- 日期翻页器 ---------- */
.date-pager {
  display: inline-flex; align-items: center; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 3px 6px; box-shadow: 0 1px 4px rgba(122,30,40,.05);
}
.date-arrow {
  width: 26px; height: 26px; border: none; background: transparent;
  border-radius: 7px; font-size: 18px; line-height: 1;
  color: var(--wine); cursor: pointer; transition: background .18s ease, transform .18s ease;
}
.date-arrow:hover:not(:disabled) { background: rgba(122,30,40,.08); }
.date-arrow:active:not(:disabled) { transform: scale(.9); }
.date-arrow:disabled { opacity: .3; cursor: not-allowed; }
.date-lbl {
  min-width: 118px; text-align: center; font-size: 13px;
  font-weight: 600; color: var(--ink); letter-spacing: .02em;
}

/* ---------- 组件 ---------- */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(122,30,40,.04);
  overflow-x: auto;
}
.panel h3 { font-family: var(--serif); font-size: 15px; color: var(--wine); margin-bottom: 14px; letter-spacing: 1px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .panel-grid { grid-template-columns: 1fr; } }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1200px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card { display: flex; flex-direction: column; }
.plan-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.plan-head h3 { margin: 0; }
.plan-badge { font-size: 12px; padding: 2px 10px; border-radius: 12px; color: #fff; flex-shrink: 0; }
.plan-badge.today { background: var(--cinnabar); }
.plan-badge.week { background: var(--gold); color: #5a4a1a; }
.plan-badge.month { background: var(--wine); }
.plan-title { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.plan-summary { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 12px; }
.plan-actions { list-style: none; padding: 0; margin: 0 0 12px; }
.plan-actions li { font-size: 13px; color: var(--ink); line-height: 1.7; padding-left: 18px; position: relative; }
.plan-actions li::before { content: "▸"; position: absolute; left: 0; color: var(--gold); }
.plan-channels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.plan-channels .chip { font-size: 11.5px; }
.plan-expected { font-size: 12.5px; color: var(--ok); background: #f0f7f3; padding: 8px 10px; border-radius: 8px; line-height: 1.5; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; position: relative; overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
.stat-card .num { font-size: 30px; font-weight: 700; font-family: var(--serif); color: var(--wine); margin-top: 6px; }
.stat-card .num small { font-size: 14px; color: var(--ink-2); font-weight: 400; margin-left: 2px; }
.stat-card .label { font-size: 13px; color: var(--ink-2); letter-spacing: 1px; }
.stat-card.warn .num { color: var(--cinnabar); }
.stat-card.warn::after { background: var(--cinnabar); }
.stat-card.money .num { color: var(--gold); }

.trend { display: flex; align-items: flex-end; gap: 14px; height: 160px; padding-top: 10px; }
.trend .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend .bar {
  width: 60%; max-width: 42px; background: linear-gradient(180deg, #a8434f, var(--wine));
  border-radius: 5px 5px 0 0; min-height: 4px; transition: height .4s;
}
.trend .bar-val { font-size: 12px; color: var(--wine); font-weight: 600; }
.trend .bar-label { font-size: 11px; color: var(--ink-2); }

.todo-list .todo {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 4px;
  border-bottom: 1px dashed var(--line); font-size: 14px;
}
.todo-list .todo:last-child { border-bottom: none; }
.todo .cnt { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--cinnabar); }
.todo .cnt.zero { color: var(--ok); }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 600; letter-spacing: 1px;
  padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 10px; border-bottom: 1px solid #f2ebe3; font-size: 13px; vertical-align: middle; word-break: break-word; overflow-wrap: anywhere; }
/* 列数多的宽表：保持列宽舒适，超窄屏横向滚动而不挤破文字 */
#castingTable .tbl { min-width: 880px; }
#usersTable .tbl { min-width: 760px; }
#ordersTable .tbl { min-width: 760px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fdf9f4; }
.tbl .strong { font-weight: 600; }
.tbl .mono { font-family: Consolas, monospace; letter-spacing: .5px; }
.tbl .muted { color: var(--ink-2); font-size: 12px; }
.tbl .gold { color: var(--gold); font-weight: 700; }
.tbl .wine { color: var(--wine); font-weight: 700; }

/* 标签 */
.tag { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px; letter-spacing: 1px; white-space: nowrap; }
.tag.pending { background: #fdf1e3; color: #b26a00; }
.tag.verified { background: #e6f3ea; color: var(--ok); }
.tag.refunded { background: #fdecea; color: var(--cinnabar); }
.tag.expired { background: #efece9; color: var(--ink-2); }
.tag.scheduled { background: #eaf1fb; color: #2c5aa0; }
.tag.performing { background: #fdf1e3; color: #b26a00; }
.tag.ended { background: #efece9; color: var(--ink-2); }
.tag-casting { background: linear-gradient(135deg, #8e2530, #7a1e28); color: #fff; box-shadow: 0 2px 8px rgba(122,30,40,.25); }
.tag.cancelled { background: #fdecea; color: var(--cinnabar); }
.tag.onDuty { background: #e6f3ea; color: var(--ok); }
.tag.onLeave { background: #fdecea; color: var(--cinnabar); }
.tag.substitute { background: #fdf1e3; color: #b26a00; }
.tag.off { background: #efece9; color: var(--ink-2); }
.tag.published { background: #e6f3ea; color: var(--ok); }
.tag.draft { background: #efece9; color: var(--ink-2); }
.tag.gold { background: rgba(212,175,55,.14); color: #a07d14; }

/* 按钮/输入 */
.btn-primary {
  background: linear-gradient(135deg, #93303a, var(--wine)); color: #f7e9c9; border: none;
  height: 36px; padding: 0 18px; border-radius: 8px; font-size: 13px; cursor: pointer; letter-spacing: 2px;
}
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost {
  background: transparent; color: var(--wine); border: 1px solid var(--line);
  height: 36px; padding: 0 16px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(212,175,55,.06); }
.side-foot .btn-ghost { color: rgba(242,228,207,.85); border-color: rgba(242,228,207,.3); width: 100%; }
.side-foot .btn-ghost:hover { color: var(--gold); border-color: var(--gold); }
.btn-mini { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 6px; cursor: pointer; letter-spacing: 1px; }
.btn-mini.primary { background: var(--wine); color: #f7e9c9; border: none; }
.btn-mini.danger { background: transparent; color: var(--cinnabar); border: 1px solid #f0c9c5; }
.btn-mini.plain { background: transparent; color: var(--wine); border: 1px solid var(--line); }
.btn-mini:hover { filter: brightness(1.05); }
.btn-block { width: 100%; height: 44px; font-size: 15px; }
.ipt {
  height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px;
  font-size: 13px; background: #fff; outline: none;
}
.ipt:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.12); }
.ipt.grow { flex: 1; }
select.ipt { cursor: pointer; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab {
  padding: 8px 18px; border-radius: 20px; font-size: 13px; cursor: pointer;
  color: var(--ink-2); border: 1px solid var(--line); background: #fff; letter-spacing: 1px;
}
.tab.active { background: var(--wine); color: #f7e9c9; border-color: var(--wine); font-weight: 600; }

/* 核销条 */
.verify-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.verify-bar .ipt { height: 40px; }

/* NPC */
.npc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.npc-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.npc-card .npc-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.npc-card .npc-name { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--wine); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npc-card .npc-desc {
  font-size: 12px; color: var(--ink-2); margin-bottom: 10px; min-height: 18px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.npc-card .npc-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.npc-card .npc-row label { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.npc-card .npc-row .ipt { height: 30px; font-size: 12px; }

/* 当前景区条 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; margin-bottom: 18px;
}
.topbar .tb-left { font-size: 13px; color: var(--ink-2); }
.topbar .tb-left b { color: var(--wine); font-family: var(--serif); font-size: 15px; margin-left: 4px; letter-spacing: 1px; }

/* 景区选择 */
.scenic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.scenic-card {
  position: relative; height: 200px; border-radius: 14px; overflow: hidden; cursor: pointer;
  background-size: cover; background-position: center; border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(122,30,40,.08); transition: transform .25s, box-shadow .25s;
}
.scenic-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(122,30,40,.2); }
.scenic-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,35,32,.05) 0%, rgba(92,18,25,.88) 100%); }
.scenic-card:hover .scenic-mask { background: linear-gradient(180deg, rgba(43,35,32,.12) 0%, rgba(92,18,25,.94) 100%); }
.scenic-info { position: absolute; left: 20px; right: 20px; bottom: 18px; color: #f7e9c9; }
.scenic-name { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: 2px; }
.scenic-meta { font-size: 12px; opacity: .82; margin-top: 5px; letter-spacing: .5px; }
.scenic-enter {
  position: absolute; top: 16px; right: 18px; font-size: 13px; color: var(--gold);
  font-weight: 600; letter-spacing: 2px; background: rgba(43,35,32,.45);
  padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(212,175,55,.5);
}

/* 空态 */
.empty { text-align: center; color: var(--ink-2); font-size: 13px; padding: 30px 0; letter-spacing: 1px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(43,35,32,.5); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal { width: 440px; max-width: 94vw; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--wine); padding: 14px 20px;
}
.modal-head h3 { font-family: var(--serif); color: #f7e9c9; font-size: 16px; letter-spacing: 2px; }
.modal-x { background: none; border: none; color: #f7e9c9; font-size: 22px; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.modal-body .form-row input, .modal-body .form-row select, .modal-body .form-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 13px; font-family: var(--sans); outline: none; background: #fff;
}
.modal-body .form-row textarea { min-height: 84px; resize: vertical; }
.modal-body .form-row input:focus, .modal-body .form-row textarea:focus, .modal-body .form-row select:focus { border-color: var(--gold); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 4px 0 14px; }
.check-row input { width: auto; }

/* Toast */
.toast {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: rgba(43,35,32,.92); color: #f7e9c9; font-size: 13px; letter-spacing: 1px;
  padding: 11px 22px; border-radius: 24px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.toast.ok { background: rgba(46,125,79,.94); }
.toast.err { background: rgba(192,54,44,.94); }

/* ---------- 导航角标 ---------- */
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--cinnabar); color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 18px; text-align: center; letter-spacing: 0;
}

/* ---------- 按钮补充 ---------- */
.btn-mini.warn { background: #fdf1e3; color: #b26a00; border: 1px solid #f3ddbb; }

/* ---------- NPC 卡片补充 ---------- */
.npc-card .npc-sub { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.npc-card .npc-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--ink-2); margin: 10px 0; }
.npc-card .npc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.npc-card .npc-actions .btn-mini { flex: 1 1 auto; white-space: nowrap; }

/* NPC 卡片横向布局：形象图 + 主体 */
.npc-card { display: flex; gap: 14px; align-items: stretch; }
.npc-portrait {
  width: 96px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: #f6ece8; display: flex; align-items: center; justify-content: center;
}
.npc-portrait img { width: 100%; height: 100%; object-fit: cover; }
.npc-portrait-empty { display: flex; align-items: center; justify-content: center; }
.npc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.npc-card .npc-actions { margin-top: auto; }

/* 通用图片选择器（弹窗内） */
.img-picker { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.img-picker-preview {
  width: 96px; height: 96px; border-radius: 10px; overflow: hidden;
  background: #f6ece8; border: 1px dashed var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.img-picker-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-picker-hint { font-size: 11px; color: var(--ink-3); padding: 6px; text-align: center; line-height: 1.5; }
.img-picker-actions { display: flex; flex-direction: column; gap: 8px; }
.img-picker-actions .btn-mini[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 用户后台 ---------- */
.ud-profile { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ud-avatar { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; background: #f6f0e9; }
.ud-name { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--wine); margin-bottom: 4px; }
#udBody .form-row input, #udBody .form-row select {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 10px; font-size: 13px; background: #fff; outline: none;
}
#udBody .form-row input:focus, #udBody .form-row select:focus { border-color: var(--gold); }
#udSaveBtn { height: 40px; padding: 0 26px; border-radius: 8px; margin-top: 4px; }

/* 流水收支色 */
.tbl td.in { color: var(--ok); font-weight: 600; }
.tbl td.out { color: var(--cinnabar); font-weight: 600; }

/* ============================================================
   根页编辑器
   ============================================================ */
.rp-toolbar { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.rp-tb-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-tb-label { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.rp-num { width: 86px; }
.rp-ipt {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 10px; font-size: 13px; background: #fff; outline: none;
}
.rp-ipt:focus { border-color: var(--gold); }

/* 地图舞台 */
.rp-stage-wrap { display: flex; justify-content: center; }
.rp-stage {
  position: relative; width: 100%; max-width: 820px; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; user-select: none; min-height: 320px;
}
.rp-stage.crosshair { cursor: crosshair; }
.rp-map-img { display: block; width: 100%; height: auto; }
.rp-no-map {
  padding: 80px 24px; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 2;
}
.rp-mode-tip {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  background: rgba(122,30,40,.92); color: #f7e9c9; font-size: 13px;
  padding: 8px 20px; border-radius: 22px; letter-spacing: 1px; z-index: 30;
}
.rp-foot-tip { margin-top: 12px; font-size: 12px; color: var(--ink-2); text-align: center; }

/* 地图上的点位 */
.rp-pin {
  position: absolute; transform: translate(-50%, -100%); cursor: pointer; z-index: 10;
}
.rp-pin:hover { z-index: 20; }
.rp-pin-dot {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--wine); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,.3);
}
.rp-pin-ico-text { transform: rotate(45deg); color: var(--gold); font-size: 11px; font-weight: 700; }
.rp-pin-name {
  position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: rgba(255,255,255,.94); color: var(--wine);
  font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line);
}

/* 点位操作菜单 */
.rp-pin-menu {
  position: fixed; z-index: 150; display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.rp-pin-menu .btn-mini { width: 130px; text-align: center; }

/* 图片字段 */
.rp-img-field { display: flex; gap: 8px; }
.rp-img-field input {
  flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 10px; font-size: 13px; background: #fff; outline: none;
}
.rp-img-field input:focus { border-color: var(--gold); }
.rp-img-field .rp-upload-btn { white-space: nowrap; }

/* 内容截断 */
.rp-clamp {
  max-width: 420px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12px; color: var(--ink-2);
}

/* 遗迹小卡 */
.rp-card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.rp-mini-card {
  display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fdfaf6;
}
.rp-mini-img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #f0e8dd; }
.rp-mini-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-mini-name { font-size: 14px; font-weight: 600; color: var(--wine); }
.rp-mini-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; }

/* 锦囊行 */
.rp-tip-row { padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.rp-tip-row:last-child { border-bottom: none; }
.rp-tip-t { margin-bottom: 6px; }
.rp-tip-row .rp-mini-actions { flex-direction: row; margin-top: 8px; }

/* ============================================================
   智能模块样式（画像 / 军师 / AI创作）
   ============================================================ */

/* ---- KPI 卡片 ---- */
.stat-card { position: relative; overflow: hidden; }
.sc-top { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; letter-spacing: 1px; }
.sc-ico { color: var(--gold); font-size: 16px; }
.sc-num { font-size: 30px; font-weight: 700; font-family: var(--serif); color: var(--wine); margin-top: 8px; }
.sc-sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* ---- 通用空态 / 加载 ---- */
.chart-empty { padding: 34px 0; text-align: center; color: #a99c91; font-size: 13px; }
.gen-loading { padding: 46px 0; text-align: center; color: var(--wine); font-size: 14px; letter-spacing: 1px; }
.gen-loading::before { content: "◌ "; display: inline-block; animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.engine-badge { font-size: 11px; color: #fff; background: linear-gradient(135deg,#8a2a1f,#c8a25a); padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.data-src { margin-top: 10px; font-size: 11px; color: #b0a498; text-align: right; }

/* ---- 环形图 ---- */
.donut-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.donut-num { font-size: 22px; font-weight: 700; fill: var(--wine); font-family: var(--serif); }
.donut-txt { font-size: 11px; fill: var(--ink-2); }
.legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 7px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-lbl { flex: 1; color: var(--ink); }
.legend-row b { color: var(--ink-2); font-weight: 600; white-space: nowrap; }

/* ---- 横向条 ---- */
.hbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.hbar-lbl { width: 76px; flex-shrink: 0; font-size: 12.5px; color: var(--ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 16px; background: #f4ede3; border-radius: 9px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 9px; transition: width .5s ease; }
.hbar-val { width: 64px; font-size: 12.5px; color: var(--wine); flex-shrink: 0; }
.hbar-val em { display: block; font-style: normal; font-size: 10.5px; color: #a99c91; }

/* ---- 纵向柱 ---- */
.vbar-svg { width: 100%; height: auto; display: block; }
.vbar-lbl { font-size: 9.5px; fill: var(--ink-2); }

/* ---- TOP 传播者 ---- */
.spreader-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--line); }
.spreader-row:last-child { border-bottom: none; }
.sp-rank { width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: #f4ede3; color: var(--ink-2); font-size: 12px; flex-shrink: 0; }
.spreader-row:nth-child(1) .sp-rank { background: var(--gold); color: #fff; }
.sp-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-main b { font-size: 13.5px; }
.sp-main span { font-size: 11.5px; color: var(--ink-2); }
.sp-score { font-size: 13px; font-weight: 700; color: var(--wine); flex-shrink: 0; }

/* ---- 天气 ---- */
.weather-now { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.w-temp { font-size: 38px; font-family: var(--serif); color: var(--wine); font-weight: 700; }
.weather-now b { font-size: 15px; display: block; margin-bottom: 4px; }
.weather-now span { font-size: 12px; color: var(--ink-2); }
.weather-days { display: flex; gap: 8px; margin-top: 12px; }
.w-day { flex: 1; background: #faf5ed; border-radius: 8px; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.w-day b { font-size: 12px; }
.w-day em { font-style: normal; color: #3c5a7a; }

/* ---- 热点 ---- */
.hot-row { display: grid; grid-template-columns: 92px 1fr 30px; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.hot-track { height: 10px; background: #f4ede3; border-radius: 6px; overflow: hidden; }
.hot-fill { height: 100%; background: linear-gradient(90deg,#c8a25a,#7a1e28); border-radius: 6px; }
.hot-row p { grid-column: 2 / 4; font-size: 11px; color: var(--ink-2); margin: 0; }

/* ---- 策略条目 ---- */
.strat-item { display: flex; gap: 14px; padding: 14px 4px; border-bottom: 1px dashed var(--line); }
.strat-item:last-child { border-bottom: none; }
.strat-tag { flex-shrink: 0; width: 52px; height: 24px; line-height: 24px; text-align: center; border-radius: 6px; font-size: 12px; }
.strat-item.urgent .strat-tag { background: #fdecea; color: var(--cinnabar); }
.strat-item.warn .strat-tag { background: #fdf3e2; color: #b26a00; }
.strat-item.ok .strat-tag { background: #e8f4ec; color: var(--ok); }
.strat-body { flex: 1; min-width: 0; }
.strat-body h4 { font-size: 14.5px; margin-bottom: 4px; }
.strat-body p { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.strat-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---- 标签 chip ---- */
.chip { display: inline-block; padding: 4px 12px; border-radius: 20px; background: #f4ede3; color: var(--ink-2); font-size: 12px; cursor: pointer; border: 1px solid transparent; }
.chip:hover { background: #ecdfca; }
.chip.sm { cursor: default; background: #fbf4e6; color: #8a6a2f; border-color: #ead8b4; }
.chip.xs { padding: 2px 8px; font-size: 10.5px; cursor: default; background: #f7f1e7; color: var(--ink-2); }

/* ---- AI 对话 ---- */
.ai-chat { display: flex; flex-direction: column; gap: 12px; }
.ai-chat-box { min-height: 200px; max-height: 340px; overflow-y: auto; background: #faf6f0; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-welcome { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.65; position: relative; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--wine); color: #f8ecd6; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-src { position: absolute; right: 8px; bottom: -18px; font-size: 10px; color: #b0a498; }
.ai-chat-bar { display: flex; gap: 10px; }
.ai-quick { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- 创作平台框架 ---- */
.studio-body { margin-top: 4px; }
.studio-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.pers-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.textarea { width: 100%; min-height: 150px; padding: 10px 12px; resize: vertical; line-height: 1.7; font-family: var(--sans); }

/* ---- 素材卡片 ---- */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.mat-head { display: flex; justify-content: space-between; align-items: center; }
.mat-cat { font-size: 11px; color: #f7e9c9; background: var(--wine); padding: 3px 10px; border-radius: 20px; }
.mat-ops { display: flex; gap: 10px; }
.mat-ops a { font-size: 12px; color: var(--ink-2); cursor: pointer; }
.mat-ops a:hover { color: var(--cinnabar); }
.mat-card h4 { font-size: 15.5px; color: var(--wine); font-family: var(--serif); }
.mat-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mat-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }

/* ---- 剧本 ---- */
.script-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.script-head h3 { font-family: var(--serif); font-size: 21px; color: var(--wine); letter-spacing: 1px; }
.script-logline { font-size: 13.5px; color: var(--ink); background: #faf5ed; padding: 12px 14px; border-radius: 8px; border-left: 3px solid var(--gold); margin-bottom: 10px; line-height: 1.7; }
.script-world { font-size: 12.5px; color: var(--ink-2); margin-bottom: 16px; line-height: 1.7; }
.block-title { font-family: var(--serif); font-size: 16px; color: var(--wine); margin: 22px 0 12px; padding-left: 10px; border-left: 3px solid var(--gold); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.char-card { background: #faf6f0; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.char-card b { font-size: 14.5px; color: var(--wine); }
.char-role { font-size: 11.5px; color: var(--gold); }
.char-card p { font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.acts { display: flex; flex-direction: column; gap: 14px; }
.act-block h5 { font-size: 14.5px; color: var(--ink); margin-bottom: 8px; font-family: var(--serif); }
.scene-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; margin-bottom: 8px; }
.scene-place { font-size: 12px; color: var(--wine); font-weight: 600; margin-bottom: 5px; }
.scene-card p { font-size: 12.8px; color: var(--ink-2); line-height: 1.7; margin-bottom: 9px; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choice-btn { font-size: 12px; background: #f4ede3; border-radius: 8px; padding: 7px 12px; color: var(--ink); }
.choice-btn em { color: var(--gold); font-style: normal; font-size: 11px; }

/* ---- 表格 ---- */
.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 10px; overflow: hidden; }
.data-tbl th { background: #faf5ed; color: var(--ink-2); font-weight: 600; padding: 10px 14px; text-align: left; font-size: 12px; }
.data-tbl td { padding: 10px 14px; border-top: 1px solid var(--line); }
.data-tbl td b { color: var(--wine); }

/* ---- 知识图谱 ---- */
.graph-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 12px; color: var(--ink-2); }
.graph-legend span { display: flex; align-items: center; gap: 5px; }
.graph-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.graph-legend b { margin-left: auto; color: var(--wine); }
.graph-canvas { width: 100%; max-width: 780px; margin: 0 auto; }
.graph-canvas svg { width: 100%; height: auto; display: block; }
.graph-lbl { font-size: 10px; fill: var(--ink-2); pointer-events: none; }
.graph-center { font-size: 13px; fill: var(--wine); font-family: var(--serif); font-weight: 700; }

/* ---- 个性化产物 ---- */
.pers-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.pers-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.pers-head h3 { font-family: var(--serif); font-size: 18px; color: var(--wine); }
.pers-card p { font-size: 13.5px; color: var(--ink); line-height: 1.9; padding: 4px 0; }

/* ============================================================
   数据看板（360°游客画像）· 红白轻量风
   ============================================================ */
#view-portrait { padding: 0; background: transparent; }
.screen {
  min-height: calc(100vh - 0px);
  padding: 0 22px 22px;
  background:
    radial-gradient(1200px 340px at 50% -120px, rgba(122,30,40,.06), transparent 70%),
    var(--paper);
  color: var(--ink);
}

/* 头部 */
.screen-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px 4px 14px;
  border-bottom: 1px solid var(--line);
}
.screen-head h2 {
  margin: 0; font-family: var(--serif); font-size: 22px; letter-spacing: 2px;
  color: var(--wine); white-space: nowrap; font-weight: 700;
}
.sh-deco { color: var(--gold); font-size: 13px; margin: 0 6px; }
.sh-side { font-size: 12.5px; color: var(--ink-2); letter-spacing: .5px; }
.sh-side.right { text-align: right; display: flex; gap: 12px; justify-content: flex-end; align-items: center; }
#shClock {
  font-size: 17px; color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: 1px;
}
.sh-btn {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: #fff; border: 1px solid var(--line);
  color: var(--wine); font-size: 15px;
  box-shadow: 0 1px 3px rgba(122,30,40,.08);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.sh-btn:hover {
  background: #fdf3f4; box-shadow: 0 3px 10px rgba(122,30,40,.14);
  transform: translateY(-1px);
}

/* KPI 条 */
.screen-kpi {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  padding: 16px 0;
}
.screen-kpi-card {
  position: relative; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 16px 12px 19px;
  box-shadow: 0 1px 3px rgba(122,30,40,.05);
  transition: transform .2s cubic-bezier(.22,.61,.36,1), box-shadow .2s ease;
}
.screen-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(122,30,40,.10);
}
.screen-kpi-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--wine), var(--gold));
}
.sk-top { font-size: 12px; color: var(--ink-2); letter-spacing: .5px; display: flex; gap: 6px; align-items: center; }
.sk-top span { color: var(--wine); }
.sk-num { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; }
.sk-num b {
  font-size: 26px; color: #1d1d1f; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sk-num em { font-size: 12px; color: var(--ink-2); font-style: normal; }

/* 主区三栏 */
.screen-main {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 14px;
}
.screen-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.s-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; min-width: 0; position: relative;
  box-shadow: 0 1px 3px rgba(122,30,40,.04);
}
.s-card h3 {
  margin: 0 0 10px; font-size: 13.5px; color: var(--ink); letter-spacing: 1px;
  display: flex; align-items: center; gap: 7px; font-weight: 600;
}
.s-card h3 i {
  width: 4px; height: 14px;
  background: linear-gradient(180deg, var(--wine), var(--gold));
  display: inline-block; border-radius: 2px;
}
.s-body { min-height: 60px; }
.s-empty { text-align: center; color: #a79b93; font-size: 12.5px; padding: 22px 0; line-height: 1.9; }
.s-empty span { font-size: 11px; color: #c2b8b0; }

/* 环形图 */
.donut-light { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dd-num { fill: var(--wine); font-size: 22px; font-weight: 700; }
.glow { filter: drop-shadow(0 2px 5px rgba(122,30,40,.18)); }
.lg { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 6px; }
.lg-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.lg-row i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.lg-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-row b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 横条 */
.hb-light { display: grid; grid-template-columns: 58px 1fr 32px; gap: 8px; align-items: center; margin-bottom: 9px; font-size: 12px; }
.hb-light > span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-light div { height: 10px; background: #f4efe9; border-radius: 6px; overflow: hidden; }
.hb-light i { display: block; height: 100%; border-radius: 6px; }
.hb-light b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* 图表通用 */
.chart-svg { width: 100%; height: auto; display: block; }
.vb-lbl { fill: #9a8d84; font-size: 9px; }

/* 地图卡 */
.screen-map-card { display: flex; flex-direction: column; }
.map-body { flex: 1; display: flex; flex-direction: column; }
.map-wrap { position: relative; flex: 1; display: flex; flex-direction: column; }
.map-svg { width: 100%; height: auto; display: block; }
.map-num { fill: var(--wine); font-size: 11px; font-weight: 700; }
.map-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); margin-top: 6px; justify-content: center; }
.map-legend i { width: 18px; height: 9px; display: inline-block; border-radius: 3px; }
.map-legend b { color: var(--ink-2); }
.map-stat {
  position: absolute; right: 6px; bottom: 26px; font-size: 11.5px; color: var(--ink-2);
  background: rgba(255,255,255,.94); padding: 5px 12px;
  border-radius: 20px; border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(122,30,40,.10);
}
.map-stat b { color: var(--wine); font-size: 14px; }

/* 底部 */
.screen-bottom { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr); gap: 14px; margin-top: 14px; }
.flex2, .flex3 { min-width: 0; }

/* TOP 传播者 */
.sp-light {
  display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px;
  align-items: center; padding: 7px 0; font-size: 12px;
  border-bottom: 1px solid #f4efe9;
}
.sp-light:last-child { border-bottom: none; }
.sp-light .rank {
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 50%; background: #f1ece8; color: var(--ink-2); font-size: 11px;
}
.sp-light .rank.top {
  background: linear-gradient(135deg, var(--wine), var(--cinnabar));
  color: #fff;
}
.sp-light b { color: var(--ink); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-light em { font-style: normal; color: #a79b93; font-size: 10.5px; }
.sp-light i { color: var(--wine); font-style: normal; font-weight: 700; }

/* ============================================================
   实时热点（文旅军师）
   ============================================================ */
.h3-src { font-size: 11px; color: #2e8b57; font-weight: 400; }
.live-plat { margin-bottom: 10px; }
.live-plat h4 { margin: 0 0 5px; font-size: 12.5px; color: var(--wine); border-left: 3px solid var(--gold); padding-left: 7px; }
.live-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.live-item:last-child { border-bottom: none; }
.li-rank { width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 4px; background: #eee; color: #999; font-size: 10.5px; flex-shrink: 0; }
.li-rank.h { background: var(--wine); color: #fff; }
.live-item a { color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.live-item a:hover { color: var(--wine); }
.li-tag { font-size: 10px; color: #2e8b57; background: #e8f5e9; padding: 1px 7px; border-radius: 10px; flex-shrink: 0; }

/* AI 对话加大 */
.ai-chat.big .ai-chat-box { min-height: 340px; max-height: 520px; }

/* ============================================================
   AI 一键创作
   ============================================================ */
.auto-intro {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(100deg,#faf3e4,#f6ecda); border: 1px solid #e6d6b4;
  border-radius: 10px; padding: 12px 18px; margin-bottom: 16px;
}
.auto-intro b { color: var(--wine); font-size: 14.5px; letter-spacing: 1px; }
.auto-engine { font-size: 12px; color: #8a6a2f; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.auto-type {
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 16px 12px; text-align: center; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.auto-type:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(122,30,40,.12); border-color: var(--gold); }
.auto-type.picked { border-color: var(--wine); background: linear-gradient(170deg,#fdf6e7,#fff); }
.at-ico { font-size: 30px; display: block; margin-bottom: 6px; }
.auto-type b { font-size: 14px; color: var(--wine); display: block; }
.auto-type p { font-size: 11px; color: var(--ink-2); margin: 3px 0 0; }

.auto-result {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.ar-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #faf6f0; gap: 10px; flex-wrap: wrap; }
.ar-head h3 { margin: 0; font-family: var(--serif); color: var(--wine); font-size: 17px; }
.ar-head > div { display: flex; gap: 10px; align-items: center; }
.ar-head span { font-size: 11px; color: #fff; background: linear-gradient(135deg,#7a1e28,#c8a25a); padding: 3px 10px; border-radius: 20px; }
.ar-text {
  margin: 0; padding: 18px 22px; white-space: pre-wrap; word-break: break-word;
  font-family: var(--sans); font-size: 13.5px; line-height: 1.9; color: var(--ink);
  max-height: 640px; overflow-y: auto;
}
.script-head .sh-actions { display: flex; gap: 10px; align-items: center; }

/* ============================================================
   全局高级感动效升级
   ============================================================ */

/* 视图切换入场 */
@keyframes rhjViewIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.view:not(.hidden) { animation: rhjViewIn .38s cubic-bezier(.22,.61,.36,1) both; }

/* 面板悬浮质感 */
.panel { transition: box-shadow .25s ease, border-color .25s ease; }
.panel:hover { box-shadow: 0 8px 26px rgba(122,30,40,.08); }

/* 按钮微交互 + 光泽扫过 */
.btn-primary, .btn-ghost, .btn-mini {
  transition: filter .18s ease, background .18s ease, border-color .18s ease,
              box-shadow .18s ease, transform .12s ease;
}
.btn-primary:active, .btn-ghost:active, .btn-mini:active { transform: scale(.96); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -90%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.3), transparent);
  transform: skewX(-20deg); transition: left .55s ease; pointer-events: none;
}
.btn-primary:hover::after { left: 140%; }

/* Tabs 悬浮 */
.tab { transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.tab:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(122,30,40,.1); }

/* 侧栏交互 + 选中金条 */
.nav-item { transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { transform: translateX(3px); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 3px; background: var(--gold);
}

/* 表格行悬浮 */
.tbl tbody tr { transition: background .15s ease; }
.tbl tbody tr:hover { background: #fdf8ef; }

/* 卡片悬浮 */
.stat-card, .plan-card, .npc-card {
  transition: transform .22s ease, box-shadow .22s ease;
}
.stat-card:hover, .plan-card:hover, .npc-card:hover {
  transform: translateY(-3px); box-shadow: 0 10px 24px rgba(122,30,40,.12);
}

/* 弹窗 / Toast 入场 */
@keyframes rhjMaskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rhjModalIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-mask { animation: rhjMaskIn .22s ease both; }
.modal-mask .modal { animation: rhjModalIn .3s cubic-bezier(.22,.61,.36,1) both; }
@keyframes rhjToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast:not(.hidden) { animation: rhjToastIn .25s ease both; }

/* 生成中：流光底 + 旋转圈 */
@keyframes rhjSpin { to { transform: rotate(360deg); } }
@keyframes rhjShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.gen-loading {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px; margin: 12px 0;
  color: var(--wine); font-size: 13px; border-radius: 10px;
  background: linear-gradient(100deg, #faf3e4, #f0e2c4, #faf3e4);
  background-size: 200% 100%;
  animation: rhjShimmer 1.8s linear infinite;
}
.gen-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(122,30,40,.25); border-top-color: var(--wine);
  animation: rhjSpin .8s linear infinite;
}

/* ============================================================
   NPC 智能创作
   ============================================================ */
.npc-creator {
  display: grid; grid-template-columns: 280px minmax(0,1fr);
  gap: 16px; align-items: start;
}
@media (max-width: 900px) { .npc-creator { grid-template-columns: 1fr; } }
.nc-list { padding: 14px; }
.nc-list h3 { margin-bottom: 10px; font-size: 14px; }
.nc-npc-list { display: flex; flex-direction: column; gap: 4px; max-height: 580px; overflow-y: auto; }
.nc-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.nc-item:hover { background: #faf3e4; transform: translateX(2px); }
.nc-item.active {
  background: linear-gradient(100deg, #fdf2d8, #fbf6e9);
  border-color: #e6d6b4;
}
.nc-item-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: #f3ece3; display: flex; align-items: center; justify-content: center;
  font-size: 18px; border: 1px solid var(--line);
}
.nc-item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nc-item-info { display: flex; flex-direction: column; min-width: 0; }
.nc-item-info b { font-size: 13.5px; color: var(--wine); }
.nc-item-info span {
  font-size: 11.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nc-item-scenic {
  align-self: center; flex-shrink: 0;
  font-style: normal; font-size: 10px; letter-spacing: .5px;
  color: var(--ink-2); background: #f1ece8;
  padding: 2px 7px; border-radius: 8px;
}

.nc-welcome { text-align: center; padding: 64px 20px; color: var(--ink-2); }
@keyframes rhjFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.nc-welcome-ico { font-size: 52px; margin-bottom: 14px; animation: rhjFloat 3s ease-in-out infinite; }
.nc-welcome b { font-size: 16px; color: var(--wine); font-family: var(--serif); }
.nc-welcome p { margin-top: 10px; font-size: 13px; line-height: 1.8; }

.nc-panel-head {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px;
}
.nc-panel-title h3 { margin: 0 0 4px; font-family: var(--serif); color: var(--wine); font-size: 18px; }
.nc-panel-title span { font-size: 12px; color: var(--ink-2); }
.nc-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nc-cur-desc { font-size: 13px; line-height: 1.7; margin-bottom: 6px; }

.nc-portrait-wrap {
  margin: 12px 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.nc-portrait-img {
  width: 150px; height: 200px; object-fit: cover; border-radius: 12px;
  border: 1.5px solid var(--gold); box-shadow: 0 8px 22px rgba(122,30,40,.18);
  animation: rhjViewIn .5s ease both;
}

.nc-result { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 12px; }
.nc-result-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.nc-engine {
  font-size: 12px; color: #a07d14;
  background: rgba(212,175,55,.12); padding: 3px 12px; border-radius: 20px;
}
.nc-sec { margin-bottom: 14px; }
.nc-sec h4 { font-size: 13.5px; color: var(--wine); margin-bottom: 6px; }
.nc-sec p {
  font-size: 13.5px; line-height: 1.9; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.nc-lines { list-style: none; }
.nc-lines li {
  font-size: 13px; line-height: 1.7; color: var(--ink);
  padding: 7px 12px; margin-bottom: 6px;
  background: #faf6f0; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
}

/* ============================================================
   互动剧情任务
   ============================================================ */
.tasks-engine { font-size: 12px; color: #a07d14; margin-bottom: 12px; }
.task-chain { display: flex; flex-direction: column; gap: 12px; }
.task-step-card {
  display: flex; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: rhjViewIn .4s ease both;
}
.task-step-card:hover {
  transform: translateX(4px); border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(122,30,40,.1);
}
.task-step-card:nth-child(2) { animation-delay: .07s; }
.task-step-card:nth-child(3) { animation-delay: .14s; }
.task-step-card:nth-child(4) { animation-delay: .21s; }
.task-step-card:nth-child(5) { animation-delay: .28s; }
.task-step-card:nth-child(6) { animation-delay: .35s; }
.ts-num {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(135deg, #93303a, var(--wine)); color: #f7e9c9;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--serif);
  box-shadow: 0 3px 10px rgba(122,30,40,.3);
}
.ts-body { min-width: 0; }
.ts-body h4 { font-size: 14.5px; color: var(--wine); margin-bottom: 6px; font-family: var(--serif); }
.ts-target { font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.ts-npc { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.ts-steps { margin: 6px 0 6px 18px; font-size: 13px; line-height: 1.9; }
.ts-reward {
  font-size: 12.5px; color: var(--ok); background: #f0f7f3;
  padding: 6px 12px; border-radius: 8px; display: inline-block;
}

/* ============================================================
   后台账号管理
   ============================================================ */
.accounts-panel { margin-bottom: 18px; }
.accounts-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.accounts-head h3 { margin: 0; font-family: var(--serif); color: var(--wine); }
.accounts-tip { font-size: 12px; margin-bottom: 12px; }
.me-row { background: #fdf8ec; }
.acct-ops { display: flex; gap: 6px; }
.sub-section-title {
  font-family: var(--serif); color: var(--ink-2); font-size: 14px;
  letter-spacing: 2px; margin: 20px 2px 10px;
}

/* ============================================================
   动效降级
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}
