/* ============================================================
   DELTA OPS · 作业特遣队 — 像素军事风样式
   ============================================================ */
:root {
  --bg: #141a10;
  --panel: #20281a;
  --panel2: #2b3522;
  --line: #3d4a2f;
  --ink: #0b0f07;
  --text: #e9e7d8;
  --muted: #98a487;
  --sand: #d8c58f;
  --amber: #ffb02e;
  --green: #8bc34a;
  --green-dk: #558b2f;
  --red: #e5484d;
  --cyan: #6fd6ff;
  --gold: #ffd54f;
  --purple: #ce93d8;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { image-rendering: pixelated; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  /* 像素网格底纹 */
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 24px 24px;
}

canvas.px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* CRT 扫描线 */
#scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* 粒子画布 */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 95; }

body.shake { animation: shake .3s steps(6); }
@keyframes shake {
  0%{transform:translate(0,0)} 20%{transform:translate(-6px,3px)}
  40%{transform:translate(5px,-4px)} 60%{transform:translate(-4px,-2px)}
  80%{transform:translate(4px,3px)} 100%{transform:translate(0,0)}
}

/* ============ HUD 顶栏 ============ */
#hud {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 20px;
  background: linear-gradient(180deg, #2b3522, #20281a);
  border-bottom: 4px solid var(--ink);
  position: sticky; top: 0; z-index: 50;
}
.hud-left { display: flex; align-items: center; gap: 12px; }
#sprite-me {
  width: 52px; height: 52px; background: var(--ink);
  border: 3px solid var(--line); box-shadow: 0 0 0 3px var(--ink);
  display: flex; align-items: center; justify-content: center;
}
#codename {
  font-weight: 900; font-size: 18px; letter-spacing: 2px;
  color: var(--sand); outline: none; min-width: 60px;
  border-bottom: 2px dashed transparent;
}
#codename:hover, #codename:focus { border-bottom-color: var(--line); }
#rank-line { font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: 1px; }
#rank-badge {
  color: var(--ink); background: var(--amber);
  padding: 1px 8px; font-weight: 900; margin-right: 6px;
  box-shadow: 0 2px 0 var(--ink);
}

.hud-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 220px; max-width: 520px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.bar-label { width: 38px; text-align: right; color: var(--muted); font-family: "Courier New", monospace; }
.bar-track {
  flex: 1; height: 14px; background: var(--ink);
  border: 2px solid var(--line); position: relative; overflow: hidden;
}
.bar-fill { height: 100%; transition: width .4s steps(12); }
#hp-fill { background: repeating-linear-gradient(90deg, var(--red) 0 8px, #c93b40 8px 10px); width: 100%; }
#xp-fill { background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, #54b6dd 8px 10px); width: 0%; }
.bar-num { font-family: "Courier New", monospace; color: var(--muted); width: 76px; font-size: 11px; }

.hud-right { display: flex; align-items: center; gap: 10px; }
.stat-chip {
  background: var(--ink); border: 2px solid var(--line);
  padding: 5px 12px; font-weight: 900; font-size: 14px;
  font-family: "Courier New", monospace;
}
.stat-chip.streak { color: var(--amber); }
#mute-btn {
  background: var(--panel2); color: var(--text); border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink); width: 36px; height: 36px; font-size: 16px; cursor: pointer;
}
#mute-btn:active { transform: translateY(3px); box-shadow: none; }

/* ============ 标题横幅 ============ */
#banner {
  text-align: center; padding: 14px 10px 6px;
}
#banner h1 {
  font-size: 26px; font-weight: 900; letter-spacing: 6px; color: var(--sand);
  text-shadow: 3px 3px 0 var(--ink);
}
#banner .sub {
  font-size: 11px; letter-spacing: 4px; color: var(--muted);
  font-family: "Courier New", monospace; margin-top: 4px;
}
#banner .sub b { color: var(--amber); }

/* ============ 标签页 ============ */
#tabs { display: flex; justify-content: center; gap: 8px; padding: 10px; flex-wrap: wrap; }
.tab {
  background: var(--panel); color: var(--muted); border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink); padding: 8px 22px; font-size: 14px; font-weight: 900;
  letter-spacing: 2px; cursor: pointer;
}
.tab.active { background: var(--amber); color: var(--ink); }
.tab:active { transform: translateY(4px); box-shadow: none; }

/* ============ 主区域 ============ */
main { max-width: 1080px; margin: 0 auto; padding: 6px 16px 60px; }
.view { display: none; }
.view.active { display: block; animation: viewin .18s steps(4); }
@keyframes viewin { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

/* ============ 任务板工具栏 ============ */
#board-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--panel); border: 3px solid var(--ink);
  padding: 10px; margin-bottom: 14px;
  box-shadow: 0 4px 0 var(--ink);
}
select, input[type="text"], input[type="date"], input[type="time"], textarea {
  background: var(--ink); color: var(--text); border: 2px solid var(--line);
  padding: 7px 10px; font-size: 14px; font-family: inherit; outline: none;
}
select:focus, input:focus, textarea:focus { border-color: var(--amber); }
.btn {
  background: var(--panel2); color: var(--text); border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink); padding: 7px 14px; font-size: 13px; font-weight: 900;
  letter-spacing: 1px; cursor: pointer; font-family: inherit;
}
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn.primary { background: var(--amber); color: var(--ink); }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 4px 9px; font-size: 12px; box-shadow: 0 3px 0 var(--ink); }
.btn.ghost { background: transparent; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.fbtn {
  background: var(--ink); color: var(--muted); border: 2px solid var(--line);
  padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.fbtn.active { color: var(--ink); background: var(--green); border-color: var(--ink); }

/* ============ 阵亡横幅 ============ */
#kia-banner {
  display: none; margin-bottom: 14px; padding: 12px 16px;
  background: repeating-linear-gradient(45deg, #571417 0 16px, #401013 16px 32px);
  border: 4px solid var(--red); color: #ffd7d8;
  font-weight: 900; letter-spacing: 2px; text-align: center;
  animation: kiaflash 1s steps(2) infinite;
}
#kia-banner.on { display: block; }
@keyframes kiaflash { 50% { border-color: #7a1e22; } }

/* ============ 任务卡片 ============ */
.mission {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel2); border: 3px solid var(--ink);
  border-left-width: 8px; box-shadow: 0 4px 0 var(--ink);
  padding: 10px 12px; margin-bottom: 10px; position: relative;
}
.mission.overdue { background: #35201f; border-left-color: var(--red) !important; animation: kiaflash 1.2s steps(2) infinite; }
.mission.done { opacity: .55; filter: grayscale(.7); }
.mission.boss { border: 3px solid var(--gold); border-left-width: 8px; box-shadow: 0 4px 0 var(--ink), 0 0 18px rgba(255,213,79,.25); }
.mission.dying { animation: die .45s steps(6) forwards; }
@keyframes die {
  0% { transform: scale(1);} 30% { transform: scale(1.06) rotate(-2deg);}
  60% { transform: scale(.9) rotate(2deg); opacity:.7;} 100% { transform: scale(0); opacity: 0; }
}
.m-sprite {
  width: 56px; height: 56px; flex: none; background: var(--ink);
  border: 3px solid var(--line); display: flex; align-items: center; justify-content: center;
  position: relative;
}
.m-body { flex: 1; min-width: 0; }
.m-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-title { font-weight: 900; font-size: 15px; letter-spacing: 1px; }
.m-tag {
  font-size: 10px; font-weight: 900; padding: 1px 7px; color: var(--ink);
  letter-spacing: 1px;
}
.m-tag.subject { background: var(--sand); }
.m-tag.src { background: var(--cyan); }
.m-meta { font-size: 12px; color: var(--muted); margin-top: 4px; font-family: "Courier New", monospace; }
.m-meta .cd-ok { color: var(--green); }
.m-meta .cd-bad { color: var(--red); font-weight: 900; }
.boss-hp { margin-top: 6px; }
.boss-hp .bar-track { height: 10px; }
.boss-hp .bar-fill { background: repeating-linear-gradient(90deg, var(--gold) 0 8px, #d8a818 8px 10px); }
.m-actions { display: flex; gap: 6px; flex: none; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* 已完成区 */
#done-wrap { margin-top: 18px; }
#done-head {
  font-size: 13px; font-weight: 900; letter-spacing: 2px; color: var(--muted);
  border: 2px dashed var(--line); padding: 7px 12px; cursor: pointer; user-select: none;
}
#done-list.collapsed, #trash-list.collapsed { display: none; }
.done-item {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted);
  padding: 6px 10px; border-left: 4px solid var(--green-dk); margin-top: 6px;
  background: var(--panel);
}
.done-item .t { flex: 1; text-decoration: line-through; }

.empty-tip {
  text-align: center; color: var(--muted); padding: 40px 10px; font-size: 14px;
  letter-spacing: 2px; border: 3px dashed var(--line);
}

/* ============ 面板 / 指挥部 ============ */
.panel {
  background: var(--panel); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  padding: 16px; margin-bottom: 16px;
}
.panel h2 {
  font-size: 14px; letter-spacing: 3px; color: var(--sand); margin-bottom: 12px;
  border-bottom: 2px solid var(--line); padding-bottom: 8px; font-weight: 900;
}
.hq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.hq-card {
  background: var(--ink); border: 2px solid var(--line); padding: 12px; text-align: center;
}
.hq-card .k { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.hq-card .v { font-size: 26px; font-weight: 900; font-family: "Courier New", monospace; margin-top: 6px; }
.hq-card .v.c-amber { color: var(--amber); } .hq-card .v.c-green { color: var(--green); }
.hq-card .v.c-red { color: var(--red); } .hq-card .v.c-cyan { color: var(--cyan); }

.pxchart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.pxcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.pxcol .col {
  width: 100%; max-width: 46px; background: var(--green);
  background: repeating-linear-gradient(0deg, var(--green) 0 6px, var(--green-dk) 6px 8px);
  border: 2px solid var(--ink); min-height: 3px;
}
.pxcol .col.warn { background: repeating-linear-gradient(0deg, var(--amber) 0 6px, #c78a1e 6px 8px); }
.pxcol .col.bad { background: repeating-linear-gradient(0deg, var(--red) 0 6px, #b03a3e 6px 8px); }
.pxcol .lbl { font-size: 10px; color: var(--muted); font-family: "Courier New", monospace; }
.subrow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.subrow .name { width: 44px; font-weight: 900; }
.subrow .track { flex: 1; height: 16px; background: var(--ink); border: 2px solid var(--line); }
.subrow .fill { height: 100%; }
.subrow .num { width: 30px; text-align: right; font-family: "Courier New", monospace; color: var(--muted); }

/* ============ 兵营 ============ */
.barracks-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .barracks-grid { grid-template-columns: 1fr 1fr; } }
.rank-track { position: relative; height: 22px; background: var(--ink); border: 2px solid var(--line); }
.rank-fill { height: 100%; background: repeating-linear-gradient(90deg, var(--amber) 0 8px, #c78a1e 8px 10px); transition: width .4s steps(12); }
.war-progress { position: relative; height: 26px; background: var(--ink); border: 2px solid var(--line); margin-top: 4px; }
.war-fill { height: 100%; background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, #4aa3c6 8px 10px); }
.war-flag { position: absolute; top: -8px; font-size: 14px; transform: translateX(-50%); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach {
  border: 2px solid var(--line); background: var(--ink); padding: 10px;
  opacity: .4; filter: grayscale(1);
}
.ach.got { opacity: 1; filter: none; border-color: var(--gold); box-shadow: 0 3px 0 var(--ink); }
.ach .ico { font-size: 22px; }
.ach .nm { font-weight: 900; font-size: 13px; margin-top: 4px; color: var(--sand); }
.ach .ds { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rec-row {
  display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px;
  background: var(--ink); border: 2px solid var(--line); font-size: 13px;
}
.rec-row .info { flex: 1; }
.rec-row .due { color: var(--muted); font-size: 11px; font-family: "Courier New", monospace; }
.switch { width: 46px; height: 22px; background: var(--line); border: 2px solid var(--ink); cursor: pointer; position: relative; flex: none; }
.switch::after {
  content: ''; position: absolute; top: 1px; left: 1px; width: 16px; height: 14px; background: var(--muted);
}
.switch.on { background: var(--green-dk); }
.switch.on::after { left: 25px; background: var(--green); }
#log-list { max-height: 220px; overflow-y: auto; font-size: 12px; font-family: "Courier New", monospace; }
#log-list div { padding: 4px 6px; border-bottom: 1px dashed var(--line); color: var(--muted); }
#log-list div:first-child { color: var(--sand); }

/* ============ 弹窗 ============ */
#modal-mask {
  display: none; position: fixed; inset: 0; background: rgba(6,9,4,.78); z-index: 100;
  align-items: center; justify-content: center; padding: 16px;
}
#modal-mask.on { display: flex; }
#modal {
  background: var(--panel); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  width: 100%; max-width: 460px; padding: 20px;
  animation: viewin .15s steps(3);
}
#modal h3 { color: var(--amber); letter-spacing: 3px; font-size: 16px; margin-bottom: 14px; }
.form-row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 12px; color: var(--muted); letter-spacing: 1px; font-weight: 700; }
.form-row input, .form-row select { width: 100%; }
.form-inline { display: flex; gap: 10px; }
.form-inline > * { flex: 1; }
.boss-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 900; color: var(--gold); }
.boss-check input { width: 18px; height: 18px; accent-color: var(--amber); }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ============ Toast / 飘字 ============ */
#toasts { position: fixed; top: 76px; right: 14px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.toast {
  background: var(--ink); border: 3px solid var(--amber); color: var(--text);
  padding: 10px 14px; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.5); animation: toastin .2s steps(4);
}
.toast.bad { border-color: var(--red); }
.toast.good { border-color: var(--green); }
@keyframes toastin { from { transform: translateX(30px); opacity: 0; } }
.toast.out { opacity: 0; transition: opacity .4s; }

.float-txt {
  position: fixed; z-index: 130; font-weight: 900; font-size: 18px; pointer-events: none;
  color: var(--gold); text-shadow: 2px 2px 0 var(--ink);
  font-family: "Courier New", monospace; animation: floatup 1.1s steps(10) forwards;
}
@keyframes floatup {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-70px); opacity: 0; }
}

/* 升级全屏闪光 */
#levelup-flash {
  position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center;
  background: rgba(255,176,46,.14); pointer-events: none;
}
#levelup-flash.on { display: flex; }
#levelup-flash .box {
  background: var(--ink); border: 5px solid var(--amber); padding: 26px 44px; text-align: center;
  box-shadow: 0 0 0 6px var(--ink), 0 0 60px rgba(255,176,46,.6);
  animation: lupop .5s steps(5);
}
@keyframes lupop { 0% { transform: scale(.4);} 70% { transform: scale(1.15);} 100% { transform: scale(1);} }
#levelup-flash .box .big { font-size: 26px; font-weight: 900; color: var(--amber); letter-spacing: 4px; }
#levelup-flash .box .small { font-size: 13px; color: var(--text); margin-top: 8px; letter-spacing: 2px; }

footer {
  text-align: center; color: var(--muted); font-size: 11px; letter-spacing: 2px;
  padding: 20px; font-family: "Courier New", monospace;
}

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--ink); }

/* ============ 观战 / 指挥模式 ============ */
#oplock-mask {
  display: none; position: fixed; inset: 0; background: rgba(6,9,4,.78); z-index: 100;
  align-items: center; justify-content: center; padding: 16px;
}
body:not(.mode-op) .op-only { display: none !important; }
.ops-extra { display: none; }
body.mode-op .ops-extra { display: inline-flex; gap: 4px; }
body.mode-op .mission .m-actions .act-btn { display: inline-block; }

/* 同步结果弹窗 */
#syncdlg-mask {
  display: none; position: fixed; inset: 0; background: rgba(6,9,4,.78); z-index: 100;
  align-items: center; justify-content: center; padding: 16px;
}
#syncdlg-mask.on { display: flex; }

/* ============ 像素星星 / 预计用时 ============ */
.m-stars { display: inline-flex; gap: 2px; align-items: center; }
canvas.star { image-rendering: pixelated; }
body.mode-op canvas.star { cursor: pointer; }
body.mode-op canvas.star:hover { filter: brightness(1.4); }
.m-mins {
  color: var(--amber); font-size: 11px; border: 2px solid var(--line);
  padding: 0 5px; font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; letter-spacing: 1px;
}
.m-mins.empty { color: var(--muted); border-style: dashed; }
body.mode-op .m-mins { cursor: pointer; }
body.mode-op .m-mins:hover { border-color: var(--amber); }

/* ============ 弹窗像素字体 ============ */
#modal-mask #modal, #oplock-mask #modal, #syncdlg-mask #modal {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; letter-spacing: 1px;
}
#modal-mask #modal h3, #oplock-mask #modal h3, #syncdlg-mask #modal h3 {
  font-weight: 900; letter-spacing: 3px; text-shadow: 2px 2px 0 var(--ink);
}
#modal-mask #modal label, #modal-mask #modal input, #modal-mask #modal select,
#oplock-mask #modal input, #syncdlg-mask #modal div {
  font-family: inherit; letter-spacing: 1px;
}

/* ============ 用时点选按钮 ============ */
.m-hours { display: inline-flex; gap: 3px; align-items: center; margin-left: 2px; }
.h-lbl { color: var(--muted); font-size: 11px; }
.h-btn {
  background: var(--ink); color: var(--muted); border: 2px solid var(--line);
  font-size: 11px; padding: 0 6px; cursor: pointer;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; letter-spacing: 0;
}
body.mode-op .h-btn:hover { border-color: var(--amber); color: var(--text); }
.h-btn.on { background: var(--amber); color: var(--ink); border-color: var(--ink); font-weight: 900; }
.m-hours.ro { color: var(--amber); font-size: 11px; font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; }

/* 标题下方同步时间 */
#banner .sub2 {
  font-size: 11px; color: var(--muted); margin-top: 4px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; letter-spacing: 2px;
}

/* 游戏风确认弹窗 */
#confirmdlg-mask {
  display: none; position: fixed; inset: 0; background: rgba(6,9,4,.78); z-index: 100;
  align-items: center; justify-content: center; padding: 16px;
}
#confirmdlg-mask.on { display: flex; }

/* 回收站 */
#trash-wrap { margin-top: 12px; }
#trash-head {
  font-size: 13px; font-weight: 900; letter-spacing: 2px; color: var(--muted);
  border: 2px dashed var(--line); padding: 7px 12px; cursor: pointer; user-select: none;
}
.done-item.trash-item { border-left-color: var(--red); opacity: .85; }
.done-item.trash-item .t { text-decoration: line-through; text-decoration-color: rgba(229,72,77,.5); }

/* 新作业提醒弹窗 */
#newdlg-mask {
  display: none; position: fixed; inset: 0; background: rgba(6,9,4,.78); z-index: 105;
  align-items: center; justify-content: center; padding: 16px;
}
#newdlg-mask.on { display: flex; }

/* 详情与作业链接 */
.m-link { color: inherit; text-decoration: none; border-bottom: 2px dashed var(--line); }
.m-link:hover { color: var(--amber); border-bottom-color: var(--amber); }
.m-desc-btn {
  background: var(--ink); color: var(--cyan); border: 2px solid var(--line);
  font-size: 11px; padding: 0 6px; cursor: pointer; font-family: inherit;
}
.m-desc-btn:hover { border-color: var(--cyan); }
.m-desc {
  font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.8;
  border-left: 3px solid var(--cyan); padding: 4px 10px; background: rgba(0,0,0,.25);
  white-space: pre-wrap; word-break: break-word;
}

#modal textarea { width: 100%; resize: vertical; min-height: 64px; font-family: inherit; line-height: 1.6; }

/* 周期任务编辑弹窗 */
#recedit-mask {
  display: none; position: fixed; inset: 0; background: rgba(6,9,4,.78); z-index: 100;
  align-items: center; justify-content: center; padding: 16px;
}
#recedit-mask.on { display: flex; }

/* 兑换账本 */
.ledger-row {
  display: flex; gap: 10px; align-items: baseline; font-size: 12px;
  padding: 5px 8px; border-left: 3px solid var(--gold); background: var(--ink);
  margin-bottom: 5px; font-family: "Courier New", SimSun, monospace;
}
.ledger-row .amt { color: var(--gold); font-weight: 900; flex: none; }
.ledger-row .what { flex: 1; color: var(--text); }
.ledger-row .when { color: var(--muted); font-size: 11px; flex: none; }

/* BOSS 皇冠开关 */
canvas.crown-btn { margin-left: 6px; image-rendering: pixelated; }
canvas.crown-btn.big { margin-left: 2px; }
canvas.boss-px { margin-right: 6px; vertical-align: -5px; image-rendering: pixelated; flex: none; }
body.mode-op canvas.crown-btn { cursor: pointer; }
body.mode-op canvas.crown-btn:hover { filter: brightness(1.5) drop-shadow(0 0 4px rgba(255,213,79,.8)); }
canvas.crown-btn.on { filter: drop-shadow(0 0 3px rgba(255,213,79,.9)); }

/* 科目选择菜单 */
#subj-menu {
  display: none; position: fixed; z-index: 140; min-width: 180px; max-height: 300px; overflow-y: auto;
  background: var(--panel); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  padding: 6px;
}
#subj-menu .sm-opt {
  display: block; width: 100%; text-align: left; background: var(--ink); color: var(--text);
  border: 2px solid var(--line); padding: 6px 10px; margin-bottom: 4px; font-size: 13px;
  cursor: pointer; font-family: inherit; font-weight: 700;
}
#subj-menu .sm-opt:hover { border-color: var(--amber); color: var(--amber); }
#subj-menu .sm-new { color: var(--cyan); border-style: dashed; }
#subj-menu input { width: 100%; margin-bottom: 6px; }

/* 状态条可点击强制刷新 */
#sync-chip { cursor: pointer; }
#sync-chip:hover { text-decoration: underline; }

/* 任务赏金标注 */
.m-reward {
  color: var(--gold); font-size: 12px; font-weight: 900; margin-left: 6px;
  font-family: "Courier New", SimSun, monospace; letter-spacing: 1px;
  text-shadow: 1px 1px 0 var(--ink);
}

/* 长科目名省略显示 */
.m-tag.subject { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 大BOSS 设定动画 */
.mission.flash-gold { animation: flashgold .9s steps(6); }
@keyframes flashgold {
  0%, 100% { box-shadow: 0 4px 0 var(--ink); }
  30% { box-shadow: 0 0 26px rgba(255,213,79,.95), 0 4px 0 var(--ink); }
  60% { box-shadow: 0 0 14px rgba(229,72,77,.8), 0 4px 0 var(--ink); }
}
.m-reward.none { color: var(--muted); font-size: 11px; }
