:root {
  --sky-bg-top: #78ccff;
  --sky-bg-mid: #cfefff;
  --sky-bg-bot: #eef9ff;
  --card-bg: rgba(255, 255, 255, 0.94);
  --header-grad: linear-gradient(135deg, #2b8be0 0%, #4cb5f5 100%);
  --gold-grad: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --pink-grad: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  --green-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --text-main: #102a43;
  --text-muted: #486581;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--sky-bg-top) 0%, var(--sky-bg-mid) 280px, var(--sky-bg-bot) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }

.pixel-crisp {
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 14px 136px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top Glass HUD */
.hud-bar {
  position: sticky;
  top: 6px;
  z-index: 35;
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(56, 152, 236, 0.45);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px rgba(16, 78, 139, 0.14);
}
.hud-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.hud-profile { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.hud-menu-btn { position: relative; border-radius: 999px; min-height: 30px; padding: 3px 10px; font-weight: 800; }
.hud-menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #fff;
  display: inline-block;
  margin-left: 2px;
}
.hud-menu-drawer {
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #bae6fd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hud-drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hud-drawer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.hud-drawer-grid .quick-pill { width: 100%; justify-content: flex-start; padding: 7px 10px; }

.hud-avatar-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bae6fd, #fce7f3);
  border: 2px solid #f59e0b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.hud-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hud-name-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-weight: 800; font-size: 13.5px; color: #0b4a7d; }
.hud-name-text { font-weight: 900; display: inline-block; }
.hud-substats { font-size: 11px; color: var(--text-muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-currencies { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }

.currency-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1.5px solid;
}
.currency-chip.xu { background: #fffbeb; border-color: #f59e0b; color: #b45309; }
.currency-chip.luong { background: #f0f9ff; border-color: #38bdf8; color: #0369a1; }
.currency-chip.vip { background: #fdf2f8; border-color: #f472b6; color: #be185d; }

.lobby-clean-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: var(--radius-md);
  border: 1.5px solid #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #0c4a6e;
  font-size: 12px;
  font-weight: 700;
  transition: transform 120ms ease, filter 120ms ease;
}
.btn:hover { border-color: #2563eb; filter: brightness(0.98); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: 0.5; filter: grayscale(0.55); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--header-grad); border-color: #1d6fb8; color: #fff; }
.btn-gold { background: var(--gold-grad); border-color: #d97706; color: #fff; }
.btn-pink { background: var(--pink-grad); border-color: #db2777; color: #fff; }
.btn-emerald { background: var(--green-grad); border-color: #047857; color: #fff; }
.btn-sm { min-height: 31px; padding: 4px 10px; font-size: 11.5px; }

/* Layout */
.tab-panel { display: none; min-width: 0; max-width: 100%; }
.tab-panel.active { display: block; }

.card {
  background: var(--card-bg);
  border: 1.5px solid rgba(56, 152, 236, 0.4);
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 8px 24px rgba(16, 78, 139, 0.1);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  background: var(--header-grad);
  color: #fff;
}

.card-title { font-size: 13.5px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.card-body { padding: 12px; min-width: 0; max-width: 100%; }
#ltbcRoot, #ltbcSubBody { min-width: 0; max-width: 100%; }

/* HD Animated Modular Podium Canvas */
.hd-podium {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid #93c5fd;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 58%, #fce7f3 100%);
  height: clamp(255px, 34vw, 310px);
}

.podium-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.podium-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0369a1;
  border: 1px solid #7dd3fc;
  pointer-events: none;
}

.outfit-pill {
  position: absolute;
  bottom: 7px;
  left: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid #93c5fd;
  font-size: 11px;
  font-weight: 800;
  color: #0c4a6e;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* 4-Layer Modular Quick Mixer */
.layer-mixer {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.mixer-row-label {
  font-size: 11px;
  font-weight: 800;
  color: #0c4a6e;
  margin-bottom: 3px;
}

.mixer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mixer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1.5px solid #bae6fd;
  background: #f8fcff;
  font-size: 11px;
  font-weight: 700;
  color: #0c4a6e;
}

.mixer-btn:hover { border-color: #38bdf8; background: #e0f2fe; }
.mixer-btn.active { border-color: #f59e0b; background: #fffbeb; color: #b45309; box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.45); }
.mixer-empty-hint { font-size: 11px; color: #64748b; font-style: italic; padding: 2px 0; }

.mixer-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

/* Street */
.street-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid #7dd3fc;
  background: #8cddff;
}

.street-canvas { display: block; width: 100%; height: clamp(235px, 42vw, 350px); cursor: pointer; }

.street-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
}

.dpad-group { display: flex; gap: 6px; }
.dpad-btn {
  min-width: 40px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid #2b8be0;
  background: #fff;
  color: #0c4a6e;
  font-weight: 800;
}
.dpad-btn:active { background: #2b8be0; color: #fff; }

/* Chat */
.chat-feed { max-height: 175px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.chat-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #f0f9ff; border: 1px solid #bae6fd; }
.chat-item.is-sys { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border-color: #fcd34d; }
.chat-mini-face { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center; background: linear-gradient(135deg, #e0f2fe, #fce7f3); border: 1px solid #7dd3fc; flex-shrink: 0; }
.chat-msg-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; flex: 1; min-width: 0; line-height: 1.45; }
.chat-author { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 800; color: #0369a1; background: none; border: none; padding: 0; text-align: left; max-width: 100%; }
.chat-text-body { color: #102a43; font-size: 12.5px; overflow-wrap: anywhere; }
.chat-author:hover { text-decoration: underline; }
.chat-form { display: flex; gap: 8px; }
.input-h5 { flex: 1; min-height: 38px; padding: 7px 11px; border-radius: var(--radius-md); border: 1.5px solid #93c5fd; background: #fff; }

/* Wardrobe */
.wardrobe-grid { display: grid; grid-template-columns: minmax(300px, 350px) 1fr; gap: 12px; align-items: start; }
.wardrobe-sticky { position: sticky; top: 76px; z-index: 24; }

.slot-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.slot-tab { padding: 5px 10px; border-radius: 999px; border: 1.5px solid #93c5fd; background: #f0f9ff; font-size: 11.5px; font-weight: 700; color: #0c4a6e; white-space: nowrap; }
.slot-tab.active { background: var(--header-grad); border-color: #1d6fb8; color: #fff; }
.slot-tab.slot-tab-vip { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #f59e0b; color: #92400e; }
.slot-tab.slot-tab-vip.active { background: linear-gradient(135deg, #d97706, #9333ea); border-color: #7e22ce; color: #fff; }
.vip-showcase-banner { grid-column: 1 / -1; padding: 8px 10px; border-radius: 11px; background: linear-gradient(135deg, #fffbeb 0%, #faf5ff 100%); border: 1.5px solid #f59e0b; margin-bottom: 2px; }
.item-card.is-locked-vip { background: linear-gradient(180deg, #fffdf7 0%, #fdf4ff 100%); border-color: #f59e0b; }
.badge-vip-lock { position: absolute; top: 4px; right: 4px; font-size: 8.5px; font-weight: 900; padding: 1px 5px; border-radius: 5px; background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff; box-shadow: 0 1px 4px rgba(124, 58, 237, 0.35); }
.item-obtain-tag { display: block; width: 100%; font-size: 9.5px; font-weight: 800; color: #9a3412; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 5px; padding: 1.5px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-hunt-btn { flex: 1; width: 100%; padding: 3px 6px; border-radius: 7px; border: 1px solid #d97706; background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; font-size: 10.5px; font-weight: 800; }
.item-hunt-btn:hover { filter: brightness(1.06); }

.wardrobe-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.wardrobe-toolbar .input-h5 { min-width: 140px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 7px; max-height: min(48vh, 420px); overflow-y: auto; padding: 2px 4px 14px 2px; }
.item-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 10px; background: #f8fcff; border: 1.5px solid #bae6fd; text-align: center; cursor: pointer; }
.item-card:hover { border-color: #2b8be0; background: #eff6ff; }
.item-card.equipped { border-color: #f59e0b; background: #fffbeb; }
.item-card.trying-on { border-color: #9333ea; background: #faf5ff; box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.35); }
.badge-tryon { position: absolute; top: 4px; left: 4px; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: #9333ea; color: #fff; }
.item-card-actions { width: 100%; margin-top: 2px; display: flex; gap: 4px; }
.item-buy-btn { flex: 1; width: 100%; padding: 3px 6px; border-radius: 7px; border: 1px solid #059669; background: linear-gradient(135deg, #10b981, #059669); color: #fff; font-size: 10.5px; font-weight: 800; }
.item-buy-btn:hover { filter: brightness(1.05); }
.item-equip-btn { flex: 1; min-width: 0; padding: 3px 5px; border-radius: 7px; border: 1px solid #38bdf8; background: #e0f2fe; color: #0369a1; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.item-card.equipped .item-equip-btn { border-color: #f59e0b; background: #fef3c7; color: #92400e; }
.item-sell-btn { flex: 0 0 auto; padding: 3px 6px; border-radius: 7px; border: 1px solid #fca5a5; background: #fef2f2; color: #b91c1c; font-size: 10px; font-weight: 800; white-space: nowrap; }
.item-sell-btn:hover { background: #fee2e2; border-color: #ef4444; }
.item-stat-pill { width: 100%; padding: 2px 4px; border-radius: 6px; background: #f0f9ff; border: 1px solid #bae6fd; font-size: 9.5px; font-weight: 800; color: #0c4a6e; line-height: 1.22; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1px 4px; }
.item-stat-pill > span { white-space: nowrap; }
.item-stat-pill.rolled { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.wardrobe-pager-info { font-size: 12px; color: #486581; font-weight: 700; min-width: 0; }
.wardrobe-pager-nav { display: flex; gap: 6px; flex-shrink: 0; }
.wardrobe-pager-nav .btn { white-space: nowrap; }
.tier-tag { display: inline-block; padding: 0 4px; border-radius: 4px; font-size: 9px; font-weight: 900; color: #fff; margin-right: 2px; vertical-align: middle; }
.tier-B { background: #0284c7; }
.tier-A { background: #9333ea; }
.tier-S { background: #d97706; }
.tier-SS { background: linear-gradient(135deg, #ef4444, #d97706); }
.tryon-bar { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: linear-gradient(135deg, #faf5ff 0%, #fffbeb 100%); border: 1.5px solid #c084fc; font-size: 11.5px; color: #4c1d95; }
.tryon-bar-head { font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.tryon-bar-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.buy-confirm-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin-bottom: 10px; }
.buy-item-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 10px; background: #f8fcff; border: 1px solid #bae6fd; }
.buy-item-row img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; border: 1px solid #cbd5e1; flex-shrink: 0; }
.buy-summary-box { padding: 9px 11px; border-radius: 11px; background: #f0f9ff; border: 1.5px solid #7dd3fc; font-size: 12px; color: #0c4a6e; line-height: 1.55; }
.buy-summary-box .insufficient { margin-top: 4px; color: #dc2626; font-weight: 800; }
.kho-empty-box { grid-column: 1 / -1; text-align: center; padding: 26px 14px; background: #f0f9ff; border: 1.5px dashed #7dd3fc; border-radius: 14px; color: #0c4a6e; }

.mannequin-box {
  width: 66px;
  height: 66px;
  background: linear-gradient(180deg, #f0f9ff 0%, #dbeafe 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mannequin-box.is-hd {
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, #e0f2fe 100%);
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.22);
}
.mannequin-box.is-hd img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.mannequin-box.is-hd.slot-mat {
  background: radial-gradient(circle at 50% 50%, #fff7ed 0%, #fed7aa 100%);
}
.mannequin-box.is-hd.slot-mat img {
  filter: drop-shadow(0 0 1.5px rgba(255, 245, 235, 0.95)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.72));
}
.badge-hd {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, #f59e0b, #ea580c);
  color: #fff;
  box-shadow: 0 1px 4px rgba(234, 88, 12, 0.35);
}

.shop-subtabs { display: flex; gap: 5px; }
.subtab-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.subtab-btn.active {
  background: #fff;
  color: #0369a1;
  border-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}
.equipped-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.eq-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 10.5px;
  font-weight: 800;
}
.eq-chip:hover { background: #fef3c7; border-color: #d97706; }
.eq-chip.tryon { background: #f3e8ff; border-color: #a855f7; color: #6b21a8; }
.eq-chip.tryon:hover { background: #e9d5ff; border-color: #9333ea; }

.item-name { font-size: 11.5px; font-weight: 700; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { font-size: 11px; font-weight: 700; }
.badge-owned { position: absolute; top: 4px; left: 4px; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 4px; background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* HD Farm Ecosystem (60fps Canvas + 6 Sub-Tabs) */
.farm-top-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.farm-kpi-card {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.farm-kpi-lbl { font-size: 10.5px; font-weight: 700; color: #166534; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.farm-kpi-val { font-size: 12.5px; font-weight: 800; color: #0c4a6e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.farm-exp-bar { width: 100%; height: 6px; border-radius: 999px; background: #dcfce7; overflow: hidden; margin-top: 2px; }
.farm-exp-fill { height: 100%; background: linear-gradient(90deg, #22c55e, #10b981); transition: width 0.25s ease; }

.farm-neighbor-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  color: #78350f;
}

.farm-world-wrap {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid #4ade80;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.16);
  margin-bottom: 12px;
  background: #dcfce7;
  user-select: none;
}
.farm-world-canvas { display: block; width: 100%; height: 270px; cursor: pointer; touch-action: manipulation; }

.farm-subtabs { margin-bottom: 10px; }
.farm-stage-body { display: flex; flex-direction: column; gap: 10px; }

.farm-seed-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
}
.farm-seed-card {
  flex: 0 0 auto;
  min-width: 112px;
  min-height: 48px;
  padding: 6px 9px;
  border-radius: 12px;
  border: 1.5px solid #bae6fd;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.farm-seed-card:hover { border-color: #2b8be0; transform: translateY(-1px); }
.farm-seed-card.active {
  border-color: #16a34a;
  background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}
.farm-seed-card img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }

.farm-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}

.farm-layout-grid { display: grid; grid-template-columns: 1fr 270px; gap: 12px; align-items: start; }

.farm-classic-scene {
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #3f6212;
  box-shadow: 0 8px 20px rgba(20, 83, 45, 0.22);
  background: #4d9b2a;
}

.farm-classic-sky {
  position: relative;
  height: 96px;
  background: #7cc9f6 url('/web/farm/img/nennongtrai.png') repeat-x left bottom;
  background-size: auto 108px;
  image-rendering: pixelated;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 7px 10px;
  gap: 6px;
}
.farm-classic-sky.is-night {
  background-color: #1d3557;
  background-image: url('/web/farm/img/nennongtrai-toi.png');
}
.farm-cloud {
  position: absolute;
  pointer-events: none;
  opacity: 0.9;
  z-index: 1;
}
.farm-cloud.c1 { top: 8px; height: 22px; width: auto; animation: farmCloudDrift1 26s linear infinite; }
.farm-cloud.c2 { top: 22px; height: 18px; width: auto; animation: farmCloudDrift2 19s linear infinite; }
.farm-classic-sky.is-night .farm-cloud { display: none; }
@keyframes farmCloudDrift1 { from { left: -60px; } to { left: calc(100% + 60px); } }
@keyframes farmCloudDrift2 { from { left: 105%; } to { left: -70px; } }

.farm-sky-pill {
  position: relative;
  z-index: 2;
  background: rgba(15, 23, 42, 0.68);
  color: #fef3c7;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(254, 243, 199, 0.35);
  white-space: nowrap;
}

.farm-classic-dat {
  background: #a39560 url('/web/images/dat.png') repeat;
  background-size: 38px 38px;
  image-rendering: pixelated;
  padding: 6px 10px;
  border-top: 2px solid #5c4018;
  border-bottom: 2px solid #4d7c0f;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 8px;
}
.farm-yard-npc {
  background: none;
  border: none;
  padding: 2px 4px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  transition: transform 0.14s ease;
}
.farm-yard-npc:hover { transform: translateY(-2px); }
.farm-yard-npc img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
.farm-yard-npc.is-ready img {
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.92)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}
.farm-yard-npc span {
  font-size: 10px;
  font-weight: 800;
  color: #fffbeb;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  white-space: nowrap;
}
.farm-yard-visit-note {
  flex: 1;
  min-width: 180px;
  font-size: 11.5px;
  color: #fffbeb;
  text-shadow: 0 1px 2px #000;
  align-self: center;
}

.farm-classic-cola {
  background: #3b9b1c url('/web/images/cola.png') repeat;
  background-size: 46px 44px;
  image-rendering: pixelated;
  padding: 12px 10px 14px;
}

.farm-plots-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(44px, 58px));
  justify-content: center;
  gap: 8px 4px;
}

.farm-plot {
  position: relative;
  background: transparent;
  border: none;
  padding: 2px 0 4px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.farm-plot::before {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 40px;
  height: 10px;
  border-radius: 50%;
  background: rgba(20, 48, 10, 0.34);
  pointer-events: none;
}
.farm-plot.soil-2::before { background: rgba(124, 45, 18, 0.42); box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.3); }
.farm-plot.soil-3::before { background: rgba(113, 63, 18, 0.46); box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.42); }
.farm-plot.soil-4::before { background: rgba(92, 64, 16, 0.50); box-shadow: 0 0 4px rgba(253, 224, 71, 0.55); }
.farm-plot:hover { transform: translateY(-2px) scale(1.05); }

.farm-plot-img {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px rgba(18, 38, 8, 0.55));
}
.farm-plot.is-empty.soil-2 .farm-plot-img {
  filter: sepia(0.18) saturate(1.25) drop-shadow(0 2px 1px rgba(18, 38, 8, 0.55));
}
.farm-plot.is-empty.soil-3 .farm-plot-img {
  filter: saturate(1.22) brightness(1.04) drop-shadow(0 2px 1px rgba(18, 38, 8, 0.55));
}
.farm-plot.is-empty.soil-4 .farm-plot-img {
  filter: contrast(1.06) brightness(1.06) drop-shadow(0 0 3px rgba(254, 240, 138, 0.48)) drop-shadow(0 2px 1px rgba(18, 38, 8, 0.55));
}
.farm-plot.planted.watered .farm-plot-img {
  filter: contrast(1.05) drop-shadow(0 2px 2px rgba(12, 32, 8, 0.68));
}
.farm-plot.has-pest .farm-plot-img {
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.85)) drop-shadow(0 2px 1px rgba(18, 38, 8, 0.55));
}
.farm-plot.ripe .farm-plot-img {
  filter: drop-shadow(0 0 5px rgba(254, 240, 138, 0.92)) drop-shadow(0 2px 1px rgba(18, 38, 8, 0.55));
}
.farm-plot.stolen { opacity: 0.72; }

.plot-badge-top {
  position: absolute;
  top: -2px;
  right: 2px;
  z-index: 3;
  font-size: 11px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
  pointer-events: none;
}
.plot-timer, .plot-mini-tag {
  position: absolute;
  bottom: -2px;
  z-index: 3;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.78);
  color: #fef08a;
  white-space: nowrap;
  pointer-events: none;
}
.plot-mini-tag.is-muted { background: rgba(51, 65, 85, 0.86); color: #e2e8f0; }

.farm-plot-expand {
  position: relative;
  background: transparent;
  border: none;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 0 4px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.farm-plot-expand:hover { transform: translateY(-2px) scale(1.05); }
.farm-muadat-img {
  width: 34px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.farm-classic-conduong {
  height: 24px;
  background: #a39560 url('/web/images/conduong.png') repeat-x left center;
  background-size: 36px 24px;
  image-rendering: pixelated;
}
.farm-classic-ranch {
  background: #3b9b1c url('/web/images/cola.png') repeat;
  background-size: 46px 44px;
  image-rendering: pixelated;
  padding: 8px 12px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.farm-ranch-spot {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: flex-end;
  transition: transform 0.14s ease;
}
.farm-ranch-spot:hover { transform: translateY(-2px); }
.farm-ranch-barn .farm-ranch-bg { height: 74px; width: auto; }
.farm-ranch-pond .farm-ranch-bg { height: 64px; width: auto; }
.farm-ranch-pet {
  position: absolute;
  bottom: 4px;
  height: 26px;
  width: auto;
  pointer-events: none;
}
.farm-ranch-dog {
  position: absolute;
  right: -12px;
  bottom: 2px;
  height: 28px;
  width: auto;
  pointer-events: none;
}
.farm-ranch-fish {
  position: absolute;
  bottom: 14px;
  height: 22px;
  width: auto;
  pointer-events: none;
}

.farm-side-stack { display: flex; flex-direction: column; gap: 10px; }
.khe-glass-box {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.farm-upgrade-box {
  background: #f8fbff;
  border: 1.5px solid #bae6fd;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.farm-pen-grid, .farm-recipe-grid, .farm-neighbor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 9px;
}
.farm-barn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
}
.farm-stove-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.farm-pen-card, .farm-barn-card, .farm-recipe-card, .farm-neighbor-card, .farm-stove-card, .farm-dog-card {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  border-radius: 13px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.farm-barn-card.is-hot { border-color: #f97316; background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%); }
.farm-stove-card.ready { border-color: #10b981; background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%); }
.farm-hot-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
}
.farm-merchant-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
}
.farm-dog-card {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #38bdf8;
}
.farm-sky-btn {
  position: absolute;
  bottom: 9px;
  right: 10px;
  z-index: 8;
  background: rgba(15, 23, 42, 0.78);
  color: #fef08a;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.farm-sky-btn:hover { background: rgba(15, 23, 42, 0.92); border-color: #fde047; }
.farm-fert-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}
.farm-fert-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
}
.farm-fert-chip.active {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.farm-fert-chip img { width: 20px; height: 20px; object-fit: contain; }
.farm-shop-drawer {
  background: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.farm-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 7px;
}
.farm-hunger-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
  border: 2px solid #ef4444;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
}
.farm-merchant-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
  align-items: stretch;
}
.farm-wheel-card, .farm-exchange-card, .farm-bxh-card {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.farm-wheel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.farm-wheel-cell {
  padding: 7px 5px;
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid #bae6fd;
  background: #f0f9ff;
  font-size: 10.5px;
  font-weight: 800;
  color: #0c4a6e;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.farm-wheel-cell.active {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  color: #92400e;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
  transform: scale(1.04);
}
.farm-gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 9px;
}
.farm-gift-card {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border: 1.5px solid #fbbf24;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.farm-rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.farm-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}
.farm-rank-row.is-me { background: #ecfdf5; border-color: #34d399; }

/* City Map */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; }
.zone-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-lg); background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%); border: 1.5px solid #bae6fd; text-align: left; }
.zone-card:hover { border-color: #2b8be0; }
.zone-icon-wrap { width: 48px; height: 48px; border-radius: 12px; background: #e0f2fe; border: 1px solid #7dd3fc; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; image-rendering: pixelated; }
.zone-icon-wrap img { max-width: 40px; max-height: 40px; object-fit: contain; }
.city-status-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.city-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.zone-status-pill { font-size: 10px; font-weight: 800; color: #047857; background: #dcfce7; border: 1px solid #86efac; padding: 1px 6px; border-radius: 999px; flex-shrink: 0; }
.zone-enter-link { font-size: 11px; font-weight: 800; color: #0284c7; }
.zone-stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1.5px solid #7dd3fc; }
.zone-stage-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zone-stage-wallet { display: flex; flex-wrap: wrap; gap: 6px; }
.zone-stage-wallet span { background: #fff; border: 1px solid #bae6fd; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; color: #0369a1; }
.zone-panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.zone-box { background: #f8fbff; border: 1.5px solid #bae6fd; border-radius: 14px; padding: 12px; min-width: 0; }
.zone-box-title { font-weight: 800; font-size: 14px; color: #0c4a6e; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.zone-muted { font-size: 12px; color: #486581; margin: 0 0 8px; }
.zone-btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.zone-form-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.zone-form-row .input-h5 { flex: 1; min-width: 150px; }
.zone-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin: 8px 0; }
.zone-kpi { background: #fff; border: 1px solid #bae6fd; border-radius: 10px; padding: 6px 8px; text-align: center; }
.zone-kpi span { display: block; font-size: 10.5px; color: #486581; font-weight: 700; }
.zone-kpi b { display: block; font-size: 12.5px; color: #0c4a6e; margin-top: 2px; }
.wheel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wheel-cell { padding: 10px 6px; border-radius: 10px; border: 1.5px solid #bae6fd; background: #fff; font-size: 11px; font-weight: 800; text-align: center; color: #0c4a6e; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.wheel-cell.active { border-color: #f59e0b; background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; box-shadow: 0 0 12px rgba(245, 158, 11, 0.55); transform: scale(1.03); }
.dice-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.die-face { width: 42px; height: 42px; border-radius: 10px; background: #fff; border: 2px solid #0284c7; font-size: 18px; font-weight: 900; color: #0c4a6e; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(2, 132, 199, 0.18); }
.tx-sum-pill { padding: 4px 10px; border-radius: 999px; background: #e0f2fe; font-weight: 800; font-size: 12px; color: #0369a1; }
.tx-hist-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11.5px; color: #486581; font-weight: 700; }
.tx-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: #fff; }
.tx-dot.tai { background: #ec4899; }
.tx-dot.xiu { background: #0284c7; }
.fish-meter { position: relative; height: 24px; border-radius: 999px; background: #dbeafe; border: 2px solid #60a5fa; overflow: hidden; }
.fish-sweet-zone { position: absolute; left: 37%; width: 26%; top: 0; bottom: 0; background: linear-gradient(90deg, #4ade80, #22c55e, #4ade80); opacity: 0.85; }
.fish-pointer { position: absolute; top: 2px; bottom: 2px; width: 6px; margin-left: -3px; border-radius: 4px; background: #e11d48; box-shadow: 0 0 8px rgba(225, 29, 72, 0.7); }
.fish-bag-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.fish-bag-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 9px; border-radius: 9px; background: #fff; border: 1px solid #bae6fd; font-size: 12px; }
.boss-hp-track { width: 100%; height: 14px; border-radius: 999px; background: #e2e8f0; border: 1px solid #cbd5e1; overflow: hidden; margin-top: 6px; }
.boss-hp-fill { height: 100%; background: linear-gradient(90deg, #ef4444, #f97316); transition: width 0.2s ease; }
.boss-mode-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.boss-quota-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 6px; font-size: 11.5px; color: #334155; font-weight: 700; }
.world-round-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #e0f2fe; border: 1px solid #7dd3fc; color: #0369a1; font-size: 10.5px; font-weight: 800; }
.world-round-pill.solo { background: #fef3c7; border-color: #fbbf24; color: #92400e; }
.boss-cd-chip { padding: 2px 8px; border-radius: 999px; background: #dcfce7; border: 1px solid #86efac; color: #166534; font-size: 10.5px; font-weight: 800; }
.boss-cd-chip.waiting { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.boss-top-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.boss-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 8px; background: #fff; border: 1px solid #bae6fd; font-size: 11.5px; color: #0f172a; }
.auc-bidder-tag { font-size: 11px; color: #475569; margin-top: 2px; }
.log-box { display: flex; flex-direction: column; gap: 4px; max-height: 165px; overflow-y: auto; }
.log-line { padding: 5px 8px; border-radius: 8px; background: #fff; border: 1px solid #e0f2fe; font-size: 11.5px; color: #1e293b; }
.pk-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.pk-side { text-align: center; background: #fff; border: 1.5px solid #bae6fd; border-radius: 12px; padding: 10px; }
.pk-side img { width: 84px; height: 84px; object-fit: contain; }
.pk-vs { font-size: 20px; font-weight: 900; color: #e11d48; text-align: center; }
.pyramid-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 280px; margin: 10px auto; }
.pyr-cell { height: 64px; border-radius: 12px; border: 2px solid #d97706; background: linear-gradient(135deg, #fef3c7, #fde68a); font-size: 24px; display: flex; align-items: center; justify-content: center; }
.pyr-cell.opened { background: #dcfce7; border-color: #16a34a; }
.pyr-cell.opened.trap { background: #fee2e2; border-color: #dc2626; }
.market-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid #bae6fd; }
.badge-orb { width: 78px; height: 78px; margin: 0 auto; border-radius: 50%; border: 3px solid; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }

/* Panoramic HD City Overview & 2.5D Canvas World */
.city-hero-banner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; width: 100%; border-radius: 16px; background-size: cover; background-position: center 42%; border: 2px solid #7dd3fc; box-shadow: 0 8px 22px rgba(12, 74, 110, 0.16); }
.city-hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 74, 110, 0.84) 0%, rgba(15, 23, 42, 0.62) 60%, rgba(12, 74, 110, 0.45) 100%); pointer-events: none; z-index: 1; }
.city-hero-emblem { position: relative; z-index: 2; height: 64px; width: 64px; object-fit: contain; border-radius: 14px; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(6px); border: 1.5px solid rgba(255, 255, 255, 0.65); padding: 4px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); flex-shrink: 0; }
.city-status-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.city-stat-pill { display: inline-flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, 0.95); border: 1.5px solid #bae6fd; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; color: #0c4a6e; font-weight: 600; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12); }
.city-stat-pill img { height: 18px; width: 18px; object-fit: contain; }
.zone-card.zone-card-visual { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.zone-card.zone-card-visual:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(2, 132, 199, 0.18); border-color: #38bdf8; }
.zone-card-banner { position: relative; height: 86px; width: 100%; overflow: hidden; border-bottom: 1.5px solid #bae6fd; background-size: cover; background-position: center; }
.zone-card-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.04) 55%, rgba(15, 23, 42, 0.36) 100%); pointer-events: none; }
.zone-card-hd-mascot { position: absolute; right: 10px; bottom: 2px; height: 76px; max-width: 84px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.38)); transition: transform 0.2s ease; pointer-events: none; }
.zone-card.zone-card-visual:hover .zone-card-hd-mascot { transform: scale(1.06) translateY(-2px); }
.zone-card-banner .zone-status-pill { position: absolute; top: 7px; left: 8px; right: auto; }
.zone-status-pill.is-hd { background: linear-gradient(135deg, #fef08a 0%, #fde047 100%); color: #92400e; border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35); }
.zone-card-body { padding: 9px 10px 10px; width: 100%; }
.zone-world-wrap { position: relative; width: 100%; border-radius: 18px; overflow: hidden; border: 2px solid #60a5fa; box-shadow: 0 12px 28px rgba(12, 74, 110, 0.18); margin-bottom: 12px; background: #e0f2fe; user-select: none; }
.zone-world-canvas { display: block; width: 100%; height: 310px; touch-action: manipulation; }
.zone-world-hint { position: absolute; top: 8px; right: 10px; z-index: 7; background: rgba(15, 23, 42, 0.72); color: #f8fafc; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); pointer-events: none; }
.scene-caption { position: absolute; top: 8px; left: 10px; z-index: 7; background: rgba(255, 255, 255, 0.90); color: #0c4a6e; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid #bae6fd; max-width: calc(100% - 310px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-crest { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; border: 2px solid; font-size: 10.5px; font-weight: 900; padding: 0 5px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18); flex-shrink: 0; letter-spacing: 0.2px; }
.pk-vs-badge { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #f97316, #e11d48); color: #fff; font-size: 16px; font-weight: 900; border: 2.5px solid #fef08a; box-shadow: 0 6px 16px rgba(225, 29, 72, 0.38); }
.pyr-tile-crest { font-size: 24px; font-weight: 900; color: #b45309; text-shadow: 0 1px 0 #fef3c7; }
.badge-orb-tier { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; text-shadow: 0 2px 8px rgba(15, 23, 42, 0.18); }

/* Quick HUD Pills, World Loa Marquee & Hub Utility Modules */
.quick-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1.5px solid #93c5fd; background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%); color: #0c4a6e; font-size: 11.5px; font-weight: 800; transition: transform 0.15s ease, border-color 0.15s ease; }
.quick-pill:hover { border-color: #2b8be0; transform: translateY(-1px); }
.quick-pill.shenron-pill { background: linear-gradient(135deg, #ecfdf5 0%, #fef3c7 100%); border-color: #10b981; color: #065f46; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.22); }
.quick-pill.shenron-pill:hover { border-color: #d97706; }
.pill-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 10px; font-weight: 900; }

.world-marquee { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: linear-gradient(90deg, #0c4a6e 0%, #1d4ed8 100%); color: #fef08a; border: 1.5px solid #60a5fa; box-shadow: 0 4px 14px rgba(12, 74, 110, 0.16); overflow: hidden; }
.marquee-tag { flex-shrink: 0; font-size: 10px; font-weight: 900; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 999px; background: #f59e0b; color: #0f172a; }
.marquee-track { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.marquee-track span { display: inline-block; padding-left: 100%; font-size: 12px; font-weight: 700; animation: teenvui-marquee 20s linear infinite; }
@keyframes teenvui-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.nick-rainbow, .nick-fx-fire, .nick-fx-ice, .nick-fx-gold, .nick-fx-galaxy, .nick-fx-thunder, .nick-fx-sakura, .nick-fx-shadow {
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.nick-rainbow { background-image: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #0284c7, #a855f7, #ec4899, #ef4444); animation: nick-flow 3s linear infinite; }
.nick-fx-fire { background-image: linear-gradient(90deg, #991b1b, #ef4444, #f97316, #facc15, #ef4444, #991b1b); animation: nick-flow 2.4s linear infinite; filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.45)); }
.nick-fx-ice { background-image: linear-gradient(90deg, #0369a1, #38bdf8, #e0f2fe, #06b6d4, #0369a1); animation: nick-flow 2.8s linear infinite; filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.45)); }
.nick-fx-gold { background-image: linear-gradient(90deg, #92400e, #d97706, #fef08a, #f59e0b, #b45309, #92400e); animation: nick-flow 2.6s linear infinite; filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.42)); }
.nick-fx-galaxy { background-image: linear-gradient(90deg, #4338ca, #9333ea, #ec4899, #38bdf8, #7c3aed, #4338ca); animation: nick-flow 3.2s linear infinite; filter: drop-shadow(0 0 4px rgba(147, 51, 234, 0.42)); }
.nick-fx-thunder { background-image: linear-gradient(90deg, #0284c7, #22d3ee, #fde047, #38bdf8, #eab308, #0284c7); animation: nick-flow 1.9s linear infinite; filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.45)); }
.nick-fx-sakura { background-image: linear-gradient(90deg, #be185d, #ec4899, #f9a8d4, #fb7185, #be185d); animation: nick-flow 3.1s linear infinite; filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.35)); }
.nick-fx-shadow { background-image: linear-gradient(90deg, #1e1b4b, #7e22ce, #dc2626, #312e81, #991b1b, #1e1b4b); animation: nick-flow 2.8s linear infinite; filter: drop-shadow(0 0 4px rgba(126, 34, 206, 0.4)); }
@keyframes nick-flow { 0% { background-position: 0% center; } 100% { background-position: 220% center; } }

.nick-fx-pill { background: #fff !important; border-color: #cbd5e1; }
.nick-fx-pill.active { border-color: #f59e0b !important; background: #fffbeb !important; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.32); }
.nick-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.35;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
  color: #92400e;
  white-space: nowrap;
}
.nick-title-badge.is-gm {
  background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%);
  border-color: #ef4444;
  color: #991b1b;
}
.nick-preview-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px solid #93c5fd;
  font-size: 13px;
}
.vip-source-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 9px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed #f59e0b;
  font-size: 11.5px;
  color: #78350f;
  font-weight: 700;
}

/* Private DM, Notifs, Forum, Mini-games & Dragon Balls */
.dm-layout { display: grid; grid-template-columns: 230px 1fr; gap: 10px; align-items: stretch; }
.dm-list { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid #bae6fd; border-radius: 12px; padding: 8px; max-height: 290px; overflow-y: auto; }
.dm-contact { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 10px; border: 1.5px solid transparent; background: #f8fbff; transition: border-color 0.15s ease, background 0.15s ease; }
.dm-contact.active { background: #e0f2fe; border-color: #0284c7; }
.dm-contact img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #fff; flex-shrink: 0; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; flex-shrink: 0; }
.dm-panel { display: flex; flex-direction: column; background: #fff; border: 1px solid #bae6fd; border-radius: 12px; padding: 10px; min-width: 0; }
.dm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #e0f2fe; }
.dm-thread { display: flex; flex-direction: column; gap: 6px; height: 195px; overflow-y: auto; padding: 8px 2px; }
.dm-msg { display: flex; width: 100%; }
.dm-msg.me { justify-content: flex-end; }
.dm-msg.them { justify-content: flex-start; }
.dm-bubble { max-width: 82%; padding: 7px 11px; border-radius: 12px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.dm-msg.me .dm-bubble { background: linear-gradient(135deg, #2b8be0, #0284c7); color: #fff; border-bottom-right-radius: 3px; }
.dm-msg.them .dm-bubble { background: #f1f5f9; color: #0f172a; border: 1px solid #cbd5e1; border-bottom-left-radius: 3px; }
.dm-time { display: block; font-size: 9.5px; opacity: 0.78; margin-top: 2px; text-align: right; }

.notif-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 9px; background: #fff; border: 1px solid #e2e8f0; font-size: 12px; }
.notif-row.unread { background: #fffbeb; border-color: #f59e0b; }
.forum-card { background: #fff; border: 1.5px solid #bae6fd; border-radius: 12px; padding: 10px; }
.forum-cmt { margin-top: 4px; padding: 4px 8px; border-radius: 7px; background: #f8fbff; border: 1px solid #e0f2fe; font-size: 11.5px; color: #334155; }

.baucua-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.baucua-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 2px solid #bae6fd; background: #fff; font-size: 12px; color: #0c4a6e; }
.baucua-btn.active { border-color: #ec4899; background: #fdf2f8; box-shadow: 0 4px 12px rgba(236, 72, 153, 0.22); }
.stock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 7px 9px; border-radius: 10px; background: #fff; border: 1px solid #bae6fd; font-size: 12px; }
.caro-board { display: grid; grid-template-columns: repeat(9, minmax(0, 34px)); gap: 3px; justify-content: center; margin-top: 6px; }
.caro-cell { width: 34px; height: 34px; border-radius: 6px; border: 1.5px solid #93c5fd; background: #fff; font-size: 15px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.caro-cell.x { color: #0284c7; background: #e0f2fe; }
.caro-cell.o { color: #e11d48; background: #ffe4e6; }

.dragon-balls-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: flex-start; }
.shenron-orb-slot { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 48px; }
.dragon-ball { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 2px dashed #cbd5e1; background: #f1f5f9; color: #64748b; font-size: 11.5px; font-weight: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.dragon-ball.owned { border-style: solid; border-color: #d97706; background: radial-gradient(circle at 32% 30%, #fef08a 0%, #f59e0b 65%, #d97706 100%); color: #7c2d12; box-shadow: 0 0 12px rgba(245, 158, 11, 0.55); }
.dragon-ball.owned.is-rare { border-color: #e11d48; background: radial-gradient(circle at 32% 30%, #fef08a 0%, #fb923c 55%, #dc2626 100%); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.45); box-shadow: 0 0 14px rgba(225, 29, 72, 0.65); }
.dragon-ball.is-stone { filter: grayscale(0.88) contrast(0.95); border-color: #64748b !important; box-shadow: none !important; }
.shenron-orb-cnt { font-size: 9.5px; font-weight: 800; opacity: 0.92; }
.shenron-orb-rarity { font-size: 9px; font-weight: 800; color: #64748b; }
.shenron-fuse-mini { border: 1px solid #f59e0b; background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border-radius: 999px; font-size: 9.5px; font-weight: 900; padding: 1.5px 6px; cursor: pointer; white-space: nowrap; }
.shenron-fuse-mini:hover { background: #f59e0b; color: #fff; }
.stage-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 7px 9px; border-radius: 10px; background: #fff; border: 1px solid #bae6fd; font-size: 12px; }

/* Bottom Floating Dock */
.bottom-dock {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 0 auto;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 2px solid #60a5fa;
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.24);
}
.dock-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: none; background: transparent; color: #335c81; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.dock-btn.active { background: var(--header-grad); color: #fff; box-shadow: 0 4px 12px rgba(43, 139, 224, 0.35); }

/* Modal & Toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, 0.58); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 14px; }
.modal-backdrop.open { display: flex; }
.ssr-modal-card { width: 100%; max-width: 610px; max-height: 92vh; overflow-y: auto; border-radius: 20px; background: #fff; border: 2.5px solid #f59e0b; box-shadow: 0 22px 55px rgba(12, 45, 78, 0.35); }
.inspect-body-grid { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: stretch; }
.toast-float { position: fixed; top: 72px; right: 16px; z-index: 70; display: flex; flex-direction: column; gap: 6px; pointer-events: none; max-width: calc(100vw - 24px); }
.toast-msg { padding: 9px 14px; border-radius: 10px; background: #ffffff; border: 2px solid #10b981; color: #065f46; font-size: 12.5px; font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14); }
.toast-msg.warn { border-color: #f59e0b; background: #fffbeb; color: #92400e; }

/* DB Status Chip & Account Modal */
.db-status-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #ecfdf5; border: 1.5px solid #34d399; color: #065f46; white-space: nowrap; margin-left: auto; }
.db-status-chip.saving { background: #fffbeb; border-color: #fbbf24; color: #b45309; }
.db-status-chip.error { background: #fef2f2; border-color: #f87171; color: #b91c1c; }
.acc-summary-box { padding: 10px 12px; border-radius: 12px; background: #f0f9ff; border: 1.5px solid #bae6fd; font-size: 12.5px; font-weight: 700; color: #0c4a6e; line-height: 1.55; margin-bottom: 10px; }
.auth-error-box { padding: 9px 12px; border-radius: 10px; background: #fef2f2; border: 1.5px solid #f87171; color: #b91c1c; font-size: 12.5px; font-weight: 800; line-height: 1.45; margin-bottom: 10px; }
.acc-actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acc-panel { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: #f8fafc; border: 1.5px solid #e2e8f0; }
.acc-panel-title { font-size: 12px; font-weight: 800; color: #0f172a; margin-bottom: 2px; }

/* Strict Auth Gate: zero game world / character visible before login */
body.auth-locked .app-shell,
body.auth-locked .bottom-dock,
body.auth-locked #inspectModal,
body.auth-locked #buyConfirmModal,
body.auth-locked #shenron3DModal,
body.auth-locked #adminModal {
  display: none !important;
}

/* 2.5D HD Boss Colosseum & Shenron Altar Viewports */
.boss-3d-stage-wrap {
  position: relative;
  width: 100%;
  height: 365px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid #f59e0b;
  background: radial-gradient(circle at 50% 45%, #1e1b4b 0%, #090d1e 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.36);
  margin-bottom: 12px;
  user-select: none;
}
.boss-3d-webgl-canvas,
.shenron-3d-webgl-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer;
  touch-action: manipulation;
}
.boss-3d-top-hud {
  position: absolute;
  top: 9px;
  left: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}
.boss-3d-top-hud button {
  pointer-events: auto;
}
.boss-3d-badge {
  background: rgba(15, 23, 42, 0.80);
  backdrop-filter: blur(6px);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 800;
}
.boss-3d-bottom-hud {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 6;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(249, 115, 22, 0.65);
  border-radius: 14px;
  padding: 6px 10px;
  color: #f8fafc;
  pointer-events: none;
}
.boss-vs-hud-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.boss-vs-fighter {
  min-width: 0;
}
.boss-vs-divider {
  font-weight: 900;
  font-size: 10.5px;
  color: #facc15;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(250, 204, 21, 0.55);
}
.hero-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.2s ease;
}
.hero-hp-fill.low {
  background: linear-gradient(90deg, #dc2626, #f59e0b);
}
.boss-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  margin-left: 4px;
  vertical-align: middle;
}
.boss-status-chip.buff {
  background: rgba(16, 185, 129, 0.28);
  border: 1px solid #34d399;
  color: #a7f3d0;
}
.boss-status-chip.debuff {
  background: rgba(244, 63, 94, 0.30);
  border: 1px solid #fb7185;
  color: #fecdd3;
}
.shenron-modal-card {
  max-width: 840px;
  border-color: #10b981;
}
.shenron-3d-viewport {
  position: relative;
  width: 100%;
  height: 315px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #f59e0b;
  background: radial-gradient(circle at 50% 35%, #064e3b 0%, #030712 100%);
  box-shadow: inset 0 0 24px rgba(250, 204, 21, 0.22);
}
.shenron-status-banner {
  padding: 8px 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ecfdf5 0%, #fffbeb 100%);
  border: 1.5px solid #6ee7b7;
  color: #064e3b;
  font-size: 12px;
  text-align: center;
}
.shenron-rain-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff1f2 0%, #fef3c7 100%);
  border: 1.5px solid #f43f5e;
  color: #881337;
  font-size: 12px;
}
.shenron-guardian-box {
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 2px solid #e11d48;
}
.shenron-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 9px;
}
.shenron-tier-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}
.shenron-tier-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  cursor: pointer;
  text-align: center;
}
.shenron-tier-tab b { font-size: 12px; }
.shenron-tier-tab small { font-size: 10px; color: #475569; font-weight: 700; }
.shenron-tier-tab.active {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #064e3b;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
}
.shenron-tier-tab.is-super.active {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef08a 100%);
  color: #78350f;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.shenron-wish-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 8px;
}
.shenron-wish-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1.5px solid #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  text-align: left;
  color: #0f172a;
}
button.shenron-wish-card {
  cursor: pointer;
  width: 100%;
}
.shenron-wish-card.is-picked {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.shenron-wish-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: #0c4a6e;
}
.shenron-wish-head .pill-badge,
.shenron-rain-banner .pill-badge {
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
  padding: 2px 7px;
}
.shenron-wish-desc {
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}
body.auth-locked #accountModal {
  display: flex !important;
  background: linear-gradient(155deg, #0284c7 0%, #38bdf8 48%, #fbcfe8 100%);
  backdrop-filter: none;
}
body.auth-locked #btnCloseAccount {
  display: none !important;
}

/* 3-Tier RBAC Badges & Management Panel */
.role-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0.3px; }
.role-admin { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.role-mod { background: linear-gradient(135deg, #10b981, #0284c7); color: #fff; }
.role-user { background: #e2e8f0; color: #475569; }
.role-banned { background: #dc2626; color: #fff; }
.admin-pill { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; border-color: #f59e0b !important; color: #92400e !important; }
.admin-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.admin-list { display: flex; flex-direction: column; gap: 6px; max-height: 290px; overflow-y: auto; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f8fafc; border: 1.5px solid #e2e8f0; flex-wrap: wrap; }
.admin-row.is-banned { background: #fef2f2; border-color: #fca5a5; }
.admin-role-select { width: auto; min-width: 92px; padding: 4px 8px; font-size: 11.5px; }
.admin-grant-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.adm-gm-target-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 11px; border-radius: 12px; background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1.5px solid #f59e0b; margin-bottom: 10px; }
.adm-gm-target-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #78350f; flex: 1 1 250px; min-width: 0; }
.adm-gm-target-label select { flex: 1; min-width: 150px; }
.adm-gm-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.adm-gm-filter-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 8px; }
.adm-gm-field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 800; color: #0f172a; min-width: 0; }
.adm-gm-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; max-height: 330px; overflow-y: auto; padding: 4px 2px; }
.adm-gm-item-card { display: flex; flex-direction: column; justify-content: space-between; gap: 5px; padding: 8px; border-radius: 11px; background: #fff; border: 1.5px solid #bae6fd; box-shadow: 0 2px 6px rgba(12, 45, 78, 0.05); min-width: 0; }
.adm-gm-item-card.is-owned { border-color: #10b981; background: #f0fdf4; }
.adm-gm-thumb-wrap { position: relative; display: flex; align-items: center; justify-content: center; height: 74px; border-radius: 9px; background: linear-gradient(135deg, #f0f9ff, #e0f2fe); overflow: hidden; }
.adm-gm-thumb-wrap.is-card { height: 104px; background: #0f172a; }
.adm-gm-thumb-wrap img { max-width: 62px; max-height: 62px; object-fit: contain; }
.adm-gm-thumb-wrap.is-card img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: top center; }
.adm-gm-badge-tl { position: absolute; top: 4px; left: 4px; padding: 1px 5px; border-radius: 6px; font-size: 9.5px; font-weight: 900; color: #fff; background: #0284c7; }
.adm-gm-badge-tr { position: absolute; top: 4px; right: 4px; padding: 1px 5px; border-radius: 6px; font-size: 9.5px; font-weight: 900; color: #fff; background: #059669; }
.adm-gm-item-name { font-size: 11.5px; font-weight: 800; color: #0f172a; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-gm-item-sub { font-size: 10px; font-weight: 700; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-gm-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: #334155; }
.adm-gm-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.adm-god-forge-layout { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: start; }

/* Full Legacy Parity Zones (House, School, P2P Flea Market, GoPet, Peach/VQBD & Folk Games) */
.zone-log-box { padding: 8px 10px; border-radius: 10px; background: #ffffff; border: 1.5px solid #bae6fd; font-size: 12px; font-weight: 700; color: #0c4a6e; }
.rank-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.rank-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 7px 10px; border-radius: 10px; background: #ffffff; border: 1px solid #bae6fd; font-size: 12px; }
.house-floorplan { padding: 12px; border-radius: 14px; border: 2px solid #fbbf24; }
.house-floor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.house-room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 8px; min-height: 86px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.78); border: 1.5px dashed rgba(180, 83, 9, 0.35); }
.house-placed-chip { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: #ffffff; border: 1.5px solid #fcd34d; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06); }
.house-furn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.house-furn-card { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px; background: #ffffff; border: 1.5px solid #bae6fd; }
.school-opts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.school-opt-btn { justify-content: flex-start; padding: 8px 11px; font-size: 12.5px; background: #ffffff; color: #0f172a; border-color: #fde68a; }
.school-opt-btn:hover { background: #fef9c3; border-color: #f59e0b; }
.school-opt-tag { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #047857; color: #fff; font-size: 11px; font-weight: 900; flex-shrink: 0; }
.flea-list-wrap { display: flex; flex-direction: column; gap: 7px; max-height: 330px; overflow-y: auto; }
.flea-item-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #ffffff; border: 1.5px solid #bae6fd; }
.flea-item-thumb { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #f0f9ff; border: 1px solid #93c5fd; padding: 3px; flex-shrink: 0; }
.gopet-avatar-orb { width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(56, 189, 248, 0.45), rgba(15, 23, 42, 0.85)); border: 2.5px solid #fbbf24; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 0 18px rgba(56, 189, 248, 0.35); }
.gopet-avatar-orb img { width: 64px; height: 64px; object-fit: contain; }
.pet-race-board { display: flex; flex-direction: column; gap: 5px; }
.pet-race-lane { display: flex; align-items: center; gap: 8px; padding: 4px 7px; border-radius: 9px; background: #ffffff; border: 1.5px solid #e2e8f0; cursor: pointer; transition: border-color 0.14s ease, background 0.14s ease; }
.pet-race-lane:hover { border-color: #38bdf8; }
.pet-race-lane.is-picked { border-color: #10b981; background: #ecfdf5; }
.pet-lane-label { width: 132px; font-size: 11px; font-weight: 800; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.pet-lane-track { position: relative; flex: 1; height: 22px; border-radius: 999px; background: linear-gradient(90deg, #f1f5f9 0%, #e0f2fe 92%, #fde68a 100%); border: 1px solid #cbd5e1; overflow: hidden; }
.pet-lane-runner { position: absolute; top: 1px; width: 24px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; transition: left 85ms linear; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.playing-card { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 36px; padding: 0 5px; margin-right: 3px; border-radius: 6px; background: #ffffff; border: 1.5px solid #94a3b8; font-weight: 900; font-size: 13px; color: #0f172a; box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1); }
.playing-card.is-red { color: #dc2626; border-color: #fca5a5; }

/* Linh Trieu Binh Ca Version 2 — Bespoke 100-Card Signature Foil & Multiverse TCG Theme (Base Rules Before Media Queries) */
@keyframes ltbcGoldSweep {
  0% { transform: translateX(-160%) skewX(-24deg); opacity: 0; }
  35% { opacity: 0.65; }
  70% { opacity: 0.55; }
  100% { transform: translateX(260%) skewX(-24deg); opacity: 0; }
}
@keyframes ltbcGodAura {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 22px var(--c1, #fde047), 0 0 40px color-mix(in srgb, var(--c2, #ef4444) 65%, transparent), inset 0 0 16px color-mix(in srgb, var(--c1, #fde047) 38%, transparent);
    border-color: var(--c1, #fde047);
  }
  50% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 26px var(--c2, #38bdf8), 0 0 46px color-mix(in srgb, var(--c3, #ec4899) 72%, transparent), inset 0 0 18px color-mix(in srgb, var(--c2, #38bdf8) 42%, transparent);
    border-color: var(--c3, #fef08a);
  }
}
@keyframes ltbcPrismSheen {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ltbcCardPopIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ltbcSigOrbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes ltbcSigOrbitRev {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
@keyframes ltbcSigPulse {
  0%, 100% { opacity: 0.62; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.04); }
}
@keyframes ltbcSigFloat {
  0% { transform: translateY(8px) scale(0.88); opacity: 0; }
  25% { opacity: 0.95; }
  80% { opacity: 0.85; }
  100% { transform: translateY(-24px) scale(1.08); opacity: 0; }
}
@keyframes ltbcSigSlash {
  0%, 12% { stroke-dashoffset: 160; opacity: 0; }
  28% { stroke-dashoffset: 0; opacity: 1; }
  62% { stroke-dashoffset: 0; opacity: 0.86; }
  88%, 100% { stroke-dashoffset: -160; opacity: 0; }
}
@keyframes ltbcSigBolt {
  0%, 100% { opacity: 0.18; }
  8%, 14% { opacity: 1; }
  18%, 46% { opacity: 0.25; }
  50%, 56% { opacity: 0.95; }
  62% { opacity: 0.3; }
}

.dock-btn-ltbc.active {
  background: linear-gradient(135deg, #991b1b 0%, #d97706 55%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.55);
}

/* ============================================================================
   LINH TRIEU BINH CA • AAA FULLSCREEN IMPERIAL PALACE & 3D FULL-ART TCG SYSTEM
   ============================================================================ */
@keyframes ltbcForgeBurst {
  0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.9), 0 0 40px rgba(249, 115, 22, 0.85); transform: scale(1.03); }
  50% { box-shadow: 0 0 48px 16px rgba(250, 204, 21, 0.72), 0 0 70px rgba(236, 72, 153, 0.55); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0), 0 0 24px rgba(245, 158, 11, 0.35); transform: scale(1); }
}

body.ltbc-fullscreen:not(.auth-locked) {
  background: #060812;
  overflow: hidden;
}
body.ltbc-fullscreen:not(.auth-locked) .app-shell {
  max-width: none;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  gap: 0;
}
body.ltbc-fullscreen:not(.auth-locked) .app-shell > .hud-bar,
body.ltbc-fullscreen:not(.auth-locked) .app-shell > .world-marquee,
body.ltbc-fullscreen:not(.auth-locked) .bottom-dock {
  display: none !important;
}
body.ltbc-fullscreen:not(.auth-locked) #tab-ltbc.active,
body.ltbc-fullscreen:not(.auth-locked) #ltbcRoot {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
}
body.ltbc-fullscreen:not(.auth-locked) .ltbc-palace {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 45;
}

.ltbc-palace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  color: #f8fafc;
  background:
    radial-gradient(ellipse 75% 42% at 50% -6%, rgba(180, 83, 9, 0.34) 0%, transparent 65%),
    radial-gradient(ellipse 45% 40% at 10% 18%, rgba(185, 28, 28, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 92% 18%, rgba(91, 33, 182, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #0b1022 0%, #070a17 55%, #04060f 100%);
  position: relative;
  overflow: hidden;
}
.ltbc-palace .input-h5 {
  background: rgba(10, 16, 36, 0.92);
  border: 1.5px solid rgba(250, 204, 21, 0.42);
  color: #f8fafc;
}
.ltbc-palace .input-h5::placeholder { color: #94a3b8; }
.ltbc-palace .input-h5 option { background: #0b1120; color: #f8fafc; }

/* Slim Obsidian-Gold Top Command HUD */
.ltbc-top-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 16px 8px;
  background:
    linear-gradient(90deg, rgba(69, 10, 10, 0.88) 0%, rgba(15, 23, 42, 0.94) 50%, rgba(30, 27, 75, 0.9) 100%);
  border-bottom: 1.5px solid rgba(250, 204, 21, 0.52);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  z-index: 20;
  flex-wrap: wrap;
}
.ltbc-hud-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.ltbc-crest-emblem {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
  border: 2px solid #fef08a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.55);
  flex-shrink: 0;
}
.ltbc-hud-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ltbc-hud-title {
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #fffbeb 0%, #fde047 60%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ltbc-hud-lvline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
}
.ltbc-mini-exp-track {
  width: 92px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.ltbc-mini-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #fde047);
}
.ltbc-hud-combat {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ltbc-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  background: rgba(9, 14, 31, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.ltbc-stat-pill.sm { color: #fda4af; border-color: rgba(244, 63, 94, 0.5); }
.ltbc-stat-pill.hp { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.5); }
.ltbc-stat-pill.binh { color: #e9d5ff; border-color: rgba(192, 132, 252, 0.45); }

.ltbc-hud-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.ltbc-cur-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  background: rgba(9, 14, 31, 0.86);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fef08a;
}
.ltbc-cur-pill.jade { border-color: rgba(56, 189, 248, 0.55); color: #7dd3fc; }
.ltbc-cur-pill.token { border-color: rgba(251, 146, 60, 0.65); color: #fdba74; }
.ltbc-cur-pill.energy { border-color: rgba(52, 211, 153, 0.55); color: #6ee7b7; }
.ltbc-pho-plus {
  border: 1px solid #fde047;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 900;
}
.ltbc-pho-plus:hover { filter: brightness(1.12); }
.ltbc-btn-exit {
  border: 1.5px solid #fde047;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fef08a;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 900;
}
.ltbc-btn-exit:hover { background: #b91c1c; color: #fff; border-color: #fecaca; }

.ltbc-btn-god-claim {
  background: linear-gradient(90deg, #f59e0b, #ef4444, #d946ef, #f59e0b);
  background-size: 220% 220%;
  animation: ltbcPrismSheen 2.4s linear infinite;
  color: #fff;
  border: 1.5px solid #fef08a;
  font-weight: 900;
  font-size: 11px;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.65);
}

/* Center Scrollable Palace Viewport & Drawer */
.ltbc-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 18px 22px;
  -webkit-overflow-scrolling: touch;
}
.ltbc-stage-inner {
  max-width: 1460px;
  margin: 0 auto;
}
.ltbc-god-drawer {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.92), rgba(30, 27, 75, 0.95));
  border: 1.5px solid #facc15;
}
.ltbc-god-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.ltbc-god-choice {
  background: #0b1120;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  color: #fff;
}
.ltbc-god-choice img {
  width: 112px;
  height: 148px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #facc15;
}

/* Bottom Royal Navigation Dock (Auto-wrap so zero tabs are ever clipped on narrow windows!) */
.ltbc-royal-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(13, 18, 38, 0.96), #05070f);
  border-top: 1.5px solid rgba(250, 204, 21, 0.5);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  z-index: 20;
}
.ltbc-nav-btn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 11px;
  border: 1.5px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.94));
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.ltbc-nav-short { display: none; }
.ltbc-dock-badge, .ltbc-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid #fef08a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.75);
}
.ltbc-nav-btn:hover { border-color: rgba(250, 204, 21, 0.65); color: #fef08a; transform: translateY(-1px); }
.ltbc-nav-btn.active {
  background: linear-gradient(135deg, #991b1b 0%, #c2410c 52%, #d97706 100%);
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.ltbc-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ltbc-filter-pill {
  padding: 5px 11px;
  min-height: 32px;
  border-radius: 999px;
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.88);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 800;
  transition: all 0.14s ease;
}
.ltbc-filter-pill:hover { border-color: #fbbf24; color: #fef08a; }
.ltbc-filter-pill.active {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: #fef08a;
  color: #fff;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}

/* Campaign Split Layout: 5v5 Arena Stage + Winding Fortress War Map */
.ltbc-campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, 0.82fr);
  gap: 16px;
  align-items: start;
}
.ltbc-arena-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(250, 204, 21, 0.65);
  background: #050814;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6), 0 0 28px rgba(245, 158, 11, 0.16);
}
.ltbc-battle-canvas {
  display: block;
  width: 100%;
  height: 415px;
}
.ltbc-arena-top-overlay {
  position: absolute;
  top: 9px;
  left: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}
.ltbc-arena-stage-pill {
  background: rgba(9, 14, 31, 0.88);
  backdrop-filter: blur(6px);
  color: #fef08a;
  border: 1.5px solid rgba(250, 204, 21, 0.62);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.ltbc-arena-top-overlay button { pointer-events: auto; }
.ltbc-arena-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-ltbc-locked {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}
.ltbc-flex-input { flex: 1 1 180px; min-width: 0; width: 100%; }
.ltbc-counter-hint {
  font-size: 10.5px;
  color: #fde68a;
  background: rgba(9, 14, 31, 0.8);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.35);
}
.ltbc-arena-bottom-bar {
  position: absolute;
  bottom: 9px;
  left: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}
.ltbc-arena-bottom-bar button, .ltbc-speed-group { pointer-events: auto; }
.ltbc-speed-group {
  display: inline-flex;
  gap: 3px;
  background: rgba(9, 14, 31, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 3px;
  border-radius: 999px;
}
.ltbc-speed-btn {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
}
.ltbc-speed-btn.active { background: #f59e0b; color: #0f172a; }

.ltbc-synergy-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.48), rgba(124, 45, 18, 0.72));
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.58);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 800;
}

/* Winding Serpentine Fortress Road Map */
.ltbc-camp-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ltbc-warmap-box {
  background:
    radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(9, 13, 28, 0.98));
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.ltbc-road-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 455px;
  overflow-y: auto;
  padding: 6px 4px;
}
.ltbc-road-step {
  display: flex;
  flex-direction: column;
  position: relative;
}
.ltbc-road-step.is-right { align-items: flex-end; }
.ltbc-road-step.is-left { align-items: flex-start; }
.ltbc-road-conn {
  width: 44%;
  height: 18px;
  margin: 0 auto;
  border-left: 2.5px dashed rgba(250, 204, 21, 0.55);
  border-right: 2.5px dashed rgba(250, 204, 21, 0.55);
  opacity: 0.75;
}
.ltbc-fort-node {
  width: min(100%, 340px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.ltbc-fort-node:hover { border-color: #fbbf24; transform: translateY(-2px); }
.ltbc-fort-node.is-selected {
  border-color: #fde047;
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.72), rgba(15, 23, 42, 0.96));
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.38);
}
.ltbc-fort-node.is-cleared { border-color: rgba(52, 211, 153, 0.55); }
.ltbc-fort-node.is-locked { opacity: 0.5; filter: grayscale(0.5); }
.ltbc-fort-medallion {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.ltbc-fort-medallion img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
}
.ltbc-fort-num {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #0f172a;
  color: #fde047;
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 9.5px;
  font-weight: 900;
}
.ltbc-fort-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ltbc-fort-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 900; color: #fef08a; }
.ltbc-fort-boss { font-size: 11px; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltbc-fort-loot { font-size: 10px; color: #94a3b8; }
.ltbc-stage-prog-bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 2px; }
.ltbc-stage-prog-fill { height: 100%; background: linear-gradient(90deg, #10b981, #fde047); }

/* 5-Slot Tactical War Pedestals & Relic Strip */
.ltbc-deck-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.ltbc-deck-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.94));
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  min-width: 0;
}
.ltbc-deck-slot.filled {
  border-color: rgba(250, 204, 21, 0.65);
  background: linear-gradient(180deg, rgba(69, 26, 3, 0.56) 0%, rgba(15, 23, 42, 0.96) 100%);
}
.ltbc-deck-slot.empty {
  justify-content: center;
  align-items: center;
  text-align: center;
  border-style: dashed;
  color: #94a3b8;
  min-height: 132px;
  font-size: 11px;
  font-weight: 700;
}
.ltbc-pos-tag {
  font-size: 9.5px;
  font-weight: 900;
  color: #fde047;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 999px;
  padding: 2px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ltbc-deck-slot-body { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.ltbc-deck-slot img { width: 46px; height: 60px; object-fit: cover; object-position: top center; border-radius: 9px; border: 2px solid #fbbf24; flex-shrink: 0; }
.ltbc-deck-slot-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 11px; }
.ltbc-deck-slot-info b { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltbc-deck-slot-info span { color: #fde047; font-weight: 800; font-size: 10px; }
.ltbc-slot-btns { display: flex; gap: 4px; justify-content: flex-end; margin-top: auto; }
.ltbc-slot-mini-btn { border: 1px solid rgba(148, 163, 184, 0.4); background: rgba(30, 41, 59, 0.9); color: #f8fafc; border-radius: 6px; padding: 2px 8px; font-size: 10px; font-weight: 900; }
.ltbc-slot-remove { border: 1px solid rgba(244, 63, 94, 0.5); background: rgba(159, 18, 57, 0.65); color: #fecdd3; border-radius: 6px; padding: 2px 8px; font-weight: 900; font-size: 10px; }

.ltbc-equip-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ltbc-equip-box { background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.86)); border: 1.5px solid rgba(56, 189, 248, 0.42); border-radius: 13px; padding: 8px 11px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ltbc-equip-box select.input-h5 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ltbc-equip-thumb { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1.5px solid #38bdf8; flex-shrink: 0; }

/* Dragon Anvil Forge Panel */
.ltbc-forge-panel {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 48%, rgba(245, 158, 11, 0.22), transparent 52%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(28, 17, 46, 0.94));
  border: 1.5px solid rgba(250, 204, 21, 0.6);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  align-items: start;
}
.ltbc-anvil-stage {
  position: relative;
  padding: 8px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, rgba(251, 191, 36, 0.16), transparent 70%);
}
.ltbc-anvil-stage.is-burst .ltbc-card { animation: ltbcForgeBurst 0.85s ease; }
.ltbc-forge-block {
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 9px;
  color: #e2e8f0;
}
.ltbc-forge-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: #fef08a; }

/* Full-Art Ornate Sculpted 3D TCG Trading Cards (E -> S) */
.ltbc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 12px;
}
.ltbc-card {
  --c1: #38bdf8;
  --c2: #facc15;
  --c3: #ffffff;
  --evo-glow: 5px;
  position: relative;
  aspect-ratio: 3 / 4.22;
  border-radius: 15px;
  overflow: hidden;
  background: #060914;
  color: #f8fafc;
  border: 2.4px solid color-mix(in srgb, var(--c1) 66%, #94a3b8);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.58),
    0 0 var(--evo-glow) color-mix(in srgb, var(--c1) 52%, transparent),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.ltbc-card::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--c2) 44%, rgba(255, 255, 255, 0.18));
  pointer-events: none;
  z-index: 6;
}
.ltbc-card:hover {
  transform: perspective(720px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px) scale(1.02);
  border-color: var(--c1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.72), 0 0 calc(var(--evo-glow) + 12px) color-mix(in srgb, var(--c1) 75%, transparent);
}
.ltbc-card.is-tilting { transition: box-shadow 0.18s ease, border-color 0.18s ease; }
.ltbc-card.is-selected { outline: 2.5px solid #facc15; outline-offset: 2px; box-shadow: 0 0 26px rgba(250, 204, 21, 0.65); }
.ltbc-card.is-fodder { outline: 2.5px solid #22c55e; outline-offset: 2px; box-shadow: 0 0 22px rgba(34, 197, 94, 0.6); }
.ltbc-card.is-large { cursor: grab; width: 100%; }

/* 6 Tier Metallic Bezels */
.ltbc-grade-e { border-color: color-mix(in srgb, var(--c1) 45%, #b45309); }
.ltbc-grade-d { border-color: color-mix(in srgb, var(--c1) 55%, #10b981); }
.ltbc-grade-c { border-color: color-mix(in srgb, var(--c1) 68%, #0ea5e9); }
.ltbc-grade-b { border-width: 2.6px; border-color: color-mix(in srgb, var(--c1) 72%, #c084fc); }
.ltbc-grade-a { border-width: 2.8px; border-color: color-mix(in srgb, var(--c1) 72%, #fbbf24); }
.ltbc-vfx-a-glow, .ltbc-vfx-a-supreme {
  border-width: 3px;
  border-color: #fde047;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 22px color-mix(in srgb, var(--c1) 78%, transparent);
}
.ltbc-vfx-god-s { border-width: 3px; border-color: var(--c1, #fde047); animation: ltbcGodAura 3s ease-in-out infinite; }

.ltbc-card-art {
  position: relative;
  width: 100%;
  height: 100%;
  background: #080d1d;
  overflow: hidden;
}
.ltbc-card-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.28s ease, filter 0.28s ease;
}
.ltbc-card-top {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.ltbc-grade-pill {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.ltbc-g-E { background: linear-gradient(135deg, #78350f, #475569); border: 1px solid #cbd5e1; }
.ltbc-g-D { background: linear-gradient(135deg, #059669, #064e3b); border: 1px solid #6ee7b7; }
.ltbc-g-C { background: linear-gradient(135deg, #0284c7, #1e3a8a); border: 1px solid #7dd3fc; }
.ltbc-g-B { background: linear-gradient(135deg, #9333ea, #581c87); border: 1px solid #f0abfc; }
.ltbc-g-A { background: linear-gradient(135deg, #f59e0b, #9a3412); border: 1px solid #fef08a; }
.ltbc-g-S { background: linear-gradient(90deg, #dc2626, #f59e0b, #7c3aed); border: 1px solid #fef08a; }
.ltbc-fac-pill, .ltbc-deck-pill {
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.ltbc-deck-pill { background: linear-gradient(135deg, #16a34a, #15803d); border: 1px solid #86efac; margin-left: auto; }
.ltbc-fodder-pill { background: #15803d; border: 1px solid #86efac; color: #fff; font-size: 9.5px; font-weight: 900; padding: 2px 6px; border-radius: 999px; margin-left: auto; }

.ltbc-card-tools {
  position: absolute;
  top: 32px;
  right: 7px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ltbc-tool-chip {
  pointer-events: auto;
  border: 1px solid rgba(254, 240, 138, 0.65);
  background: rgba(6, 9, 20, 0.82);
  backdrop-filter: blur(4px);
  color: #fef08a;
  border-radius: 7px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
}
.ltbc-tool-chip:hover { background: #f59e0b; color: #0f172a; }
.ltbc-tool-chip.is-fodder-on { background: #16a34a; border-color: #bbf7d0; color: #fff; }

/* Integrated Full-Art Lower Plaque (Unobstructed Face Zone!) */
.ltbc-card-plaque {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  padding: 26px 8px 7px;
  background: linear-gradient(180deg, rgba(6, 9, 20, 0) 0%, rgba(6, 9, 20, 0.82) 34%, rgba(4, 6, 14, 0.98) 100%);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ltbc-card-stars {
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1;
}
.ltbc-stars-c1 { color: #fbbf24; }
.ltbc-stars-c2 { color: #6ee7b7; }
.ltbc-stars-c3 { color: #38bdf8; text-shadow: 0 0 6px rgba(56, 189, 248, 0.7); }
.ltbc-stars-c4 { color: #e879f9; text-shadow: 0 0 8px rgba(232, 121, 249, 0.8); }
.ltbc-stars-c5 { color: #fde047; text-shadow: 0 0 10px #f59e0b; }
.ltbc-card-name {
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px #000;
}
.ltbc-card-sub {
  font-size: 9.5px;
  font-weight: 800;
  color: #fde68a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ltbc-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 1px; }
.ltbc-stat-gem {
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 9.5px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}
.ltbc-stat-gem.atk { color: #fda4af; border-color: rgba(244, 63, 94, 0.38); }
.ltbc-stat-gem.def { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.38); }
.ltbc-binh-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.32);
  overflow: hidden;
  text-align: center;
}
.ltbc-binh-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #0284c7, #10b981); }
.ltbc-binh-bar.is-god .ltbc-binh-fill { width: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444, #9333ea); }
.ltbc-binh-bar span { position: relative; z-index: 2; font-size: 9px; font-weight: 900; color: #fff; line-height: 12px; }

/* Interactive 3D Card-Flip Summon Stage */
.ltbc-gacha-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ltbc-gacha-banner {
  border-radius: 16px;
  padding: 13px;
  background: linear-gradient(160deg, #1e293b 0%, #090d1a 100%);
  border: 2px solid rgba(148, 163, 184, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.ltbc-gacha-banner.is-silver { background: radial-gradient(circle at 85% 18%, rgba(56, 189, 248, 0.3), transparent 55%), linear-gradient(160deg, #0f172a, #082f49); border-color: #38bdf8; }
.ltbc-gacha-banner.is-gold { background: radial-gradient(circle at 85% 18%, rgba(250, 204, 21, 0.34), transparent 55%), linear-gradient(160deg, #451a03, #1e1b4b); border-color: #fde047; }
.ltbc-gacha-art-row { display: flex; align-items: center; gap: 10px; }
.ltbc-gacha-thumb { width: 56px; height: 74px; border-radius: 10px; object-fit: cover; object-position: top center; border: 2px solid #fde047; flex-shrink: 0; }

.ltbc-summon-stage {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(250, 204, 21, 0.22), rgba(4, 7, 18, 0.96));
  border: 2px solid #fbbf24;
  text-align: center;
}
.ltbc-summon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 168px)); gap: 12px; justify-content: center; margin-top: 10px; }
.ltbc-flip-scene { perspective: 900px; aspect-ratio: 3 / 4.22; }
.ltbc-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}
.ltbc-flip-card.is-flipped { transform: rotateY(180deg); cursor: default; }
.ltbc-flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 15px; overflow: hidden; }
.ltbc-flip-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 42%, rgba(250, 204, 21, 0.25), transparent 62%),
    linear-gradient(155deg, #450a0a 0%, #1e1b4b 55%, #090d1a 100%);
  border: 2.5px solid #fde047;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.45);
}
.ltbc-flip-back-seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #fde047;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.55);
}
.ltbc-flip-front { transform: rotateY(180deg); }
.ltbc-flip-front .ltbc-card { width: 100%; height: 100%; }

.ltbc-shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 10px; margin-top: 8px; }
.ltbc-shop-item { background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96)); border: 1.5px solid rgba(251, 191, 36, 0.38); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; justify-content: space-between; color: #f1f5f9; }
.ltbc-pvp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96)); border: 1.5px solid rgba(244, 63, 94, 0.35); border-radius: 13px; margin-bottom: 8px; }

/* Quests, Achievements & Live Dynasty Events */
.ltbc-ev-buff-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.72), rgba(124, 45, 18, 0.88));
  border: 1px solid rgba(251, 146, 60, 0.7);
  color: #fef08a;
}
.ltbc-ev-buff-pill.is-emerald {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.78), rgba(15, 118, 110, 0.85));
  border-color: rgba(52, 211, 153, 0.65);
  color: #a7f3d0;
}
.ltbc-ev-buff-pill.is-gold {
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.85), rgba(120, 53, 15, 0.92));
  border-color: #fde047;
  color: #fef08a;
}
.ltbc-qe-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 13px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(69, 10, 10, 0.75), rgba(30, 27, 75, 0.88));
  border: 1.5px solid rgba(250, 204, 21, 0.48);
}
.ltbc-qe-box {
  padding: 13px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: radial-gradient(circle at 85% 20%, rgba(250, 204, 21, 0.14), transparent 55%), linear-gradient(150deg, rgba(15, 23, 42, 0.95), rgba(9, 13, 28, 0.98));
  border: 1.5px solid rgba(250, 204, 21, 0.45);
}
.ltbc-qe-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ltbc-qe-chests-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ltbc-qe-chest {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
  color: #f1f5f9;
}
.ltbc-qe-chest.is-ready { border-color: #fde047; box-shadow: 0 0 18px rgba(250, 204, 21, 0.35); background: linear-gradient(145deg, rgba(120, 53, 15, 0.55), rgba(15, 23, 42, 0.94)); }
.ltbc-qe-chest.is-claimed { border-color: rgba(52, 211, 153, 0.42); opacity: 0.78; }
.ltbc-qe-chest-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: #fef08a; }
.ltbc-qe-pts-tag { font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(250, 204, 21, 0.5); color: #fde047; white-space: nowrap; }
.ltbc-qe-reward-line { font-size: 11px; font-weight: 800; color: #7dd3fc; }
.ltbc-qe-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ltbc-qe-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96));
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  color: #f8fafc;
}
.ltbc-qe-card.is-ready { border-color: #fde047; box-shadow: 0 0 16px rgba(250, 204, 21, 0.28); }
.ltbc-qe-card.is-done { border-color: rgba(52, 211, 153, 0.35); opacity: 0.75; }
.ltbc-qe-card-main { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.ltbc-qe-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(2, 6, 23, 0.72); border: 1px solid rgba(250, 204, 21, 0.42); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.ltbc-qe-title-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: #fff; }
.ltbc-qe-desc { font-size: 11px; color: #cbd5e1; margin: 2px 0 3px; }
.ltbc-qe-prog-wrap { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.ltbc-qe-prog-wrap .ltbc-stage-prog-bar { flex: 1; height: 6px; margin: 0; }
.ltbc-qe-prog-wrap span { font-size: 10.5px; font-weight: 800; color: #fde68a; white-space: nowrap; }
.ltbc-qe-card-act { flex-shrink: 0; }

.ltbc-carn-grid, .ltbc-evshop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.ltbc-carn-card, .ltbc-evshop-card {
  padding: 12px;
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.92), rgba(12, 18, 36, 0.98));
  border: 1.5px solid rgba(148, 163, 184, 0.34);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.ltbc-carn-card.is-grand {
  grid-column: 1 / -1;
  background: radial-gradient(circle at 18% 50%, rgba(250, 204, 21, 0.24), transparent 55%), linear-gradient(145deg, #451a03 0%, #1e1b4b 60%, #090d1a 100%);
  border: 2px solid #fde047;
}
.ltbc-carn-card.is-ready { border-color: #fde047; box-shadow: 0 0 18px rgba(250, 204, 21, 0.32); }
.ltbc-carn-card.is-done { border-color: rgba(52, 211, 153, 0.4); opacity: 0.8; }
.ltbc-carn-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ltbc-carn-body { display: flex; align-items: center; gap: 10px; }
.ltbc-carn-thumb { width: 54px; height: 70px; border-radius: 10px; object-fit: cover; object-position: top center; border: 2px solid #fbbf24; flex-shrink: 0; }
.ltbc-carn-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ltbc-carn-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 800;
}
.ltbc-carn-choice-btn img { width: 30px; height: 38px; border-radius: 6px; object-fit: cover; object-position: top center; border: 1px solid #fde047; }
.ltbc-carn-choice-btn.active { border-color: #fde047; background: rgba(180, 83, 9, 0.58); color: #fff; box-shadow: 0 0 14px rgba(250, 204, 21, 0.45); }

/* Leaderboard Top 3 Podium & Table */
.ltbc-podium-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ltbc-podium-card { padding: 12px 10px; border-radius: 14px; text-align: center; background: linear-gradient(160deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96)); border: 2px solid #94a3b8; }
.ltbc-podium-card.rank-1 { background: radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.32), transparent 65%), linear-gradient(160deg, #451a03, #0f172a); border-color: #fde047; }
.ltbc-podium-card.rank-2 { border-color: #e2e8f0; }
.ltbc-podium-card.rank-3 { border-color: #fb923c; }
.ltbc-rank-table { width: 100%; border-collapse: collapse; font-size: 12px; color: #e2e8f0; }
.ltbc-rank-table th { background: rgba(30, 41, 59, 0.95); color: #fde047; padding: 9px 10px; text-align: left; border-bottom: 1.5px solid rgba(250, 204, 21, 0.45); }
.ltbc-rank-table td { padding: 8px 10px; border-bottom: 1px solid rgba(148, 163, 184, 0.16); background: rgba(15, 23, 42, 0.72); }

/* Bespoke Per-Card Signature Elemental & Foil Layers (Center-Clear Face Protection!) */
.ltbc-sig-wrap { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.ltbc-sig-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 58% 52% at 50% 35%, transparent 54%, color-mix(in srgb, var(--c1) 24%, transparent) 88%, color-mix(in srgb, var(--c2) 38%, rgba(2, 6, 23, 0.55)) 100%); opacity: var(--sig-vig, 0.55); mix-blend-mode: screen; }
.ltbc-sig-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: var(--sig-op, 0.72); filter: drop-shadow(0 0 4px var(--c1)); }
.ltbc-sig-svg.is-blend-screen { mix-blend-mode: screen; }
.ltbc-sig-holo { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 32%), rgba(255, 255, 255, 0.34) 0%, color-mix(in srgb, var(--c1) 28%, transparent) 34%, color-mix(in srgb, var(--c2) 20%, transparent) 58%, transparent 76%); mix-blend-mode: screen; transition: opacity 0.2s ease; }
.ltbc-card:hover .ltbc-sig-holo, .ltbc-card.is-large .ltbc-sig-holo { opacity: var(--holo-op, 0.55); }
.ltbc-sig-sweep { position: absolute; top: -10%; left: 0; width: 42%; height: 120%; z-index: 4; pointer-events: none; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c3, #ffffff) 46%, transparent), transparent); opacity: 0; }
.ltbc-anim-orbit { transform-box: fill-box; transform-origin: center; animation: ltbcSigOrbit 11s linear infinite; }
.ltbc-anim-orbit-rev { transform-box: fill-box; transform-origin: center; animation: ltbcSigOrbitRev 14s linear infinite; }
.ltbc-anim-pulse { transform-box: fill-box; transform-origin: center; animation: ltbcSigPulse 2.6s ease-in-out infinite; }
.ltbc-anim-float-1 { animation: ltbcSigFloat 2.9s ease-in-out infinite; }
.ltbc-anim-float-2 { animation: ltbcSigFloat 3.4s ease-in-out 0.9s infinite; }
.ltbc-anim-float-3 { animation: ltbcSigFloat 3.1s ease-in-out 1.7s infinite; }
.ltbc-anim-slash-1 { stroke-dasharray: 160; animation: ltbcSigSlash 2.8s cubic-bezier(0.22, 1, 0.36, 1) infinite; }
.ltbc-anim-slash-2 { stroke-dasharray: 160; animation: ltbcSigSlash 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.45s infinite; }
.ltbc-anim-slash-3 { stroke-dasharray: 160; animation: ltbcSigSlash 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.9s infinite; }
.ltbc-anim-bolt-1 { animation: ltbcSigBolt 2.3s linear infinite; }
.ltbc-anim-bolt-2 { animation: ltbcSigBolt 2.7s linear 0.8s infinite; }
.ltbc-evo-1 { --evo-glow: 4px; --sig-op: 0.62; --sig-vig: 0.42; --holo-op: 0.35; }
.ltbc-evo-2 { --evo-glow: 8px; --sig-op: 0.76; --sig-vig: 0.56; --holo-op: 0.50; }
.ltbc-evo-3 { --evo-glow: 13px; --sig-op: 0.88; --sig-vig: 0.68; --holo-op: 0.68; }
.ltbc-evo-3 .ltbc-sig-sweep { opacity: 0.45; animation: ltbcGoldSweep 3.8s ease-in-out infinite; }
.ltbc-evo-4 { --evo-glow: 18px; --sig-op: 0.96; --sig-vig: 0.80; --holo-op: 0.82; }
.ltbc-evo-4 .ltbc-sig-sweep { opacity: 0.68; animation: ltbcGoldSweep 3.0s ease-in-out infinite; }
.ltbc-evo-5 { --evo-glow: 24px; --sig-op: 1; --sig-vig: 0.92; --holo-op: 0.95; }
.ltbc-evo-5 .ltbc-sig-sweep { opacity: 0.92; animation: ltbcGoldSweep 2.3s ease-in-out infinite; }
.ltbc-vfx-god-s .ltbc-sig-sweep { opacity: 1; animation: ltbcGoldSweep 2.0s ease-in-out infinite; }

.ltbc-codex-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: rgba(15, 23, 42, 0.92); border: 1.5px solid rgba(251, 191, 36, 0.42); border-radius: 13px; padding: 9px 12px; margin-bottom: 10px; }

/* Card Close-Up Showcase & Victory Spoils Loot Modal */
.ltbc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.ltbc-modal-box {
  width: 100%;
  max-width: 720px;
  max-height: min(92vh, 92dvh);
  border-radius: 18px;
  background: radial-gradient(circle at 22% 35%, rgba(245, 158, 11, 0.22), transparent 55%), linear-gradient(150deg, #0f172a 0%, #060914 100%);
  border: 2px solid #fde047;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.82);
  color: #f8fafc;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ltbc-modal-box > .card-header { position: sticky; top: 0; z-index: 10; background: linear-gradient(135deg, #450a0a, #7c2d12, #1e1b4b); border-bottom: 1.5px solid rgba(250, 204, 21, 0.5); }
.ltbc-modal-grid { display: grid; grid-template-columns: 245px 1fr; gap: 16px; padding: 16px; align-items: start; }
.ltbc-loot-rewards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0; }
.ltbc-loot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 148px)); gap: 10px; justify-content: center; margin-top: 10px; }

@media (min-width: 1280px) {
  .app-shell { max-width: 1380px; padding-left: 20px; padding-right: 20px; }
  .wardrobe-grid { grid-template-columns: 370px 1fr; gap: 16px; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 9px; max-height: min(56vh, 520px); }
  .ltbc-battle-canvas { height: 435px; }
  .ltbc-cards-grid { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 14px; }
  .ltbc-forge-panel { grid-template-columns: 270px 1fr; gap: 20px; padding: 18px; }
}

@media (max-width: 980px) {
  .lobby-clean-grid { grid-template-columns: 1fr; }
  .zone-world-hint { display: none; }
  .scene-caption { max-width: calc(100% - 20px); }
  .ltbc-campaign-layout { grid-template-columns: 1fr; }
  .ltbc-road-list { max-height: 360px; }
}

/* Unified Responsive Breakpoints (Tablet <= 860px, Compact Arena <= 680px, Mobile <= 600px) */
@media (max-width: 860px) {
  .hud-bar { position: relative; top: 0; }
  .wardrobe-grid, .farm-layout-grid, .farm-merchant-grid { grid-template-columns: 1fr; }
  .wardrobe-sticky {
    position: sticky;
    top: 6px;
    z-index: 25;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 24px rgba(12, 74, 110, 0.18);
  }
  .hd-podium { max-width: 540px; width: 100%; height: clamp(255px, 46vw, 305px); margin: 0 auto; }
  #tab-wardrobe .hd-podium { max-width: 100%; height: 192px; }
  .wardrobe-sticky .equipped-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-top: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .wardrobe-sticky .equipped-chips::-webkit-scrollbar { display: none; }
  .wardrobe-sticky .eq-chip { flex-shrink: 0; }
  .card-header { flex-wrap: wrap; }
  .item-grid { max-height: none; }
  .farm-top-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .farm-stove-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltbc-deck-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltbc-equip-strip { grid-template-columns: 1fr; }
  .ltbc-forge-panel, .ltbc-modal-grid { grid-template-columns: 1fr; }
  .ltbc-gacha-grid, .ltbc-podium-grid, .ltbc-qe-chests-grid, .ltbc-qe-list-grid { grid-template-columns: 1fr; }
  .ltbc-carn-grid, .ltbc-evshop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  input, select, textarea, .input-h5 { font-size: 16px; }
  .ltbc-arena-top-overlay {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    padding: 9px 10px;
    background: rgba(9, 14, 31, 0.96);
    border-bottom: 1px solid rgba(250, 204, 21, 0.3);
    pointer-events: auto;
  }
  .ltbc-arena-stage-pill {
    width: 100%;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    border-radius: 10px;
  }
  .ltbc-arena-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  #btnLtbcFightBoss { grid-column: 1 / -1; }
  .ltbc-arena-bottom-bar {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    padding: 7px 10px;
    background: rgba(9, 14, 31, 0.96);
    border-top: 1px solid rgba(250, 204, 21, 0.25);
    pointer-events: auto;
    justify-content: center;
  }
  .ltbc-counter-hint { font-size: 10px; padding: 2px 7px; text-align: center; }
  .ltbc-battle-canvas { height: 345px; }
  .app-shell { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .bottom-dock {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 3px;
    box-shadow: 0 -6px 22px rgba(15, 76, 129, 0.18);
  }
  .dock-btn { width: 100%; justify-content: center; min-height: 36px; padding: 6px 2px; font-size: 11px; }
  .ltbc-nav-short { display: inline; }
  .ltbc-nav-full { display: none; }
  .ltbc-top-hud {
    padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px;
    gap: 5px;
  }
  .ltbc-crest-emblem { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
  .ltbc-hud-title { font-size: 12px; }
  .ltbc-mini-exp-track, .ltbc-stat-pill.binh { display: none; }
  .ltbc-hud-left, .ltbc-hud-right { width: 100%; justify-content: space-between; gap: 4px; }
  .ltbc-stat-pill, .ltbc-cur-pill { padding: 2px 7px; font-size: 10.5px; }
  .ltbc-top-hud .btn-sm, .ltbc-btn-exit { padding: 3px 8px; font-size: 10.5px; min-height: 26px; }
  .ltbc-viewport { padding: 10px 9px 16px; }
  .ltbc-royal-dock {
    justify-content: center;
    gap: 4px;
    padding: 5px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .ltbc-nav-btn { font-size: 10.5px; padding: 4px 8px; min-height: 30px; border-radius: 9px; gap: 4px; }
}

@media (max-width: 600px) {
  .app-shell { padding: 8px 8px calc(74px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .hud-bar { position: relative; top: 0; padding: 7px 9px; gap: 6px; border-radius: 14px; }
  .hud-avatar-ring { width: 38px; height: 38px; }
  .hud-avatar-ring img { width: 42px; height: 42px; }
  .hud-name-row { font-size: 12.5px; flex-wrap: wrap; }
  .hud-substats { font-size: 10.5px; }
  .currency-chip { padding: 3px 7px; font-size: 10.5px; }
  .hud-drawer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body { padding: 9px; }
  .card-title { font-size: 12.5px; }
  .shop-subtabs { width: 100%; }
  .subtab-btn { flex: 1; text-align: center; padding: 5px 6px; font-size: 11px; }
  .hd-podium { max-width: 100%; height: clamp(245px, 68vw, 290px); }
  .wardrobe-sticky > .card-header { display: none; }
  .wardrobe-sticky > .card-body { padding: 6px 7px; }
  #tab-wardrobe .hd-podium { height: 162px; }
  #tab-wardrobe .podium-tag { font-size: 9.5px; padding: 2px 7px; }
  #tab-wardrobe .outfit-pill { bottom: 4px; left: 7px; right: 7px; font-size: 10px; padding: 2px 8px; }
  .wardrobe-sticky .tryon-bar { margin-top: 5px; padding: 6px 8px; font-size: 10.5px; }
  .wardrobe-sticky .tryon-bar-actions { margin-top: 4px; gap: 5px; }
  .wardrobe-sticky .tryon-bar-actions .btn { flex: 1; min-height: 29px; padding: 3px 6px; font-size: 10.5px; white-space: nowrap; }
  .wardrobe-sticky .eq-chip { font-size: 9.5px; padding: 2px 6px; }
  .slot-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .slot-tab { flex-shrink: 0; padding: 4px 9px; font-size: 11px; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: none; }
  .item-card { padding: 8px 6px; }
  .mannequin-box { width: 56px; height: 56px; }
  .mannequin-box.is-hd img { width: 48px; height: 48px; }
  .item-name { font-size: 11.5px; }
  .item-price { font-size: 10.5px; }
  .mixer-btn { padding: 3px 6px; font-size: 10.5px; }
  .mixer-btn img { width: 18px; height: 18px; }
  .inspect-body-grid { grid-template-columns: 1fr; }
  .city-grid { grid-template-columns: 1fr; }
  .zone-panel-grid, .pk-grid { grid-template-columns: 1fr; }
  .wheel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zone-world-canvas { height: 235px; }
  .scene-caption { font-size: 10px; padding: 2px 8px; }
  .item-buy-btn, .item-equip-btn, .item-sell-btn, .item-hunt-btn { font-size: 11px; padding: 5px 6px; min-height: 31px; }
  .item-stat-pill { font-size: 9.5px; padding: 2.5px 4px; gap: 2px 4px; }
  #wardrobePager { gap: 6px; }
  .wardrobe-pager-info { font-size: 10.5px; }
  .wardrobe-pager-nav .btn { padding: 4px 8px; font-size: 10.5px; min-height: 29px; }
  .quick-pill { flex: 0 0 auto; justify-content: center; font-size: 11.5px; padding: 5px 10px; }
  .db-status-chip { flex: 0 0 auto; justify-content: center; margin-left: 0; font-size: 11px; }
  .account-grid { grid-template-columns: 1fr; }
  .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grant-row { grid-template-columns: 1fr; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 3px; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs .slot-tab { flex: 0 0 auto; white-space: nowrap; }
  .adm-gm-filter-row, .adm-gm-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-gm-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 295px; }
  .adm-god-forge-layout { grid-template-columns: 1fr; }
  .dm-layout { grid-template-columns: 1fr; }
  .dm-list { flex-direction: row; overflow-x: auto; max-height: none; }
  .dm-contact { min-width: 145px; width: auto; }
  .caro-board { grid-template-columns: repeat(9, minmax(0, 31px)); gap: 2px; }
  .caro-cell { width: 31px; height: 31px; font-size: 13px; }
  .toast-float { top: 10px; right: 8px; left: 8px; align-items: center; }
  .farm-top-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .farm-world-canvas { height: 210px; }
  .farm-classic-sky { height: 82px; background-size: auto 92px; }
  .farm-yard-npc img { height: 36px; }
  .farm-plots-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 2px; }
  .farm-plot, .farm-plot-expand { min-height: 46px; }
  .farm-plot-img { width: 40px; height: 40px; }
  .farm-plot::before { width: 34px; height: 8px; }
  .farm-ranch-barn .farm-ranch-bg { height: 60px; }
  .farm-ranch-pond .farm-ranch-bg { height: 52px; }
  .farm-stove-grid { grid-template-columns: 1fr; }
  .farm-wheel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-3d-stage-wrap { height: 325px; }
  .boss-vs-hud-grid { grid-template-columns: 1fr; gap: 5px; }
  .boss-vs-divider { display: none; }
  .shenron-3d-viewport { height: 250px; }
  .shenron-tier-tabs, .shenron-wish-cards-grid, .school-opts-grid { grid-template-columns: 1fr; }
  .pet-lane-label { width: 98px; font-size: 10px; }
  .flea-item-card { flex-wrap: wrap; }
  .ltbc-carn-grid, .ltbc-evshop-grid { grid-template-columns: 1fr; }
  .ltbc-qe-card { flex-direction: column; align-items: stretch; }
  .ltbc-qe-card-act .btn { width: 100%; }
  .ltbc-deck-row { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ltbc-deck-row::-webkit-scrollbar { display: none; }
  .ltbc-deck-slot { flex: 0 0 212px; scroll-snap-align: start; min-height: 116px; }
  .ltbc-equip-strip { grid-template-columns: 1fr; }
  .ltbc-filter-bar, .ltbc-codex-bar > div:first-child { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; padding-bottom: 2px; gap: 5px; }
  .ltbc-filter-bar::-webkit-scrollbar, .ltbc-codex-bar > div:first-child::-webkit-scrollbar { display: none; }
  .ltbc-filter-pill { flex: 0 0 auto; }
  .ltbc-forge-card-col { width: 100%; max-width: 226px; margin: 0 auto; }
  .ltbc-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .ltbc-cards-grid .ltbc-card-top { top: 5px; left: 5px; right: 5px; gap: 3px; }
  .ltbc-cards-grid .ltbc-grade-pill { font-size: 9px; padding: 1.5px 5px; }
  .ltbc-cards-grid .ltbc-deck-pill, .ltbc-cards-grid .ltbc-fodder-pill { font-size: 8.5px; padding: 1.5px 5px; }
  .ltbc-cards-grid .ltbc-card-name { font-size: 11px; }
  .ltbc-cards-grid .ltbc-card-sub { display: none; }
  .ltbc-cards-grid .ltbc-stat-gem { font-size: 9.5px; padding: 2px 3px; }
  .ltbc-summon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltbc-fort-node { width: 100%; }
}

@media (max-width: 480px) {
  .hd-badge { display: none; }
}

@media (max-width: 350px) {
  .farm-plots-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ltbc-cards-grid { grid-template-columns: 1fr; }
}
