/* ============================================================
   $COAL — dashboard pixel panel styles
   ============================================================ */
.app{ position:fixed; inset:0; display:flex; flex-direction:column; gap:12px; padding:12px;
  background:
    linear-gradient(180deg, rgba(8,6,4,.7), rgba(6,4,3,.85)),
    url('assets/bg/underground.webp');
  background-size:cover; background-position:center; }
.app::before{ content:""; position:absolute; inset:0; pointer-events:none;
  box-shadow:inset 0 0 200px 30px rgba(0,0,0,.8); z-index:0; }

/* ---------- HUD top bar ---------- */
.hud{ position:relative; z-index:5; flex:none; display:flex; align-items:center; gap:18px; padding:9px 18px; }
.hud-brand{ display:flex; align-items:center; gap:11px; flex:none; }
.hud-emblem{ width:46px; height:46px; flex:none; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 45% 30%, #3a3022, #16110a); border:2px solid var(--frame-edge); border-radius:5px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.08); }
.hud-emblem img{ width:36px; height:36px; object-fit:contain; filter:drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.hud-title{ font-size:23px; color:var(--gold-bright); text-shadow:0 2px 0 #6b3f1a, 0 3px 2px rgba(0,0,0,.5); line-height:.95; white-space:nowrap; }
.hud-season{ font-size:9px; color:var(--bone-dim); margin-top:4px; white-space:nowrap; }
.ph{ padding:2px 5px; border-radius:3px; }
.ph-digging{ color:var(--green); background:rgba(131,194,78,.14); }
.ph-resolving{ color:var(--gold); background:rgba(245,166,35,.14); }
.ph-won{ color:var(--diamond); } .ph-lost{ color:var(--danger); }

.hud-pills{ display:flex; gap:10px; margin-left:6px; }
.hud-clock{ margin-left:auto; text-align:right; padding-left:14px; border-left:2px solid var(--frame-edge); }
.hud-clock .label{ color:var(--bone-dim); }
.hud-clock-t{ font-size:18px; color:var(--gold-bright); font-weight:700; margin-top:3px; }

/* ---------- stage grid ---------- */
.stage{ position:relative; z-index:4; flex:1; min-height:0; display:grid;
  grid-template-columns:256px minmax(0,1fr) 286px; gap:12px; }
.rail{ display:flex; flex-direction:column; gap:12px; min-height:0; overflow-y:auto; padding-right:2px; }
.mine-col{ position:relative; min-height:0; }
.mine-col .mine{ height:100%; }

/* ---------- stat rows ---------- */
.srows{ padding:8px; display:flex; flex-direction:column; gap:6px; }
.srow{ display:grid; grid-template-columns:30px 1fr auto; grid-template-rows:auto auto; gap:1px 9px; align-items:center;
  padding:7px 9px; background:rgba(0,0,0,.22); border-radius:4px; border:1px solid rgba(245,166,35,.08); }
.srow-ic{ grid-row:1/3; width:30px; height:30px; display:flex; align-items:center; justify-content:center; }
.srow-ic img{ width:36px; height:36px; object-fit:contain; filter:drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.srow-lbl{ align-self:end; }
.srow-val{ grid-row:1/3; grid-column:3; font-size:19px; color:var(--bone); font-weight:700; }
.srow-val.gold{ color:var(--gold-bright); }
.srow-sub{ align-self:start; color:var(--muted); grid-column:2; }

/* ---------- tools inventory grid ---------- */
.tool-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:7px; padding:10px; }
.slot-pow{ position:absolute; left:2px; top:1px; font-size:10px; color:var(--gold); text-shadow:0 1px 0 #000,0 0 3px #000; }
.slot-plus{ font-family:var(--f-display); font-size:26px; color:#6a5a3e; }
.slot.buy:hover .slot-plus{ color:var(--gold); }
.frame-hd .hd-note{ margin-left:auto; font-size:8px; color:var(--muted); }
.frame-foot{ padding:0 10px 11px; }

/* ---------- bag ---------- */
.bag{ padding:11px 12px; }
.bag-lbl{ margin-bottom:8px; }
.bag-btns{ display:flex; gap:8px; }
.bag-btns .pbtn{ flex:1; }

/* ---------- wage cart ---------- */
.wage-body{ display:flex; gap:11px; padding:12px; align-items:center; }
.cart{ position:relative; width:96px; height:84px; flex:none; }
.cart-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; z-index:2; filter:drop-shadow(0 5px 5px rgba(0,0,0,.5)); }
.cart-coal{ position:absolute; inset:0; z-index:3; }
.cart-chunk{ position:absolute; object-fit:contain; filter:drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.cart.full .cart-img{ filter:drop-shadow(0 0 13px rgba(245,166,35,.55)); }
.wage-readout{ flex:1; min-width:0; }
.wage-num{ font-size:21px; color:var(--bone); font-weight:700; margin:3px 0 8px; line-height:1; }
.wage-num span{ font-size:10px; color:var(--bone-dim); }
.wage-bar{ height:9px; border-radius:5px; background:#120d07; overflow:hidden; border:2px solid var(--frame-edge); box-shadow:inset 0 1px 3px rgba(0,0,0,.6); }
.wage-bar span{ display:block; height:100%; background:linear-gradient(90deg,var(--brown),var(--gold)); transition:width .4s; }
.wage-status{ margin-top:7px; color:var(--muted); }
.wage-status.full{ color:var(--gold); }

/* ---------- leaderboard ---------- */
.lb{ padding:8px; display:flex; flex-direction:column; gap:3px; }
.lb-row{ display:flex; align-items:center; gap:9px; padding:7px 9px; border-radius:4px; background:rgba(0,0,0,.2); }
.lb-row.me{ background:linear-gradient(90deg, rgba(245,166,35,.16), rgba(245,166,35,.03)); box-shadow:inset 0 0 0 1px rgba(245,166,35,.3); }
.lb-rank{ width:22px; height:22px; flex:none; display:flex; align-items:center; justify-content:center; font-size:13px; color:var(--muted); font-weight:700;
  background:rgba(0,0,0,.3); border-radius:4px; }
.lb-rank.m1{ background:linear-gradient(180deg,#ffd773,#e0a019); color:#2a1c08; }
.lb-rank.m2{ background:linear-gradient(180deg,#dfe3e8,#9aa3ad); color:#222; }
.lb-rank.m3{ background:linear-gradient(180deg,#d8995a,#a4632f); color:#fff; }
.lb-name{ flex:1; font-size:14px; color:var(--bone); font-weight:600; }
.lb-row.me .lb-name{ color:var(--gold-bright); }
.lb-tools{ font-size:12px; color:var(--muted); }
.lb-depth{ font-size:14px; color:var(--bone); font-weight:700; }
.lb-depth i{ font-size:9px; color:var(--muted); font-style:normal; }

/* ---------- action bar ---------- */
.actbar{ position:relative; z-index:5; flex:none; display:flex; align-items:center; gap:10px; padding:10px 14px; }
.actbar-sp{ flex:1; }

/* ---------- toasts ---------- */
.toasts{ position:fixed; left:50%; bottom:84px; transform:translateX(-50%); z-index:80; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
.toast{ display:flex; align-items:center; gap:9px; padding:11px 16px !important; font-size:14px; font-weight:600; color:var(--bone);
  animation:toastIn .3s ease; max-width:400px; }
.toast-ic{ font-size:17px; }
.toast.t-gold{ box-shadow:inset 0 0 0 2px var(--gold), 0 5px 0 var(--frame-edge), var(--pit); }

/* ---------- responsive ---------- */
@media (max-width:1180px){ .stage{ grid-template-columns:228px minmax(0,1fr) 252px; } }
@media (max-width:980px){
  .app{ padding:8px; gap:8px; }
  .stage{ grid-template-columns:1fr; grid-auto-rows:min-content; overflow-y:auto; }
  .mine-col{ height:58vh; min-height:380px; order:-1; }
  .rail{ overflow:visible; padding-right:0; }
  .hud{ flex-wrap:wrap; gap:8px 12px; padding:8px 12px; }
  .hud-pills{ order:3; width:100%; margin-left:0; }
  .hud-pills .pill{ flex:1; }
  .actbar{ overflow-x:auto; padding:8px 10px; gap:8px; }
  .actbar .pbtn{ flex:none; font-size:13px; padding:9px 12px; }
  .toasts{ bottom:96px; width:92vw; }
  .gauge{ width:46px; }
  .gtick-lbl{ font-size:8px; width:20px; }
}
