:root {
  --bg: #0b0c0e;
  --bg2: #121418;
  --panel: #15181d;
  --panel2: #1b1f26;
  --line: #2a2f38;
  --text: #d8dbe0;
  --dim: #8a909b;
  --red: #ff3b3b;
  --red-dim: #7a1717;
  --amber: #ffb547;
  --green: #5fd38a;
  --blue: #3fb6ff;
  --blue-glow: rgba(63, 182, 255, .55);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at 50% -20%, #2a0d0d 0%, transparent 60%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button { font-family: inherit; }

/* ---------- 按钮 ---------- */
.btn {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover:not(:disabled) { border-color: #4a5260; background: #232833; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-primary { border-color: #3a6; color: #bff5cf; }
.btn-danger { border-color: var(--red-dim); background: #2a1010; color: #ffd0d0; }
.btn-danger:hover:not(:disabled) { background: #3d1313; border-color: var(--red); box-shadow: 0 0 16px rgba(255,59,59,.3); }
.btn-sys { border-color: #1f6fa3; background: #0d2233; color: #bfe6ff; }
.btn-sys:hover:not(:disabled) { background: #11314a; border-color: var(--blue); box-shadow: 0 0 14px var(--blue-glow); }

/* ---------- 标题画面 ---------- */
.screen { position: fixed; inset: 0; }
#title-screen {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1a0606 0%, #050505 75%);
  overflow: hidden;
}
.title-noise {
  position: absolute; inset: -50%;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  animation: scan 8s linear infinite;
  pointer-events: none;
}
@keyframes scan { to { transform: translateY(60px); } }
.title-inner { position: relative; text-align: center; padding: 24px 16px; max-width: 520px; width: 100%; }
.title-warning { color: var(--red); letter-spacing: 4px; font-size: 13px; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.title-main {
  font-size: clamp(44px, 12vw, 84px); margin: 12px 0 0; letter-spacing: 6px;
  color: #ff4a4a;
  text-shadow: 0 0 18px rgba(255,40,40,.65), 0 0 2px #fff, 3px 0 0 rgba(0,180,255,.35), -3px 0 0 rgba(255,0,0,.4);
  animation: glitch 4s infinite;
}
@keyframes glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: translate(-3px, 1px) skewX(4deg); }
  95% { transform: translate(3px, -1px) skewX(-3deg); }
  97% { transform: translate(-1px, 0); }
}
.title-sub {
  margin-top: 6px; font-size: 22px; letter-spacing: 10px; color: var(--blue);
  text-shadow: 0 0 12px var(--blue-glow);
}
.title-tag { color: var(--dim); margin: 22px 0; }
.title-name { margin: 18px auto; display: flex; gap: 10px; align-items: center; justify-content: center; }
.title-name label { color: var(--dim); font-size: 14px; }
.title-name input {
  background: #0c0e12; border: 1px solid var(--line); color: var(--text);
  padding: 8px 12px; border-radius: 6px; width: 130px; font-size: 16px; text-align: center; font-family: inherit;
}
.title-buttons { display: flex; flex-direction: column; gap: 10px; max-width: 260px; margin: 0 auto; }
.title-buttons .btn { padding: 13px; font-size: 17px; }
.title-save-info { color: var(--dim); font-size: 13px; margin-top: 12px; min-height: 1em; }

/* ---------- 顶栏 ---------- */
#game-screen { display: flex; flex-direction: column; }
#topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 14px; background: linear-gradient(#16090a, #0f0f11);
  border-bottom: 1px solid #3a1414;
}
.tb-time { display: flex; flex-direction: column; line-height: 1.25; min-width: 92px; }
#tb-day { font-weight: 700; }
#tb-clock { color: var(--dim); font-family: var(--mono); font-size: 13px; }
.tb-countdown {
  color: var(--red); font-size: 24px; font-weight: 800; letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(255,40,40,.6);
  animation: pulse 2s ease-in-out infinite;
  flex: 1 1 auto; text-align: center; white-space: nowrap;
}
.tb-countdown.calm { color: var(--amber); text-shadow: 0 0 12px rgba(255,181,71,.4); }
@keyframes pulse { 50% { opacity: .72; } }
.tb-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 14px; }
.stat i { font-style: normal; }
.stat b { font-weight: 600; }
.stat-sys b { color: var(--blue); text-shadow: 0 0 8px var(--blue-glow); }
.stat.flash b { animation: statflash .6s; }
@keyframes statflash { 0% { color: #fff; transform: scale(1.3); } 100% { transform: none; } }
.stat.low b { color: var(--red); }
.tb-buttons { display: flex; gap: 6px; }

/* ---------- 三栏布局 ---------- */
#layout {
  flex: 1; display: grid; min-height: 0;
  grid-template-columns: 300px 1fr 320px;
  gap: 10px; padding: 10px;
}
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  overflow-y: auto; min-height: 0; padding: 10px 12px;
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.panel-title {
  font-size: 13px; color: var(--dim); letter-spacing: 2px; margin: 10px 0 6px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.panel-title:first-child { margin-top: 0; }
.panel-title small { letter-spacing: 0; font-family: var(--mono); }

/* 行动列表 */
.act-group { margin-bottom: 10px; }
.act-group-head {
  font-size: 13px; color: #c9a36a; padding: 4px 2px; border-bottom: 1px dashed #3a3226; margin-bottom: 6px;
  cursor: pointer; user-select: none; display: flex; justify-content: space-between;
}
.act-group.collapsed .act-list { display: none; }
.act-group.collapsed .act-group-head::after { content: '▸'; }
.act-group-head::after { content: '▾'; color: var(--dim); }
.act {
  display: block; width: 100%; text-align: left;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); padding: 7px 9px; margin-bottom: 5px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.act:hover:not(:disabled) { border-color: #6b4a2a; background: #231d18; }
.act:disabled { opacity: .42; cursor: not-allowed; }
.act-name { font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.act-cost { font-size: 11.5px; color: var(--amber); font-family: var(--mono); white-space: nowrap; }
.act-desc { font-size: 12px; color: var(--dim); line-height: 1.4; margin-top: 2px; }
.act-reason { font-size: 11.5px; color: #e07a7a; margin-top: 2px; }

/* 任务 */
#tasks { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.tasks-title { font-size: 13px; color: var(--blue); letter-spacing: 2px; margin-bottom: 4px; text-shadow: 0 0 8px var(--blue-glow); }
.task { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; color: #b9d8ef; }
.task.done { color: var(--green); text-decoration: line-through; opacity: .75; }
.task .rw { color: var(--blue); font-family: var(--mono); white-space: nowrap; }

/* 剧情区 */
#panel-center { display: flex; flex-direction: column; position: relative; }
#story { flex: 1; overflow-y: auto; padding-right: 4px; font-size: 15.5px; line-height: 1.85; cursor: pointer; scrollbar-width: thin; }
#story p { margin: 0 0 6px; animation: fadein .35s ease; white-space: pre-wrap; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }
#story .l-title { text-align: center; color: var(--amber); font-weight: 700; margin: 16px 0 8px; letter-spacing: 3px; }
#story .l-good { color: var(--green); }
#story .l-bad { color: #ff7272; }
#story .l-sys { color: var(--blue); text-shadow: 0 0 6px var(--blue-glow); }
#story .l-dim { color: var(--dim); font-size: 14px; }
#story .l-event { color: #f1d6a8; }
#story .l-big { color: var(--red); font-size: 18px; font-weight: 700; }
#story-skip { font-size: 11px; color: #555; text-align: right; }

/* 仓库 */
.cap-bar { height: 8px; background: #0b0d10; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
#cap-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2f9d5b, #e3b341); transition: width .4s; }
#cap-fill.full { background: linear-gradient(90deg, #d0612e, var(--red)); }
#supply-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0; font-size: 12px; }
.sup { background: var(--panel2); border-radius: 5px; padding: 4px 6px; text-align: center; }
.sup b { display: block; font-family: var(--mono); font-size: 14px; }
.sup.warn b { color: var(--red); }
#inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 5px; }
.inv-cell {
  position: relative; aspect-ratio: 1; background: #101317; border: 1px solid #262b33; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: help;
}
.inv-cell.pop { animation: pop .45s; }
@keyframes pop { 0% { transform: scale(1.35); border-color: var(--amber); } }
.inv-cell .q {
  position: absolute; right: 2px; bottom: 0; font-size: 11px; font-family: var(--mono); color: #fff;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
}
.inv-empty { grid-column: 1 / -1; color: var(--dim); font-size: 13px; text-align: center; padding: 10px; border: 1px dashed var(--line); border-radius: 6px; }

/* 安全屋 & 队伍 */
.shelter-card { background: var(--panel2); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.shelter-card .sh-name { font-size: 15px; font-weight: 600; }
.shelter-card .sh-def { color: var(--amber); font-family: var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: #252a33; color: #c8ccd3; }
.chip.sys { background: #0e2a40; color: #bfe6ff; border: 1px solid #1f5f8a; }
.member { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: 6px; padding: 6px 8px; margin-bottom: 5px; font-size: 13px; }
.member .m-icon { font-size: 22px; }
.member .m-main { flex: 1; min-width: 0; }
.member .m-sub { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpbar { height: 5px; background: #0b0d10; border-radius: 3px; overflow: hidden; margin-top: 3px; }
.hpbar div { height: 100%; background: var(--green); transition: width .4s; }
.hpbar div.mid { background: var(--amber); }
.hpbar div.low { background: var(--red); }
.member.pending { opacity: .6; border: 1px dashed #444; }

/* ---------- 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadein .2s;
}
.modal-box {
  background: #14171c; border: 1px solid #4a2020; border-radius: 10px;
  box-shadow: 0 0 40px rgba(255,40,40,.15);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; padding: 18px 18px 14px;
}
.modal-box.wide { max-width: 760px; }
.modal-title { font-size: 19px; font-weight: 700; color: #ffd6a0; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.modal-text { white-space: pre-wrap; color: #cfd3da; margin-bottom: 14px; line-height: 1.75; }
.choice {
  display: block; width: 100%; text-align: left; margin-bottom: 8px;
  background: #1c2027; border: 1px solid #333a45; color: var(--text); border-radius: 7px; padding: 10px 12px; cursor: pointer; font-size: 15px;
}
.choice:hover:not(:disabled) { border-color: var(--amber); background: #241f19; }
.choice:disabled { opacity: .45; cursor: not-allowed; }
.choice small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.choice .why { color: #e07a7a; }

/* 商店 */
.shop-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.shop-row { display: flex; align-items: center; gap: 10px; background: #1a1e24; border: 1px solid #2a2f38; border-radius: 7px; padding: 7px 9px; }
.shop-row .ic { font-size: 26px; width: 34px; text-align: center; }
.shop-row .info { flex: 1; min-width: 0; }
.shop-row .nm { font-size: 14.5px; }
.shop-row .ds { font-size: 12px; color: var(--dim); line-height: 1.4; }
.shop-row .pr { font-family: var(--mono); color: var(--amber); font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 30px; height: 30px; border-radius: 5px; border: 1px solid #3a414d; background: #232833; color: #fff; font-size: 16px; cursor: pointer; }
.stepper button:disabled { opacity: .35; }
.stepper span { width: 28px; text-align: center; font-family: var(--mono); }
.shop-foot { position: sticky; bottom: -14px; background: #14171c; padding: 10px 0 4px; border-top: 1px solid var(--line); }
.shop-sum { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-family: var(--mono); }
.shop-sum .bad { color: var(--red); }
.shop-btns { display: flex; gap: 8px; justify-content: flex-end; }
.sys-shop .modal-box, .modal-box.sysm { border-color: #1f6fa3; box-shadow: 0 0 40px rgba(63,182,255,.25); }
.sysm .modal-title { color: #bfe6ff; text-shadow: 0 0 10px var(--blue-glow); }
.sysm .shop-row { border-color: #1b3a52; background: #0f1a24; }
.sysm .pr { color: var(--blue); }

/* 系统提示 */
.overlay-sys { background: rgba(0,10,20,.55); z-index: 60; }
.sys-panel {
  width: 100%; max-width: 440px; padding: 18px 20px 14px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(10,40,70,.95), rgba(6,20,36,.96));
  border: 1px solid var(--blue);
  box-shadow: 0 0 22px var(--blue-glow), inset 0 0 22px rgba(63,182,255,.2);
  animation: sysin .35s cubic-bezier(.2,1.4,.4,1);
  position: relative;
}
.sys-panel::before, .sys-panel::after {
  content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid #9fe0ff;
}
.sys-panel::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.sys-panel::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
@keyframes sysin { from { transform: scale(.7); opacity: 0; } }
.sys-head { color: #9fe0ff; font-size: 20px; font-weight: 800; letter-spacing: 3px; text-shadow: 0 0 10px var(--blue); margin-bottom: 8px; }
.sys-body { color: #dff3ff; white-space: pre-wrap; min-height: 3em; line-height: 1.8; margin-bottom: 14px; }
.sys-body .cursor { display: inline-block; width: 8px; background: #9fe0ff; animation: blink .8s steps(2) infinite; }
#sys-ok { float: right; }
.sys-panel::selection { background: transparent; }

/* 末日演出 */
.overlay-cine { background: #000; z-index: 70; flex-direction: column; }
#cine-text { max-width: 640px; width: 100%; font-size: 18px; line-height: 2; }
#cine-text p { margin: 0 0 8px; animation: fadein .8s; }
#cine-text .c-big { font-size: 30px; color: var(--red); font-weight: 800; text-align: center; text-shadow: 0 0 20px red; }
#cine-text .c-sys { color: var(--blue); text-shadow: 0 0 10px var(--blue); text-align: center; }
#cine-text .c-dim { color: #777; }
#cine-ok { margin-top: 24px; }
.shake { animation: shake .5s; }
@keyframes shake {
  20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, 3px); } 80% { transform: translate(3px, -1px); }
}
.flash-red { animation: flashred .7s; }
@keyframes flashred { 0% { box-shadow: inset 0 0 0 9999px rgba(255,0,0,.35); } 100% { box-shadow: none; } }

/* 结局 */
.ending { text-align: center; }
.ending .e-icon { font-size: 60px; }
.ending .e-name { font-size: 26px; font-weight: 800; color: #ffd6a0; letter-spacing: 3px; margin: 6px 0; }
.ending .e-text { text-align: left; white-space: pre-wrap; color: #cfd3da; line-height: 1.8; margin: 12px 0; }
.ending .grade { font-size: 72px; font-weight: 900; line-height: 1; margin: 8px 0; font-family: var(--mono); }
.grade.S { color: #ffd23f; text-shadow: 0 0 24px #ffb300; }
.grade.A { color: #ff7ad9; text-shadow: 0 0 20px #d0f; }
.grade.B { color: var(--blue); text-shadow: 0 0 18px var(--blue); }
.grade.C { color: var(--green); }
.grade.D { color: #888; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.stats-table td { padding: 5px 6px; border-bottom: 1px solid #262b33; text-align: left; }
.stats-table td:last-child { text-align: right; font-family: var(--mono); color: var(--amber); }

#toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 80;
  display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none;
}
.toast-item { background: #1d222b; border: 1px solid #3a414d; padding: 6px 14px; border-radius: 16px; font-size: 13.5px; animation: toast 2.4s forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#mobile-tabs { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  #layout { grid-template-columns: 260px 1fr 270px; }
}
@media (max-width: 860px) {
  body { font-size: 14px; }
  #topbar {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 6px 12px;
    grid-template-areas: "time btns" "stats stats" "cd cd";
  }
  .tb-time { grid-area: time; min-width: 0; flex-direction: row; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
  .tb-buttons { grid-area: btns; }
  .tb-stats { grid-area: stats; gap: 4px; flex-wrap: nowrap; justify-content: space-between; }
  .tb-countdown { grid-area: cd; font-size: 20px; line-height: 1.3; }
  .stat { font-size: 12.5px; gap: 2px; }
  #layout { display: block; padding: 8px; position: relative; }
  #layout > .panel { position: absolute; inset: 8px; display: none; }
  #layout > .panel.show { display: flex; flex-direction: column; }
  #panel-left.show, #panel-right.show { display: block; }
  #mobile-tabs {
    display: flex; border-top: 1px solid var(--line); background: #0f1114;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #mobile-tabs button {
    flex: 1; background: none; border: 0; color: var(--dim); padding: 12px 0; font-size: 14px; position: relative;
  }
  #mobile-tabs button.active { color: var(--amber); }
  #mobile-tabs button.badge::after {
    content: ''; position: absolute; top: 9px; right: calc(50% - 34px); width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  }
  .shop-row { flex-wrap: wrap; }
  .shop-row .info { flex-basis: calc(100% - 44px); }
  .shop-row .stepper { margin-left: auto; }
  #toast { bottom: 80px; }
}

/* ---------- 命运抽签 ---------- */
#gacha-screen { display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #071a2b 0%, #030507 75%); overflow-y: auto; }
.gacha-inner { position: relative; text-align: center; padding: 24px 16px; width: 100%; max-width: 860px; }
.gacha-title { font-size: 30px; font-weight: 800; letter-spacing: 6px; color: #bfe6ff; text-shadow: 0 0 16px var(--blue); }
.gacha-sub { color: var(--dim); margin: 6px 0 20px; }
.gacha-cards { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.gslot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gcard { width: 200px; height: 280px; perspective: 900px; cursor: default; }
.gcard-inner { position: relative; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.3,1.3,.5,1); transform-style: preserve-3d; }
.gcard.flipped .gcard-inner { transform: rotateY(180deg); }
.gcard-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; }
.gcard-back {
  background: repeating-linear-gradient(45deg, #0b2236 0 10px, #0d2a42 10px 20px);
  border: 2px solid #1f6fa3; box-shadow: 0 0 18px rgba(63,182,255,.25);
  color: #9fe0ff; font-size: 22px; letter-spacing: 4px; font-weight: 700;
}
.gcard-back .q { font-size: 64px; opacity: .6; }
.gcard-front { transform: rotateY(180deg); background: linear-gradient(170deg, #1a1e26, #0d0f13); border: 2px solid var(--rc, #888); box-shadow: 0 0 24px var(--rc, #888); }
.gcard-front .cat { position: absolute; top: 10px; left: 12px; font-size: 12px; color: var(--dim); letter-spacing: 2px; }
.gcard-front .rar { position: absolute; top: 8px; right: 10px; font-weight: 900; font-family: var(--mono); color: var(--rc); text-shadow: 0 0 8px var(--rc); }
.gcard-front .ic { font-size: 64px; line-height: 1.1; }
.gcard-front .nm { font-size: 22px; font-weight: 800; margin: 6px 0; color: #fff; }
.gcard-front .ds { font-size: 13px; color: #c8ccd3; line-height: 1.5; }
.gcard[data-rar="SSR"] .gcard-front { background: linear-gradient(170deg, #3a2c08, #120d02); animation: ssrglow 1.6s ease-in-out infinite; }
.gcard[data-rar="SR"] .gcard-front { background: linear-gradient(170deg, #2a1440, #0e0716); }
@keyframes ssrglow { 50% { box-shadow: 0 0 46px var(--rc); } }
.gslot .btn { padding: 6px 14px; font-size: 13px; }
.gacha-info { color: var(--dim); margin: 16px 0 10px; min-height: 1.4em; }
.gacha-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gacha-btns .btn { padding: 12px 26px; font-size: 17px; }
.gacha-rates { color: #556; font-size: 12px; margin-top: 14px; }
.ssr-flash { animation: ssrflash 1s; }
@keyframes ssrflash { 0% { box-shadow: inset 0 0 0 9999px rgba(255,210,60,.45); } 100% { box-shadow: none; } }
@media (max-width: 860px) {
  .gacha-cards { gap: 8px; flex-wrap: nowrap; }
  .gcard { width: 30vw; max-width: 140px; height: 210px; }
  .gcard-front .ic { font-size: 40px; }
  .gcard-front .nm { font-size: 16px; }
  .gcard-front .ds { font-size: 11px; }
  .gcard-back { font-size: 15px; }
  .gcard-back .q { font-size: 44px; }
  .gacha-title { font-size: 24px; }
}

/* ---------- 夜袭塔防 ---------- */
.overlay-battle { z-index: 65; background: #050507; padding: 10px; }
.bt-wrap { width: 100%; max-width: 1100px; position: relative; }
.bt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bt-title { font-size: 18px; font-weight: 800; color: #ff7272; text-shadow: 0 0 10px rgba(255,40,40,.5); }
.bt-wall { display: flex; align-items: center; gap: 6px; font-size: 13px; flex: 1; min-width: 180px; }
.bt-bar { flex: 1; height: 10px; background: #111; border: 1px solid #333; border-radius: 5px; overflow: hidden; }
#bt-wallfill { height: 100%; background: var(--green); transition: width .2s; }
#bt-wallfill.mid { background: var(--amber); } #bt-wallfill.low { background: var(--red); }
.bt-wall b { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.bt-left { font-size: 13px; color: #e0c040; font-family: var(--mono); }
.bt-speed { display: flex; gap: 4px; }
#bt-canvas { width: 100%; display: block; border-radius: 8px; border: 1px solid #3a1414; cursor: crosshair; background: #000; }
.bt-skills { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.bt-skill { background: #1c2027; border: 1px solid #3a414d; color: var(--text); border-radius: 8px; padding: 6px 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.bt-skill span { font-size: 20px; }
.bt-skill b { font-family: var(--mono); color: var(--amber); }
.bt-skill.on { border-color: var(--amber); box-shadow: 0 0 10px rgba(255,181,71,.4); }
.bt-skill:disabled { opacity: .35; cursor: not-allowed; }
.bt-tip { text-align: center; font-size: 12px; color: var(--dim); margin-top: 4px; }
.bt-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, 92%);
  background: #14171c; border: 1px solid #5a2020; border-radius: 10px; padding: 18px; text-align: center; box-shadow: 0 0 40px rgba(255,40,40,.25);
}
.bt-ptitle { font-size: 22px; font-weight: 800; color: #ffd6a0; margin-bottom: 8px; }
.bt-ptitle.good { color: var(--green); } .bt-ptitle.bad { color: var(--red); }
.bt-ptext { color: #cfd3da; line-height: 1.7; font-size: 14px; }
.bt-ptext .bad { color: #ff7272; }
.bt-defs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 10px 0; }
.bt-pbtns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.bt-check { display: block; margin-top: 10px; font-size: 12px; color: var(--dim); }
@media (max-width: 860px) {
  .bt-head { gap: 6px; }
  .bt-title { font-size: 15px; }
  .bt-skill { padding: 5px 8px; font-size: 12px; }
  .bt-skill span { font-size: 16px; }
  .bt-panel { position: fixed; }
}

/* ---------- 剧情 / 房间 切换 ---------- */
.center-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.center-tabs button { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--dim); border-radius: 6px; padding: 6px; font-size: 14px; cursor: pointer; }
.center-tabs button.active { color: var(--amber); border-color: #6b4a2a; background: #231d18; }
#room { flex: none; }
#basehub { flex: none; }

/* ---------- 我的房间 ---------- */
.rm-scene { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; container-type: inline-size; border: 1px solid #3a3226; user-select: none; }
.rm-wall { position: absolute; inset: 0 0 24% 0; background: repeating-linear-gradient(90deg, #4a4036 0 6cqw, #463c33 6cqw 12cqw); }
.rm-villa .rm-wall { background: repeating-linear-gradient(90deg, #5a4128 0 3cqw, #553d26 3cqw 3.3cqw); }
.rm-bunker .rm-wall { background: linear-gradient(#3a3d42, #2e3135); background-image: repeating-linear-gradient(0deg, #ffffff08 0 1px, transparent 1px 8cqw), linear-gradient(#3a3d42, #2e3135); }
.rm-floor { position: absolute; inset: 76% 0 0 0; background: repeating-linear-gradient(90deg, #3b2b1d 0 9cqw, #36271a 9cqw 9.3cqw); border-top: .5cqw solid #2a1e14; }
.rm-bunker .rm-floor { background: #26282c; }
.rm-scene [data-tip] { cursor: pointer; }

.rm-window { position: absolute; left: 4%; top: 7%; width: 24%; height: 36%; border: .8cqw solid #6b5a48; border-radius: .6cqw; overflow: hidden; }
.rm-window.sky-day { background: linear-gradient(#6fb5ff, #bfe3ff); }
.rm-window.sky-dusk { background: linear-gradient(#ff8a4c, #ffd28a); }
.rm-window.sky-night { background: linear-gradient(#05060c, #2a0d10); }
.rm-sun { position: absolute; right: 8%; top: 6%; font-size: 4cqw; }
.rm-moon { position: absolute; right: 8%; top: 6%; font-size: 3.4cqw; }
.rm-city { position: absolute; bottom: 0; left: 4%; font-size: 4.4cqw; letter-spacing: -.6cqw; }
.rm-z { position: absolute; bottom: 4%; font-size: 3.2cqw; filter: brightness(.6) sepia(1) hue-rotate(60deg); animation: zsway 3s ease-in-out infinite; }
@keyframes zsway { 50% { transform: translateX(1.4cqw) rotate(-4deg); } }
.rm-bars { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 2.3cqw, #222 2.3cqw 2.9cqw); }
.rm-planks::before, .rm-planks::after { content: ''; position: absolute; left: -10%; width: 120%; height: 2.4cqw; background: #8a5a2e; border: .2cqw solid #5a3a1e; box-shadow: 0 .3cqw .6cqw #0008; }
.rm-planks::before { top: 30%; transform: rotate(-14deg); }
.rm-planks::after { top: 58%; transform: rotate(10deg); }
.rm-planks.n3 { background: linear-gradient(transparent 44%, #7a4e26 44% 54%, transparent 54%); }
.rm-steel { position: absolute; inset: 12% 8%; background: linear-gradient(135deg, #8a9099, #5a6068); border: .3cqw solid #444; box-shadow: inset 0 0 1.4cqw #0008; }
.rm-steel::after { content: '· · · ·'; position: absolute; top: 4%; left: 6%; color: #333; font-size: 2cqw; letter-spacing: 3cqw; }
.rm-vent { position: absolute; left: 6%; top: 10%; width: 14cqw; height: 14cqw; border-radius: 50%; background: #1a1c1f; border: .8cqw solid #555; display: flex; align-items: center; justify-content: center; font-size: 8cqw; }
.rm-vent span { animation: spin 2s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.rm-cal { position: absolute; left: 31%; top: 8%; width: 8%; background: #f4efe4; color: #333; text-align: center; border-radius: .4cqw; padding: .4cqw 0; line-height: 1.1; box-shadow: 0 .3cqw .6cqw #0006; }
.rm-cal small { display: block; font-size: 1.1cqw; }
.rm-cal b { display: block; font-size: 3.4cqw; }
.rm-cal.red b { color: #d01818; }
.rm-tv { position: absolute; left: 42%; top: 8%; width: 20%; height: 16%; background: #111; border: .7cqw solid #2a2a2a; border-radius: .8cqw; overflow: hidden; display: flex; align-items: center; }
.rm-news { width: 100%; overflow: hidden; white-space: nowrap; color: #ffe08a; font-size: 1.6cqw; }
.rm-news span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.rm-tv.off span { position: relative; margin: auto; color: #ddd; font-size: 1.6cqw; }
.rm-static { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, #888 0 1px, #222 1px 3px); opacity: .5; animation: staticmv .2s steps(3) infinite; }
@keyframes staticmv { 50% { background-position: 0 2px; } }
.rm-rack { position: absolute; left: 65%; top: 9%; width: 14%; min-height: 9%; background: #3a2a1a; border: .3cqw solid #2a1d10; border-radius: .4cqw; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; font-size: 3cqw; padding: .3cqw; }
.rm-rack em { font-size: 1.2cqw; color: #a08a6a; font-style: normal; }
.rm-rack sub, .rm-eq sub { font-size: 1.3cqw; color: #fff; font-family: var(--mono); }

.rm-door { position: absolute; right: 4%; bottom: 24%; width: 13%; height: 52%; background: linear-gradient(90deg, #7a4f2a, #6a4322); border: .4cqw solid #3a2410; border-bottom: 0; border-radius: .6cqw .6cqw 0 0; }
.rm-door.steel { background: linear-gradient(90deg, #6d757e, #545b63); border-color: #333; box-shadow: inset 0 0 0 1cqw #0002; }
.rm-knob { position: absolute; left: 12%; top: 52%; width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: #d8b45a; }
.rm-lock { position: absolute; left: 6%; top: 46%; font-size: 2.4cqw; }
.rm-cracks { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, #000a 41% 42%, transparent 43%), linear-gradient(60deg, transparent 60%, #000a 61% 62%, transparent 63%); }
.rm-drawing { position: absolute; right: 10%; top: 16%; font-size: 3cqw; }
.rm-cam { position: absolute; right: 9%; top: 18%; font-size: 2.6cqw; }

.rm-shelfwrap { position: absolute; left: 31%; top: 28%; width: 46%; bottom: 24%; display: flex; flex-direction: column; justify-content: flex-end; }
.rm-shelf { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: .25cqw; background: #2a1d10; border: .5cqw solid #5a3c1e; padding: .4cqw; border-radius: .4cqw; }
.rm-shelf i { aspect-ratio: 1; background: #1a120a; border-radius: .2cqw; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: calc(46cqw / var(--cols) * .62); line-height: 1; }
.rm-shelf i.f { background: #3a2a18; }
.rm-crates { position: absolute; top: 100%; margin-top: .4cqw; left: 0; font-size: 3cqw; letter-spacing: -1cqw; width: 46cqw; white-space: nowrap; overflow: hidden; }

.rm-eqrow { position: absolute; left: 3%; bottom: 25%; width: 27%; display: flex; flex-wrap: wrap-reverse; gap: .5cqw; align-items: flex-end; }
.rm-eq { font-size: 3.4cqw; line-height: 1; }
.rm-eq.big { font-size: 5cqw; }
.rm-pet { font-size: 3.4cqw; animation: zsway 4s ease-in-out infinite; }

.rm-people { position: absolute; left: 3%; right: 3%; bottom: 2%; height: 21%; display: flex; justify-content: center; align-items: flex-end; gap: 1.4cqw; }
.rm-person { position: relative; display: flex; flex-direction: column; align-items: center; animation: idle 3s ease-in-out infinite; }
.rm-person:nth-child(2n) { animation-delay: .7s; } .rm-person:nth-child(3n) { animation-delay: 1.4s; }
@keyframes idle { 50% { transform: translateY(-.4cqw); } }
.rm-pi { font-size: 4.6cqw; line-height: 1; }
.rm-pn { font-size: 1.3cqw; color: #f1e6d2; background: #0008; padding: 0 .6cqw; border-radius: .6cqw; white-space: nowrap; }
.rm-person.hurt .rm-pi { filter: saturate(.3) brightness(.8); }
.rm-person.ghost { opacity: .45; }
.rm-bubble { position: absolute; bottom: 100%; margin-bottom: .6cqw; background: #f4efe4; color: #222; font-size: 1.5cqw; padding: .5cqw 1cqw; border-radius: 1cqw; white-space: nowrap; box-shadow: 0 .3cqw .8cqw #0008; z-index: 2; }
.rm-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; border: .8cqw solid transparent; border-top-color: #f4efe4; transform: translateX(-50%); }
.rm-bulb { position: absolute; left: 50%; top: 1%; font-size: 3cqw; filter: drop-shadow(0 0 2cqw #ffd36a); }

.rm-light { position: absolute; inset: 0; pointer-events: none; }
.rm-scene.dusk .rm-light { background: rgba(255,120,40,.12); }
.rm-scene.lamp .rm-light { background: radial-gradient(ellipse at 50% 0%, rgba(255,210,120,.18), rgba(0,0,10,.35) 75%); }
.rm-scene.dark .rm-light { background: radial-gradient(circle at 50% 75%, rgba(0,0,0,.2), rgba(0,0,8,.82) 55%); }

.rm-yard { margin-top: 6px; background: linear-gradient(#2f4a24, #23381b); border: 1px solid #3a5a2a; border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 20px; }
.rm-yard.balcony { background: linear-gradient(#3a3d42, #2e3135); border-color: #444; }
.rm-yard b { font-size: 12px; color: #cfe8c0; letter-spacing: 2px; }
.rm-status { margin-top: 6px; font-size: 13px; color: #d8c8a8; background: var(--panel2); border-radius: 6px; padding: 6px 10px; }
.rm-hint { font-size: 11px; color: #555; text-align: right; margin-top: 2px; }

/* 阶段氛围：末日后整个界面更暗、更红 */
body[data-phase="survival"] { background-image: radial-gradient(ellipse at 50% -20%, #3a0808 0%, transparent 65%); }
body[data-phase="survival"] #topbar { background: linear-gradient(#200606, #0f0a0a); border-bottom-color: #5a1414; }
body[data-phase="survival"] .panel { border-color: #2f2224; }

/* ---------- 我的房间（俯视角） ---------- */
.gi { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; fill: currentColor; }
.rscene { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; border: 2px solid #2a2520; background: #222; container-type: inline-size; user-select: none; box-shadow: 0 8px 30px #000a; }
.rscene .rt { position: absolute; display: block; image-rendering: auto; pointer-events: auto; }
.rscene [data-tip] { cursor: pointer; }
.ri { position: absolute; display: flex; align-items: center; justify-content: center; }
.ri .gi { width: 100%; height: 100%; }
.ri.farm { color: #7ee26b; filter: drop-shadow(0 1px 1px #000); }
.ri.farm.ripe { color: #3fe24a; }
.ri.solar { color: #3fb6ff; background: #0d2233; border: .3cqw solid #6aa8d8; border-radius: .4cqw; }
.walker { position: absolute; transform: rotate(var(--r)); animation: walkby 18s linear infinite; }
.walker.ped { left: -5%; animation-name: walkped; }
@keyframes walkped { from { left: -5%; } to { left: 105%; } }
.walker.z { animation: zshamble 6s ease-in-out infinite; }
@keyframes zshamble { 50% { transform: rotate(var(--r)) translateX(1.2cqw) rotate(8deg); } }
.rwall { position: absolute; background: linear-gradient(#5b5550, #34302c); box-shadow: 0 .3cqw .6cqw #0008; z-index: 2; }
.rwall.v { background: linear-gradient(90deg, #5b5550, #34302c); }
.rwin { position: absolute; z-index: 3; border: .35cqw solid #c9c0b0; background: linear-gradient(#bfe3ff, #6fb5ff); }
.rwin.dusk { background: linear-gradient(#ffd28a, #ff8a4c); }
.rwin.night { background: linear-gradient(#2a0d10, #05060c); }
.rwin.bars { background-image: repeating-linear-gradient(90deg, transparent 0 .9cqw, #222 .9cqw 1.25cqw), linear-gradient(#6fb5ff, #bfe3ff); }
.rwin.night.bars { background-image: repeating-linear-gradient(90deg, transparent 0 .9cqw, #555 .9cqw 1.25cqw), linear-gradient(#2a0d10, #05060c); }
.rwin.planks::after { content: ''; position: absolute; inset: -20% -6%; background: linear-gradient(8deg, transparent 30%, #8a5a2e 30% 48%, transparent 48% 55%, #7a4e26 55% 72%, transparent 72%); }
.rwin.steel { background: linear-gradient(135deg, #8a9099, #5a6068) !important; }
.rvent { position: absolute; z-index: 3; background: repeating-linear-gradient(90deg, #222 0 .5cqw, #666 .5cqw .8cqw); border: .3cqw solid #888; }
.rdoor { position: absolute; z-index: 3; background: linear-gradient(90deg, #8a5a2e, #6a4322); border: .25cqw solid #3a2410; border-radius: .3cqw; }
.rdoor.steel { background: linear-gradient(90deg, #7d858e, #545b63); border-color: #2a2d31; box-shadow: 0 0 1cqw #000a; }
.rstore { position: absolute; border: .25cqw dashed #e0c04055; border-radius: .6cqw; background: #00000022; }
.rcrate { position: absolute; z-index: 1; }
.rcrate img { position: absolute; inset: 4%; width: 92%; height: 92%; filter: hue-rotate(var(--h)) saturate(1.1) drop-shadow(0 .2cqw .2cqw #000a); }
.rcrate .gi { position: absolute; inset: 24%; width: 52%; height: 52%; color: #fff; filter: drop-shadow(0 0 .2cqw #000); }
.rdev { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; background: #2a2d33; border: .25cqw solid #11151a; border-radius: .6cqw; color: #ffd36a; box-shadow: 0 .3cqw .6cqw #000a; }
.rdev .gi { width: 78%; height: 78%; }
.rdev.big { color: #ffb547; }
.rdev.wpn { background: #3a2a1a; color: #e8e2d8; }
.rdev.cam { background: #1a1a1a; color: #ff5050; border-radius: 50%; }
.rdev b { position: absolute; right: -.4cqw; bottom: -.6cqw; font-size: 1.3cqw; background: #000c; color: #fff; padding: 0 .4cqw; border-radius: .6cqw; font-family: var(--mono); }
.rwire { position: absolute; background: repeating-linear-gradient(60deg, transparent 0 .6cqw, #a0a6ac .6cqw .8cqw), repeating-linear-gradient(-60deg, transparent 0 .6cqw, #6c7176 .6cqw .8cqw); }
.rt.blood { filter: sepia(1) saturate(6) hue-rotate(-50deg) brightness(.55); opacity: .8; }
.rperson { position: absolute; z-index: 4; display: flex; justify-content: center; }
.rperson img { width: 90%; height: auto; filter: drop-shadow(.3cqw .4cqw .2cqw #0009); animation: breathe 3s ease-in-out infinite; }
.rperson:nth-child(2n) img { animation-delay: -1s; }
@keyframes breathe { 50% { scale: 1.04; } }
.rperson.hurt img { filter: grayscale(.6) brightness(.8) drop-shadow(0 0 .6cqw #ff3030); }
.rperson.ghost { opacity: .45; }
.rpn { position: absolute; top: 92%; white-space: nowrap; font-size: 1.25cqw; color: #fff; background: #000a; padding: 0 .5cqw; border-radius: .5cqw; }
.rbubble { position: absolute; bottom: 104%; white-space: nowrap; background: #f6f1e7; color: #222; font-size: 1.35cqw; padding: .4cqw .9cqw; border-radius: .9cqw; box-shadow: 0 .3cqw .8cqw #000a; z-index: 6; }
.rbubble::after { content: ''; position: absolute; left: 50%; top: 100%; border: .6cqw solid transparent; border-top-color: #f6f1e7; transform: translateX(-50%); }
.rpet { position: absolute; z-index: 4; font-size: 2.6cqw; animation: idle 3s ease-in-out infinite; }
.rlight { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.rscene.dusk .rlight { background: rgba(255,120,40,.14); }
.rscene.lamp .rlight { background: linear-gradient(rgba(0,0,20,.55) 0 20%, transparent 20%), radial-gradient(ellipse at 55% 60%, rgba(255,210,120,.12), rgba(0,0,10,.35) 80%); }
.rscene.dark .rlight { background: linear-gradient(rgba(0,0,20,.6) 0 20%, transparent 20%), radial-gradient(circle at 55% 62%, rgba(0,0,0,.15), rgba(0,0,8,.85) 50%); }
.rcal { position: absolute; z-index: 9; left: 1.2%; top: 2%; background: #f4efe4; color: #333; text-align: center; border-radius: .6cqw; padding: .4cqw 1cqw; line-height: 1.05; box-shadow: 0 .4cqw 1cqw #000a; }
.rcal small { display: block; font-size: 1.1cqw; }
.rcal b { display: block; font-size: 3.6cqw; font-family: var(--num); }
.rcal.red b { color: #d01818; }
.rnews { position: absolute; z-index: 9; left: 0; right: 0; bottom: 0; background: #000c; color: #ffe08a; font-size: 1.5cqw; padding: .4cqw 1cqw; white-space: nowrap; overflow: hidden; }
.rstatus { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #e6d6b6; background: var(--panel2); border-radius: 8px; padding: 7px 10px; }
.rstatus span { display: inline-flex; align-items: center; gap: 4px; }
.rstatus .gi { color: var(--amber); }
.rhint { font-size: 11px; color: #556; text-align: right; margin-top: 3px; }

/* ==================== 视觉皮肤 v2 ==================== */
:root {
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --title: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  --num: "Share Tech Mono", "SF Mono", Menlo, monospace;
  --mono: var(--num);
  --panel: #14161a;
  --panel2: #1c1f25;
  --line: #2c3139;
  --hazard: repeating-linear-gradient(-45deg, #e0b43a 0 8px, #17130a 8px 16px);
}
body {
  background-color: #08090b;
  background-image:
    radial-gradient(ellipse at 50% -10%, #2c0b0b 0%, transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
}
.gi { fill: currentColor; }

/* 标题 */
.title-main { font-family: var(--title); letter-spacing: 10px; font-weight: 400; }
.title-sub { font-family: var(--title); }
.title-street { position: absolute; inset: 0; overflow: hidden; opacity: .5; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 140px, #ffffff06 140px 142px), linear-gradient(#0a0a0c, #141416); }
.title-street img { position: absolute; left: 105%; transform: rotate(180deg); filter: brightness(.55) drop-shadow(0 0 6px #000); animation: tstreet linear infinite; }
.title-street img.hero { left: 8%; top: 46%; width: 56px; transform: none; filter: brightness(.8) drop-shadow(0 0 12px #ffcc66aa); animation: none; }
@keyframes tstreet { from { left: 105%; } to { left: -8%; } }
.title-inner { background: radial-gradient(ellipse at center, #000000cc 30%, transparent 72%); padding: 40px 20px; }
.btn { font-weight: 700; letter-spacing: 1px; border-radius: 4px; }
.btn .gi { margin-right: 2px; }
.btn-danger { background: linear-gradient(#3a1212, #241010); }
.btn-sys { background: linear-gradient(#103049, #0a1f30); }
.gacha-title { font-family: var(--title); font-weight: 400; }

/* 顶栏 */
#topbar { background: linear-gradient(#1a0c0c, #0c0c0e); position: relative; }
#topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--hazard); opacity: .55; }
#tb-day { font-family: var(--title); font-weight: 400; font-size: 18px; letter-spacing: 1px; }
.tb-countdown { font-family: var(--title); font-weight: 400; font-size: 30px; letter-spacing: 3px; }
.stat { font-family: var(--num); font-size: 15px; background: #0c0e11; border: 1px solid #262a31; border-radius: 4px; padding: 2px 8px; }
.stat i { display: inline-flex; width: 16px; height: 16px; color: var(--amber); }
.stat-sys i { color: var(--blue); }
.stat i .gi { width: 16px; height: 16px; }
.tb-buttons .btn { display: inline-flex; align-items: center; gap: 4px; }
.tb-buttons .btn .gi { width: 16px; height: 16px; }

/* 面板 */
.panel { background: linear-gradient(180deg, #16191e, #111317); border-color: #262a31; box-shadow: inset 0 1px 0 #ffffff08; }
.panel-title { font-family: var(--title); font-size: 16px; color: #d9c49a; letter-spacing: 3px; border-left: 4px solid #e0b43a; padding-left: 8px; }
.panel-title small { font-family: var(--num); color: var(--dim); letter-spacing: 0; font-size: 13px; }
.act-group-head { font-family: var(--title); font-size: 15px; color: #e0b43a; letter-spacing: 2px; border-bottom: 1px solid #3a3226; }
.act { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; padding: 7px 8px; border-radius: 5px; background: linear-gradient(#1d2026, #181b20); }
.act > .act-name { grid-column: 1 / -1; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; }
.act-ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 6px; background: #0d0f12; border: 1px solid #333944; display: flex; align-items: center; justify-content: center; color: #e8c879; font-size: 20px; }
.act-ic .gi { width: 22px; height: 22px; }
.act-title { font-weight: 700; font-size: 14px; }
.act-desc, .act-reason { grid-column: 2 / -1; }
.act:hover:not(:disabled) .act-ic { border-color: #e0b43a; color: #ffd36a; box-shadow: 0 0 8px #e0b43a55; }
.act-cost { font-family: var(--num); font-size: 12px; background: #0c0e11; border-radius: 3px; padding: 0 5px; color: #ffb547; }

/* 任务 */
.tasks-title { font-family: var(--title); font-size: 15px; }

/* 剧情文字 */
#story { font-size: 16px; }
#story .l-title { font-family: var(--title); font-weight: 400; font-size: 20px; color: #e0b43a; }

/* 仓库格子 */
#inventory { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
.inv-cell { background: radial-gradient(circle at 50% 40%, #1f242c, #0d0f12); border: 1px solid #2a2f37; border-bottom: 2px solid var(--cc, #444); color: var(--cc, #ccc); }
.inv-cell .gi { width: 62%; height: 62%; filter: drop-shadow(0 1px 2px #000); }
.inv-cell .q { font-family: var(--num); font-size: 12px; color: #fff; }
.sup b { font-family: var(--num); font-size: 16px; }

/* 商店图标 */
.shop-row .ic { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; background: #0d0f12; border: 1px solid #2f343d; border-radius: 6px; }
.shop-row .ic .gi { width: 28px; height: 28px; }
.shop-row .ic.sysic { color: #7fd0ff; border-color: #1f5f8a; background: #071522; box-shadow: inset 0 0 10px #3fb6ff33; }
.modal-title { font-family: var(--title); font-weight: 400; font-size: 22px; letter-spacing: 2px; }
.sys-head { font-family: var(--title); font-weight: 400; font-size: 24px; }
.choice { border-radius: 5px; background: linear-gradient(#1f232a, #1a1d23); }
.ending .e-name { font-family: var(--title); font-weight: 400; font-size: 32px; }
.grade { font-family: var(--title) !important; }
.bt-title { font-family: var(--title); font-weight: 400; font-size: 22px; }
.bt-ptitle { font-family: var(--title); font-weight: 400; font-size: 26px; }
.center-tabs button { font-family: var(--title); font-size: 16px; letter-spacing: 2px; }
.rtv { position: absolute; z-index: 2; background: #111; border: .3cqw solid #2a2a2a; border-radius: .3cqw; box-shadow: 0 .4cqw .8cqw #000a; display: flex; }
.rtv i { flex: 1; margin: .3cqw; background: linear-gradient(90deg, #3a7bd5, #73c8ff); box-shadow: 0 0 2cqw #6fc0ff88; animation: tvflick 2.5s infinite; }
.rtv.off i { background: repeating-linear-gradient(0deg, #777 0 1px, #222 1px 3px); box-shadow: none; animation: staticmv .2s steps(3) infinite; }
@keyframes tvflick { 50% { filter: brightness(.8); } 52% { filter: brightness(1.2); } }
@media (max-width: 860px) {
  .stat { padding: 1px 4px; font-size: 12px; gap: 2px; }
  .stat i, .stat i .gi { width: 13px; height: 13px; }
  #tb-day { font-size: 16px; }
  .tb-countdown { font-size: 24px; }
  .tb-buttons .btn { padding: 5px 8px; font-size: 12px; }
  .tb-stats { overflow: hidden; }
}

/* ==================== 整套房子平面图 ==================== */
.rscene.house { aspect-ratio: 3 / 2; background: #1a1a1a; }
.house .rground, .house .rfloor, .house .rsurface { position: absolute; background-size: calc(100cqw / 24) calc(100cqw / 24); background-repeat: repeat; }
.house .rground { inset: 0; filter: brightness(.82) saturate(.85); }
.house .rground.g-con { filter: brightness(.55); }
.house .rfloor { background-position: 0 0; }
.house .rfloor.yard { opacity: .92; border-radius: .4cqw; }
.house .rsurface { filter: brightness(.7); }
.rroom { position: absolute; border: .45cqw solid #2b2723; box-shadow: inset 0 0 1.2cqw #0006; pointer-events: none; z-index: 2; }
.rroom.thick { border-width: .8cqw; border-color: #3b3e43; box-shadow: inset 0 0 2cqw #000a; }
.rlabel { position: absolute; z-index: 3; display: flex; align-items: flex-end; justify-content: center; font-size: 1.15cqw; color: #fff9; letter-spacing: .2cqw; text-shadow: 0 0 .3cqw #000; pointer-events: none; font-family: var(--title); }
.rlabel.y { color: #fffc; }
.rstairs { position: absolute; z-index: 1; background: repeating-linear-gradient(0deg, #6b6b70 0 .55cqw, #3a3a3e .55cqw .9cqw); border: .3cqw solid #2a2a2a; }
.rlift { position: absolute; z-index: 2; background: linear-gradient(90deg, #8a9099 49.5%, #222 49.5% 50.5%, #8a9099 50.5%); border: .4cqw solid #333; display: flex; align-items: center; justify-content: center; }
.rlift span { background: #000a; color: #ddd; font-size: 1.1cqw; padding: 0 .5cqw; border-radius: .3cqw; }
.rnbdoor { position: absolute; z-index: 3; background: #6a4322; }
.rrail { position: absolute; z-index: 3; background: repeating-linear-gradient(90deg, #9aa0a6 0 .3cqw, transparent .3cqw 1.2cqw); border-top: .2cqw solid #9aa0a6; }
.rramp { position: absolute; z-index: 1; background: repeating-linear-gradient(0deg, #55585d 0 .7cqw, #3a3c40 .7cqw 1cqw); border-left: .4cqw solid #222; border-right: .4cqw solid #222; }
.rfence { position: absolute; z-index: 2; border: .45cqw dashed #8a5a2e; border-radius: .6cqw; pointer-events: none; box-shadow: 0 0 0 .2cqw #5a3a1e inset; }
.rgate { position: absolute; z-index: 3; background: repeating-linear-gradient(90deg, #a06a38 0 .5cqw, #5a3a1e .5cqw .8cqw); }
.rcar { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; background: #2a5d8f; border-radius: 1cqw; box-shadow: 0 .4cqw .8cqw #000a; color: #dfe9f3; }
.rcar.pickup { background: #7a3a2a; }
.rcar .gi { width: 80%; height: 80%; transform: rotate(-90deg); }
.rwin.vert.bars { background-image: repeating-linear-gradient(0deg, transparent 0 .9cqw, #222 .9cqw 1.25cqw), linear-gradient(#6fb5ff, #bfe3ff); }
.rdoor.v, .rdoor.h { border-radius: .2cqw; }
.rdoor.blast { background: repeating-linear-gradient(90deg, #8a9099 0 1.2cqw, #5a6068 1.2cqw 1.4cqw); border: .3cqw solid #e0b43a; box-shadow: 0 0 1cqw #e0b43a66; }
.rsolar { position: absolute; z-index: 3; background: repeating-linear-gradient(90deg, #1d4f86 0 .9cqw, #9cc6ef .9cqw 1cqw), #1d4f86; background-blend-mode: normal; border: .25cqw solid #cfd8e3; border-radius: .2cqw; box-shadow: 0 .3cqw .6cqw #000a; }
.ri.hen { color: #f3efe6; filter: drop-shadow(0 .2cqw .2cqw #000a); animation: peck 1.6s ease-in-out infinite; }
@keyframes peck { 50% { transform: translateY(.3cqw) rotate(-10deg); } }
.ri.spike { color: #c9cdd2; filter: drop-shadow(0 .2cqw .2cqw #000); }
.ri.candle { color: #ffcf6a; filter: drop-shadow(0 0 1cqw #ffb347); animation: tvflick 1.2s infinite; z-index: 9; }
.ri.trash { color: #7d8a70; }
.ri.bagi { color: #e8c879; filter: drop-shadow(0 .2cqw .2cqw #000); }
.rdev.lamp { color: #ffe08a; box-shadow: 0 0 1.4cqw #ffd36a88; }
.rdev.rain, .rdev.tankd { color: #6fc6ff; }
.rdev.red { color: #ff5050; background: #2a1010; }
.rdev.bag { background: #3c4a2a; color: #cfe0a8; border-radius: 1cqw; }
.rcrate.stack img { filter: hue-rotate(var(--h)) saturate(1.1) brightness(1.15) drop-shadow(0 .4cqw .3cqw #000); }
.rt.barric { z-index: 4; filter: drop-shadow(0 .3cqw .3cqw #000); }
.house .rcal { position: absolute; left: auto; top: auto; z-index: 5; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: .3cqw; }
.house .rcal b { font-size: 2.2cqw; }
.house .rcal small { font-size: .8cqw; }
.rclock { position: absolute; z-index: 5; border-radius: 50%; background: #f4efe4; border: .25cqw solid #333; }
.rclock i { position: absolute; left: 50%; top: 18%; width: .25cqw; height: 32%; background: #222; transform-origin: 50% 100%; margin-left: -.125cqw; }
.rclock i.m { height: 40%; top: 10%; transform: rotate(0deg); background: #a00; }
.rtitle { position: absolute; z-index: 10; right: 1%; top: 1.4%; background: #000b; color: #f1e6d2; font-size: 1.4cqw; padding: .3cqw 1cqw; border-radius: .5cqw; font-family: var(--title); letter-spacing: .2cqw; }
.house .rperson { animation: wander linear infinite alternate; }
@keyframes wander { 0%, 30% { transform: translate(0, 0); } 70%, 100% { transform: translate(var(--dx), var(--dy)); } }
.house .rperson img { width: 100%; }
.house .rpn { font-size: 1cqw; }
.house .rbubble { font-size: 1.15cqw; }
.house .rpet { font-size: 2cqw; }
.house .walker.ped.h { animation: walkped 16s linear infinite; }
.house .walker.ped.v { animation: walkpedv 16s linear infinite; transform: rotate(90deg); }
@keyframes walkpedv { from { top: -4%; } to { top: 104%; } }
.rrain { position: absolute; z-index: 11; pointer-events: none; background: repeating-linear-gradient(105deg, transparent 0 1.2cqw, #a8c8ff33 1.2cqw 1.3cqw); animation: rainfall .5s linear infinite; }
@keyframes rainfall { to { background-position: -2cqw 4cqw; } }
.rfrost { position: absolute; inset: 0; z-index: 11; pointer-events: none; box-shadow: inset 0 0 6cqw #cfe8ff88; }
.house .rlight { z-index: 9; }
.rscene.house.lamp .rlight { background: radial-gradient(ellipse at 55% 55%, rgba(255,210,120,.1), rgba(0,0,12,.45) 85%); }
.rscene.house.dark .rlight { background: radial-gradient(circle at 50% 55%, rgba(0,0,0,.25), rgba(0,0,8,.85) 60%); }
.r-apartment.lamp .rlight, .r-apartment.dark .rlight { box-shadow: inset 16.6cqw 0 0 #0006; }

.rzoom { position: absolute; z-index: 12; left: 1%; top: 1.4%; width: 3.4cqw; height: 3.4cqw; min-width: 26px; min-height: 26px; border-radius: .6cqw; border: 1px solid #555; background: #000b; color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.rzoom:hover { border-color: var(--amber); color: var(--amber); }
#room-full { position: fixed; inset: 0; z-index: 75; background: #050507f2; display: flex; align-items: center; justify-content: center; padding: 14px; }
#room-full .rf-box { width: min(100%, calc((100vh - 110px) * 1.5)); }
#room-full .rf-close { position: fixed; right: 16px; top: 12px; z-index: 76; }

.overlay-battle { animation: none; }

/* 新庇护所 & 防御装备（房间） */
.house .rground.g-water { background: repeating-linear-gradient(170deg, #1d5f8a 0 1.4cqw, #1a5781 1.4cqw 2.8cqw); animation: waves 6s linear infinite; filter: none; }
@keyframes waves { to { background-position: 0 5.6cqw; } }
.rhull { position: absolute; z-index: 1; background: #5a3a1e; border-radius: 1cqw 45% 45% 1cqw / 1cqw 50% 50% 1cqw; box-shadow: 0 .6cqw 1.4cqw #000c, inset 0 0 0 .5cqw #3a2410; }
.rfence.stone { border: .6cqw solid #8a8680; border-radius: .3cqw; box-shadow: inset 0 0 0 .2cqw #5a5650; }
.rfence.wall { border: .7cqw solid #6d7178; border-radius: 0; box-shadow: inset 0 0 0 .2cqw #3a3d42, 0 0 0 .2cqw #222; }
.rprop { position: absolute; z-index: 3; }
.rprop.rwell { border-radius: 50%; background: radial-gradient(circle, #10314a 40%, #8a8680 42% 62%, #5a5650 64%); box-shadow: 0 .4cqw .8cqw #000a; }
.rprop.rrow { background: #8a5a2e; border-radius: 50%; border: .3cqw solid #5a3a1e; }
.rprop.rnet { background: repeating-linear-gradient(45deg, transparent 0 .5cqw, #ddd8 .5cqw .6cqw), repeating-linear-gradient(-45deg, transparent 0 .5cqw, #ddd8 .5cqw .6cqw); border-radius: .5cqw; }
.rprop.rhelipad { border-radius: 50%; border: .5cqw solid #e0b43a; background: radial-gradient(circle, transparent 55%, #0002 56%); }
.rprop.rhelipad::after { content: 'H'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 3cqw/1 sans-serif; color: #e0b43a; }
.rprop.rstairs { background: repeating-linear-gradient(90deg, #6b6b70 0 .55cqw, #3a3a3e .55cqw .9cqw); border: .3cqw solid #2a2a2a; }
.rsand { position: absolute; z-index: 4; border-radius: 40%; background: radial-gradient(circle at 40% 35%, #c9b27a, #8a7448); box-shadow: 0 .3cqw .4cqw #0009; }
.refence { position: absolute; z-index: 4; background: repeating-linear-gradient(45deg, transparent 0 .4cqw, #ffd23f .4cqw .55cqw); box-shadow: 0 0 1cqw #ffd23f88; }
.refence.off { filter: grayscale(1) brightness(.6); box-shadow: none; }
.ri.barri { color: #c99062; filter: drop-shadow(0 .3cqw .3cqw #000); z-index: 4; }
.ri.ftrap { color: #ff8a3a; filter: drop-shadow(0 0 .6cqw #ff6a00aa); z-index: 4; }
.ri.hole { color: #ff5050; z-index: 5; }
.rdev.slight { color: #fff3b0; }
.rdev.slight.on { box-shadow: 0 0 2.4cqw 1cqw #fff3b066; }
.rdev.turret { color: #e8e2d8; background: #3a3d42; }
.rdev.ammo { background: #3a3220; color: #ffd36a; }

/* =================== v23：雷达 / 人物档案 / 系统商城 / 房间互动 =================== */
/* ---------- 雷达 ---------- */
#radar { flex: 1; overflow-y: auto; }
.radar-wrap { display: flex; gap: 14px; align-items: flex-start; }
.radar-left { flex: 0 0 min(60%, 540px); }
.radar-bezel { position: relative; border-radius: 50%; padding: 3.4%; aspect-ratio: 1;
  background: radial-gradient(circle at 30% 25%, #ffffff 0%, #d9dde2 18%, #9aa1a9 45%, #e8ebee 62%, #7c838b 80%, #c9ced4 100%);
  box-shadow: 0 10px 28px #000c, inset 0 2px 3px #fff8, inset 0 -3px 6px #0006; }
.radar-cv { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; background: #0b4019; box-shadow: inset 0 0 0 2px #0a2a10, 0 0 0 3px #5f666e; }
.radar-glass { position: absolute; inset: 3.4%; border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse at 32% 22%, rgba(255,255,255,.22), rgba(255,255,255,0) 42%); }
.radar-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.radar-head .rh-title { font-family: var(--title); font-size: 18px; color: #9dffb0; display: flex; align-items: center; gap: 6px; letter-spacing: 2px; }
.radar-head .rh-title .gi { width: 20px; height: 20px; }
.radar-head .rh-title b { font-family: var(--num); color: #e6ffe9; }
.radar-head .rh-title small { color: #6fae7c; font-size: 12px; letter-spacing: 0; }
.radar-head .rh-note { font-size: 12.5px; color: #8fb79a; }
.radar-card { background: #0c1a10; border: 1px solid #1f4a2a; border-radius: 8px; padding: 10px 11px; min-height: 120px; }
.rc-empty { font-size: 13px; color: #8fb79a; line-height: 1.7; }
.rc-up { margin-top: 8px; font-size: 12px; color: #ffd36a; background: #2a2410; border-radius: 6px; padding: 6px 8px; }
.rc-name { font-size: 16px; color: var(--kc); font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-name small { font-weight: 400; font-size: 11.5px; color: #6fae7c; border: 1px solid #2c5a37; border-radius: 9px; padding: 0 6px; }
.rc-ic { font-size: 20px; }
.rc-sub { font-size: 12.5px; color: #c4dcc9; margin-top: 3px; line-height: 1.5; }
.rc-stock { height: 5px; background: #12301a; border-radius: 3px; margin: 6px 0 2px; overflow: hidden; }
.rc-stock i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a6a, #ffe27a 40%, #9dffb0); }
.rc-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.rc-acts .btn { text-align: left; }
.rc-acts .btn small, .pf-acts .btn small { display: block; font-size: 11px; opacity: .75; margin-top: 1px; }
.rc-acts .btn small.why { color: #ff9f9f; opacity: 1; }
.radar-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: #8fb79a; }
.radar-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; box-shadow: 0 0 6px currentColor; }
.radar-feed p, .rfeed p { margin: 0 0 3px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; }
.radar-feed { border-top: 1px dashed #24452d; padding-top: 6px; }
.l-good { color: var(--green); } .l-bad { color: #ff7272; } .l-sys { color: var(--blue); } .l-dim { color: var(--dim); } .l-event { color: #f1d6a8; } .l-big { color: var(--red); font-weight: 700; } .l-title { color: var(--amber); }
#radar { container-type: inline-size; }
@container (max-width: 700px) {
  .radar-wrap { flex-direction: column; align-items: stretch; }
  .radar-left { flex: none; width: min(100%, 480px); margin: 0 auto; }
}

/* ---------- 顶栏：晶核、签到红点 ---------- */
.stat-core i { color: #8fe3ff; }
.stat-core b { color: #bff0ff; text-shadow: 0 0 8px #3fb6ff88; }
#btn-shop { position: relative; }
#btn-shop.dot::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- 队伍 ---------- */
.member.click { cursor: pointer; transition: border-color .15s, background .15s; border: 1px solid transparent; }
.member.click:hover { border-color: #4a5260; background: #20252d; }
.m-nat { font-size: 11px; color: #9aa3ad; border: 1px solid #333a44; border-radius: 8px; padding: 0 5px; }
.m-ab { font-size: 11px; }
.m-loyal { height: 3px; margin-top: 3px; background: #262b33; border-radius: 2px; overflow: hidden; }
.m-loyal i { display: block; height: 100%; }
.m-loyal.hi i, .loyal.hi i { background: #e06fb0; } .m-loyal.mid i, .loyal.mid i { background: #d9a24a; } .m-loyal.lo i, .loyal.lo i { background: #8a5a5a; }
.chip.warn { background: #3a1f10; color: #ffcf9a; border: 1px solid #7a4a1a; }

/* ---------- 人物档案 ---------- */
.pf-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.pf-ic { font-size: 44px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: #11151a; border: 1px solid #2f343d; border-radius: 12px; }
.pf-name { font-size: 20px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-tag { font-size: 12.5px; font-weight: 400; color: var(--dim); }
.pf-sub { font-size: 12.5px; color: #b9c0c9; margin-top: 2px; }
.pf-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13.5px; }
.pf-row .k { color: var(--dim); width: 34px; flex: none; }
.pf-row.nat > div { display: flex; flex-direction: column; }
.pf-row.nat small { color: var(--dim); font-size: 12px; }
.pf-nat { font-weight: 700; }
.pf-nat.unk { color: #8a909b; letter-spacing: 3px; }
.loyal { flex: 1; height: 8px; background: #262b33; border-radius: 4px; overflow: hidden; }
.loyal i { display: block; height: 100%; }
.pf-bio { background: #11151a; border-left: 3px solid #6b4a2a; border-radius: 6px; padding: 8px 12px; margin: 10px 0; }
.pf-bio p { margin: 0 0 6px; font-size: 14px; line-height: 1.75; color: #d8d2c4; }
.pf-bio p:last-child { margin-bottom: 0; }
.pf-bio p.locked { color: #6f7680; font-size: 12.5px; }
.pf-wish { font-size: 13.5px; color: #f1d6a8; margin-bottom: 10px; }
.pf-wish.done { color: var(--green); }
.pf-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pf-acts .btn { text-align: left; display: block; }
.pf-acts .btn .gi { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- 系统商城 ---------- */
.signin { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #0d2233, #0a1a28); border: 1px solid #1f5f8a; border-radius: 8px; padding: 8px 12px; margin: 6px 0 8px; }
.signin .sg-l { flex: 1; min-width: 0; }
.signin b { color: #bfe6ff; display: inline-flex; align-items: center; gap: 4px; }
.signin b .gi { width: 16px; height: 16px; }
.signin small { display: block; font-size: 12px; color: #8fb9d6; }
.sg-days { display: flex; gap: 4px; margin-top: 5px; }
.sg-day { width: 26px; height: 26px; border-radius: 5px; border: 1px solid #1f4a6a; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #5f8bab; font-family: var(--mono); }
.sg-day.done { background: #1b5a86; color: #e6f6ff; border-color: #3fb6ff; }
.sg-day.today { border-color: var(--amber); box-shadow: 0 0 8px #ffb54788; color: var(--amber); }
.shop-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.shop-tabs button { background: #0f1a24; border: 1px solid #1b3a52; color: #8fb9d6; border-radius: 14px; padding: 3px 12px; font-size: 13px; cursor: pointer; }
.shop-tabs button.on { background: #1b5a86; color: #fff; border-color: #3fb6ff; }
.shop-tabs button b { color: #bff0ff; }
.shop-sec { font-size: 12.5px; color: var(--amber); margin: 6px 0 2px; letter-spacing: 2px; }
.tag-deal { font-size: 11px; background: #ff3b3b; color: #fff; border-radius: 4px; padding: 0 5px; }
.sysm .shop-row.deal { border-color: #7a4a1a; background: linear-gradient(90deg, #2a1a0c, #0f1a24 60%); }
.core-intro { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #b9d6e6; background: #0a1a28; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; line-height: 1.6; }
.core-intro .gi { width: 34px; height: 34px; flex: none; color: #8fe3ff; filter: drop-shadow(0 0 6px #3fb6ff); }
.ab-card { display: flex; gap: 10px; align-items: center; background: #0f141b; border: 1px solid #23303d; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.ab-card.mine { border-color: var(--ac); box-shadow: 0 0 12px color-mix(in srgb, var(--ac) 35%, transparent); }
.ab-ic { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #0a0d12; color: var(--ac); border: 1px solid #2a323c; }
.ab-ic .gi { width: 26px; height: 26px; }
.ab-main { flex: 1; min-width: 0; }
.ab-main .nm { font-weight: 700; color: var(--ac); }
.ab-main .lv { font-family: var(--num); font-size: 12px; background: var(--ac); color: #111; border-radius: 4px; padding: 0 5px; }
.ab-lv { font-size: 12px; color: #6f7680; }
.ab-lv.got { color: #d8dbe0; }

/* ---------- 盘点 / 日程 ---------- */
.stk-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.stk-sum > div { background: #11151a; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.stk-sum b { font-family: var(--num); font-size: 17px; color: var(--amber); margin-left: 3px; }
.stk-sum small { display: block; color: var(--dim); font-size: 11.5px; }
.stk-cat { margin-bottom: 8px; }
.stk-h { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.stk-items { display: flex; flex-wrap: wrap; gap: 5px; }
.stk-i { display: inline-flex; align-items: center; gap: 4px; background: #1a1e24; border: 1px solid #2a2f38; border-radius: 6px; padding: 3px 7px; font-size: 12.5px; }
.stk-i .gi { width: 15px; height: 15px; }
.stk-i small { color: var(--dim); font-size: 11px; }
.cal-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.cal-row { display: flex; gap: 10px; background: #11151a; border-radius: 6px; padding: 6px 10px; font-size: 13.5px; }
.cal-row b { flex: 0 0 150px; color: #d9c49a; font-weight: 400; }
.cal-row.danger { border-left: 3px solid var(--red); }
.cal-row.warn { border-left: 3px solid var(--amber); }
.cal-row.dim { color: var(--dim); font-size: 12px; background: transparent; }
@media (max-width: 860px) { .stk-sum { grid-template-columns: repeat(2, 1fr); } .cal-row b { flex-basis: 110px; } }

/* ---------- 房间互动 ---------- */
.rscene [data-hot] { cursor: pointer; }
.rscene .rt.hot { transition: filter .15s; }
.rscene .rt.hot:hover { filter: brightness(1.25) drop-shadow(0 0 .5cqw #ffd36a); }
.rscene .rdev[data-hot]:hover, .rscene .rwin:hover, .rscene .rdoor:hover, .rscene .rtv:hover, .rscene .rcal:hover, .rscene .rclock:hover { outline: .25cqw solid #ffd36aaa; outline-offset: .15cqw; }
.rhot { position: absolute; z-index: 1; border-radius: .6cqw; }
.rhot:hover { background: #ffd36a14; outline: .2cqw dashed #ffd36a88; }
.rpop { position: fixed; z-index: 120; min-width: 190px; max-width: 280px; background: #15181d; border: 1px solid #6b4a2a; border-radius: 9px; box-shadow: 0 10px 30px #000c; padding: 6px; animation: fadein .15s ease; }
.rpop-h { font-size: 14px; color: var(--amber); font-weight: 700; padding: 3px 6px 6px; border-bottom: 1px solid #2a2f38; margin-bottom: 4px; }
.rpop-h small { display: block; font-weight: 400; font-size: 11.5px; color: var(--dim); }
.rpop button { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--text); padding: 6px 8px; border-radius: 6px; font-size: 13.5px; cursor: pointer; }
.rpop button:hover:not(:disabled) { background: #2a2520; }
.rpop button:disabled { opacity: .45; cursor: not-allowed; }
.rpop button small { display: block; font-size: 11px; color: var(--dim); }
.rfeed { margin-top: 6px; background: #11151a; border-radius: 6px; padding: 5px 9px; min-height: 0; }
.rfeed:empty { display: none; }
/* 据点页里固定高度，免得新动态把下面的按钮挤走 */
@media (min-width: 861px) {
  #room .rfeed { height: 7.4em; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
  #room .rfeed:empty::before { content: '最新动态会显示在这里'; color: #555; font-size: 12px; }
}
@media (max-width: 860px) { #room .rhint { display: none; } }
.racid { position: absolute; z-index: 11; pointer-events: none; background: repeating-linear-gradient(100deg, transparent 0 1.1cqw, #b6ff4a40 1.1cqw 1.25cqw); animation: rainfall .55s linear infinite; mix-blend-mode: screen; }
.rsnow { position: absolute; z-index: 11; pointer-events: none; opacity: .7; background-image: radial-gradient(circle at 30% 40%, #ffffffdd .16cqw, transparent .26cqw), radial-gradient(circle at 70% 75%, #ffffffaa .11cqw, transparent .2cqw); background-size: 6.3cqw 5.1cqw, 4.1cqw 3.7cqw; animation: snowfall 6s linear infinite; }
@keyframes snowfall { to { background-position: 2cqw 5.1cqw, -1.4cqw 7.4cqw; } }
.rheat { position: absolute; inset: 0; z-index: 11; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, #ff8a2a33, transparent 70%); animation: heatwave 2.4s ease-in-out infinite alternate; }
@keyframes heatwave { from { opacity: .55; } to { opacity: 1; } }

/* ---------- 抽卡：卡面上的钱 ---------- */
.gcard-front .fin { margin-top: 6px; font-size: 11.5px; color: #ffd98a; background: #2a2410aa; border-radius: 5px; padding: 3px 6px; line-height: 1.45; }
@media (max-width: 860px) { .gcard-front .fin { font-size: 9.5px; padding: 2px 4px; margin-top: 4px; } .gcard { height: 250px; } .gcard-front { justify-content: flex-start; padding-top: 30px; } .gcard-front .ds { line-height: 1.35; } .gcard-front .ic { font-size: 34px; } }

/* ===== v25：晶核批量兑换、结局图鉴、长线玩法 ===== */
.shop-row.core2 { flex-wrap: wrap; }
.c2-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.e-gal { margin: 10px 0 4px; color: var(--dim); font-size: 13px; }
.e-gal b { color: #ffd36a; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 10px 0; max-height: 60vh; overflow-y: auto; }
.gal-card { display: flex; gap: 10px; align-items: flex-start; background: #15181d; border: 1px dashed #2d333c; border-radius: 8px; padding: 8px 10px; opacity: .75; }
.gal-card.got { border-style: solid; opacity: 1; background: #1a1e24; }
.gal-card.got.k-win { border-color: #3f8f5a; }
.gal-card.got.k-exit { border-color: #3f7fb0; }
.gal-card.got.k-lose { border-color: #8f3f3f; }
.gal-ic { font-size: 28px; width: 34px; text-align: center; line-height: 1.1; }
.gal-main { flex: 1; min-width: 0; }
.gal-nm { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gal-kind { font-size: 11px; font-weight: 400; color: var(--dim); border: 1px solid #333a44; border-radius: 4px; padding: 0 4px; }
.gal-best { font-size: 11px; font-weight: 800; padding: 0 5px; border-radius: 4px; background: #2a2f38; }
.gal-best.g-S { background: #b8860b; color: #fff; } .gal-best.g-A { background: #8a3ab8; color: #fff; } .gal-best.g-B { background: #2f6fa3; color: #fff; }
.gal-hint { font-size: 12px; color: var(--dim); margin-top: 2px; line-height: 1.45; }
.modal-title small { font-size: 13px; color: var(--dim); font-weight: 400; margin-left: 6px; }
@media (max-width: 520px) { .gal-grid { grid-template-columns: 1fr; max-height: 58vh; } }

/* ===== v26：据点页、仓库管理、耐久、一键日常、手机四标签 ===== */
/* 仓库总览 */
#supply-summary .flow { display: block; font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.sup.sm { padding: 3px 4px; font-size: 11.5px; }
.sup.sm b { display: inline; font-size: 13px; }
.sup-warn { grid-column: 1 / -1; font-size: 12px; color: #ffb4a8; background: #2a1414; border-radius: 5px; padding: 4px 6px; }
#inv-tools { margin-top: 6px; }
.inv-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.inv-btns button, .inv-cats button, .hub-tabs button, .hub-filter button {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.inv-btns button.hot { border-color: #a33; color: #ffb4a8; }
.inv-cats { display: flex; gap: 4px; overflow-x: auto; margin-top: 6px; padding-bottom: 2px; scrollbar-width: none; }
.inv-cats button { flex: none; color: var(--dim); }
.inv-cats button.on, .hub-tabs button.on, .hub-filter button.on { color: var(--amber); border-color: #6b4a2a; background: #231d18; }
.inv-cell { cursor: pointer; }
.inv-cell .lk { position: absolute; left: 2px; top: 1px; font-size: 10px; }
.inv-cell .lk.kp { font-family: var(--mono); color: #9ad07a; text-shadow: 0 0 3px #000; }
.dur { display: block; position: absolute; left: 4px; right: 4px; bottom: 3px; height: 3px; background: #000a; border-radius: 2px; overflow: hidden; }
.dur i { display: block; height: 100%; background: var(--green); }
.dur.mid i { background: var(--amber); } .dur.low i { background: var(--red); }
.dur.big { position: static; display: inline-block; width: 100%; height: 7px; vertical-align: middle; }

/* 底部弹出的面板（手机）/ 普通弹窗（电脑） */
.sheet-h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.sheet-h b { font-size: 17px; display: block; }
.sheet-h small { color: var(--dim); font-size: 12px; }
.sh-ic { width: 46px; height: 46px; border-radius: 10px; background: #101317; border: 1px solid var(--cc, #333); display: flex; align-items: center; justify-content: center; font-size: 28px; flex: none; }
.sheet-ds { color: #c9cdd4; font-size: 13.5px; line-height: 1.55; }
.sheet-sec { margin: 14px 0 6px; font-size: 12.5px; color: var(--amber); letter-spacing: 1px; }
.sheet-tip { font-size: 12px; color: var(--dim); line-height: 1.5; margin: 4px 0; }
.sheet-uses div { font-size: 13px; line-height: 1.6; color: #d8d0bf; }
.sheet-btn { width: 100%; margin-top: 6px; }
.dur-list { display: grid; gap: 4px; }
.dur-row { display: grid; grid-template-columns: 28px 1fr 44px; align-items: center; gap: 8px; font-size: 12.5px; }
.dur-row b { font-family: var(--mono); text-align: right; }
.keep-row, .rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.keep-row b { min-width: 22px; text-align: center; font-family: var(--mono); }
.lg-day { background: var(--panel2); border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 13px; line-height: 1.6; }
.lg-h { color: var(--amber); font-size: 12.5px; margin-bottom: 2px; }
.lg-in { color: #9ad07a; } .lg-out { color: #c9cdd4; } .lg-lost { color: #ff8a7a; }
.st-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid #22262d; font-size: 13.5px; }
.st-row span { flex: 1; }

/* 一键日常 */
.routine { width: 100%; margin-bottom: 8px; text-align: left; background: linear-gradient(90deg, #2a2312, #1b1f26); border: 1px solid #6b5a2a; color: #ffd36a; border-radius: 8px; padding: 9px 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.routine small { display: block; font-weight: 400; font-size: 11.5px; color: #c8b98f; margin-top: 2px; }
.routine:disabled { opacity: .5; }

/* 据点页 */
#basehub { margin-top: 8px; }
.hub-note { background: var(--panel2); border: 1px dashed var(--line); border-radius: 8px; padding: 12px; color: var(--dim); font-size: 13.5px; line-height: 1.6; }
.hub-head { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--panel2); border-radius: 8px; padding: 8px 10px; }
.hub-lv b { font-size: 15px; color: var(--amber); }
.hub-lv small { display: block; color: var(--dim); font-size: 12px; margin: 2px 0 4px; }
.hub-bar { height: 5px; background: #0b0d10; border-radius: 3px; overflow: hidden; }
.hub-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a5a2e, var(--amber)); }
.hub-meters { display: grid; grid-template-columns: repeat(4, auto); gap: 4px; }
.hm { background: #101317; border: 1px solid #262b33; border-radius: 6px; padding: 3px 7px; text-align: center; min-width: 54px; }
.hm small { display: block; font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.hm b { font-family: var(--mono); font-size: 14px; }
.hm.warn b { color: var(--amber); } .hm.bad b { color: var(--red); }
.hub-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0; }
.hub-tabs button { padding: 7px 4px; font-size: 13px; }
.hub-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
.hub-filter label { margin-left: auto; font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 4px; }
.fac-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.fac { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; background: #171a20; border: 1px solid #2a2f38; border-radius: 8px; padding: 7px 9px; }
.fac.can { border-color: #4a6b3a; }
.fac.built { background: #141a16; border-color: #2c4a34; }
.fac.lock { opacity: .72; }
.fac-ic { font-size: 26px; text-align: center; }
.fac-nm { font-weight: 700; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fac-cat { font-size: 10.5px; font-weight: 400; color: var(--dim); border: 1px solid #333a44; border-radius: 4px; padding: 0 4px; }
.fac-ds { font-size: 12px; color: #aeb3bb; line-height: 1.45; margin-top: 2px; }
.fac-cost { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.cc { font-size: 11px; background: #0f1215; border: 1px solid #2a2f38; border-radius: 4px; padding: 0 4px; color: #cfd3da; }
.cc.miss { color: #ff8a7a; border-color: #5a2a2a; }
.fac-act { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 64px; }
.fac-act .btn { white-space: nowrap; max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.fac-act small { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.fac-ok { color: var(--green); font-size: 12.5px; }
.hub-sec { margin: 12px 0 4px; font-weight: 700; color: var(--amber); font-size: 14px; }
.hub-sec small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 8px; }
.hub-tip { font-size: 12.5px; color: var(--dim); line-height: 1.55; margin-bottom: 6px; }
.hub-row, .hub-pr { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: 8px; padding: 8px 10px; margin-bottom: 5px; font-size: 14px; }
.hub-row span { flex: 1; } .hub-row small, .hub-pr small { display: block; font-size: 12px; color: var(--dim); }
.hub-row.bad { border: 1px solid #5a2a2a; }
.hub-pr { flex-direction: column; align-items: stretch; }
.pr-acts, .hub-btns { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 6px; }

/* 房间：设施招牌、裂缝、寒冬小雪、隔离标签 */
.rfacs { position: absolute; left: 1%; right: 6%; top: 0.6%; display: flex; flex-wrap: wrap; gap: 0.4cqw; z-index: 6; pointer-events: none; }
.rfac { pointer-events: auto; font-size: 2.4cqw; line-height: 1; background: #000a; border: 1px solid #6b4a2a; border-radius: 0.6cqw; padding: 0.3cqw 0.4cqw; cursor: pointer; }
.rfac.broken { filter: grayscale(1); border-color: #a33; }
.rcrack { position: absolute; z-index: 7; cursor: pointer; transform: rotate(var(--r)); }
.rcrack::before, .rcrack::after { content: ''; position: absolute; inset: 0; background: #150b05; filter: drop-shadow(0 0 .15cqw #fff3); }
.rcrack::before { clip-path: polygon(0 46%, 22% 40%, 38% 58%, 58% 36%, 78% 54%, 100% 44%, 100% 50%, 78% 61%, 58% 43%, 38% 66%, 22% 47%, 0 53%); }
.rcrack::after { clip-path: polygon(38% 60%, 46% 78%, 40% 100%, 44% 100%, 50% 79%, 42% 60%); }
.rsnow.light { opacity: .45; }
.rlabel.iso { background: #3a1414e0; color: #ffc9c0; border-radius: 4px; z-index: 6; }

@media (max-width: 860px) {
  /* 手机：弹窗改成从底部滑出的面板 */
  #modal:has(.modal-box.sheet) { align-items: flex-end; padding: 0; }
  .modal-box.sheet { max-width: none; border-radius: 14px 14px 0 0; max-height: 86vh; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: sheetup .22s ease; }
  @keyframes sheetup { from { transform: translateY(40px); opacity: .3; } }
  .rpop.sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; border-radius: 14px 14px 0 0; padding: 10px 10px calc(12px + env(safe-area-inset-bottom)); }
  .rpop.sheet button { padding: 11px 10px; font-size: 15px; }
  .hub-head { grid-template-columns: 1fr; }
  .hub-meters { grid-template-columns: repeat(4, 1fr); }
  .hub-tabs { grid-template-columns: repeat(2, 1fr); }
  .fac-list { grid-template-columns: 1fr; }
  .fac { grid-template-columns: 32px 1fr; }
  .fac-act { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; align-items: center; }
  .fac-act .btn { max-width: none; padding: 8px 12px; }
  .inv-btns button, .inv-cats button { padding: 7px 10px; font-size: 13px; }
  #inventory { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
  .routine { padding: 12px; }
  #mobile-tabs button { font-size: 13px; padding: 12px 0; }
  /* 放大看房间：可以左右拖动 */
  #room-full { align-items: flex-start; justify-content: flex-start; overflow: auto; padding: 52px 10px 10px; }
  #room-full .rf-box { width: 190vw; flex: none; }
  .rfac { font-size: 3.4cqw; }
}

/* ---------- v27：语言切换 / 英文版 ---------- */
.lang-btn {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 5;
  background: rgba(12, 14, 18, .82); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--blue); color: #fff; }
@media (min-width: 861px) { html[lang=en] #room .rfeed:empty::before { content: 'Latest updates show up here'; } }
html[lang=en] .title-sub { letter-spacing: 6px; }
.gcard-front .cat { z-index: 2; text-shadow: 0 0 4px #000, 0 0 2px #000; }
html[lang=en] .gcard-front .cat { letter-spacing: .5px; }

/* v28：弹窗右上角的 ✕（滚动时一直钉在上面，不用滑到底找「关闭」） */
.modal-x { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: center; margin: -6px -6px -32px auto; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #232830; border: 1px solid #3a414c; color: #cfd3da; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.modal-x:hover { border-color: var(--amber); color: var(--amber); }
.modal-box.has-x > .modal-title, .modal-box.has-x .pf-head, .modal-box.has-x .sheet-h { padding-right: 40px; }

/* v29：分工 */
.hub-tabs { grid-template-columns: repeat(5, 1fr); }
.hub-tabs button { overflow-wrap: anywhere; }
.fac.proj { border-color: #6b5a2a; background: #1b1a16; }
.fac-cat.sk { color: #9fd3ff; border-color: #2c4a63; }
.fac-cat.sk.miss { color: #e39a8a; border-color: #5a2a2a; }
.fac-proj { margin-top: 5px; font-size: 12px; color: var(--amber); }
.fac-proj .hub-bar { margin-top: 3px; }
.wk-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; background: var(--panel2); border-radius: 8px; padding: 7px 10px; margin-bottom: 5px; }
.wk-row.away { opacity: .7; }
.wk-ic { font-size: 22px; text-align: center; }
.wk-main b { font-size: 14px; }
.wk-main small { display: block; font-size: 12px; color: var(--dim); }
.wk-tired { position: relative; height: 12px; background: #0b0d10; border-radius: 3px; overflow: hidden; margin-top: 3px; max-width: 220px; }
.wk-tired i { display: block; height: 100%; background: #3a6b4a; }
.wk-tired.warn i { background: #8a6a2e; } .wk-tired.bad i { background: #8a2e2e; }
.wk-tired span { position: absolute; left: 6px; top: 0; font-size: 10px; line-height: 12px; color: #e8e8e8; text-shadow: 0 0 2px #000; }
.wk-job { max-width: 170px; white-space: normal; text-align: center; line-height: 1.3; }
.wk-job.on { border-color: #6b4a2a; color: var(--amber); }
.m-job { font-size: 11.5px; color: var(--amber); margin-top: 1px; }
@media (max-width: 860px) {
  .hub-tabs { grid-template-columns: repeat(3, 1fr); }
  .wk-row { grid-template-columns: 30px 1fr; }
  .wk-job { grid-column: 1 / -1; max-width: none; padding: 8px 10px; }
}

/* v30：晶核分阶、建材去哪找、拆除 */
.core-tiers { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; font-size: 13px; color: var(--dim); }
.core-tiers b { color: #d9ecff; font-size: 15px; margin-left: 2px; }
.cc[data-ci] { cursor: pointer; }
.cc.miss[data-ci]:hover { text-decoration: underline; }
.fac-act .btn[data-dism] { opacity: .75; }

/* v31：避难所等级、系统空间、势力 */
.hub-tabs { grid-template-columns: repeat(3, 1fr); }
.sh-lvs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.sh-lv { background: var(--panel2); border: 1px solid #2a2f38; border-radius: 8px; padding: 7px 9px; font-size: 13px; opacity: .65; }
.sh-lv b { display: block; color: var(--amber); }
.sh-lv span { display: block; margin: 2px 0; }
.sh-lv small { display: block; font-size: 11px; color: var(--dim); line-height: 1.4; }
.sh-lv.done { opacity: 1; border-color: #3d5a3a; }
.sh-lv.cur { border-color: var(--amber); box-shadow: 0 0 0 1px #6b4a2a inset; }
.sp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sp { background: var(--panel2); border: 1px solid #2a2f38; border-radius: 8px; padding: 8px 9px; display: flex; flex-direction: column; gap: 5px; }
.sp.on { border-color: #4a6b8a; background: #161b24; }
.sp-h { font-size: 14px; } .sp-d { font-size: 12px; color: var(--dim); line-height: 1.45; flex: 1; }
.sp .btn { white-space: normal; }
.fx-list { display: flex; flex-direction: column; gap: 6px; }
.fx-row { display: grid; grid-template-columns: 34px 1fr; gap: 8px; background: var(--panel2); border: 1px solid #2a2f38; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.fx-row:hover { border-color: var(--amber); }
.fx-row.dead { opacity: .45; cursor: default; }
.fx-ic { font-size: 24px; text-align: center; }
.fx-main b { font-size: 15px; margin-right: 6px; }
.fx-rep { font-size: 13px; margin-right: 6px; }
.fac-cat.q { color: var(--amber); border-color: #6b4a2a; }
.fx-main small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.fx-bars { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); margin-top: 4px; }
.fx-bar { position: relative; flex: 1; max-width: 200px; height: 6px; background: #0b0d10; border-radius: 3px; overflow: hidden; }
.fx-bar::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #555; }
.fx-bar i { position: absolute; top: 0; bottom: 0; display: block; }
@media (max-width: 860px) {
  .sh-lvs { grid-template-columns: repeat(2, 1fr); }
  .sp-grid { grid-template-columns: 1fr; }
}

/* v32：羁绊、社交属性、压力、性别 */
#player-gender { background: #111418; color: var(--text); border: 1px solid #3a414c; border-radius: 6px; padding: 6px 8px; font-size: 14px; }
.pf-sec { margin: 12px 0 6px; font-weight: 700; color: var(--amber); font-size: 14px; }
.soc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.soc { background: var(--panel2); border-radius: 8px; padding: 6px 9px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.soc-dots { color: #ff9ec7; letter-spacing: 2px; }
.soc small { color: var(--dim); font-size: 11.5px; }
.bond-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.bond { background: var(--panel2); border: 1px solid #3a2a38; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.bond.off { opacity: .55; }
.bond-h b { font-size: 14px; margin-right: 4px; }
.bond-bar { height: 5px; background: #0b0d10; border-radius: 3px; overflow: hidden; margin: 5px 0; }
.bond-bar i { display: block; height: 100%; background: linear-gradient(90deg, #a8537d, #ff9ec7); }
.bond small { display: block; color: var(--dim); font-size: 12px; margin-bottom: 4px; }
.bond-ab { font-size: 11.5px; color: #6a6f78; }
.bond-ab.got { color: #ffc2dc; }
.wk-tired.stress i { background: #6a4a8a; }
.wk-tired.stress.warn i { background: #9a5a9a; } .wk-tired.stress.bad i { background: #c0407a; }

/* v33：收集品 */
.doc-list { display: flex; flex-wrap: wrap; gap: 5px; }
.doc { background: #1d1a15; border: 1px solid #5a4a2a; color: #f0d9a8; border-radius: 6px; padding: 5px 8px; font-size: 12.5px; cursor: pointer; }
.doc:hover { border-color: var(--amber); }
.doc.off { background: var(--panel2); border: 1px dashed #333; color: #555; cursor: default; padding: 5px 8px; border-radius: 6px; font-size: 12.5px; }
.pf-sec small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 8px; }

/* v34：难度、尾声 */
#player-diff { background: #111418; color: var(--text); border: 1px solid #3a414c; border-radius: 6px; padding: 6px 8px; font-size: 14px; }
.e-epi { text-align: left; margin: 10px auto; max-width: 560px; background: #15181e; border: 1px solid #2a2f38; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; line-height: 1.7; color: #d6d9de; }
.e-epi b { display: block; color: var(--amber); margin-bottom: 4px; }
@media (max-width: 860px) { .title-name { flex-wrap: wrap; } }

/* v35：手机上任务栏折叠 */
.tasks-bar { display: none; }
@media (max-width: 860px) {
  .tasks-bar { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; background: transparent; border: 0; color: #b9d8ef; font-size: 13px; padding: 2px 0; cursor: pointer; text-align: left; }
  .tasks-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .tasks-bar b { color: var(--blue); font-weight: 400; font-size: 12px; white-space: nowrap; }
  #tasks.collapsed .tasks-body { display: none; }
  #tasks.collapsed { padding-bottom: 4px; margin-bottom: 6px; }
  .tasks-body { margin-top: 4px; }
}
