/* 灰烬深井 — 样式：石墙、铁器、羊皮纸、余烬 */
:root {
  --bg: #0c0a08;
  --bg2: #14100c;
  --stone: #1d1712;
  --stone2: #262019;
  --panel: #1a1410;
  --line: #3b2f22;
  --line2: #55432f;
  --parch: #d6c49a;
  --parch-dim: #a3906c;
  --dim: #7a6a52;
  --faint: #55483a;
  --gold: #c99a45;
  --ember: #c05b33;
  --blood: #93312a;
  --green: #7fa66a;
  --blue: #6e93b8;
  --purple: #9a7bb8;
  --orange: #c8873a;
  --hp: #8c3b30;
  --shield: #6e93b8;
  --serif: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: #050403;
  color: var(--parch);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
#app {
  position: relative;
  margin: 0 auto;
  max-width: 472px;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(193, 114, 57, 0.05), transparent 60%),
    radial-gradient(140% 90% at 50% 110%, rgba(0, 0, 0, 0.6), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.04 0 0 0 0 0.03 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 80px rgba(0,0,0,.9);
}
@media (min-width: 500px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
#game { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
#game[hidden] { display: none; }
button {
  font-family: inherit;
  color: var(--parch);
  background: linear-gradient(180deg, var(--stone2), var(--stone));
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,240,200,.06), 0 1px 2px rgba(0,0,0,.5);
}
button:active { transform: translateY(1px); filter: brightness(.9); }
button:disabled { opacity: .42; cursor: default; }
button.primary { border-color: #6b5230; background: linear-gradient(180deg, #3a2d1c, #2b2013); color: #e8d5a5; }
button.danger { border-color: #6b3028; background: linear-gradient(180deg, #3a201c, #2b1613); color: #dfa79a; }
button.ghost { background: transparent; border-color: var(--line); color: var(--dim); }
input, textarea, select {
  font-family: inherit; color: var(--parch);
  background: #0f0c09; border: 1px solid var(--line); border-radius: 3px; padding: 8px;
  width: 100%; font-size: 14px;
}
h3 { font-weight: 600; letter-spacing: .06em; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 2px; }

/* ============ 顶栏资源 ============ */
#topbar {
  flex: none;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0;
  min-height: 36px;
  padding: 8px 7px 7px;
  padding-top: max(8px, env(safe-area-inset-top));
  background:
    linear-gradient(90deg, rgba(73,57,38,.12), transparent 18%, rgba(201,154,69,.08) 50%, transparent 82%, rgba(73,57,38,.12)),
    linear-gradient(180deg, #171612, #080908);
  border-top: 1px solid #3b342a;
  border-bottom: 2px solid #322d26;
  box-shadow:
    inset 0 1px rgba(201,154,69,.08),
    inset 0 -1px #050505,
    0 3px 12px rgba(0,0,0,.85);
  font-size: 11.5px;
  position: relative; z-index: 8;
}
.res-chip { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--parch-dim); min-width: 0; white-space: nowrap; }
.res-chip b { color: var(--parch); font-weight: 500; }
.res-chip .cap-full b { color: var(--ember); }
.res-chip svg { width: 13px; height: 13px; opacity: .85; }
.res-chip.res-gold svg { color: #d8a63d; }
.res-chip.res-food svg { color: #c99d45; }
.res-chip.res-wood svg { color: #986542; }
.res-chip.res-iron svg { color: #9299a0; }
.res-chip.res-soul svg { color: #c2b49e; }
.res-chip.res-potion svg { color: #b8c5bd; }
.res-chip.res-ember svg { color: #ad78c8; }
.ico-img { display: inline-block; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)); }

/* ============ 主区 ============ */
#screen { flex: 1 1 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 10px; }
.scr { padding: 12px; }
.scr-title {
  font-size: 17px; letter-spacing: .25em; color: var(--gold);
  text-align: center; margin: 4px 0 2px;
}
.scr-sub { text-align: center; color: var(--faint); font-size: 12px; margin-bottom: 12px; letter-spacing: .1em; }

/* ============ 底部导航 ============ */
#tabbar {
  flex: none; display: flex;
  min-height: 75px;
  background:
    linear-gradient(90deg, rgba(110,80,41,.08), transparent 18%, rgba(201,154,69,.08) 50%, transparent 82%, rgba(110,80,41,.08)),
    linear-gradient(0deg, #080808, #181714);
  border-top: 2px solid #3b352b;
  padding: 6px 7px max(6px, env(safe-area-inset-bottom));
  box-shadow:
    inset 0 1px #090807,
    inset 0 2px rgba(201,154,69,.07),
    0 -7px 18px rgba(0,0,0,.82);
  position: relative; z-index: 8;
}
#tabbar::before {
  content: '';
  position: absolute;
  inset: 4px 5px max(4px, env(safe-area-inset-bottom));
  border: 1px solid rgba(108,89,61,.34);
  pointer-events: none;
}
#tabbar button {
  flex: 1; background: none; border: none; box-shadow: none; border-radius: 0;
  padding: 8px 0 6px; color: #746d60; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  letter-spacing: .15em; position: relative;
  border-right: 1px solid rgba(85,67,47,.28);
}
#tabbar button:last-child { border-right: 0; }
#tabbar button svg { width: 27px; height: 27px; stroke-width: 1.35; filter: drop-shadow(0 2px 2px rgba(0,0,0,.9)); }
#tabbar button .ico-img { width: 27px !important; height: 27px !important; opacity: .72; filter: sepia(.25) brightness(.72) drop-shadow(0 2px 2px rgba(0,0,0,.9)); }
#tabbar button.on {
  color: #f3d797;
  border: 1px solid #8a602b;
  background:
    radial-gradient(85% 105% at 50% 55%, rgba(195,104,32,.38), transparent 72%),
    linear-gradient(180deg, rgba(88,51,22,.7), rgba(38,25,15,.92));
  box-shadow:
    inset 0 0 20px rgba(230,151,64,.18),
    inset 0 1px rgba(255,221,152,.12),
    0 0 9px rgba(0,0,0,.75);
}
#tabbar button.on::before {
  content: ''; position: absolute; inset: 3px; border: 1px solid rgba(225,165,78,.34); pointer-events: none;
}
#tabbar button.on svg { filter: drop-shadow(0 0 5px rgba(223,151,61,.42)) drop-shadow(0 2px 2px #000); }
#tabbar button.on .ico-img { opacity: 1; filter: sepia(.35) brightness(1.15) drop-shadow(0 0 6px rgba(223,151,61,.45)); }
#tabbar button .dot { position: absolute; margin-left: 30px; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }

/* ============ 面板/卡片 ============ */
.panel {
  background: linear-gradient(180deg, rgba(38,30,22,.55), rgba(24,19,14,.7));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.panel-title { font-size: 13px; color: var(--gold); letter-spacing: .2em; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.panel-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
.muted { color: var(--dim); font-size: 12.5px; }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.gold-t { color: var(--gold); }
.ember-t { color: var(--ember); }
.center { text-align: center; }

/* ============ 城堡 2.5D 场景 ============ */
.castle-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 13;
  min-height: 0;
  border: 1px solid #4a4031;
  overflow: hidden;
  background:
    radial-gradient(90% 30% at 50% 0%, rgba(160, 90, 40, .07), transparent),
    radial-gradient(60% 22% at 63% 88%, rgba(192, 91, 51, .12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.045 0 0 0 0 0.03 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #151009 0%, #1c150e 30%, #211913 60%, #17110b 100%);
  box-shadow:
    inset 0 0 0 2px rgba(8,8,7,.85),
    inset 0 0 42px rgba(0,0,0,.82),
    0 7px 20px rgba(0,0,0,.76);
}
.castle-screen { padding: 0 5px 6px; }
.cs-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; object-position: 50% 50%; z-index: 0;
}
.cs-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3,5,6,.5), transparent 16%, transparent 80%, rgba(5,4,3,.5)),
    radial-gradient(ellipse at 50% 48%, transparent 52%, rgba(0,0,0,.48) 100%);
  box-shadow: inset 0 0 36px rgba(0,0,0,.8);
}
.cs-heading {
  position: absolute; left: 50%; top: 3.2%; transform: translateX(-50%);
  width: 88%; z-index: 5; text-align: center; pointer-events: none;
  text-shadow: 0 2px 3px #000, 0 0 18px rgba(0,0,0,.95);
}
.cs-title {
  color: #d7a94f; font-size: 24px; letter-spacing: .24em; line-height: 1.2;
  background: linear-gradient(180deg, #f1d68d, #bb7629);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 #21180d);
}
.cs-sub { color: #a49273; font-size: 11px; letter-spacing: .12em; }
.art-ready .cs-band, .art-ready .cs-lantern, .art-ready .cs-glow { display: none; }
.art-ready .cs-img { opacity: 0; }
.art-ready .cs-tile { width: 30%; min-height: 12%; justify-content: flex-end; }
.art-ready .cs-tile:hover .cs-name, .art-ready .cs-well:hover .cs-name {
  border-color: #a77a3e; color: #f0d9a6; box-shadow: 0 0 14px rgba(201,154,69,.24);
}
.cs-band {
  position: absolute; left: -2%; width: 104%; height: 30px;
  background:
    linear-gradient(180deg, rgba(120, 92, 58, .28), rgba(60, 46, 30, .18) 3px, rgba(20, 14, 9, .5) 65%, transparent);
  clip-path: polygon(0 0, 4% 18%, 9% 4%, 16% 22%, 24% 8%, 33% 24%, 41% 6%, 50% 20%, 58% 5%, 67% 22%, 76% 8%, 85% 24%, 93% 6%, 100% 16%, 100% 100%, 0 100%);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.55));
}
.cs-lantern { position: absolute; transform: translate(-50%, -50%); z-index: 1; }
.cs-lantern i {
  display: block; width: 6px; height: 9px; border-radius: 2px;
  background: linear-gradient(180deg, #3a2d1c, #e8a15a 45%, #c05b33);
  border: 1px solid #241b10;
  box-shadow: 0 0 14px 4px rgba(220, 140, 70, .28), 0 0 34px 12px rgba(220, 140, 70, .08);
  animation: lantern-flicker 3.4s infinite;
}
.cs-lantern::before {
  content: ''; position: absolute; left: 50%; top: -8px; width: 1px; height: 8px; background: #3a2f22;
}
@keyframes lantern-flicker {
  0%, 100% { filter: brightness(1); } 48% { filter: brightness(.85); }
  52% { filter: brightness(1.15); } 60% { filter: brightness(.92); }
}
.cs-ember {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #d06a3a; opacity: 0; pointer-events: none; z-index: 4;
  animation: floatup linear infinite;
}
.cs-glow {
  position: absolute; transform: translate(-50%, -50%);
  width: 170px; height: 120px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse, rgba(216, 140, 70, .1), transparent 65%);
}
.cs-mist {
  position: absolute; transform: translate(-50%, -50%);
  width: 150px; height: 44px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(180, 160, 140, .07), transparent 65%);
  filter: blur(6px); pointer-events: none; z-index: 3;
  animation: mist-drift 9s ease-in-out infinite;
}
@keyframes mist-drift {
  0%, 100% { transform: translate(-50%, -50%) scaleX(1); opacity: .8; }
  50% { transform: translate(-54%, -56%) scaleX(1.25); opacity: .45; }
}
.cs-tile {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.cs-tile:active { transform: translate(-50%, -50%) scale(.95); }
.cs-img { display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 6px 8px rgba(0,0,0,.7)); }
.cs-img img { width: 100%; height: 100%; object-fit: contain; }
.cs-tile.locked .cs-img { filter: grayscale(.9) brightness(.45) drop-shadow(0 6px 8px rgba(0,0,0,.7)); }
.cs-tile.locked .cs-name { color: var(--faint); }
.cs-name {
  margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: #e1cfa7;
  background:
    linear-gradient(90deg, rgba(119,85,43,.08), transparent 18%, transparent 82%, rgba(119,85,43,.08)),
    linear-gradient(180deg, rgba(31,27,22,.97), rgba(8,8,7,.96));
  border: 1px solid #80623c;
  border-radius: 1px; padding: 3px 11px; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.82),
    inset 0 1px rgba(232,190,112,.06),
    0 2px 7px rgba(0,0,0,.8);
  transition: border-color .18s, color .18s, box-shadow .18s;
}
.cs-lv { color: #d6a651; font-size: 11.5px; font-weight: 500; }
.cs-timer {
  font-size: 11px; color: #d66f49;
  background: rgba(10,8,6,.92); border: 1px solid rgba(91,61,38,.56); border-radius: 1px; padding: 0 7px; margin-top: 2px;
}
.cs-tile.upgrading .cs-img { animation: build-pulse 1.6s infinite; }
@keyframes build-pulse { 0%,100% { filter: drop-shadow(0 6px 8px rgba(0,0,0,.7)); } 50% { filter: drop-shadow(0 0 12px rgba(201,154,69,.55)); } }
.cs-well { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 2; }
.cs-well:active { transform: translate(-50%, -50%) scale(.95); }
.cs-well-mouth {
  width: 108px; height: 62px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, #030202 45%, #241b12 78%, #3a2d1f 82%, #241b12 88%);
  border: 2px solid #443728;
  box-shadow: inset 0 6px 18px rgba(0,0,0,.95), 0 0 22px rgba(192,91,51,.18);
  position: relative; overflow: hidden;
}
.art-ready .cs-well-mouth { opacity: 0; }
.art-ready .cs-well { width: 36%; min-height: 14%; justify-content: flex-end; }
.cs-rope {
  position: absolute; left: 50%; top: 0; width: 1px; height: 60%;
  background: #4a3b28; display: block;
}
.cs-rope::after {
  content: ''; position: absolute; left: -2px; bottom: -3px; width: 5px; height: 6px;
  background: radial-gradient(circle, #e8944a, #c05b33); border-radius: 50%;
  box-shadow: 0 0 8px rgba(232,148,74,.8);
  animation: pulse 2.4s infinite;
}
.cs-well .cs-name { color: var(--gold); border-color: var(--line2); }

.castle-status {
  position: relative; z-index: 3;
  margin-top: 6px; padding: 8px 10px 7px;
  border: 1px solid #62523a;
  background: linear-gradient(180deg, rgba(25,23,19,.98), rgba(10,10,9,.98));
  box-shadow:
    inset 0 0 0 2px #0c0c0b,
    inset 0 0 0 3px rgba(111,91,61,.42),
    0 5px 16px rgba(0,0,0,.68);
}
.castle-status::before, .castle-status::after {
  content: ''; position: absolute; width: 13px; height: 13px; top: 3px;
  border-top: 1px solid #7c6644;
}
.castle-status::before { left: 3px; border-left: 1px solid #7c6644; }
.castle-status::after { right: 3px; border-right: 1px solid #7c6644; }
.castle-build { min-height: 48px; padding: 2px 5px 8px; border-bottom: 1px solid #40372b; color: #cdbd9a; }
.castle-build-main { min-height: 36px; }
.castle-build-copy { min-width: 0; }
.castle-build b { color: #e3d2ac; font-weight: 500; }
.castle-build em { color: #766b59; font-style: normal; }
.status-medallion {
  width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: #e0ae4c; border: 1px solid #7a5d37; border-radius: 50%;
  background: radial-gradient(circle, #33291d, #13110e 72%);
  box-shadow: inset 0 0 0 2px #0b0a09, 0 0 0 1px rgba(196,145,72,.12);
}
.castle-enter { min-width: 49px; height: 35px; padding: 5px 12px; color: #e0ae4c; border-color: #745936; }
.build-timer { min-width: 36px; text-align: right; color: #d16b44; font-size: 11.5px; }
.castle-progress {
  height: 4px; margin-top: 5px; overflow: hidden;
  background: #0b0a08; border: 1px solid #443725;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.9);
}
.castle-progress i {
  display: block; height: 100%; min-width: 2px;
  background: linear-gradient(90deg, #8d5429, #d49a4d);
  box-shadow: 0 0 6px rgba(212,154,77,.3);
}
.castle-production { padding: 7px 4px 1px; }
.castle-production-title { font-size: 11.5px; color: #ab9a79; margin-bottom: 5px; letter-spacing: .17em; }
.castle-production-row { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 5px; overflow: hidden; }
.castle-production-row .res-chip { font-size: 11px; justify-content: flex-start; gap: 3px; }
.castle-production-row .res-chip b { color: #d7bd83; }
.castle-production-row .res-chip small { color: #685e50; font-size: 9px; }

@media (max-width: 390px) {
  #topbar { font-size: 10px; }
  #topbar .res-chip { gap: 2px; }
  #topbar .ico-img { width: 12px !important; height: 12px !important; }
  .castle-scene {
    height: calc(100dvh - 250px);
    min-height: 450px;
    max-height: 594px;
    aspect-ratio: auto;
  }
  .cs-title { font-size: 22px; }
  .cs-name { font-size: 11px; padding: 2px 8px; }
  .castle-production-row { gap: 3px; }
  .castle-production-row .res-chip { font-size: 9.5px; }
  #tabbar { min-height: 70px; }
  #tabbar button { font-size: 11.5px; }
}

/* ============ 战斗站场 ============ */
.battle-titlebar {
  flex: none; min-height: 52px; padding: 7px 12px 8px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  border-bottom: 1px solid #56442c;
  background:
    linear-gradient(90deg, transparent, rgba(173,112,46,.12) 50%, transparent),
    linear-gradient(180deg, rgba(21,18,14,.97), rgba(8,8,7,.93));
  box-shadow: 0 5px 18px rgba(0,0,0,.72);
}
.battle-titlebar b {
  color: #d8b46f; font-size: 15px; font-weight: 500; letter-spacing: .14em;
  text-shadow: 0 1px 3px #000;
}
.battle-titlebar span { color: #5f564a; font-size: 9px; letter-spacing: .12em; }
.battle-titlebar span:last-child { text-align: right; }
.battle-stage {
  flex: none; position: relative; isolation: isolate;
  padding: 15px 6px 10px;
  min-height: 278px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(3,3,3,.48)),
    radial-gradient(70% 35% at 50% 53%, rgba(189,104,42,.11), transparent 72%);
}
.battle-stage::after {
  content: ''; position: absolute; z-index: -1; left: 4%; right: 4%; bottom: 8px; height: 44%;
  background: radial-gradient(ellipse at 50% 72%, rgba(65,52,37,.4), rgba(5,5,4,.15) 55%, transparent 73%);
  border-bottom: 1px solid rgba(132,99,56,.2);
  transform: perspective(260px) rotateX(57deg);
}
.stage-row { display: flex; justify-content: center; align-items: flex-end; gap: 5px; min-height: 105px; flex-wrap: wrap; }
.stage-row.enemy-row { transform: scale(.96); margin-bottom: 5px; }
.stage-vs {
  text-align: center; font-size: 9px; color: #80653e; letter-spacing: .55em; margin: 1px 0;
  text-shadow: 0 1px 3px #000;
}
.bunit {
  position: relative; width: 68px; padding: 3px 2px 4px;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .18s, opacity .4s, filter .3s;
  border: 1px solid rgba(93,76,52,.22);
  background: linear-gradient(180deg, rgba(18,16,13,.08), rgba(8,7,6,.58));
  box-shadow: 0 5px 14px rgba(0,0,0,.32);
}
.bunit.boss-u { width: 112px; border-color: rgba(136,54,42,.42); }
.bunit .bu-hp { width: 90%; height: 5px; background: #160f0d; border: 1px solid rgba(82,59,43,.75); border-radius: 1px; overflow: hidden; margin-bottom: 3px; }
.bunit .bu-hp i { display: block; height: 100%; background: linear-gradient(90deg, #7c352b, #a04a33); transition: width .25s; }
.bunit.enemy-u .bu-hp i { background: linear-gradient(90deg, #6b4a86, #93312a); }
.bunit .bu-sprite {
  width: 58px; height: 58px; object-fit: contain; display: block;
  filter: drop-shadow(0 7px 6px rgba(0,0,0,.82));
}
.bunit.boss-u .bu-sprite { width: 98px; height: 98px; }
.bunit .bu-shadow {
  width: 70%; height: 8px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 70%);
  margin-top: -5px;
}
.bunit .bu-name { font-size: 9.5px; color: #c9b890; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: rgba(10,8,6,.82); border: 1px solid rgba(93,74,48,.35); border-radius: 1px; padding: 0 5px; }
.bunit .bu-hpnum { font-size: 8.5px; color: var(--dim); }
.bunit .st-row { display: flex; gap: 2px; min-height: 11px; flex-wrap: wrap; justify-content: center; }
.bunit .st { font-size: 8.5px; padding: 0 2px; border-radius: 2px; background: rgba(44,31,20,.9); color: #b99; }
.bunit.hero-u .bu-sprite { border-radius: 50%; border: 2px solid #6a5336; width: 50px; height: 50px; object-fit: cover; box-shadow: 0 0 10px rgba(201,154,69,.12); }
.bunit.acting { transform: translateY(-7px) scale(1.07); z-index: 3; border-color: rgba(201,154,69,.68); box-shadow: 0 0 16px rgba(201,154,69,.22); }
.bunit.enemy-u.acting { transform: translateY(7px) scale(1.07); }
.bunit.hurt-fx .bu-sprite { animation: hurtflash .3s; }
@keyframes hurtflash { 0% { filter: brightness(2.2) drop-shadow(0 0 6px rgba(220,80,50,.9)); } 100% { filter: drop-shadow(0 5px 5px rgba(0,0,0,.75)); } }
.bunit.dead { opacity: .18; filter: grayscale(1); }
.bunit.dead .bu-sprite { transform: rotate(12deg) translateY(4px); }
.bunit .dmg-float { top: 14px; }

/* ============ 建筑列表 ============ */
.bld {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  border: 1px solid var(--line); border-radius: 4px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(40,32,23,.5), rgba(22,17,12,.6));
}
.bld.locked { opacity: .5; }
.bld-ico {
  width: 42px; height: 42px; flex: none;
  border: 1px solid var(--line2); border-radius: 3px;
  background: radial-gradient(circle at 50% 35%, #2e251a, #191410);
  display: flex; align-items: center; justify-content: center;
}
.bld-ico svg { width: 26px; height: 26px; color: var(--gold); }
.bld-lv { color: var(--gold); font-size: 12px; }
.bld-prod { color: var(--dim); font-size: 11.5px; }
.build-timer { color: var(--ember); font-size: 12px; }

/* ============ 英雄卡 ============ */
.heroes-screen, .hero-detail-screen, .party-screen, .explore-screen {
  min-height: 100%;
  background:
    radial-gradient(100% 36% at 50% 0%, rgba(102,74,39,.08), transparent 72%),
    linear-gradient(180deg, rgba(7,7,6,.16), transparent 45%);
}
.party-command {
  padding: 9px;
  border-color: #51442f;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), 0 5px 16px rgba(0,0,0,.24);
}
.party-strip { padding: 8px 5px; border-bottom: 1px solid rgba(85,67,47,.55); }
.party-strip:last-of-type { border-bottom: 0; }
.party-name { color: #dfcfaa; }
.party-mini { display: flex; align-items: center; gap: 4px; min-height: 30px; padding: 3px 4px 0 44px; }
.party-mini .portrait.small { width: 29px; height: 29px; border-width: 1px; }
.party-mini .portrait.small .lv-badge { display: none; }
.hero-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 10px; margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(38,30,22,.45), rgba(22,17,12,.6));
}
.roster-card {
  position: relative; min-height: 74px; padding: 9px 11px;
  border-color: color-mix(in srgb, var(--q-color) 42%, #3b3022);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--q-color) 8%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(31,27,22,.82), rgba(12,11,10,.88));
  box-shadow: inset 2px 0 color-mix(in srgb, var(--q-color) 58%, transparent), 0 5px 14px rgba(0,0,0,.22);
}
.roster-card::after {
  content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px;
  border-top: 1px solid var(--q-color); border-right: 1px solid var(--q-color); opacity: .55;
}
.roster-card .portrait { width: 54px; height: 54px; box-shadow: 0 0 13px rgba(0,0,0,.8), 0 0 10px color-mix(in srgb, var(--q-color) 18%, transparent); }
.roster-card.wounded { filter: saturate(.58); }
.hero-profile {
  gap: 15px; justify-content: center; padding: 14px;
  border: 1px solid color-mix(in srgb, var(--q-color) 52%, #423522);
  background:
    radial-gradient(circle at 22% 50%, color-mix(in srgb, var(--q-color) 14%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(33,28,21,.9), rgba(12,11,9,.94));
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.5);
}
.hero-profile .portrait { width: 76px; height: 76px; }
.hero-bio {
  margin: 8px 0 12px; padding: 9px 12px;
  border-left: 1px solid #5f4c31; border-right: 1px solid #5f4c31;
  background: linear-gradient(90deg, transparent, rgba(56,44,30,.25), transparent);
}
.portrait {
  position: relative; width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 32%, #34291b, #15100b 78%);
  border: 2px solid var(--q-color, #777);
  box-shadow: 0 0 8px rgba(0,0,0,.6), inset 0 0 10px rgba(0,0,0,.55);
}
.portrait svg { width: 24px; height: 24px; color: var(--q-color, #999); filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
.portrait.small { width: 38px; height: 38px; }
.portrait.small svg { width: 20px; height: 20px; }
.px { image-rendering: pixelated; }
.portrait .pt-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.scene-banner { display: block; width: 100%; border: 1px solid var(--line2); border-radius: 4px; margin-bottom: 10px; image-rendering: auto; }
.scene-banner.px { image-rendering: pixelated; }
.bld-ico img { width: 100%; height: 100%; border-radius: 2px; object-fit: cover; }
.unit-card .sprite { width: 40px; height: 40px; object-fit: contain; display: block; margin: 2px auto; }
.unit-card.boss-card .sprite { width: 64px; height: 64px; }
.portrait .lv-badge {
  position: absolute; bottom: -5px; right: -5px;
  background: #241c12; border: 1px solid var(--line2); border-radius: 3px;
  font-size: 9.5px; padding: 0 3px; color: var(--parch);
}
.hero-name { font-size: 14px; }
.hero-meta { font-size: 11.5px; color: var(--dim); }
.hp-bar { height: 5px; background: #241a14; border-radius: 2px; overflow: hidden; margin-top: 4px; border: 1px solid rgba(0,0,0,.6); }
.hp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7c352b, #a04a33); transition: width .3s; }
.hp-bar i.shield { background: var(--shield); }
.q-tag { font-size: 10.5px; padding: 0 5px; border-radius: 2px; border: 1px solid; }
.status-tag { font-size: 10.5px; color: var(--blood); }

/* ============ 编队 ============ */
.formation-panel { border-color: #51442f; }
.formation-power { color: #d6ad61; font-size: 13px; letter-spacing: .06em; }
.formation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.slot {
  border: 1px dashed #4d4232; border-radius: 2px;
  min-height: 94px; padding: 7px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--faint);
  background:
    radial-gradient(circle at 50% 45%, rgba(77,61,40,.19), transparent 60%),
    rgba(0,0,0,.3);
}
.slot.filled { border-style: solid; border-color: #655138; background: linear-gradient(180deg, rgba(45,37,28,.72), rgba(15,13,11,.86)); box-shadow: inset 0 0 12px rgba(0,0,0,.45); }
.slot.filled .portrait.small { width: 46px; height: 46px; }
.slot .nm { font-size: 11px; color: var(--parch); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-label { grid-column: 1 / -1; font-size: 10px; color: #7a6546; letter-spacing: .4em; text-align: center; margin-top: 3px; }

/* ============ 酒馆 ============ */
.cand { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; background: linear-gradient(180deg, rgba(38,30,22,.45), rgba(22,17,12,.6)); }

/* ============ 地图 ============ */
.expedition-active {
  border-color: #6a4f2c;
  background:
    radial-gradient(70% 120% at 0 50%, rgba(171,92,38,.14), transparent),
    linear-gradient(180deg, rgba(41,31,21,.92), rgba(17,14,11,.95));
  box-shadow: 0 0 15px rgba(174,91,36,.08);
}
.expedition-card {
  position: relative; min-height: 148px; margin-bottom: 10px; overflow: hidden; cursor: pointer;
  border: 1px solid #4d4132; border-radius: 2px;
  background-size: cover; background-position: center 40%;
  box-shadow: inset 0 0 28px rgba(0,0,0,.55), 0 5px 15px rgba(0,0,0,.28);
}
.expedition-card:active { transform: translateY(1px); filter: brightness(.9); }
.expedition-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,8,7,.95) 0%, rgba(8,8,7,.68) 52%, rgba(7,7,6,.5) 76%, rgba(7,7,6,.82) 100%),
    linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.68));
}
.expedition-copy { position: absolute; z-index: 2; left: 15px; right: 92px; bottom: 13px; }
.expedition-title { color: #e0cc9e; font-size: 17px; letter-spacing: .1em; text-shadow: 0 2px 3px #000; }
.expedition-title .tag { margin-left: 7px; vertical-align: middle; }
.expedition-desc { color: #8d806b; font-size: 11px; line-height: 1.5; margin-top: 3px; }
.expedition-boss { color: #7c5846; font-size: 10px; margin-top: 5px; }
.expedition-tier {
  position: absolute; z-index: 2; right: 14px; top: 12px; width: 43px; height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid #715536; color: #8d7758; background: rgba(12,11,9,.82);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.62);
}
.expedition-tier span { font-size: 8px; line-height: 1; }
.expedition-tier b { font-size: 20px; line-height: 1.25; color: #d2a65d; font-weight: 500; }
.expedition-action { position: absolute; z-index: 3; right: 13px; bottom: 12px; }
.expedition-action button { padding: 6px 12px; }
.expedition-card.locked { filter: grayscale(.88) brightness(.55); cursor: default; }
.expedition-card.locked .expedition-copy { right: 14px; }
.expedition-lock {
  position: absolute; z-index: 2; right: 18px; top: 15px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; color: #806f59;
  border: 1px solid #5b4c39; border-radius: 50%; background: rgba(8,8,7,.75);
}
#map-wrap {
  position: relative; overflow-y: auto; overflow-x: hidden;
  height: 100%;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(160, 90, 40, .04), transparent),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.03 0 0 0 0 0.025 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #16110c, #0b0806 70%);
}
#map-svg { display: block; width: 100%; }
.map-edge { stroke: #50422f; stroke-width: .7; opacity: .75; }
.map-edge.lit { stroke: #b08040; filter: drop-shadow(0 0 1.5px rgba(218,157,69,.55)); }
.map-node { cursor: pointer; }
.map-node .halo { fill: none; }
.map-node.cur .halo { fill: rgba(212, 133, 58, .22); stroke: rgba(212,133,58,.45); stroke-width: .3; animation: pulse 2s infinite; }
.map-node circle.body { fill: #181510; stroke: #665238; stroke-width: .6; filter: drop-shadow(0 1px 1.5px #000); }
.map-node.visited circle.body { fill: #191410; stroke: #3a2e20; }
.map-node.frontier circle.body { stroke: #bd8c43; fill: #332313; filter: drop-shadow(0 0 2px rgba(193,132,57,.4)); }
.map-node.unknown circle.body { fill: #14100c; stroke: #2c231a; }
.map-node text { fill: #6b5b43; font-size: 3.2px; text-anchor: middle; font-family: var(--serif); }
.map-node.frontier text { fill: #b09a6d; }
.map-node .ico { color: #9c8a66; }
.map-node.cleared .ico { color: #5b4d3b; }
.map-node.boss-node circle.body { stroke: var(--blood); }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
#explore-hud {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; align-items: center;
  padding: 8px 10px;
  background:
    linear-gradient(90deg, transparent, rgba(175,110,43,.08) 50%, transparent),
    linear-gradient(180deg, rgba(19,17,14,.98), rgba(7,7,6,.92));
  border-bottom: 1px solid #5a4830;
  box-shadow: 0 5px 14px rgba(0,0,0,.55);
  font-size: 12px;
}

/* ============ 战斗 ============ */
#battle-overlay {
  position: absolute; inset: 0; z-index: 40;
  background: radial-gradient(120% 70% at 50% -10%, rgba(147,49,42,.1), transparent 55%), #0b0806;
  display: flex; flex-direction: column;
  box-shadow: inset 0 0 60px rgba(0,0,0,.72);
}
.battle-side { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; justify-content: center; }
.unit-card {
  width: 96px; padding: 5px 6px 6px;
  border: 1px solid var(--line); border-radius: 4px;
  background: linear-gradient(180deg, rgba(35,27,19,.7), rgba(18,14,10,.8));
  font-size: 11px; text-align: center;
  transition: opacity .3s;
  position: relative;
}
.unit-card.enemy { border-color: #4a2c24; }
.unit-card.dead { opacity: .28; filter: grayscale(.9); }
.unit-card.acting { border-color: var(--gold); box-shadow: 0 0 8px rgba(201,154,69,.25); }
.unit-card.hurt { animation: shake .3s; }
.unit-card .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--parch); }
.unit-card .st-row { display: flex; justify-content: center; gap: 2px; min-height: 12px; margin-top: 2px; flex-wrap: wrap; }
.unit-card .st { font-size: 9px; padding: 0 2px; border-radius: 2px; background: #2c1f14; color: #b99; }
.unit-card.boss-card { width: 200px; }
.unit-card .hpnum { font-size: 9.5px; color: var(--dim); }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.dmg-float {
  position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  font-size: 13px; color: #e2b08f; pointer-events: none;
  animation: rise .8s forwards; font-weight: 600; text-shadow: 0 1px 2px #000;
}
.dmg-float.crit { color: #e8593a; font-size: 16px; }
.dmg-float.heal { color: #9ec98a; }
@keyframes rise { from { opacity: 1; top: 10px; } to { opacity: 0; top: -14px; } }
#battle-log {
  flex: 1 1 0; overflow-y: auto; margin: 5px 10px;
  border: 1px solid #443928; border-radius: 1px;
  background:
    linear-gradient(180deg, rgba(12,11,9,.82), rgba(4,4,3,.76));
  padding: 8px 10px;
  font-size: 12px; color: var(--parch-dim); line-height: 1.7;
  box-shadow: inset 0 0 18px rgba(0,0,0,.48);
}
#battle-log .r-head { color: var(--gold); letter-spacing: .2em; margin-top: 4px; }
#battle-log .crit-t { color: #e8593a; }
#battle-log .heal-t { color: #9ec98a; }
#battle-log .phase-t { color: var(--ember); }
#battle-ctrl {
  flex: none; display: flex; gap: 8px; padding: 9px 10px;
  padding-bottom: max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid #4a3c29;
  background: linear-gradient(180deg, rgba(23,20,16,.96), rgba(8,8,7,.98));
}
#battle-ctrl button { flex: 1; }

/* ============ 弹窗 ============ */
#modal-root { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(4,3,2,.78);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto; padding: 18px;
  animation: fadein .18s;
}
.modal {
  width: 100%; max-width: 400px; max-height: 86%;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(46,37,26,.97), rgba(26,20,14,.98));
  border: 1px solid var(--line2); border-radius: 5px;
  padding: 16px;
  box-shadow: 0 12px 50px rgba(0,0,0,.8);
}
.modal-title { font-size: 16px; color: var(--gold); letter-spacing: .18em; text-align: center; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions button { flex: 1; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lore-paper {
  background: linear-gradient(180deg, #cfc09a, #b7a67e);
  color: #33281a; padding: 14px 15px; border-radius: 3px;
  font-size: 13.5px; line-height: 1.8;
  box-shadow: inset 0 0 30px rgba(90,70,40,.35);
  border: 1px solid #8a7754;
}
.lore-paper .lp-title { font-weight: 700; letter-spacing: .15em; margin-bottom: 6px; color: #4a3822; }

/* ============ 提示 ============ */
#toast-root { position: absolute; left: 0; right: 0; top: 54px; z-index: 80; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.toast {
  background: rgba(20,15,10,.95); border: 1px solid var(--line2);
  color: var(--parch); border-radius: 3px; padding: 7px 16px;
  font-size: 13px; max-width: 86%;
  animation: toastin .25s, fadeout .4s 2.4s forwards;
  box-shadow: 0 4px 16px rgba(0,0,0,.6);
}
.toast.warn { border-color: #6b3028; color: #dfa79a; }
@keyframes toastin { from { transform: translateY(-8px); opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }

/* ============ 开场 ============ */
#title-screen {
  position: absolute; inset: 0; z-index: 100;
  background:
    radial-gradient(100% 55% at 50% 118%, rgba(192,91,51,.22), transparent 60%),
    radial-gradient(120% 70% at 50% -20%, rgba(30,24,18,.8), transparent),
    #080604;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 30px;
}
#ts-art { width: min(78%, 340px); border: 1px solid var(--line2); border-radius: 4px; margin-bottom: 26px; box-shadow: 0 8px 40px rgba(0,0,0,.7); }
#ts-art.px { image-rendering: pixelated; }
#title-screen .t-name { font-size: 40px; letter-spacing: .4em; margin-right: -.4em; color: var(--parch); text-shadow: 0 0 30px rgba(192,91,51,.35); margin-bottom: 2px; }
#title-screen .t-sub { color: var(--faint); font-size: 13px; letter-spacing: .3em; margin-right: -.3em; margin-bottom: 40px; }
#title-screen button { min-width: 200px; padding: 12px; letter-spacing: .3em; font-size: 15px; }
#title-screen .t-ver { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); color: #4a3e30; font-size: 11px; letter-spacing: .1em; }
.ember-fleck { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #d06a3a; opacity: 0; animation: floatup linear infinite; }
@keyframes floatup {
  0% { opacity: 0; transform: translateY(0); }
  12% { opacity: .8; }
  100% { opacity: 0; transform: translateY(-46vh) translateX(12px); }
}

/* ============ 物品 ============ */
.inv-item {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 7px 9px; margin-bottom: 7px;
  background: linear-gradient(180deg, rgba(36,29,21,.5), rgba(20,16,11,.6));
}
.item-ico {
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--q-color, var(--line2)); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #2b2216, #171209);
}
.item-ico svg { width: 20px; height: 20px; color: var(--q-color, #998); }
.filter-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-row button { padding: 4px 10px; font-size: 12px; }
.filter-row button.on { border-color: var(--gold); color: var(--gold); }

/* ============ 任务 ============ */
.quest-main {
  border: 1px solid var(--line2); border-radius: 4px; padding: 12px;
  background: linear-gradient(180deg, rgba(50,38,24,.5), rgba(24,18,12,.6));
  margin-bottom: 10px;
}
.progress-bar { height: 6px; background: #241a12; border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a34, #c99a45); }
.lore-entry { padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lore-entry.locked { color: var(--faint); }

/* 探索节点交互条 */
#node-action {
  position: sticky; bottom: 0; z-index: 6;
  background: linear-gradient(0deg, rgba(10,8,6,.97), rgba(10,8,6,.88));
  border-top: 1px solid var(--line);
  padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.event-text { font-size: 13.5px; line-height: 1.8; color: var(--parch); }
.choice-btn { display: block; width: 100%; text-align: left; margin-top: 8px; padding: 10px 12px; font-size: 13.5px; }
.choice-btn .req-t { color: var(--ember); font-size: 11px; }
.choice-btn:disabled .req-t { color: var(--blood); }

.tag { display: inline-block; font-size: 10.5px; border: 1px solid var(--line2); border-radius: 2px; padding: 0 5px; color: var(--dim); margin-right: 4px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line2), transparent); margin: 10px 0; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 13px; }
.stat-grid .k { color: var(--dim); }
.loot-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.loot-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line2); padding: 3px 9px; border-radius: 3px; background: rgba(0,0,0,.3); font-size: 13px; }
.loot-chip svg { width: 14px; height: 14px; }
.big-num { font-size: 22px; color: var(--gold); }
.section-gap { height: 14px; }
.offline-gain { display: flex; justify-content: space-between; padding: 4px 2px; border-bottom: 1px dashed var(--line); font-size: 14px; }
