/* In-game HUD — premium dark-glass RTS interface.
   Scoped under #hud (main.css already gives it position:fixed inset:0 pointer-events:none).
   Root stays click-through; only solid interactive panels opt back in to pointer events. */

.hud-root {
  --gold: #d4a53a;
  --gold-soft: #e8c874;
  --gold-deep: #a9781f;
  --ink: #e9edf5;
  --ink-dim: #a6b0c2;
  --ink-faint: #6f7a8f;
  --danger: #e2483c;
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --glass: linear-gradient(180deg, rgba(26, 32, 46, 0.82), rgba(13, 17, 26, 0.9));
  --glass-strong: linear-gradient(180deg, rgba(28, 34, 50, 0.94), rgba(12, 16, 25, 0.96));
  --panel-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
}
.hud-root * { box-sizing: border-box; }
.hud-root .hidden { display: none !important; }

/* ============================================================= TOP BAR ===== */
.hud-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  pointer-events: none;
}

.res-panel {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid rgba(212, 165, 58, 0.26);
  border-radius: 13px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
.res-item { display: flex; align-items: center; gap: 7px; }
.res-ic { font-size: 18px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.res-val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  min-width: 30px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.res-item.pop.capped .res-val { color: #ff5a48; animation: hud-pulse 1s ease-in-out infinite; }
.res-sep { width: 1px; height: 26px; background: var(--stroke-strong); margin: 0 2px; }

.age-box { display: flex; align-items: center; gap: 10px; }
.age-badge {
  width: 27px; height: 27px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-family: var(--serif);
  font-weight: 700; font-size: 13px;
  color: #241708;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.age-meta { display: flex; flex-direction: column; gap: 3px; min-width: 100px; }
.age-name { font-family: var(--serif); font-size: 13.5px; letter-spacing: 0.06em; color: var(--gold-soft); }
.age-prog {
  height: 0; border-radius: 2px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  transition: height 0.25s ease;
}
.age-prog.active { height: 4px; }
.age-prog-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  box-shadow: 0 0 8px rgba(232, 200, 116, 0.6);
  transition: width 0.3s linear;
}

/* right cluster: ping / quality / resign */
.top-right { pointer-events: auto; display: flex; align-items: center; gap: 8px; }
.ping {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ping-ic { opacity: 0.85; font-size: 12px; }
.ping.good { color: #6fd44a; }
.ping.mid { color: var(--gold-soft); }
.ping.bad { color: #ff6a58; }

.hbtn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.08s, background 0.15s;
}
.hbtn-tx { letter-spacing: 0.03em; }
.hbtn:hover { border-color: rgba(212, 165, 58, 0.55); color: var(--gold-soft); transform: translateY(-1px); }
.hbtn:active { transform: translateY(0); }
.hbtn.danger:hover { border-color: rgba(226, 72, 60, 0.7); color: #ff7a6b; }

/* ============================================================= PLAYERS ===== */
.players-ov {
  position: absolute;
  top: 58px; right: 12px;
  pointer-events: auto;
  display: flex; flex-direction: column; gap: 5px;
  padding: 9px 11px;
  min-width: 132px;
  font-size: 12px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 11px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pl-row { display: flex; align-items: center; gap: 8px; }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 6px rgba(0, 0, 0, 0.5); flex: none; }
.pl-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; color: var(--ink-dim); }
.pl-row.me .pl-name { color: var(--gold-soft); font-weight: 700; }
.pl-you {
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint); border: 1px solid var(--stroke); border-radius: 4px; padding: 0 4px;
}
.pl-team { margin-left: auto; font-size: 10px; color: var(--ink-faint); font-weight: 700; }
.pl-row.dead { opacity: 0.42; }
.pl-row.dead .pl-name { text-decoration: line-through; }

/* ============================================================== ALERTS ===== */
.alerts-feed {
  position: absolute;
  top: 62px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: max-content; max-width: 56vw;
  pointer-events: none;
}
.alert-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 15px;
  font-size: 13px; font-weight: 500;
  color: var(--ink);
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.alert-row.in { opacity: 1; transform: translateY(0); }
.alert-row.out { opacity: 0; transform: translateY(-8px); }
.al-ic { font-size: 15px; }
.alert-row.attack { border-color: rgba(226, 72, 60, 0.55); box-shadow: 0 0 18px rgba(226, 72, 60, 0.3), 0 8px 22px rgba(0, 0, 0, 0.5); }
.alert-row.attack .al-tx { color: #ff9a8d; font-weight: 700; }
.alert-row.res { border-color: rgba(212, 165, 58, 0.45); }
.alert-row.res .al-tx { color: var(--gold-soft); }

/* =============================================================== TOASTS ===== */
.toast-wrap {
  position: absolute;
  top: 36%; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  background: var(--glass-strong);
  border: 1px solid rgba(212, 165, 58, 0.3);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(10px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.toast.in { opacity: 1; transform: translateY(0) scale(1); }
.toast.out { opacity: 0; transform: translateY(-6px) scale(0.98); }

/* ============================================================= MINIMAP ===== */
#minimapWrap {
  position: absolute;
  left: 14px; bottom: 14px;
  width: 232px; height: 232px;
  padding: 4px;
  pointer-events: auto;
  background: var(--glass);
  border: 1px solid rgba(212, 165, 58, 0.3);
  border-radius: 12px;
  box-shadow: var(--panel-shadow), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#minimapWrap canvas { width: 224px; height: 224px; display: block; border-radius: 8px; }

/* ================================================================= CHAT ===== */
.chat-wrap {
  position: absolute;
  left: 14px; bottom: 258px;
  width: 322px;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.chat-wrap.faded { opacity: 0; }
.chat-log { display: flex; flex-direction: column; gap: 3px; max-height: 154px; overflow: hidden; pointer-events: none; }
.chat-line {
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 9px;
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(9, 13, 21, 0.55);
  border-radius: 8px;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.chat-from { font-weight: 700; }
.chat-input-wrap {
  display: none;
  align-items: center; gap: 8px;
  padding: 8px 12px;
  pointer-events: auto;
  background: var(--glass-strong);
  border: 1px solid rgba(212, 165, 58, 0.4);
  border-radius: 10px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chat-wrap.open .chat-input-wrap { display: flex; }
.chat-hint { color: var(--gold-soft); font-weight: 700; font-size: 13px; }
.chat-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--ink); font-size: 13px; font-family: var(--sans);
}
.chat-input::placeholder { color: var(--ink-faint); }

/* ======================================================= BOTTOM-CENTER ===== */
.bottom-center {
  position: absolute;
  left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 10px;
  pointer-events: auto;
}
.bottom-center.hidden { display: none; }

.sel-panel {
  min-width: 214px; min-height: 196px;
  padding: 13px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 13px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
.cmd-card {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 54px);
  grid-auto-rows: 54px;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 13px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

/* --- selection: single unit / building card --- */
.unit-card, .bld-card { display: flex; gap: 12px; align-items: flex-start; }
.portrait {
  position: relative;
  width: 64px; height: 64px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 50% 38%, rgba(60, 70, 92, 0.7), rgba(14, 18, 28, 0.9));
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}
.portrait-ic { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.portrait-count {
  position: absolute; right: -5px; bottom: -5px;
  padding: 0 5px;
  font-size: 11px; font-weight: 700;
  color: var(--gold-soft);
  background: rgba(12, 16, 25, 0.95);
  border: 1px solid var(--gold);
  border-radius: 6px;
}
.uc-info { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 128px; }
.uc-name-row { display: flex; align-items: baseline; gap: 8px; }
.uc-name { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--gold-soft); letter-spacing: 0.02em; }
.uc-tag {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--ink-faint); border: 1px solid var(--stroke); border-radius: 5px; padding: 1px 5px;
}
.hpbar {
  position: relative; height: 16px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.hpbar-fill { position: absolute; top: 0; left: 0; bottom: 0; height: 100%; transition: width 0.2s ease, background 0.2s ease; }
.hpbar-txt {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.uc-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.stat {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 7px;
  font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 6px;
}
.stat-ic { font-size: 12px; opacity: 0.9; }
.stat.pierce .stat-v { color: #8fd0ff; }
.stat.melee .stat-v { color: #ffb98a; }
.stat.siege .stat-v { color: #ffd36a; }

/* --- selection: multi-type group grid --- */
.sel-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); }
.group-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-height: 152px; overflow-y: auto; }
.grp-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 3px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.grp-tile:hover { border-color: var(--gold); background: rgba(212, 165, 58, 0.12); transform: translateY(-1px); }
.grp-ic { font-size: 22px; line-height: 1; }
.grp-count { font-size: 11px; font-weight: 700; color: var(--ink); }
.grp-hp { width: 100%; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
.grp-hp-fill { height: 100%; }

/* --- selection: building extras --- */
.constr-bar {
  position: relative; height: 16px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.constr-fill {
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--gold-deep) 8px 16px);
  box-shadow: 0 0 8px rgba(212, 165, 58, 0.5);
  transition: width 0.2s ease;
}
.constr-txt {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.rally-tag { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-dim); }
.rally-tag span:first-child { color: var(--gold-soft); }
.queue-row { display: flex; gap: 5px; flex-wrap: wrap; }
.q-chip {
  position: relative;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--stroke);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s;
}
.q-chip:hover { border-color: var(--danger); }
.q-ic { position: relative; z-index: 1; font-size: 18px; line-height: 1; }
.q-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(232, 200, 116, 0.35), rgba(212, 165, 58, 0.55));
  z-index: 0;
  transition: height 0.2s linear;
}
.q-chip:hover::after {
  content: '✕';
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: rgba(226, 72, 60, 0.62);
  color: #fff; font-weight: 700; font-size: 15px;
}

/* --- command card cells --- */
.cmd-cell {
  position: relative;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(44, 52, 70, 0.72), rgba(22, 28, 40, 0.82));
  border: 1px solid var(--stroke-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.cmd-cell:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), 0 0 12px rgba(212, 165, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.cmd-cell:active { transform: translateY(0); }
.cmd-cell.empty {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.07);
  box-shadow: none;
  cursor: default;
}
.cmd-cell.disabled { opacity: 0.5; filter: grayscale(0.5); cursor: not-allowed; }
.cmd-cell.disabled:hover { border-color: rgba(226, 72, 60, 0.5); transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.cmd-ic { font-size: 26px; line-height: 1; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.cmd-hk {
  position: absolute; top: 3px; left: 4px;
  padding: 0 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--gold-soft);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  pointer-events: none;
}

/* ============================================================= TOOLTIP ===== */
.hud-tip {
  position: fixed;
  z-index: 50;
  min-width: 178px; max-width: 280px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(26, 32, 46, 0.97), rgba(13, 17, 27, 0.98));
  border: 1px solid rgba(212, 165, 58, 0.35);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.hud-tip.show { opacity: 1; visibility: visible; transform: translateY(0); }
.tip-title {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-bottom: 5px;
  font-family: var(--serif); font-weight: 700; font-size: 14px;
  color: var(--gold-soft);
}
.tip-hk {
  flex: none;
  padding: 1px 6px;
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  color: var(--gold-soft);
  background: rgba(212, 165, 58, 0.18);
  border: 1px solid rgba(212, 165, 58, 0.5);
  border-radius: 4px;
}
.tip-cost { display: flex; gap: 12px; margin: 4px 0 6px; }
.tip-cost .c { display: flex; align-items: center; gap: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-ic { font-size: 12px; }
.tip-desc { color: var(--ink-dim); line-height: 1.4; }
.tip-reason {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px solid var(--stroke);
  color: #ff8a7a; font-size: 11.5px; font-weight: 600;
}

/* =========================================================== GAME OVER ===== */
.gameover {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.86));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 40;
}
.gameover.show { display: flex; pointer-events: auto; animation: hud-fade-in 0.4s ease both; }
.go-panel {
  width: min(820px, 94vw); max-height: 88vh; overflow: auto;
  padding: 34px 34px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
  background: var(--glass-strong);
  border: 1px solid rgba(212, 165, 58, 0.4);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: hud-rise 0.45s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.go-banner {
  font-family: var(--serif); font-weight: 700;
  font-size: 56px; letter-spacing: 0.14em; text-transform: uppercase;
  line-height: 1;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.go-banner.win { background-image: linear-gradient(180deg, #fff 0%, var(--gold-soft) 45%, var(--gold) 100%); filter: drop-shadow(0 3px 14px rgba(212, 165, 58, 0.5)); }
.go-banner.lose { background-image: linear-gradient(180deg, #ffd0c8 0%, var(--danger) 55%, #7a1e17 100%); filter: drop-shadow(0 3px 14px rgba(226, 72, 60, 0.4)); }
.go-sub { margin-top: -4px; color: var(--ink-dim); font-size: 15px; letter-spacing: 0.04em; }

.go-table-wrap { width: 100%; margin-top: 8px; overflow-x: auto; border: 1px solid var(--stroke); border-radius: 10px; }
.go-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.go-table th {
  padding: 9px 10px; text-align: right;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--stroke-strong);
  white-space: nowrap;
}
.go-table th:first-child, .go-table th:nth-child(2) { text-align: left; }
.go-table td { padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(255, 255, 255, 0.05); white-space: nowrap; }
.go-table td:nth-child(2) { text-align: left; color: var(--ink-dim); }
.go-name { text-align: left !important; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.go-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.go-table tbody tr.dead { opacity: 0.5; }
.go-table tbody tr.dead .go-name { text-decoration: line-through; }
.go-table tbody tr.me { background: rgba(212, 165, 58, 0.1); }
.go-table tbody tr.me .go-name { color: var(--gold-soft); }

.go-btn {
  margin-top: 12px;
  padding: 12px 34px;
  font-family: var(--serif); font-weight: 700; font-size: 15px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #241708;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  border: 1px solid rgba(212, 165, 58, 0.5);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: filter 0.15s, transform 0.08s;
}
.go-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.go-btn:active { transform: translateY(0); }

/* ========================================================== ANIMATIONS ===== */
@keyframes hud-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes hud-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hud-rise { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ========================================================== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .cmd-card { grid-template-columns: repeat(4, 48px); grid-auto-rows: 48px; }
  .cmd-ic { font-size: 23px; }
  .sel-panel { min-width: 190px; min-height: 174px; }
  .portrait { width: 56px; height: 56px; }
  .portrait-ic { font-size: 30px; }
}
@media (max-width: 860px) {
  .res-panel { gap: 10px; padding: 7px 12px; }
  .res-val { font-size: 14px; min-width: 24px; }
  .hbtn-tx { display: none; }
  .chat-wrap { width: 260px; }
}
