/* field.css: Linh Vực (shared map) HUD: boss clock, Đồ Sát alarm, trip summary, safe-zone hint; co-op locked notice. */

#coop-locked {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 7, 13, 0.62);
  backdrop-filter: blur(4px);
  color: var(--text);
}
#coop-locked .cl-box {
  max-width: 380px;
  padding: 22px 24px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
#coop-locked .cl-seal {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--crimson, #a82020);
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
}
#coop-locked h3 {
  margin: 10px 0 6px;
  color: var(--gold2);
}
#coop-locked p {
  margin: 6px 0;
  line-height: 1.45;
}
#coop-locked .cl-sub {
  color: var(--muted);
  font-size: 13px;
}
#coop-locked button {
  margin-top: 12px;
}

/* ---------------------------------------------------------------- Linh Vực HUD */
/* In Linh Vực, the run clock rides inside #field-hud on the same top row (above #bossbar) */
body.in-field #timer {
  display: none !important;
}
#field-hud {
  position: fixed;
  left: 50%;
  top: max(28px, calc(env(safe-area-inset-top) + 26px));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: min(74vw, 680px);
  pointer-events: none;
  font-family: system-ui, -apple-system, sans-serif;
}
#field-hud .fh-bar {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(105, 65, 38, 0.94), rgba(68, 40, 22, 0.94));
  border: 2px solid #e6be60;
  box-shadow: inset 0 1px 0 rgba(255, 242, 200, 0.25), 0 3px 0 #2b180e;
  font-size: 13px;
  line-height: 1.25;
}
#field-hud .fh-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  white-space: nowrap;
  color: #fff6dc;
}
#field-hud .fh-seg.fh-time {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff8dc !important;
  padding-left: 4px;
  padding-right: 11px;
}
#field-hud .fh-seg + .fh-seg {
  border-left: 1px solid rgba(255, 228, 160, 0.28);
}
#field-hud .fh-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.78);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  white-space: nowrap;
}
#field-hud .fh-bar b,
#field-hud .fh-row b {
  color: var(--gold2);
}
#field-hud .fh-zone.safe {
  color: var(--jade);
}
#field-hud .fh-boss.live {
  color: #ffb0a0;
}
#field-hud .fh-pk {
  background: rgba(120, 10, 10, 0.88);
  border-color: #ff4a3a;
  color: #fff;
  font-size: 13.5px;
  font-weight: bold;
  animation: fh-pulse 0.7s ease-in-out infinite alternate;
}
#field-hud .fh-pk.warn {
  background: rgba(110, 70, 10, 0.88);
  border-color: #ffb040;
}
/* Đồ Sát going on between the boss fighters; we are not in it */
#field-hud .fh-pk.off {
  background: rgba(14, 40, 36, 0.85);
  border-color: #5ee6c6;
  color: #bff5e6;
  font-size: 12px;
  font-weight: 600;
  animation: none;
}
/* Thiên Đạo Trừng Phạt: run time left / lightning on */
#field-hud .fh-td.warn b {
  color: #96d2ff !important;
}
#field-hud .fh-td.on {
  background: rgba(20, 40, 110, 0.9);
  border-color: #8ec8ff;
  font-weight: bold;
  animation: fh-pulse 0.7s ease-in-out infinite alternate;
}
@keyframes fh-pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

#field-leave {
  position: fixed;
  left: 50%;
  bottom: max(110px, calc(env(safe-area-inset-bottom) + 100px));
  transform: translateX(-50%);
  z-index: 7;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--plaque-dark, rgba(13, 21, 31, 0.95));
  color: var(--gold2);
  font-size: 14px;
  cursor: pointer;
}

#field-sum {
  position: fixed;
  right: 14px;
  bottom: max(120px, calc(env(safe-area-inset-bottom) + 110px));
  z-index: 8;
  min-width: 220px;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
  transition: opacity 0.4s;
}
#field-sum h4 {
  margin: 0 0 4px;
  color: var(--gold2);
  font-size: 14px;
}
#field-sum.bad h4 {
  color: #ff8a7a;
}
#field-sum .fs-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
#field-sum .fs-items span {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}
#field-sum .fs-items span.boss {
  background: rgba(200, 120, 255, 0.22);
}
#field-sum .fs-items span.lost {
  text-decoration: line-through;
  opacity: 0.6;
}

/* the bright theme (pixel-bright.css) recolours text: keep the field HUD readable on its dark plates */
#field-hud .fh-bar,
#field-hud .fh-bar *,
#field-hud .fh-row,
#field-hud .fh-row * {
  color: #eef4f8 !important;
  text-shadow: 0 1px 2px #000;
}
#field-hud .fh-bar b,
#field-hud .fh-row b {
  color: #f6df9e !important;
}
#field-hud .fh-zone.safe,
#field-hud .fh-zone.safe * {
  color: #7ff5da !important;
}
#field-hud .fh-boss.live,
#field-hud .fh-boss.live * {
  color: #ffc0b0 !important;
}
#field-hud .fh-boss.live b {
  color: #ffe2a0 !important;
}
#field-sum,
#field-sum div {
  color: #eef4f8 !important;
}
#field-sum h4 {
  color: #f6df9e !important;
}
#field-sum.bad h4 {
  color: #ff8a7a !important;
}
#coop-locked .cl-box,
#coop-locked .cl-box p {
  color: #eef4f8 !important;
}
#coop-locked .cl-box h3 {
  color: #f6df9e !important;
}
#coop-locked .cl-box .cl-sub {
  color: #a8b8cc !important;
}
#coop-locked .cl-box,
#field-sum {
  background: rgba(14, 20, 30, 0.96) !important;
  border-color: rgba(214, 178, 102, 0.6) !important;
}

/* yeu dan news in the middle of the screen (G.Field announce) */
#field-ann {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 9;
  padding: 12px 26px;
  border-radius: 10px;
  background: rgba(30, 10, 46, 0.9);
  border: 2px solid #c070ff;
  box-shadow: 0 0 24px rgba(192, 112, 255, 0.6);
  color: #f4e8ff !important;
  font-family: serif;
  font-size: 22px;
  text-align: center;
  text-shadow: 0 2px 3px #000;
  pointer-events: none;
  animation: fa-in 0.35s ease-out;
}
#field-ann b {
  color: #ffd870 !important;
}
#field-ann.home {
  background: rgba(10, 40, 36, 0.9);
  border-color: #5ee6c6;
  box-shadow: 0 0 24px rgba(94, 230, 198, 0.5);
}
@keyframes fa-in {
  from {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Truyền Tống Sứ (G.Field NPC): shown while standing next to it in the safe zone */
#field-tp {
  position: fixed;
  left: 50%;
  bottom: max(150px, calc(env(safe-area-inset-bottom) + 140px));
  transform: translateX(-50%);
  z-index: 9;
  padding: 10px 22px;
  border-radius: 10px;
  border: 2px solid #9af8e4;
  background: rgba(10, 40, 36, 0.94) !important;
  color: #eafff8 !important;
  font-family: serif;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(154, 248, 228, 0.55);
  animation: ftp-pulse 0.9s ease-in-out infinite alternate;
}
#field-tp small {
  display: block;
  font-size: 12px;
  color: #f6df9e !important;
}
@keyframes ftp-pulse {
  from {
    transform: translateX(-50%) scale(1);
  }
  to {
    transform: translateX(-50%) scale(1.05);
  }
}

@media (max-height: 520px), (max-width: 760px) {
  #field-hud {
    top: max(18px, calc(env(safe-area-inset-top) + 16px));
    gap: 3px;
    max-width: calc(100vw - 16px);
  }
  #field-hud .fh-long {
    display: none;
  }
  #field-hud .fh-bar {
    padding: 2px 6px;
    border-width: 1.5px;
    border-radius: 7px;
    font-size: 10.5px;
    box-shadow: 0 2px 0 #2b180e;
  }
  #field-hud .fh-seg {
    padding: 0 5px;
    gap: 2px;
  }
  #field-hud .fh-seg.fh-time {
    font-size: 12px;
    padding-left: 2px;
    padding-right: 6px;
  }
  #field-hud .fh-row {
    padding: 2px 8px;
    font-size: 10.5px;
    gap: 4px;
  }
  #field-hud .fh-pk {
    font-size: 11.5px;
  }
  #field-leave {
    bottom: max(54px, calc(env(safe-area-inset-bottom) + 48px));
    padding: 5px 12px;
    font-size: 12px;
  }
  #field-tp {
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 52px));
    padding: 6px 14px;
    font-size: 13px;
  }
  #field-tp small {
    font-size: 10px;
  }
  #field-sum {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(54px, calc(env(safe-area-inset-bottom) + 48px));
    min-width: 170px;
    max-width: 230px;
    padding: 6px 9px;
    font-size: 11px;
  }
  #field-ann {
    font-size: 14px;
    padding: 7px 14px;
    max-width: 86vw;
  }
}

/* ---------------------------------------------------------------- Danh Hiệu (js/systems/titles.js) */
.tt-modal .box { max-width: 760px; max-height: 88vh; overflow-y: auto; }
.tt-chip { display: inline-block; padding: 1px 8px; border: 1px solid; border-radius: 5px; font: italic bold 12px serif; white-space: nowrap; }
.tt-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.tt-acts button, .tt-own button, .tt-ms button { padding: 2px 10px !important; font-size: 12px !important; min-height: 0 !important; }
.tt-own { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tt-modal h3 small { font-weight: normal; font-size: 12px; opacity: 0.7; margin-left: 6px; }
.tt-note { font-size: 12px; opacity: 0.75; margin: 2px 0 8px; }
.tt-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.tt-cat { background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; padding: 6px 8px; }
.tt-cat h4 { margin: 0 0 4px; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.tt-cat h4 em { font-style: normal; font-weight: normal; font-size: 11px; opacity: 0.75; }
.tt-cat table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tt-cat td { padding: 2px 4px; }
.tt-cat td.v { text-align: right; opacity: 0.85; white-space: nowrap; }
.tt-cat tr.me td { background: rgba(70, 226, 180, 0.12); }
.tt-mss { display: flex; flex-direction: column; gap: 4px; }
.tt-ms { display: grid; grid-template-columns: 190px 1fr 150px 70px; gap: 6px; align-items: center; font-size: 12px; opacity: 0.6; }
.tt-ms.ok { opacity: 1; }
.tt-bar { position: relative; height: 12px; background: rgba(0, 0, 0, 0.35); border-radius: 6px; overflow: hidden; }
.tt-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f8f6e, #7be0b8); }
.tt-bar em { position: relative; display: block; text-align: center; font-style: normal; font-size: 10px; line-height: 12px; }
@media (max-width: 600px) { .tt-ms { grid-template-columns: 1fr 1fr; } }

/* Low-perf / Mobile GPU optimization: disable expensive per-frame CSS backdrop-filter blurs & drop-shadows over the live canvas */
body.low-perf *,
body.low-perf *::before,
body.low-perf *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.low-perf #hud *,
body.low-perf #field-hud *,
body.low-perf #activebar *,
body.low-perf #pillbar * {
  filter: none !important;
}

/* ================================================================
 * 3-TIER IN-MAP NOTIFICATION SYSTEM (PC & Mobile)
 * ================================================================ */

/* Tier 1 — Slim single-line top-center ribbon for major/urgent events (never covers center) */
#run-banner {
  position: fixed;
  left: 50%;
  top: max(68px, calc(env(safe-area-inset-top) + 64px));
  transform: translateX(-50%);
  z-index: 10;
  max-width: min(84vw, 540px);
  padding: 5px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(64, 14, 14, 0.92), rgba(110, 22, 18, 0.94), rgba(64, 14, 14, 0.92));
  border: 1.5px solid #f0b85a;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.48);
  color: #fff3d6 !important;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 1px 2px #000;
  white-space: normal;
  pointer-events: none;
  animation: rb-in 0.22s ease-out;
}
#run-banner.hidden {
  display: none !important;
}
#run-banner b {
  color: #ffe07d !important;
}
#run-banner.dan {
  background: linear-gradient(90deg, rgba(40, 14, 62, 0.92), rgba(74, 24, 110, 0.94), rgba(40, 14, 62, 0.92));
  border-color: #c880ff;
}
#run-banner.home {
  background: linear-gradient(90deg, rgba(12, 46, 40, 0.92), rgba(20, 76, 66, 0.94), rgba(12, 46, 40, 0.92));
  border-color: #5ee6c6;
}
@keyframes rb-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Tier 2 — Left-side merged loot & personal status pills during a run */
body.in-run #toasts {
  left: max(12px, env(safe-area-inset-left)) !important;
  right: auto !important;
  top: max(118px, calc(env(safe-area-inset-top) + 114px)) !important;
  bottom: auto !important;
  align-items: flex-start !important;
  gap: 5px !important;
  max-width: min(300px, 46vw);
  z-index: 9;
}
body.in-run #toasts .toast {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px !important;
  border-radius: 7px !important;
  background: rgba(12, 18, 26, 0.84) !important;
  border: 1px solid rgba(230, 190, 96, 0.55) !important;
  color: #f4f8fc !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-shadow: 0 1px 2px #000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  white-space: normal;
  word-break: break-word;
  animation: lt-in 0.2s ease-out !important;
}
body.in-run #toasts .toast.loot {
  white-space: nowrap;
}
body.in-run #toasts .toast.re-pop {
  animation: lt-pop 0.2s ease-out !important;
}
body.in-run #toasts .toast img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
}
body.in-run #toasts .toast span {
  overflow: hidden;
  text-overflow: ellipsis;
}
body.in-run #toasts .toast b {
  flex: 0 0 auto;
  color: #ffe07d !important;
  font-weight: 800;
}
body.in-run #toasts .toast.loot.boss {
  border-color: #c880ff !important;
  background: rgba(34, 16, 52, 0.88) !important;
}
@keyframes lt-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes lt-pop {
  0% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

/* Tier 3 — Right-side mini-feed tucked neatly below the minimap + bell mute toggle */
#feed-toggle {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  top: max(210px, calc(env(safe-area-inset-top) + 206px));
  z-index: 11;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  background: rgba(16, 22, 30, 0.72);
  border: 1px solid rgba(230, 190, 96, 0.55);
  color: #ffe8b0;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  opacity: 0.72;
  pointer-events: auto;
  transition: opacity 0.15s;
}
#feed-toggle:hover {
  opacity: 1;
}
#feed-toggle.muted {
  opacity: 0.45;
  border-color: rgba(180, 180, 180, 0.35);
}
#feed-toggle.hidden {
  display: none !important;
}
#feed {
  right: max(12px, env(safe-area-inset-right)) !important;
  top: max(238px, calc(env(safe-area-inset-top) + 234px)) !important;
  width: min(220px, 38vw) !important;
  gap: 3px !important;
  z-index: 8 !important;
}
#feed .feed-row {
  padding: 3px 8px !important;
  background: rgba(10, 16, 24, 0.62) !important;
  border-left: none !important;
  border-right: 2px solid rgba(240, 200, 110, 0.65) !important;
  border-radius: 4px !important;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px !important;
  line-height: 1.28;
  color: #e6eef4 !important;
  text-shadow: 0 1px 2px #000;
  white-space: normal;
  word-break: break-word;
  animation: feed 3.2s forwards !important;
}

@media (max-height: 520px), (max-width: 760px) {
  #run-banner {
    top: max(46px, calc(env(safe-area-inset-top) + 42px));
    padding: 3px 11px;
    font-size: 11px;
    max-width: calc(100vw - 24px);
  }
  body.in-run #toasts {
    left: max(8px, env(safe-area-inset-left)) !important;
    top: max(86px, calc(env(safe-area-inset-top) + 82px)) !important;
    max-width: min(215px, 46vw);
    gap: 3px !important;
  }
  body.in-run #toasts .toast {
    padding: 2px 7px !important;
    font-size: 10.5px !important;
    gap: 4px;
    border-radius: 5px !important;
  }
  body.in-run #toasts .toast img {
    width: 14px;
    height: 14px;
  }
  #feed-toggle {
    right: max(8px, env(safe-area-inset-right));
    top: max(144px, calc(env(safe-area-inset-top) + 140px));
    width: 20px;
    height: 20px;
    font-size: 10px;
    line-height: 18px;
  }
  #feed {
    right: max(8px, env(safe-area-inset-right)) !important;
    top: max(168px, calc(env(safe-area-inset-top) + 164px)) !important;
    width: min(170px, 38vw) !important;
  }
  #feed .feed-row {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
}

/* Safe-Zone Recall Button (Truyền Tống Phù · hotkey T) */
#field-recall {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 88px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 2px solid #7ff5da;
  background: linear-gradient(180deg, rgba(16, 56, 50, 0.94), rgba(10, 34, 32, 0.95)) !important;
  color: #eafff8 !important;
  font-family: system-ui, -apple-system, sans-serif;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  pointer-events: auto;
}
#field-recall b {
  font-size: 13px;
  line-height: 1.2;
  color: #eafff8 !important;
}
#field-recall small {
  font-size: 11px;
  color: #ffe07d !important;
  font-weight: 700;
}
#field-recall.casting {
  border-color: #ffe07d;
  box-shadow: 0 0 16px rgba(127, 245, 218, 0.7);
}
#field-recall.urgent {
  animation: fh-pulse 0.8s ease-in-out infinite alternate;
  box-shadow: 0 0 16px rgba(127, 245, 218, 0.75);
}
#field-recall.off {
  opacity: 0.55;
  border-color: #6b7b78;
}
#field-recall.hidden {
  display: none !important;
}
@media (max-height: 520px), (max-width: 760px) {
  #field-recall {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(116px, calc(env(safe-area-inset-bottom) + 110px));
    min-width: 72px;
    padding: 4px 8px;
    border-radius: 8px;
  }
  #field-recall b {
    font-size: 11px;
  }
  #field-recall small {
    font-size: 9.5px;
  }
}

/* High-contrast bright gold labels & counts on bottom skillbar / pillbar (Space, Q, 1-6, qty) */
#skillbar kbd,
#skillbar #pillbar kbd,
#pillbar kbd {
  color: #ffe97a !important;
  background: rgba(12, 16, 22, 0.82) !important;
  border: 1px solid rgba(255, 224, 120, 0.55) !important;
  border-radius: 4px !important;
  padding: 0 4px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-shadow: 0 1px 2px #000, 0 0 3px #000 !important;
  z-index: 3;
}
#pillbar b,
#skillbar #pillbar b {
  color: #ffe97a !important;
  font-weight: 800 !important;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 1px 3px #000 !important;
  z-index: 3;
}

/* Camera Zoom Slider (Settings & In-Run Pause Menu) */
.zoom-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 12px;
  margin-bottom: 6px;
  border-radius: 9px;
  background: rgba(94, 58, 30, 0.12);
  border: 1.5px solid rgba(180, 136, 74, 0.55);
}
.zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #4a2e18;
}
.zoom-head b {
  color: #9e5c0a;
  font-size: 13.5px;
}
.zoom-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zoom-ctrl input[type='range'] {
  flex: 1;
  accent-color: #c8892a;
  cursor: pointer;
  height: 6px;
}
.zoom-ctrl .z-step,
.zoom-ctrl .z-rst {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 28px !important;
  min-height: 0 !important;
  padding: 3px 8px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 800;
  border-radius: 6px !important;
}
.zoom-row.pause-zoom {
  background: rgba(94, 58, 30, 0.08);
  border-color: rgba(180, 136, 74, 0.48);
  margin: 6px 0 12px;
}
.zoom-row.pause-zoom .zoom-head {
  color: #4a2e18;
}
.zoom-row.pause-zoom .zoom-head b {
  color: #9e5c0a;
}

/* Pause / ESC menu button layout: uniform sizing & clean alignment */
#panel.pause .pause-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
#panel.pause .pause-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
#panel.pause .pause-actions button {
  margin: 0 !important;
  min-height: 44px !important;
  padding: 10px 16px !important;
  font-size: 15px !important;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}
#panel.pause .pause-row button {
  flex: 1 1 170px;
}
#panel.pause .pause-actions button.danger {
  width: 100%;
  font-size: 14px !important;
}

/* ================================================================
 * MOBILE-ONLY MOBA RIGHT-HAND CONTROLS (Skills + Pills + Recall)
 * ================================================================ */
body.is-mobile #skillbar {
  left: auto !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
  transform: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: flex-end !important;
  gap: 8px !important;
  max-width: min(56vw, 310px);
}
body.is-mobile #skillbar .sk {
  order: 1;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  border-width: 2px !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
}
body.is-mobile #skillbar #pillbar {
  order: 2;
  flex: 1 0 100%;
  justify-content: flex-end !important;
  gap: 5px !important;
  margin-left: 0 !important;
}
body.is-mobile #skillbar #pillbar .pl {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
}
body.is-mobile #field-recall {
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: max(112px, calc(env(safe-area-inset-bottom) + 106px)) !important;
  min-width: 74px !important;
  padding: 4px 9px !important;
}

/* Tổ Đội (js/systems/field.js party section) */
#field-hud .fh-ally {
  background: rgba(10, 60, 30, 0.82);
  border-color: #7dff9a;
}
#field-hud .fh-colang {
  background: rgba(60, 40, 90, 0.86);
  border-color: #c8a0ff;
}
#field-hud .fh-down {
  background: rgba(100, 70, 10, 0.9);
  border-color: #ffd36a;
  font-weight: bold;
  pointer-events: auto;
  animation: fh-pulse 0.7s ease-in-out infinite alternate;
}
#field-hud .fh-down button {
  pointer-events: auto;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #ffb0a0;
  background: rgba(120, 20, 10, 0.9);
  color: #fff !important;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* Thiên Tượng Đại Cảnh Giới (js/core/btfx.js): full-screen phenomenon overlay above the town / run canvas, under the HUD and panels */
#btfx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 7;
  pointer-events: none;
  image-rendering: pixelated;
}
#btfx-banner {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(560px, calc(100vw - 24px));
  padding: 10px 18px 11px;
  border-radius: 14px;
  border: 2.5px solid var(--btc, #ffd875);
  background: linear-gradient(180deg, rgba(28, 18, 46, 0.92), rgba(14, 10, 28, 0.95));
  box-shadow: 0 0 28px var(--btc, #9b64ff), 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #fff6dc;
  text-align: center;
  pointer-events: none;
  animation: btBannerIn 0.3s ease-out;
}
#btfx-banner.hidden {
  display: none !important;
}
#btfx-banner.mode-ok {
  background: linear-gradient(180deg, rgba(72, 46, 14, 0.94), rgba(38, 22, 8, 0.96));
}
#btfx-banner.mode-fail {
  border-color: #ff6b6b;
  background: linear-gradient(180deg, rgba(58, 14, 24, 0.94), rgba(26, 8, 18, 0.96));
}
#btfx-banner .btb-tag {
  display: inline-block;
  padding: 2px 12px;
  margin-bottom: 4px;
  border-radius: 999px;
  border: 1px solid var(--btc, #ffd875);
  color: #ffe28a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}
#btfx-banner .btb-msg {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  text-shadow: 0 1px 2px #000;
}
#btfx-banner .btb-msg b {
  color: #ffe484;
  font-weight: 900;
}
body.in-run #btfx-banner {
  top: 118px;
  width: min(480px, calc(100vw - 32px));
  padding: 7px 14px 8px;
}
body.in-run #btfx-banner .btb-msg {
  font-size: 13px;
}
