:root {
  /* ── Neo-Brutalism 设计令牌 ── */
  --bg: #FFF5E1;            /* 奶白底 */
  --paper: #FFFFFF;         /* 卡片纸面 */
  --ink: #141414;           /* 近黑墨色 */
  --muted: #5b5648;         /* 次要文字 */
  --line: #141414;          /* 黑边 */
  --shadow: 5px 5px 0 #141414;     /* 硬阴影 */
  --shadow-sm: 3px 3px 0 #141414;
  --shadow-lg: 8px 8px 0 #141414;
  --radius: 14px;
  /* 六部门强调色 (兼作按钮色) */
  --red: #E63946; --blue: #1D6FB8; --green: #2A9D5C;
  --yellow: #F2B705; --orange: #F3722C; --purple: #8E5BD0;
  --gold: #F2B705;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -13px -13px;
  color: var(--ink); overflow-x: hidden; min-height: 100vh;
}
#app { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }

/* ───── 时间之城·Neo-Brutalism 天际线 ───── */
.skyline { position: fixed; left: 0; right: 0; bottom: 0; height: 34vh; z-index: 0; display: flex; align-items: flex-end; justify-content: center; gap: 4px; opacity: .9; pointer-events: none; }
.building { width: 7vw; max-width: 92px; background: var(--paper); border: 4px solid var(--line); border-bottom: none; box-shadow: var(--shadow-sm); position: relative; }
.building::after { content: ""; position: absolute; inset: 10px; background-image: linear-gradient(var(--ink) 2px, transparent 2px), linear-gradient(90deg, var(--ink) 2px, transparent 2px); background-size: 16px 18px; opacity: .12; }
.building .win { position: absolute; width: 9px; height: 9px; border: 2px solid var(--ink); }
.b1{height:42%;background:var(--yellow)} .b2{height:64%;background:var(--paper)} .b3{height:36%;background:var(--red)}
.b4{height:78%;background:var(--blue)} .b5{height:52%;background:var(--paper)} .b6{height:88%;background:var(--green)}
.b7{height:46%;background:var(--orange)} .b8{height:70%;background:var(--paper)} .b9{height:40%;background:var(--purple)}
.b10{height:60%;background:var(--paper)} .b11{height:82%;background:var(--yellow)} .b12{height:50%;background:var(--paper)}
.stars { display: none; } /* NB 风不使用星空 */

/* ───── 通用 ───── */
.title-neon { font-weight: 900; letter-spacing: 3px; color: var(--ink);
  text-shadow: 4px 4px 0 var(--yellow), 4px 4px 0 var(--yellow); -webkit-text-stroke: 2px var(--ink); }
.card { background: var(--paper); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.btn { font-family: inherit; font-weight: 900; font-size: 15px; color: var(--ink); background: var(--yellow);
  border: 3px solid var(--line); border-radius: 12px; padding: 11px 18px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .07s, box-shadow .07s; }
.btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: var(--shadow-sm); transform: none; }
.btn.cyan { background: var(--blue); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.purple { background: var(--purple); color: #fff; }
.btn.orange { background: var(--orange); color: #fff; }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.dark { background: var(--ink); color: var(--bg); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 6px; border: 2px solid var(--line); color: var(--ink); }
.tag.甲 { background: var(--green); } .tag.乙 { background: var(--orange); } .tag.丙 { background: var(--red); color: #fff; }
.hide { display: none !important; }

/* ───── 落地页 ───── */
.hero { text-align: center; padding: 40px 0 24px; }
.hero h1 { font-size: clamp(40px, 8vw, 72px); }
.hero .sub { color: var(--ink); margin-top: 10px; font-size: 16px; letter-spacing: 2px; font-weight: 700; }
.gate { max-width: 760px; margin: 22px auto; text-align: center; }
.gate h2 { font-size: 22px; margin-bottom: 14px; }
.group-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0; }
.group-btn { aspect-ratio: 1.25; border: 4px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 22px; font-weight: 900; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .1s, box-shadow .1s; }
.group-btn:hover { transform: translate(-2px,-2px); border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--yellow); }
.group-btn small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }

/* ───── 介绍/引导/通用页 ───── */
.page { animation: fade .45s; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section { margin: 16px 0; }
.section h3 { font-size: 20px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.section h3 .dot { width: 16px; height: 16px; border-radius: 4px; border: 3px solid var(--line); }
.step-list { counter-reset: s; display: grid; gap: 10px; }
.step-item { display: flex; gap: 12px; align-items: flex-start; }
.step-num { flex: 0 0 36px; height: 36px; border-radius: 10px; border: 3px solid var(--line); background: var(--yellow); color: var(--ink); font-weight: 900; display: grid; place-items: center; box-shadow: var(--shadow-sm); font-size: 17px; }
.step-body { background: var(--paper); border: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; flex: 1; }
.step-body b { color: var(--ink); }
.rule-item { display: flex; gap: 8px; padding: 7px 0; border-bottom: 2px dotted var(--line); font-weight: 600; }
.rule-item::before { content: "◆"; color: var(--orange); }
.scroll-hint { text-align: center; color: var(--muted); margin-top: 10px; animation: bob 1.4s infinite; font-weight: 700; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

/* 专家贡献徽标 */
.expert-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; padding: 3px 10px; border: 3px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.expert-badge .e-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); }
.callout { border-left: 6px solid var(--yellow); background: #fffdf3; border: 3px solid var(--line); border-left-width: 8px; border-radius: 10px; padding: 10px 14px; margin: 10px 0; font-weight: 600; line-height: 1.8; }

/* 步骤详解卡 */
.step-card { display: grid; grid-template-columns: 48px 1fr; gap: 14px; border: 4px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm); padding: 14px; margin: 12px 0; }
.step-card .badge { width: 48px; height: 48px; border: 3px solid var(--line); border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 900; background: var(--yellow); }
.step-card h4 { font-size: 17px; }
.step-card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.step-card .who { font-size: 12px; font-weight: 900; padding: 2px 8px; border: 2px solid var(--line); border-radius: 6px; background: var(--paper); }
.step-card .key { font-size: 12px; font-weight: 900; padding: 2px 8px; border: 2px solid var(--line); border-radius: 6px; background: var(--green); color: #fff; }
.step-card ul { margin: 6px 0 0 18px; line-height: 1.8; font-weight: 500; }

/* FAQ */
.faq { border: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--paper); }
.faq b { color: var(--ink); }

/* ───── 顶部条 ───── */
.topbar { position: sticky; top: 8px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--paper); border: 4px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 14px; flex-wrap: wrap; }
.topbar .who { font-weight: 900; font-size: 18px; }
.pill { font-size: 12px; font-weight: 900; padding: 4px 10px; border-radius: 20px; border: 3px solid var(--line); background: var(--yellow); color: var(--ink); }
.pill.live { background: var(--green); color: #fff; } .pill.off { background: var(--red); color: #fff; }
.icon-btn { width: 42px; height: 42px; border-radius: 10px; border: 3px solid var(--line); background: var(--paper); cursor: pointer; font-size: 18px; box-shadow: var(--shadow-sm); }
.icon-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }

/* ───── 小组盘面 ───── */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--paper); border: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 800; }
.stat .v { font-size: 26px; font-weight: 900; color: var(--ink); }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 700; }
.step-banner { text-align: center; padding: 12px; border-radius: 12px; background: var(--yellow); border: 4px solid var(--line); margin: 12px 0; box-shadow: var(--shadow-sm); }
.step-banner .sn { font-size: 13px; color: var(--ink); font-weight: 900; letter-spacing: 2px; }
.step-banner .st { font-size: 22px; font-weight: 900; }
.results { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.res { border-radius: 10px; border: 3px solid var(--line); padding: 8px 4px; text-align: center; color: var(--ink); box-shadow: var(--shadow-sm); }
.res .dept { font-size: 10px; font-weight: 900; }
.res .amt { font-size: 22px; font-weight: 900; line-height: 1.1; }
.res .tal { font-size: 10px; font-weight: 800; }
.tabs { display: flex; gap: 8px; margin: 10px 0; }
.tab { flex: 1; text-align: center; padding: 8px; border: 3px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 900; background: var(--paper); box-shadow: var(--shadow-sm); }
.tab.active { border-color: var(--ink); background: var(--yellow); }
.order { border: 4px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: var(--paper); box-shadow: var(--shadow-sm); }
.order .head { display: flex; justify-content: space-between; align-items: center; }
.order .cost { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chip { font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 6px; border: 2px solid var(--line); color: var(--ink); }
.order .reward { font-size: 12px; color: var(--muted); font-weight: 700; }
.order.done { opacity: .55; }
.order.mine { border-color: var(--blue); box-shadow: 4px 4px 0 var(--blue); }
.panel-title { font-size: 16px; font-weight: 900; margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 8px; height: 20px; background: var(--ink); border-radius: 3px; display: inline-block; }
.log { max-height: 200px; overflow-y: auto; font-size: 12.5px; line-height: 1.7; background: var(--paper); border: 3px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: var(--shadow-sm); }
.log div { border-bottom: 1px dashed var(--line); padding: 2px 0; }
.log .t { color: var(--muted); font-weight: 700; }
.adv-list { display: flex; gap: 6px; flex-wrap: wrap; }
.adv { font-size: 11px; font-weight: 900; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--line); background: var(--purple); color: #fff; box-shadow: 2px 2px 0 var(--ink); }

/* ───── 复盘 / 排名 ───── */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; }
.rank-card { border: 4px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); padding: 14px; }
.rank-card h4 { font-size: 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.rank-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border: 3px solid var(--line); border-radius: 8px; margin: 6px 0; font-weight: 800; background: var(--bg); }
.rank-row .pos { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); display: grid; place-items: center; font-size: 13px; background: var(--yellow); }
.rank-row.top1 { background: var(--yellow); }
.rank-row.top2 { background: #e9e9e9; }
.rank-row.top3 { background: #f3d9b8; }
.medal { font-size: 18px; }
.kpi { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.kpi .box { border: 3px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; background: var(--paper); box-shadow: var(--shadow-sm); }
.kpi .box .n { font-size: 22px; font-weight: 900; }
.kpi .box .l { font-size: 11px; color: var(--muted); font-weight: 800; }

/* ───── 推演日志时间线 ───── */
.log-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.filter-btn { font-size: 12px; font-weight: 900; padding: 4px 10px; border: 3px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.filter-btn.active { background: var(--yellow); }
.timeline { position: relative; border-left: 4px solid var(--ink); margin-left: 8px; padding-left: 14px; }
.tl-item { position: relative; padding: 8px 10px; margin: 8px 0; border: 3px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow-sm); }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 14px; width: 14px; height: 14px; border: 3px solid var(--ink); background: var(--yellow); border-radius: 50%; }
.tl-item.evt-bid::before { background: var(--blue); }
.tl-item.evt-order::before { background: var(--green); }
.tl-item.evt-event::before { background: var(--red); }
.tl-item.evt-advantage::before { background: var(--purple); }
.tl-item.evt-unlock::before { background: var(--orange); }
.tl-item.evt-recruit::before { background: var(--yellow); }
.tl-item.playing { box-shadow: 0 0 0 4px var(--orange); transform: translateX(4px); }
.tl-item .tl-h { display: flex; justify-content: space-between; gap: 8px; }
.tl-item .tl-type { font-size: 11px; font-weight: 900; padding: 1px 7px; border: 2px solid var(--line); border-radius: 6px; }
.tl-item .tl-time { font-size: 11px; color: var(--muted); font-weight: 800; }
.tl-item .tl-detail { font-size: 13px; margin-top: 4px; font-weight: 600; }
.tl-group-tag { font-size: 11px; font-weight: 900; padding: 1px 7px; border: 2px solid var(--line); border-radius: 6px; background: var(--bg); }

/* ───── NPC 议事会 ───── */
.council-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }
.council-card { border: 4px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); padding: 12px; }
.council-card .c-role { font-size: 12px; font-weight: 900; padding: 2px 8px; border: 2px solid var(--line); border-radius: 6px; display: inline-block; }
.council-card h4 { font-size: 16px; margin: 6px 0; }
.council-card .c-line { font-size: 13px; font-weight: 600; line-height: 1.6; background: var(--bg); border: 2px solid var(--line); border-radius: 8px; padding: 8px; margin: 6px 0; }
.tension-list { display: grid; gap: 8px; }
.tension { border: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); box-shadow: var(--shadow-sm); }
.tension .t-head { display: flex; justify-content: space-between; align-items: center; }
.tension .t-eff { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 4px; }

/* ───── NPC 总控台 ───── */
.npc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.npc-cell { border: 3px solid var(--line); border-radius: 10px; padding: 8px; background: var(--paper); font-size: 12px; box-shadow: var(--shadow-sm); cursor: pointer; }
.npc-cell .gn { font-weight: 900; font-size: 14px; }
.npc-cell .mini { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.npc-cell.on { border-color: var(--green); box-shadow: 3px 3px 0 var(--green); }
.npc-cell .bars { margin-top: 4px; }
.bartiny { height: 8px; border-radius: 4px; background: var(--bg); border: 2px solid var(--line); overflow: hidden; margin: 2px 0; }
.bartiny > i { display: block; height: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border: 2px solid var(--line); padding: 6px 8px; text-align: center; }
.table th { background: var(--yellow); font-weight: 900; }
.table tr.avail { background: rgba(42,157,92,.18); }
.table tr.prog { background: rgba(29,111,184,.15); }
.table tr.done { opacity: .5; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.field input, .field select { font-family: inherit; font-size: 14px; padding: 8px; border-radius: 8px; border: 3px solid var(--line); background: var(--paper); color: var(--ink); }
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,20,.55); z-index: 50; display: grid; place-items: center; }
.modal { background: var(--paper); border: 5px solid var(--line); border-radius: 16px; padding: 20px; width: min(92vw, 440px); box-shadow: var(--shadow-lg); }
.modal h3 { margin-bottom: 12px; }
.modal .row { margin-top: 14px; }

/* ───── Toast ───── */
#toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--paper); border: 4px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 800; box-shadow: var(--shadow-sm); animation: pop .3s; }
.toast.err { border-color: var(--red); background: var(--red); color: #fff; }
.toast.ok { border-color: var(--green); background: var(--green); color: #fff; }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 进场闪电动画 (NB: 改为硬边高亮) */
.zap { position: relative; }
@keyframes zappulse { 0%{box-shadow:0 0 0 var(--ink)} 30%{box-shadow:0 0 0 5px var(--orange)} 100%{box-shadow:var(--shadow-sm)} }
.zap.go { animation: zappulse .8s; }

@media (max-width: 720px) {
  .group-grid { grid-template-columns: repeat(3, 1fr); }
  .npc-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .results { grid-template-columns: repeat(3, 1fr); }
  .kpi { grid-template-columns: repeat(2,1fr); }
  #app { padding: 12px 10px 50px; }
}

/* ───── 体验密码门 (8888) ───── */
.gate-overlay { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center;
  background: var(--bg); background-image: radial-gradient(var(--ink) 1px, transparent 1px); background-size: 26px 26px; }
.gate-box { width: min(92vw, 420px); text-align: center; }
.gate-box .lock { font-size: 56px; margin-bottom: 6px; }
.gate-box h2 { font-size: 24px; margin-bottom: 6px; }
.pwd-input { width: 100%; margin-top: 14px; font-family: inherit; font-size: 20px; font-weight: 800;
  padding: 12px 14px; border: 4px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); letter-spacing: 4px; text-align: center; }
.pwd-input:focus { outline: none; box-shadow: var(--shadow-sm); }
.pwd-err { color: var(--red); font-weight: 800; font-size: 13px; min-height: 18px; margin-top: 8px; }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }

/* ───── 本版新增卡牌展示 ───── */
.newcard { display: flex; gap: 14px; align-items: flex-start; padding: 14px; margin-top: 10px;
  border: 4px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-sm); }
.nc-icon { font-size: 40px; line-height: 1; flex: 0 0 auto; filter: drop-shadow(3px 3px 0 var(--ink)); }
.nc-body { flex: 1; }
.nc-body b { font-size: 18px; }
.nc-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 900; padding: 2px 8px;
  border: 2px solid var(--line); border-radius: 6px; background: var(--red); color: #fff; vertical-align: middle; }
