/* 牛来 · 网页版样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --cream: #faf6ec;
  --cream2: #f1e9d6;
  --brown: #5b3a29;
  --brown2: #7a5238;
  --orange: #e8892d;
  --red: #c0392b;
  --green: #1e8449;
  --gray: #8a8078;
  --card: #fffdf7;
  --line: #e5dcc6;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--cream);
  color: #3c332b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* 顶部 */
#topbar {
  background: linear-gradient(135deg, var(--brown), var(--brown2));
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.logo { font-size: 26px; font-weight: 900; letter-spacing: 2px; }
.logo span { color: var(--orange); }
.logo small { font-size: 12px; font-weight: 400; color: #e8d9c4; margin-left: 8px; letter-spacing: 1px; }
.logo .ver {
  font-size: 10px; font-weight: 700; color: #fff;
  background: var(--orange); border-radius: 4px;
  padding: 1px 5px; margin-left: 6px; vertical-align: 4px;
  letter-spacing: 1px;
}
.stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.stat b { font-size: 15px; margin-left: 2px; }
.stat .up { color: #ff9d7a; }
.stat .down { color: #7be0a5; }
.stat .dim { color: #e8d9c4; font-weight: 400; }

/* 新闻栏：左右分栏（左事件/右小道消息），提高空间利用率 */
.newsbar {
  background: #3d2c1f;
  color: #ffe9cf;
  padding: 6px 20px;
  font-size: 12px;
  line-height: 1.7;
  border-bottom: 2px solid var(--orange);
}
.newsbar-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.newsbar-col {
  max-height: 172px;
  overflow-y: auto;
  padding: 2px 4px;
}
.newsbar-col + .newsbar-col {
  border-left: 1px solid rgba(255, 233, 207, .18);
  padding-left: 14px;
}
.newsbar-col-title {
  position: sticky;
  top: 0;
  z-index: 1;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  background: #3d2c1f;
}
.newsbar-col-event .newsbar-col-title {
  color: #ffc98a;
  background: linear-gradient(90deg, rgba(232,137,45,.4), rgba(232,137,45,.05));
  border-left: 4px solid #f0a94a;
}
.newsbar-col-rumor .newsbar-col-title {
  color: #e6d4ff;
  background: linear-gradient(90deg, rgba(124,77,255,.4), rgba(124,77,255,.05));
  border-left: 4px solid #9b6bff;
}
.newsbar .news-item { padding: 3px 10px 3px 14px; margin: 1px 0; }
.newsbar .news-item .t { font-weight: 800; }
.newsbar .newsbar-col-event .news-item .t { color: #ffd9a8; }
.newsbar .newsbar-col-rumor .news-item .t { color: #e6d4ff; }
.newsbar .news-item .b { color: #d9c4ab; font-size: 11.5px; margin-top: 1px; padding-left: 8px; }
.newsbar .news-item.flat-txt { color: #a89a8a; font-style: italic; }
.newsbar .news-item.warn {
  background: linear-gradient(90deg, rgba(192,57,43,.3), rgba(192,57,43,.06));
  border-left: 3px solid #e0563f;
}
.newsbar .news-item.warn .t { color: #ffb3a0; }
.newsbar .news-item.reveal {
  background: linear-gradient(90deg, rgba(232,137,45,.28), rgba(232,137,45,.05));
  border-left: 3px solid #f0a94a;
}
.newsbar .news-item.reveal .t { color: #ffe9b8; }
.newsbar .news-item.fin {
  background: linear-gradient(90deg, rgba(46,134,193,.28), rgba(46,134,193,.05));
  border-left: 3px solid #4aa3df;
}
.newsbar .news-item.fin .t { color: #cdeaff; }
.newsbar-alert {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(232,137,45,.16), rgba(232,137,45,.04));
  border: 1px solid rgba(232,137,45,.35);
}
.na-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.na-tag.na-season { color: #ffe9b8; background: rgba(232,137,45,.28); }
.na-tag.na-warn { color: #ffd0c2; background: rgba(192,57,43,.4); }
.na-tag.na-fin { color: #cdeaff; background: rgba(46,134,193,.4); }

/* 页签 */
#tabs {
  display: flex;
  gap: 4px;
  background: var(--cream2);
  padding: 8px 20px 0;
  border-bottom: 2px solid var(--line);
}
#tabs button {
  border: 1px solid var(--line);
  border-bottom: none;
  background: transparent;
  padding: 8px 22px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  color: var(--brown2);
}
#tabs button.active {
  background: var(--card);
  color: var(--brown);
  font-weight: 700;
  border-color: var(--brown2);
  border-bottom: 2px solid var(--card);
  margin-bottom: -2px;
}

main { flex: 1; padding: 16px 20px 70px; max-width: 1200px; width: 100%; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }

/* 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(91, 58, 41, 0.08);
}
.card h3 { font-size: 15px; color: var(--brown); margin-bottom: 10px; }
.card h3 .sub { font-size: 12px; color: var(--gray); font-weight: 400; margin-left: 8px; }

/* 市场选择 */
.market-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.market-tabs button {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  color: var(--brown2);
}
.market-tabs button.active { background: var(--brown); color: #fff; border-color: var(--brown); }
.market-tabs button.locked { color: var(--gray); cursor: not-allowed; opacity: .7; }

/* 行情 */
.indexline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.indexline .idxname { font-size: 18px; font-weight: 800; color: var(--brown); }
.badge { padding: 2px 10px; border-radius: 12px; font-size: 12px; color: #fff; font-weight: 700; }
.badge.牛 { background: var(--red); }
.badge.熊 { background: var(--green); }
.badge.震荡 { background: var(--orange); }
.indexline .idxval { font-size: 18px; font-weight: 800; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--gray); font-weight: 600; background: var(--cream2); }
tr:hover td { background: #fff9ec; }
.up { color: var(--red); font-weight: 700; }
.down { color: var(--green); font-weight: 700; }
.flat { color: var(--gray); }
.sector { color: var(--gray); font-size: 12px; }
.tag { font-size: 11px; color: #fff; border-radius: 4px; padding: 1px 6px; background: var(--orange); margin-left: 4px; }
.tag.limitup { background: var(--red); }
.tag.limitdown { background: var(--green); }
.tag.halt { background: #666; }

.btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 12px;
  color: var(--brown2);
}
.btn:hover { border-color: var(--brown2); }
.btn.buy { color: var(--red); border-color: #e6b8b1; }
.btn.buy:hover { background: #fdf1ef; }
.btn.sell { color: var(--green); border-color: #b6d8c2; }
.btn.sell:hover { background: #eff7f1; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.btn-primary {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 10px 24px;
  font-size: 15px;
  border-radius: 8px;
}
.btn.btn-primary:hover { background: #d97a1e; }

/* 底部 */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--cream2);
  border-top: 2px solid var(--line);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
footer .btn { padding: 12px 20px; font-size: 14px; }
#btn-step {
  background: linear-gradient(135deg, #f0743a, #d9542a);
  border: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 22px;
  padding: 12px 26px;
  box-shadow: 0 3px 12px rgba(217, 84, 42, .5);
  animation: stepPulse 2s ease-in-out infinite;
  cursor: pointer;
  transition: transform .12s;
}
#btn-step:hover { transform: translateY(-2px) scale(1.03); }
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 3px 12px rgba(217,84,42,.5); }
  50% { box-shadow: 0 3px 22px rgba(240,116,58,.85); }
}

/* 持仓 */
.pos-side-long { color: var(--red); font-weight: 700; }
.pos-side-short { color: var(--green); font-weight: 700; }
.frozen { color: var(--gray); font-size: 11px; }

/* 账户 */
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.acct-item { background: var(--cream2); border-radius: 8px; padding: 10px 12px; }
.acct-item .k { font-size: 12px; color: var(--gray); }
.acct-item .v { font-size: 18px; font-weight: 800; margin-top: 4px; color: var(--brown); }
.acct-tip {
  display: inline-block;
  font-size: 11px;
  color: var(--gray);
  cursor: help;
  margin-left: 3px;
  vertical-align: 1px;
}

/* 指北 */
.inst { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.inst .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inst .name { font-weight: 800; color: var(--brown); font-size: 15px; }
.inst .desc { color: var(--gray); font-size: 12px; margin: 6px 0; }
.inst .sub { margin-left: auto; }
.inst select, .inst input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.rating-table { margin-top: 8px; font-size: 12px; }
.rating-table td { text-align: left; }
.inst.exclusive { border-color: #b98a2f; background: #fffdf4; }
.season-pick { margin-top: 8px; padding: 8px 10px; border: 1px dashed #c0392b;
  background: #fff7f4; border-radius: 6px; font-size: 12px; }
.season-pick .sp-title { font-weight: 800; color: #c0392b; }
.season-pick .sp-line { margin-top: 2px; color: #4a3a2c; }
/* 指北子页签：机构评级 / 财报预测汇总 */
.advice-subtabs { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }
.advice-subtab { border: 1px solid var(--line); background: transparent; padding: 5px 16px;
  border-radius: 16px; font-size: 13px; cursor: pointer; color: var(--brown2); }
.advice-subtab.on { background: var(--brown); color: #fff; border-color: var(--brown); }
/* 财报预测汇总页 */
.fc-summary { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.fc-inst { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.fc-inst .fc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.fc-inst .name { font-weight: 800; color: var(--brown); font-size: 14px; }
.fc-inst table { width: 100%; }
.er-超预期 { color: var(--red); }
.er-符合预期 { color: var(--brown2); }
.er-低于预期 { color: var(--green); }
.inst-view { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.inst-view:last-child { border-bottom: none; }
.inst-view .iv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inst-view .iv-head .name { font-weight: 800; color: var(--brown); font-size: 13px; }
.inst-view .iv-line { font-size: 12.5px; color: #4a3a2c; margin-top: 4px; line-height: 1.7; }
.r-强烈买入 { color: var(--red); font-weight: 800; }
.r-买入 { color: var(--red); }
.r-增持 { color: #c96f1a; }
.r-中性 { color: var(--gray); }
.r-减持 { color: var(--green); }
.r-卖出 { color: var(--green); font-weight: 800; }
.comment { color: var(--gray); font-size: 11px; }

/* 事件 */
.ev { border-left: 4px solid var(--orange); background: var(--cream2); padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; }
.ev.reversed { border-left-color: #7f1d1d; background: #fbeceb; }
.ev .name { font-weight: 800; color: var(--brown); }
.ev .day { color: var(--gray); font-size: 12px; }
.ev ul { margin: 6px 0 0 18px; color: #6b5342; font-size: 13px; line-height: 1.8; }
.ev .warn { color: #b0301f; font-weight: 700; font-size: 12px; margin-top: 4px; }

/* 通用警示文字（行情板块预警横幅等） */
.warn { color: #b0301f; font-weight: 600; font-size: 13px; margin: 6px 0; }

/* 帮助 */
#tab-help pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.9; color: #4a3a2c; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0;
  background: rgba(78, 52, 28, .42);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.modal.hidden { display: none; }
.hidden { display: none !important; }
.modal-box {
  background: var(--card);
  border-radius: 12px;
  padding: 22px 26px;
  width: 400px;
  max-width: 92vw;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.modal-box h3 { color: var(--brown); margin-bottom: 12px; }
.modal-box .row { margin: 10px 0; }
.modal-box label { display: block; font-size: 12px; color: var(--gray); margin-bottom: 4px; }
.modal-box input, .modal-box select {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 14px;
}
.modal-box .info { font-size: 12px; color: var(--gray); margin-bottom: 4px; }
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.run-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 4px;
}
.run-summary .rs-item {
  background: var(--cream2);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.run-summary .rs-k { font-size: 11px; color: var(--gray); }
.run-summary .rs-v { font-size: 15px; font-weight: 800; color: var(--brown); margin-top: 3px; }
.big-title { font-size: 26px; font-weight: 900; color: var(--orange); text-align: center; margin: 12px 0; }
.big-text { text-align: center; color: var(--brown); line-height: 1.9; }

/* Toast */
.toast {
  position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%);
  background: rgba(51, 36, 25, .94); color: #ffe9cf;
  padding: 10px 22px; border-radius: 8px; font-size: 13px;
  max-width: 80vw; z-index: 99; white-space: pre-line;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.toast.hidden { display: none; }

/* 祝福/奇遇卡片 */
.modal-box.wide { width: 640px; max-width: 94vw; }
.bless-row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.bless-card {
  flex: 1;
  min-width: 160px;
  background: linear-gradient(160deg, #fff9ec, #f7ead2);
  border: 2px solid var(--orange);
  border-radius: 12px;
  padding: 16px 14px;
  cursor: pointer;
  text-align: center;
  transition: transform .12s, box-shadow .12s;
}
.bless-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(232, 137, 45, .35);
}
.bless-name { font-size: 16px; font-weight: 800; color: var(--brown); margin-bottom: 8px; }
.bless-desc { font-size: 12px; color: #6b5342; line-height: 1.7; }

/* 记录页 */
.h-total { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.h-total-item {
  background: var(--cream2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--gray);
}
.h-total-item b { font-size: 16px; margin-left: 6px; }
.h-events { list-style: none; max-height: 360px; overflow-y: auto; font-size: 13px; line-height: 1.9; }
.h-events li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.hdate { color: var(--gray); font-size: 12px; margin-right: 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col > div { min-width: 0; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
#tab-history table { font-size: 12px; }
#tab-history th, #tab-history td { padding: 5px 8px; }

/* ---------- 经验条 ---------- */
.expbar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.expbar-label { color: #ffe1b3; font-weight: 800; }
.expbar-track {
  width: 130px; height: 10px;
  background: rgba(255,255,255,.18);
  border-radius: 6px; overflow: hidden;
}
.expbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ffc46b);
  border-radius: 6px;
  transition: width .4s;
}
.expbar-num { color: #e8d9c4; font-size: 11px; white-space: nowrap; }

/* ---------- 通关进度条 ---------- */
.winprog { margin-top: 6px; }
.win-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.win-label { color: #ffd98a; font-weight: 800; letter-spacing: 1px; }
.win-track {
  flex: 1;
  max-width: 420px;
  height: 12px;
  background: rgba(255,255,255,.15);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,233,207,.25);
}
.win-fill {
  height: 100%;
  background: linear-gradient(90deg, #8e6fb5, #e8892d, #ffd98a);
  border-radius: 7px;
  transition: width .5s;
  box-shadow: 0 0 10px rgba(232,137,45,.6);
}
.win-num { color: #e8d9c4; font-size: 11px; white-space: nowrap; }
.win-num.up { color: #ffd98a; font-weight: 800; }

/* ---------- 成就页 ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.ach-card {
  background: var(--cream2);
  border: 1px solid var(--line);
  border-left: 4px solid #a89a8a;
  border-radius: 10px;
  padding: 12px 14px;
  transition: transform .12s, box-shadow .12s;
}
.ach-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(91,58,41,.18); }
.ach-card .ach-name { font-size: 14px; font-weight: 800; color: var(--brown); margin-bottom: 6px; }
.ach-card .ach-desc { font-size: 12px; color: #7a6550; line-height: 1.6; }
.ach-card .ach-reward { font-size: 11.5px; color: #a97c14; margin-top: 8px; }
.ach-card.done {
  border-color: #d9a93b;
  background: linear-gradient(160deg, #fff8e0, #fbeec7);
  border-left-color: #d9a93b;
}
.ach-card.done .ach-name { color: #7a5238; }
.ach-card.ach-hidden {
  border-style: dashed;
  border-left-style: solid;
  background: #3a302a;
}
.ach-card.ach-hidden .ach-name { color: #cbb9a4; }
.ach-card.ach-hidden .ach-desc { color: #a89a8a; font-style: italic; }

/* ---------- 牛魂附体：角色选择 ---------- */
.modal-box.wide.char-modal { width: 1000px; max-width: 96vw; }
.char-intro {
  font-size: 13px; line-height: 1.9; text-align: left;
  background: linear-gradient(135deg, #fff8e8, #faeccf);
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  padding: 12px 16px;
  color: #6b4a26;
}
.char-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 16px; }
.char-card {
  position: relative;
  background: linear-gradient(168deg, #fffdf5 0%, #fdf3dd 55%, #f9e7c4 100%);
  border: 2px solid #e8cf9e;
  border-radius: 16px;
  padding: 15px 16px 14px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(160, 110, 40, .12);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.char-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, #f7c873, #e8892d, #c96f1a);
}
.char-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: 0 12px 28px rgba(232, 137, 45, .35);
}
.char-card .char-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.char-icon { font-size: 30px; line-height: 1; }
.char-name { font-size: 20px; font-weight: 900; color: #5b3a29; letter-spacing: 1px; }
.char-soul { font-size: 15px; font-weight: 800; color: #c96f1a; }
.char-title {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(135deg, #f0743a, #d9542a);
  border-radius: 10px;
  padding: 2px 9px;
  margin-left: 2px;
  vertical-align: 3px;
}
.char-card .char-skill {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #8a3d08;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(232, 137, 45, .16), rgba(232, 137, 45, .04));
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  padding: 7px 9px;
  margin-bottom: 8px;
  line-height: 1.65;
}
.char-card .char-skill-label {
  flex: none;
  font-size: 11px;
  color: #fff;
  background: var(--orange);
  border-radius: 10px;
  padding: 1px 8px;
  margin-top: 2px;
}
.char-card .char-desc { font-size: 11.5px; color: #6b5640; line-height: 1.7; margin-bottom: 8px; }
.char-card .char-wake { font-size: 11px; color: #a08a6c; font-style: italic; line-height: 1.7; }

/* ---------- 账户页：牛魂附体横幅 ---------- */
.soul-banner {
  position: relative;
  border: 2px solid #e5b76b;
  border-radius: 16px;
  padding: 16px 20px 16px;
  background: linear-gradient(135deg, #fff8e9 0%, #fdeecf 45%, #f6d9a6 100%);
  box-shadow: 0 6px 22px rgba(200, 130, 40, .28), inset 0 1px 0 rgba(255, 255, 255, .65);
  overflow: hidden;
}
.soul-banner::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, #f7c873, #e8892d, #c96f1a);
}
.soul-banner-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.soul-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f0743a, #d9542a);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 3px 16px;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(217, 84, 42, .45);
}
.soul-sub { font-size: 12px; color: #9c7a4a; }
.soul-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 10px; }
.soul-icon { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(180, 110, 30, .35)); }
.soul-name { font-size: 30px; font-weight: 900; color: #5b3a29; letter-spacing: 1px; }
.soul-soul { font-size: 18px; font-weight: 800; color: #c96f1a; }
.soul-skill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #7a3d0a;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(232, 137, 45, .18), rgba(232, 137, 45, .04));
  border: 1px solid rgba(232, 137, 45, .45);
  border-left: 5px solid #e8892d;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  line-height: 1.7;
}
.soul-skill-label {
  flex: none;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f0743a, #d9542a);
  border-radius: 12px;
  padding: 2px 10px;
  margin-top: 2px;
  font-weight: 800;
}
.soul-desc { font-size: 12.5px; color: #7a5a34; line-height: 1.8; }

/* 账户页 / 弹窗内经验条 */
.exp-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.exp-level { font-weight: 800; color: var(--orange); font-size: 15px; min-width: 46px; }
.exp-track {
  flex: 1; height: 14px;
  background: var(--cream2);
  border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
}
.exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ffc46b);
  border-radius: 8px;
  transition: width .4s;
}
.exp-num { color: var(--gray); font-size: 12px; white-space: nowrap; }

/* ---------- 道具背包 ---------- */
.item-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.item-card {
  flex: 1;
  min-width: 180px;
  max-width: 260px;
  background: linear-gradient(160deg, #fffdf5, #f6ecd8);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 12px;
  text-align: center;
  transition: transform .12s, box-shadow .12s;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(91, 58, 41, .22);
}
.gacha-name { font-size: 15px; font-weight: 800; color: var(--brown); margin-bottom: 4px; }
.gacha-quality { font-size: 11px; font-weight: 700; margin-bottom: 8px; opacity: .9; }
.gacha-desc { font-size: 12px; color: #6b5342; line-height: 1.7; margin-bottom: 10px; }

/* 品质配色 */
.q-green { border-color: #4f9e8b; box-shadow: 0 0 0 1px #4f9e8b33 inset; }
.q-green .gacha-quality { color: #2f7a68; }
.q-blue { border-color: #5a8fbd; box-shadow: 0 0 0 1px #5a8fbd33 inset; }
.q-blue .gacha-quality { color: #3a6f9e; }
.q-gold {
  border-color: #d9a93b;
  background: linear-gradient(160deg, #fff8e0, #fbeec7);
  box-shadow: 0 0 0 1px #d9a93b55 inset;
}
.q-gold .gacha-quality { color: #a97c14; }
.q-red {
  border-color: #c0392b;
  background: linear-gradient(160deg, #fdf1ef, #f8dcd8);
  box-shadow: 0 0 0 1px #c0392b44 inset;
}
.q-red .gacha-quality { color: #a0281b; }
.q-black {
  border-color: #2c2420;
  background: linear-gradient(160deg, #3a302a, #221c18);
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
}
.q-black .gacha-name { color: #ffd98a; }
.q-black .gacha-quality { color: #d9b48a; }
.q-black .gacha-desc { color: #cbb9a4; }
.q-black:hover { box-shadow: 0 6px 22px rgba(232, 137, 45, .5); }

/* 红/黑品质开箱光效（爽点：抽到高品时的仪式感） */
.item-card.q-red { box-shadow: 0 0 16px rgba(232, 137, 45, .45); }
.item-card.q-black { box-shadow: 0 0 20px rgba(155, 107, 255, .55); }
.item-card.q-red:hover, .item-card.q-black:hover { animation: qpulse .8s ease-in-out infinite; }
@keyframes qpulse {
  0%, 100% { transform: translateY(-3px) scale(1); }
  50% { transform: translateY(-3px) scale(1.04); }
}

/* ---------- 牛来抽卡弹窗 ---------- */
.gacha-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.gacha-market {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.gacha-mk { flex: 1; min-width: 120px; }
.gacha-cost { font-size: 13px; font-weight: 700; color: var(--brown2); min-width: 90px; text-align: right; }

/* ---------- 底部"牛来"按钮 ---------- */
.btn-gacha {
  background: linear-gradient(135deg, #f4a72c, #d97a1e);
  color: #fff;
  border: none;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 22px;
  box-shadow: 0 3px 10px rgba(232, 137, 45, .45);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.btn-gacha:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(232, 137, 45, .6);
}
.btn-gacha {
  animation: gachaPulse 2.6s ease-in-out infinite;
}
@keyframes gachaPulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(232, 137, 45, .45); }
  50% { box-shadow: 0 3px 20px rgba(244, 167, 44, .9); }
}

/* ---------- 生效中（主页面/账户页） ---------- */
.active-buffs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ab-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--orange);
  margin-right: 2px;
}
.ab-chip {
  font-size: 12px;
  border-radius: 12px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--brown2);
}
.ab-gold { border-color: #d9a93b; color: #8a6210; background: #fff8e0; }
.ab-blue { border-color: #5a8fbd; color: #2f5c86; background: #eef5fb; }
.ab-green { border-color: #4f9e8b; color: #1e5f51; background: #ecf6f2; }
.ab-black { border-color: #2c2420; color: #ffd98a; background: #3a302a; }

/* ---------- 番剧周更（牛头动漫下周预告） ---------- */
.ntr-peek {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #d9a93b;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8e0, #fdf1cf);
}
.ntr-peek h3 { color: #8a6210; margin-bottom: 8px; }
.ntr-peek-levels { display: flex; flex-direction: column; gap: 6px; }
.ntr-peek-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.ntr-peek-prob {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #d9a93b;
  border-radius: 12px;
  padding: 1px 10px;
}
.ntr-peek-range { font-weight: 800; color: #6b3f14; font-size: 15px; }

/* ---------- 道具选目标弹窗 ---------- */
.item-target-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 340px; overflow-y: auto; }
.item-target {
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream2);
  cursor: pointer;
  font-size: 13px;
  color: var(--brown2);
  transition: border-color .12s, background .12s;
}
.item-target:hover { border-color: var(--orange); background: #fff3dd; color: var(--brown); }

/* ---------- 个股详情 ---------- */
.stock-name { color: var(--brown2); text-decoration: none; font-weight: 700; }
.stock-name:hover { color: var(--orange); text-decoration: underline; }
.modal-box.stock-detail { width: 660px; max-width: 94vw; max-height: 88vh; overflow-y: auto; }
.sd-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.sd-title { font-size: 18px; font-weight: 800; color: var(--brown); }
.sd-price { font-size: 22px; font-weight: 900; margin-top: 2px; }
.sd-ohlc { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; font-size: 12px; color: var(--gray); }
.sd-ohlc b { color: var(--brown); }
.sd-sec { margin-top: 12px; }
.sd-sec-title { font-size: 13px; font-weight: 800; color: var(--orange); margin-bottom: 6px; }
.sd-sec p { font-size: 13px; color: #4a3a2c; line-height: 1.8; }
.sd-sec .ceo { color: #6b4a2a; }
.fin-row { display: flex; gap: 10px; flex-wrap: wrap; }
.fin-item { flex: 1; min-width: 110px; background: var(--cream2); border-radius: 8px; padding: 8px 12px; }
.fin-item .k { font-size: 11px; color: var(--gray); }
.fin-item .v { font-size: 15px; font-weight: 800; color: var(--brown); margin-top: 2px; }

/* ---------- AI 分析助手 ---------- */
.ai-bar { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; align-items: center; flex-wrap: wrap; }
.ai-result { margin-top: 10px; background: linear-gradient(160deg, #f0f4ff, #e6ecfb); border: 1px solid #c4d3f0; border-radius: 10px; padding: 12px 14px; }
.ai-result-title { font-size: 13px; font-weight: 800; color: #2f4a8a; margin-bottom: 8px; }
.ai-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-cell { flex: 1; min-width: 90px; background: rgba(255,255,255,.75); border-radius: 8px; padding: 6px 10px; text-align: center; }
.ai-cell.big { flex: 1.4; }
.ai-cell .k { font-size: 11px; color: #5a6f96; }
.ai-cell .v { font-size: 18px; font-weight: 900; margin-top: 2px; }
.ai-line { font-size: 13px; color: #33455f; line-height: 1.8; margin-top: 4px; }
.ai-line.clue { color: #8a93a8; font-size: 11px; }

/* ---------- 小道消息（账户页） ---------- */
.rumor-list { display: flex; flex-direction: column; gap: 8px; }
.rumor-item { border-left: 3px solid #9b6bff; background: var(--cream2); border-radius: 6px; padding: 8px 12px; }
.rumor-item .rumor-head { font-size: 13px; font-weight: 800; color: var(--brown); }
.rumor-item .rumor-body { font-size: 12px; color: #6b5342; line-height: 1.7; margin-top: 3px; }
.rumor-item .rumor-meta { font-size: 11px; color: var(--gray); margin-top: 3px; }

/* ---------- 重大事件选项 ---------- */
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.choice-card {
  border: 2px solid var(--orange);
  background: linear-gradient(160deg, #fff9ec, #f7ead2);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232, 137, 45, .35);
}
.choice-label { font-size: 15px; font-weight: 800; color: var(--brown); }
.choice-desc { font-size: 12px; color: #6b5342; line-height: 1.7; margin-top: 4px; }

/* ---------- 生效中 · 红色品质 ---------- */
.ab-red { border-color: #c0392b; color: #a0281b; background: #fdf1ef; }

/* ---------- 财报 / 股东标签 ---------- */
.tag.earn { background: #5a7dc0; }
.tag.core { background: #b8860b; }
.tag.full { background: #2c2420; color: #ffd98a; }

/* ---------- 快捷金额 ---------- */
.quick-amt { display: flex; align-items: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.btn-mini {
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--cream2);
  color: var(--brown2);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.btn-mini:hover { border-color: var(--orange); background: #fff3dd; }

/* ---------- 新股申购专用按钮（底部固定，喜庆中国红 + 金边） ---------- */
.btn-ipo {
  background: linear-gradient(135deg, #e02d2d, #b91c1c);
  color: #ffe9b8;
  border: 2px solid #ffd76a;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  border-radius: 22px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(224, 45, 45, .45);
  animation: ipoPulse 1.8s ease-in-out infinite;
  transition: transform .12s;
}
.btn-ipo:hover { transform: translateY(-2px); }
@keyframes ipoPulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(224,45,45,.4); }
  50% { box-shadow: 0 3px 20px rgba(255,215,106,.8); }
}

/* 新股申购弹窗（独立页面） */
.ipo-modal { border: 2px solid #ffd76a; }
.ipo-head { text-align: center; padding: 4px 0 10px; }
.ipo-horn { font-size: 34px; line-height: 1.3; }
.ipo-title { font-size: 22px; font-weight: 900; color: #c0392b; letter-spacing: 3px; }
.ipo-sub { font-size: 12px; color: var(--gray); margin-top: 4px; }
.ipo-card {
  background: #fff8e6;
  border: 1px solid #e8cf9a;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.ipo-lock {
  text-align: center;
  background: #fff8e6;
  border: 1px dashed #d9a93b;
  border-radius: 10px;
  padding: 22px 14px;
  margin-top: 10px;
}
.ipo-rule {
  font-size: 11.5px;
  color: var(--gray);
  line-height: 1.9;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--cream2);
  border-radius: 8px;
}

/* ---------- 赌牛默示录专用按钮 ---------- */
.btn-gamble {
  background: linear-gradient(135deg, #2c2420, #4a3a2c);
  color: #ffd98a;
  border: 1px solid #ffd98a;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 22px;
  cursor: pointer;
  animation: gamblePulse 1.8s ease-in-out infinite;
}
.btn-gamble.active-gamble { border-color: #f0743a; color: #fff; }
@keyframes gamblePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 217, 138, .0); }
  50% { box-shadow: 0 0 14px 2px rgba(255, 217, 138, .65); }
}

/* ---------- 大考验专用按钮（进行中/结算中显示） ---------- */
.btn-boss {
  background: linear-gradient(135deg, #4a1712, #7a2d1d);
  color: #ffd9a8;
  border: 1px solid #ff9d6c;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 22px;
  cursor: pointer;
  animation: bossPulse 1.6s ease-in-out infinite;
}
.btn-boss.settle { border-color: #ff5a4a; color: #fff; }
/* 桌面端：大考验未解锁时不显示（顶部进度条已展示下一场） */
.btn-boss.preview { display: none; }
@keyframes bossPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 140, 90, .0); }
  50% { box-shadow: 0 0 14px 2px rgba(255, 140, 90, .7); }
}

/* ---------- 旗下资产（持仓页） ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.asset-card {
  border: 2px solid #2c2420;
  background: linear-gradient(160deg, #3a302a, #2c2420);
  color: #ffe9c2;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.asset-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(44, 36, 32, .5); }
.asset-head { font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.asset-line { font-size: 12px; color: #d9b98a; margin-top: 6px; }
.asset-line b { color: #ffd98a; }
.asset-link { font-size: 12px; color: #f0743a; margin-top: 8px; }
.story {
  font-size: 13px;
  color: #4a3a2c;
  line-height: 2;
  background: var(--cream2);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 4px solid var(--orange);
}

/* ---------- 成就达成弹窗 ---------- */
.ach-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px; }
.ach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #d9a93b;
  background: linear-gradient(160deg, #fff8e0, #fdf0c8);
  border-radius: 10px;
  padding: 10px 14px;
}
.ach-medal { font-size: 22px; }
.ach-txt { font-size: 13px; font-weight: 700; color: #7a5a12; line-height: 1.7; }

/* =====================================================================
   移动端折叠按钮（仅 <768px 显示；桌面端隐藏）
   ===================================================================== */
.fold-btn { display: none; }
.newsbar-head { display: flex; align-items: center; gap: 8px; }

/* =====================================================================
   移动端股票卡片列表（仅 <768px 显示，桌面隐藏；操作按钮常驻可见）
   ===================================================================== */
.stock-cards { display: none; }

/* =====================================================================
   移动端适配（纯 CSS 响应式，仅命中手机/窄屏，不影响桌面端）
   ===================================================================== */

/* ---------- 触屏设备：消除"粘滞 hover"（桌面 hover 视觉不受影响） ---------- */
@media (hover: none) {
  #btn-step:hover,
  .btn:hover, .btn-mini:hover, .btn-primary:hover,
  .btn-gacha:hover, .btn-gamble:hover,
  .char-card:hover, .item-card:hover, .ach-card:hover,
  .choice-card:hover, .bless-card:hover, .asset-card:hover,
  .item-target:hover, .stock-name:hover,
  .market-tabs button:hover {
    transform: none;
    box-shadow: none;
    animation: none;
    background: inherit;
    border-color: inherit;
    color: inherit;
  }
  .market-tabs button.active:hover { background: var(--brown); color: #fff; border-color: var(--brown); }
}

/* ---------- 移动端布局（视口宽度 < 768px） ---------- */
@media (max-width: 768px) {
  body { font-size: 15px; line-height: 1.55; }

  /* 折叠按钮：移动端显示 */
  .fold-btn {
    display: inline-block;
    flex: none;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,233,207,.35);
    color: #ffe9cf;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
  }

  /* 顶栏：压缩留白，隐藏副标题，统计改为 3 列网格（避免 4 行杂乱换行） */
  #topbar { padding: 8px 12px; gap: 6px; }
  .logo { font-size: 20px; }
  .logo small { display: none; }
  .stats { gap: 10px; font-size: 12px; display: grid; grid-template-columns: repeat(3, auto); gap: 3px 14px; width: 100%; }
  .stat b { font-size: 13px; }
  .expbar-track { width: 76px; }
  .expbar { font-size: 11px; }
  #winprog { width: 100%; }
  #btn-fold-top { margin-left: auto; }
  /* 收起顶部：只留 logo + 按钮一行 */
  body.fold-top #stats,
  body.fold-top #expbar,
  body.fold-top #winprog { display: none; }
  body.fold-top #topbar { padding: 6px 12px; }
  body.fold-top .logo { font-size: 18px; }

  /* 新闻栏：左右两列改单列堆叠，整体压缩高度 */
  .newsbar { padding: 6px 12px; }
  .newsbar-head { align-items: center; }
  .newsbar-head .newsbar-alert { flex: 1; margin-bottom: 0; }
  #btn-fold-news { flex: none; }
  .newsbar-cols { grid-template-columns: 1fr; gap: 8px; }
  .newsbar-col { max-height: 84px; }
  .newsbar-alert { padding: 5px 8px; margin-bottom: 5px; }
  .newsbar .news-item { padding: 2px 6px 2px 10px; }
  .newsbar-col + .newsbar-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 233, 207, .18);
    padding-top: 6px;
  }
  /* 收起新闻：只留顶部预警播报条；无预警条时保留一行折叠按钮，保证可再展开 */
  body.fold-news .newsbar-cols { display: none; }
  body.fold-news #newsbar:not(:has(.newsbar-alert)) { padding: 4px 12px; }

  /* 页签：横向滑动（9 个 tab 不换行、不挤压），右侧渐隐提示可滑动 */
  #tabs { padding: 6px 8px 0; gap: 2px; overflow-x: auto; scrollbar-width: none; position: relative; }
  #tabs::-webkit-scrollbar { display: none; }
  #tabs::after {
    content: "";
    position: absolute; top: 0; right: 0; bottom: 0; width: 36px;
    background: linear-gradient(90deg, rgba(250,246,236,0), rgba(250,246,236,.95));
    pointer-events: none;
  }
  #tabs button { flex: none; padding: 8px 13px; font-size: 13px; }

  /* 主内容与卡片 */
  main { padding: 12px 12px 78px; }
  .card { padding: 12px; }
  .card h3 { font-size: 14px; }

  /* 行情：桌面表格 → 移动端卡片列表（操作按钮常驻、触控目标加大） */
  table.stock-table { display: none; }
  .stock-cards { display: flex; flex-direction: column; gap: 10px; }
  .stock-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: 12px;
    padding: 12px;
  }
  .sc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
  .sc-name { font-size: 14px; font-weight: 800; color: var(--brown); line-height: 1.55; }
  .sc-quote { text-align: right; flex: none; }
  .sc-price { font-size: 17px; font-weight: 900; }
  .sc-ret { font-size: 12px; font-weight: 800; }
  .sc-tags { margin-top: 6px; }
  .sc-tags .tag { display: inline-block; margin: 2px 4px 0 0; }
  .sc-mid { margin-top: 8px; }
  .sc-mid svg { display: block; width: 100%; height: auto; max-height: 46px; }
  .sc-ops { display: flex; gap: 8px; margin-top: 10px; }
  .sc-ops .btn {
    flex: 1;
    min-width: 0;
    padding: 11px 2px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
  }
  .sc-ops .btn:disabled { opacity: .35; }

  /* 表格：自身横向滑动，标题/卡片固定不跟随滚动 */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  th, td { padding: 7px 7px; font-size: 12px; }
  /* 表格内操作按钮（持仓/历史等）：加大触控目标 */
  td .btn { padding: 8px 12px; font-size: 13px; }

  /* 行情页细节 */
  .indexline .idxname { font-size: 15px; }
  .indexline .idxval { font-size: 15px; }
  .market-tabs button { padding: 6px 13px; font-size: 13px; }

  /* 底部操作栏：一行排开（按钮缩小），"收盘结算"保持突出；大考验未解锁时显示倒计时占位 */
  footer {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  footer .btn {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 10px 2px;
    font-size: 12px;
    text-align: center;
    border-radius: 8px;
    white-space: nowrap;
  }
  #btn-step { font-size: 13px; font-weight: 800; border-radius: 8px; padding: 10px 4px; white-space: nowrap; }
  #btn-gacha, #btn-ipo { letter-spacing: 0; }
  /* 大考验占位（未解锁）：不可点击的浅色提示 */
  #btn-boss.preview {
    display: block;
    pointer-events: none;
    opacity: .85;
    background: rgba(255,255,255,.45);
    border-style: dashed;
    color: var(--gray);
    font-weight: 700;
  }

  /* 账户页：网格保持 2 列（默认 minmax 在窄屏会退化成一列长条） */
  .account-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* 弹窗：移动端全屏化（含宽弹窗） */
  .modal { align-items: stretch; overflow-y: auto; }
  .modal-box {
    width: 100vw;
    max-width: 100vw;
    min-height: 100dvh;
    border-radius: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
  }
  .modal-box.wide,
  .modal-box.stock-detail,
  .modal-box.wide.char-modal { width: 100vw; max-width: 100vw; }

  /* 弹窗内表单/按钮：加大触控目标；输入框字号≥16px 防止 iOS 聚焦时自动放大 */
  .modal-box input, .modal-box select { font-size: 16px; padding: 10px 12px; }
  .modal-btns { gap: 10px; }
  .modal-btns .btn { flex: 1; padding: 12px 6px; font-size: 15px; }
  .quick-amt .btn-mini { padding: 9px 14px; font-size: 13px; }

  /* Toast */
  .toast { bottom: 66px; max-width: 92vw; }

  /* 记录页 */
  .h-events { max-height: 52vh; }

  /* 触屏按压反馈（替代 hover 的浮起效果） */
  .btn:active, .btn-mini:active, .char-card:active, .item-card:active,
  .ach-card:active, .choice-card:active, .bless-card:active,
  .asset-card:active, .item-target:active {
    transform: scale(.97);
  }
}

/* 账户页：我的遗物（名称+状态+描述） */
.heirloom-list { display: flex; flex-direction: column; gap: 8px; }
.heirloom-row {
  background: var(--cream2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
}
.heirloom-name { font-weight: 700; color: var(--brown); margin-bottom: 3px; }
.heirloom-desc { font-size: 12px; color: var(--gray); line-height: 1.6; }

/* ---------- 大考验 / 小考验 提示窗 ---------- */
.boss-modal { padding: 20px 22px; }
.boss-head {
  text-align: center;
  background: linear-gradient(135deg, #3d2c1f, #5b3a29);
  border-radius: 10px;
  padding: 14px 10px 12px;
  margin: -6px -4px 14px;
  color: #ffe9cf;
}
.boss-horn { font-size: 26px; line-height: 1; }
.boss-title {
  font-size: 22px; font-weight: 900; letter-spacing: 1px;
  color: #ffc98a; margin: 4px 0 2px;
  text-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.boss-sub { font-size: 12px; color: #e8d9c4; letter-spacing: 2px; }
.boss-desc {
  font-size: 13px; line-height: 1.9; color: var(--brown);
  background: var(--cream2);
  border-left: 3px solid var(--orange);
  border-radius: 6px; padding: 10px 12px; margin-bottom: 10px;
}
.boss-meta { font-size: 13px; color: var(--brown2); text-align: center; margin-bottom: 8px; }
.boss-warn {
  font-size: 12px; color: #b0301f; font-weight: 700;
  background: rgba(192,57,43,.08);
  border-left: 3px solid var(--red);
  border-radius: 6px; padding: 8px 12px; margin-bottom: 10px;
  line-height: 1.7;
}
.boss-item-title, .boss-event-title {
  font-size: 13px; font-weight: 800; color: var(--brown);
  margin: 14px 0 8px;
  display: flex; align-items: baseline; gap: 6px;
}
.boss-item-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.boss-item-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; border-radius: 8px; cursor: pointer;
}
.boss-item-btn .bi-name { font-size: 12.5px; font-weight: 800; color: var(--brown); }
.boss-item-btn .bi-desc { font-size: 10.5px; color: var(--gray); line-height: 1.4; text-align: center; }
.boss-item-btn .bi-cnt { font-size: 11px; font-weight: 800; color: var(--orange); }
.boss-item-on { border-color: var(--orange); background: #fff3dd; }
.boss-item-on:hover { background: #ffe6c0; }
.boss-item-off { border-style: dashed; opacity: .55; }
.boss-item-off .bi-cnt { color: var(--gray); }
.boss-event-list { display: flex; flex-direction: column; gap: 6px; }
.boss-event-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--cream2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
}
.boss-event-btn:hover { border-color: var(--orange); background: #fff3dd; }
.boss-event-btn .be-name { font-size: 13px; font-weight: 700; color: var(--brown); }
.boss-event-btn .be-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.st-done     { color: #1e8449; background: rgba(30,132,73,.12); }
.st-active   { color: #c0392b; background: rgba(192,57,43,.12); }
.st-incoming { color: #c0392b; background: rgba(192,57,43,.14); font-weight: 900; }
.st-locked   { color: var(--gray); background: rgba(138,128,120,.14); }
.st-upcoming { color: #7a5238; background: rgba(232,137,45,.14); }
.st-ready    { color: #b8860b; background: rgba(184,134,11,.14); }
.boss-prog { background: var(--cream2); border-radius: 8px; padding: 10px 12px; margin: 4px 0 6px; }
.boss-prog-row { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--brown2); margin-bottom: 6px; }
