
:root {
    --tb-page: #05080d;
    --tb-card: #090d14;
    --tb-card-2: #0c111a;
    --tb-card-3: #0f151f;
    --tb-border: #2c333f;
    --tb-border-soft: #1b212b;
    --tb-text: #f5f7fb;
    --tb-text-soft: #a8b0bf;
    --tb-text-dim: #626c7d;
    --tb-gold: #f0c400;
    --tb-gold-2: #d9ab12;
    --tb-hex-bg: #05090f;
    --tb-hex-border: #1b2029;
    --tb-c1: #8b94a4;
    --tb-c2: #24b96c;
    --tb-c3: #2b9bff;
    --tb-c4: #bc65ff;
    --tb-c5: #f0c400;
    --tb-shadow: 0 18px 34px rgba(0,0,0,.42);
}

.tb-wrap {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--tb-page);
    color: var(--tb-text);
    border: 1px solid #131821;
    border-radius: 26px;
    overflow: hidden;
    max-width: 1650px;
    margin: 0 auto;
    box-shadow: var(--tb-shadow);
}
.tb-wrap * { box-sizing: border-box; }
.tb-wrap, .tb-wrap * { user-select: none; -webkit-user-select: none; }
.tb-wrap input, .tb-wrap textarea { user-select: text; -webkit-user-select: text; }
button, input, textarea { font: inherit; }

/* ============================================================
   MOBILE TOUCH FIX
   - touch-action:none trên các phần tử có thể KÉO -> chạm vào
     tướng/item/hex sẽ KHÔNG kích hoạt cuộn list & cuộn trang.
   - Người dùng vẫn cuộn list bình thường bằng cách chạm vào
     vùng trống của panel (panel cha vẫn auto-scroll).
   - Khi đang kéo, body thêm class .tb-dragging -> chặn mọi
     cử chỉ cuộn / refresh kéo xuống của trình duyệt.
   ============================================================ */
.tb-champ,
.tb-item,
.tb-hex,
.tb-hex-content,
.tb-hex-item-wrap {
    touch-action: none;
    -ms-touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
.tb-champ img,
.tb-item img,
.tb-hex img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}
body.tb-dragging,
body.tb-dragging .tb-wrap,
body.tb-dragging .tb-wrap * {
    touch-action: none !important;
    -ms-touch-action: none !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: auto;
}
body.tb-dragging {
    cursor: grabbing;
}
.tb-touch-ghost {
    /* dự phòng - inline style đã set position:fixed,
       class này để có thể override từ CSS nếu cần */
    pointer-events: none !important;
}

.tb-topbar {
    display: grid;
    grid-template-columns: 220px 1fr 180px;
    gap: 18px;
    align-items: center;
    padding: 18px 24px;
    background: #070b11;
    border-bottom: 1px solid var(--tb-border-soft);
}
.tb-topbar-left, .tb-topbar-center, .tb-topbar-right { display:flex; align-items:center; gap:10px; }
.tb-topbar-center { justify-content:center; flex-wrap: wrap; }
.tb-topbar-right { justify-content:flex-end; }
.tb-logo-mark { color: var(--tb-gold); font-size: 22px; line-height:1; filter: drop-shadow(0 0 8px rgba(240,196,0,.35)); }

.tb-pill, .tb-toggle-pill, .tb-icon-btn, .tb-btn {
    border: 2px solid var(--tb-border);
    background: #0c1118;
    color: var(--tb-text);
    border-radius: 999px;
    padding: 10px 18px;
    line-height: 1;
    cursor: pointer;
    transition: .16s ease;
    font-weight: 750;
}
.tb-pill:hover, .tb-toggle-pill:hover, .tb-icon-btn:hover, .tb-btn:hover { border-color:#566174; transform: translateY(-1px); }
.tb-pill-select { min-width: 130px; }

/* Select mùa: giữ giao diện pill nhưng vẫn hiện mũi tên thả xuống */
#tb-app.tb-wrap .tb-season-select {
    min-width: 130px;
    cursor: pointer;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: auto !important;
    padding-right: 24px;
}
#tb-app.tb-wrap .tb-season-select option {
    background: #101724;
    color: #e9edf5;
}

.tb-toggle-pill { display:inline-flex; align-items:center; gap:10px; color:#d7dce5; padding: 8px 16px; }
.tb-toggle-pill.is-on { border-color:#465266; background:#111721; }
.tb-toggle-dot { width:36px; height:18px; border-radius:999px; background:rgba(240,196,0,.35); position:relative; display:inline-block; }
.tb-toggle-dot::after { content:""; width:14px; height:14px; border-radius:50%; background:var(--tb-gold); position:absolute; top:2px; right:2px; transition:.16s ease; box-shadow:0 0 10px rgba(240,196,0,.45); }
.tb-toggle-pill:not(.is-on) .tb-toggle-dot { background:#242b36; }
.tb-toggle-pill:not(.is-on) .tb-toggle-dot::after { right:20px; background:#7b8495; box-shadow:none; }
.tb-icon-btn { width:44px; height:44px; padding:0; display:flex; align-items:center; justify-content:center; }
.tb-icon-btn-gold { background:linear-gradient(180deg,#ffdc28,#d7ab0e); color:#101010; border-color:#ffdc28; }

.tb-share, .tb-import-bar, .tb-json-bar { padding:14px 24px; border-bottom:1px solid var(--tb-border-soft); background:#0a0f17; }
.tb-share { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tb-share-label { color:#9df2b8; font-weight:800; }
.tb-share input, .tb-import-bar input, .tb-json-bar textarea, .tb-pool-search, .tb-items-search, .tb-augment-search {
    background:#070b11; border:2px solid var(--tb-border); color:var(--tb-text); border-radius:999px; padding:12px 16px; outline:none;
}
.tb-share input, .tb-import-bar input { flex:1; min-width:200px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tb-import-bar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tb-json-bar { display:none; gap:10px; flex-direction:column; }
.tb-json-bar.visible { display:flex; }
.tb-json-bar textarea { border-radius:16px; min-height:112px; resize:vertical; width:100%; }
.tb-json-bar-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tb-json-hint { color:var(--tb-text-dim); flex:1; font-size:12px; }
.tb-btn-sm { padding:8px 14px; font-size:13px; }
.tb-btn-gold { background:linear-gradient(180deg,#ffdc28,#d7ab0e); color:#111; border-color:#ffdc28; }
.tb-btn-danger { background:#170c12; color:#ff8d9a; border-color:#6f2530; }

.tb-main { display:grid; grid-template-columns: 300px minmax(0,1fr) 250px; gap:18px; padding:18px; background:radial-gradient(circle at center top, rgba(25,32,45,.33), transparent 42%), var(--tb-page); }
.tb-sidebar, .tb-center { min-width:0; display:flex; flex-direction:column; gap:18px; }
.tb-card { background:linear-gradient(180deg,rgba(12,17,25,.98),rgba(8,12,18,.98)); border:2px solid var(--tb-border); border-radius:30px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), var(--tb-shadow); }
.tb-card-title { padding:22px 22px 12px; color:#c8d1df; font-weight:900; font-size:16px; letter-spacing:.04em; }
.tb-card-body { padding:0 18px 18px; }
.tb-card-body-fill { min-height:560px; }
.tb-card-footer { border-top:1px solid rgba(255,255,255,.06); padding:14px 20px 18px; }
.tb-left-footer { display:flex; justify-content:center; gap:12px; align-items:center; color:#e7edf7; }
.tb-count-chip { display:inline-flex; align-items:center; gap:7px; font-weight:800; }
.tb-count-divider { color:#647083; }
.tb-empty-hint { color:var(--tb-text-dim); padding:26px 10px; text-align:center; font-size:13px; }

.tb-traits-list { display:flex; flex-direction:column; gap:10px; }
.tb-trait-row { background:#0d141f; border:1px solid var(--tb-border); border-radius:16px; padding:12px; display:flex; flex-direction:column; gap:8px; }
.tb-trait-row.active { border-color:rgba(240,196,0,.7); box-shadow:0 0 0 1px rgba(240,196,0,.16) inset; }
.tb-trait-top { display:flex; align-items:center; gap:10px; }
.tb-trait-icon { width:30px; height:30px; border-radius:8px; object-fit:cover; }
.tb-trait-name { flex:1; font-size:13px; font-weight:800; color:#eef3fb; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tb-trait-count { min-width:32px; height:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:#070b11; border:1px solid var(--tb-border); font-weight:800; }
.tb-trait-count.active { color:var(--tb-gold); border-color:rgba(240,196,0,.58); background:rgba(240,196,0,.1); }
.tb-trait-pips { display:flex; flex-wrap:wrap; gap:6px; padding-left:40px; }
.tb-trait-pip { width:10px; height:10px; border-radius:50%; background:#202938; border:1px solid #323c4c; }
.tb-trait-pip.filled { background:var(--tb-gold); border-color:var(--tb-gold); box-shadow:0 0 8px rgba(240,196,0,.4); }
.tb-trait-pip.tier-break { width:12px; height:12px; }

.tb-board-card { padding:14px 18px 18px; }
.tb-board-head { display:grid; grid-template-columns:120px 1fr 150px; align-items:center; min-height:52px; color:var(--tb-text-dim); font-size:12px; font-weight:900; letter-spacing:.16em; text-transform:uppercase; padding:4px 10px 10px; }
.tb-board-head-center { text-align:center; color:#f1f5fb; letter-spacing:normal; text-transform:none; font-size:17px; }
.tb-board-brand-right { text-align:right; }
.tb-board-wrap { min-height:610px; display:flex; align-items:center; justify-content:center; padding:12px 8px 20px; border-radius:26px; background:radial-gradient(circle at center, rgba(29,38,55,.34), transparent 44%), linear-gradient(180deg,#060a11,#03060a); border:1px solid rgba(255,255,255,.04); overflow:hidden; }
.tb-board { display:flex; flex-direction:column; gap:10px; transition:transform .22s ease; }
.tb-hex-row { display:flex; gap:12px; justify-content:center; }
.tb-hex-row.tb-hex-odd { margin-left:72px; }
.tb-hex { width:108px; height:118px; position:relative; cursor:pointer; flex-shrink:0; transition:transform .22s ease; }
.tb-hex::before { content:""; position:absolute; inset:0; clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); background:var(--tb-hex-border); transition:.16s ease; }
.tb-hex:hover::before { background:#2b3342; }
.tb-hex.tb-hex-selected::before { background:var(--tb-gold)!important; }
.tb-hex.tb-drag-over::before { background:#2d8cff!important; }
.tb-hex.tb-item-drag-over::before { background:#43b146!important; }
.tb-hex.tb-hex-cost-1::before { background:var(--tb-c1); }
.tb-hex.tb-hex-cost-2::before { background:var(--tb-c2); }
.tb-hex.tb-hex-cost-3::before { background:var(--tb-c3); }
.tb-hex.tb-hex-cost-4::before { background:var(--tb-c4); }
.tb-hex.tb-hex-cost-5::before { background:var(--tb-c5); }
.tb-hex-inner { position:absolute; inset:5px; clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); background:var(--tb-hex-bg); display:flex; align-items:center; justify-content:center; overflow:hidden; z-index:1; }
.tb-hex.tb-hex-filled .tb-hex-inner { background:#121a27; }
.tb-hex-content { width:100%; height:100%; position:relative; overflow:hidden; }
.tb-hex-content img.tb-hex-champ-img { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:118%; height:118%; object-fit:cover; pointer-events:none; }
.tb-hex-name { position:absolute; left:50%; bottom:22px; transform:translateX(-50%); max-width:82px; padding:3px 7px; border-radius:999px; background:rgba(0,0,0,.62); color:#fff; font-size:10px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; z-index:7; pointer-events:none; text-shadow:0 1px 2px rgba(0,0,0,.8); }
.tb-hide-board-names .tb-hex-name { display:none; }
.tb-enemy-mode .tb-board { transform:rotate(180deg); }
.tb-enemy-mode .tb-hex { transform:rotate(180deg); }
.tb-enemy-mode .tb-board-card { border-color:#5c3340; }
.tb-enemy-mode .tb-board-wrap { background:radial-gradient(circle at center, rgba(80,36,48,.22), transparent 44%), linear-gradient(180deg,#060a11,#03060a); }
.tb-hex-star-overlay { position:absolute; top:-8px; left:50%; transform:translateX(-50%); z-index:25; pointer-events:none; }
.tb-hex-star { display:flex; gap:1px; line-height:1; }
.tb-hex-star .tb-star-icon { font-size:17px; color:#ffdb4e; text-shadow:0 0 10px rgba(255,207,48,.55),0 2px 4px rgba(0,0,0,.8); }
.tb-hex-items-overlay { position:absolute; bottom:-4px; left:50%; transform:translateX(-50%); display:flex; z-index:20; }
.tb-hex-item-wrap { width:30px; height:34px; position:relative; margin:0 -1px; cursor:pointer; }
.tb-hex-item-bg, .tb-hex-item-inner { position:absolute; clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); }
.tb-hex-item-bg { inset:0; background:#22405a; }
.tb-hex-item-inner { inset:2px; background:#0a1118; overflow:hidden; }
.tb-hex-item-inner img { width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }

.tb-bottom-grid { display:grid; grid-template-columns:minmax(0,1fr) 390px; gap:18px; }
.tb-pool-card, .tb-items-card { padding:18px; min-height:290px; }
.tb-section-head { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:14px; }
.tb-section-kicker { color:var(--tb-text-dim); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.14em; }
.tb-section-title { font-size:18px; font-weight:900; color:#f5f7fb; }
.tb-pool-search-wrap { display:flex; align-items:center; gap:10px; flex:1; max-width:430px; }
.tb-pool-search { flex:1; min-width:0; }
.tb-search-shortcut { white-space:nowrap; color:#d9dee7; background:#151b25; border:1px solid var(--tb-border); border-radius:999px; padding:9px 12px; font-weight:800; font-size:12px; }
.tb-pool-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.tb-pool-top-filters, .tb-pool-type-tabs, .tb-item-tabs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tb-cost-btn, .tb-item-cat-btn { border:1px solid var(--tb-border); background:#101722; color:var(--tb-text-soft); border-radius:999px; padding:9px 14px; font-weight:800; cursor:pointer; transition:.16s ease; }
.tb-cost-btn:hover, .tb-item-cat-btn:hover { border-color:#566174; }
.tb-cost-btn.active, .tb-item-cat-btn.active { background:var(--tb-gold); border-color:var(--tb-gold); color:#111; }
.tb-muted-tab { appearance:none; -webkit-appearance:none; border:0; background:transparent; margin:0; padding:4px 2px; color:var(--tb-text-soft); opacity:.75; font:inherit; font-weight:800; font-size:13px; line-height:1.2; cursor:pointer; transition:color .16s ease, opacity .16s ease, transform .16s ease; }
.tb-muted-tab:hover { color:#fff; opacity:1; }
.tb-muted-tab:focus-visible { outline:2px solid rgba(245,200,66,.72); outline-offset:3px; border-radius:5px; }
.tb-active-tab { color:var(--tb-gold); opacity:1; }
.tb-pool { display:flex; flex-wrap:wrap; gap:10px; max-height:262px; overflow:auto; padding:3px 2px 3px 0; }
.tb-pool::-webkit-scrollbar, .tb-items-grid::-webkit-scrollbar, .tb-card-body-fill::-webkit-scrollbar, .tb-augment-list::-webkit-scrollbar { width:8px; height:8px; }
.tb-pool::-webkit-scrollbar-thumb, .tb-items-grid::-webkit-scrollbar-thumb, .tb-card-body-fill::-webkit-scrollbar-thumb, .tb-augment-list::-webkit-scrollbar-thumb { background:#2b3443; border-radius:999px; }
.tb-champ { width:62px; height:62px; border-radius:14px; border:2px solid #253144; overflow:hidden; cursor:grab; position:relative; transition:.14s ease; background:#0b1018; }
.tb-champ:hover { border-color:#fff; transform:translateY(-3px) scale(1.03); z-index:3; box-shadow:0 10px 16px rgba(0,0,0,.26); }
.tb-champ img { width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
.tb-champ-name { position:absolute; left:4px; right:4px; bottom:4px; background:rgba(0,0,0,.64); color:#fff; font-size:9px; font-weight:800; border-radius:999px; text-align:center; padding:2px 3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
.tb-champ-fb { display:none; width:100%; height:100%; align-items:center; justify-content:center; color:#9aa4b6; font-size:10px; }
.tb-champ .tb-champ-cost { display:none; }
.tb-champ.hidden { display:none; }
.tb-champ[data-cost="1"]{border-color:var(--tb-c1)} .tb-champ[data-cost="2"]{border-color:var(--tb-c2)} .tb-champ[data-cost="3"]{border-color:var(--tb-c3)} .tb-champ[data-cost="4"]{border-color:var(--tb-c4)} .tb-champ[data-cost="5"]{border-color:var(--tb-c5)}

.tb-items-head { align-items:flex-start; }
.tb-items-search { width:160px; padding:10px 13px; font-size:13px; }
.tb-item-tabs { margin-bottom:12px; }
.tb-item-cat-btn { padding:8px 10px; font-size:12px; }
.tb-items-grid { display:flex; flex-wrap:wrap; gap:8px; max-height:260px; overflow:auto; padding:2px 2px 2px 0; }
.tb-item { width:44px; height:44px; border-radius:10px; border:2px solid #283140; overflow:hidden; background:#0b1018; cursor:grab; transition:.14s ease; position:relative; }
.tb-item:hover { border-color:var(--tb-gold); transform:translateY(-2px) scale(1.04); }
.tb-item img { width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
.tb-item.active { border-color:var(--tb-gold); box-shadow:0 0 0 1px rgba(240,196,0,.22),0 0 14px rgba(240,196,0,.18); }
.tb-item.hidden { display:none; }

.tb-augment-card { padding-bottom:18px; position:relative; }
.tb-augment-slots { display:flex; flex-direction:column; gap:12px; padding:0 18px 12px; }
.tb-augment-slot { min-height:74px; border:2px dashed #343d4c; background:#090e15; color:#eaf0fa; border-radius:18px; display:flex; align-items:center; justify-content:center; gap:10px; cursor:pointer; font-size:28px; transition:.16s ease; padding:10px; }
.tb-augment-slot:hover { border-color:var(--tb-gold); color:var(--tb-gold); }
.tb-augment-slot.filled { justify-content:flex-start; border-style:solid; font-size:13px; color:#f4f7fb; background:linear-gradient(180deg,#111824,#0b1017); }
.tb-augment-icon { width:44px; height:44px; border-radius:12px; background:#151b25; object-fit:cover; flex-shrink:0; border:1px solid #303947; display:flex; align-items:center; justify-content:center; font-weight:900; color:var(--tb-gold); }
.tb-augment-meta { min-width:0; text-align:left; }
.tb-augment-name { font-weight:900; font-size:13px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
.tb-augment-tier { color:var(--tb-text-dim); font-size:11px; margin-top:4px; text-transform:capitalize; }
.tb-augment-picker { margin:0 18px; border:1px solid var(--tb-border); border-radius:18px; background:#060a10; padding:12px; box-shadow:0 16px 28px rgba(0,0,0,.38); }
.tb-augment-search { width:100%; padding:10px 13px; margin-bottom:10px; font-size:13px; }
.tb-augment-list { display:flex; flex-direction:column; gap:8px; max-height:320px; overflow:auto; padding-right:2px; }
.tb-augment-option { border:1px solid #232b37; background:#0d141e; color:#edf3fb; border-radius:14px; padding:10px; display:flex; align-items:center; gap:10px; cursor:pointer; text-align:left; }
.tb-augment-option:hover { border-color:var(--tb-gold); }
.tb-mini-tip { padding:0 18px 20px; color:var(--tb-text-soft); font-size:13px; line-height:1.5; }

body.tb-dragging { cursor:grabbing!important; }
body.tb-dragging .tb-champ, body.tb-dragging .tb-item, body.tb-dragging .tb-hex { cursor:grabbing!important; }
.tb-drag-ghost-lite { opacity:.9; background:#111722; border:2px solid var(--tb-gold); box-shadow:0 12px 24px rgba(0,0,0,.4); overflow:hidden; contain:layout paint style; }
.tb-drag-ghost-lite.is-item { width:46px; height:46px; border-radius:10px; }
.tb-drag-ghost-lite.is-unit { width:64px; height:64px; border-radius:14px; }
.tb-selected { display:flex; align-items:center; gap:10px; padding:14px 22px 20px; border-top:1px solid var(--tb-border-soft); background:#0b1018; flex-wrap:wrap; }
.tb-sel-info { flex:1; color:var(--tb-text-soft); }
.tb-sel-info b { color:var(--tb-gold); }

@media (max-width: 1460px) { .tb-main { grid-template-columns:270px minmax(0,1fr) 230px; } .tb-bottom-grid { grid-template-columns:minmax(0,1fr) 340px; } .tb-hex { width:96px; height:106px; } .tb-hex-row.tb-hex-odd { margin-left:64px; } .tb-board-wrap { min-height:560px; } }
@media (max-width: 1160px) { .tb-topbar { grid-template-columns:1fr; } .tb-topbar-left,.tb-topbar-center,.tb-topbar-right { justify-content:center; } .tb-main { grid-template-columns:1fr; } .tb-sidebar-left { order:2; } .tb-center { order:1; } .tb-sidebar-right { order:3; } .tb-card-body-fill { min-height:0; max-height:300px; overflow:auto; } .tb-augment-slots { flex-direction:row; } .tb-augment-slot { flex:1; min-height:66px; } }
@media (max-width: 920px) { .tb-bottom-grid { grid-template-columns:1fr; } .tb-items-search { width:100%; } .tb-section-head { align-items:flex-start; flex-direction:column; } .tb-pool-search-wrap { width:100%; max-width:none; } }
@media (max-width: 768px) { .tb-wrap { border-radius:20px; } .tb-main,.tb-topbar,.tb-share,.tb-import-bar,.tb-json-bar,.tb-selected { padding-left:12px; padding-right:12px; } .tb-board-card,.tb-pool-card,.tb-items-card { padding:12px; } .tb-board-head { grid-template-columns:1fr; gap:6px; text-align:center; } .tb-board-brand-right,.tb-board-brand-left { text-align:center; } .tb-board-wrap { min-height:auto; padding:10px 0 16px; } .tb-board { gap:6px; } .tb-hex-row { gap:6px; } .tb-hex-row.tb-hex-odd { margin-left:34px; } .tb-hex { width:64px; height:70px; } .tb-hex-inner { inset:3px; } .tb-hex-name { bottom:13px; max-width:50px; font-size:8px; padding:2px 4px; } .tb-hex-item-wrap { width:20px; height:22px; } .tb-hex-star .tb-star-icon { font-size:11px; } .tb-champ { width:50px; height:50px; border-radius:12px; } .tb-item { width:38px; height:38px; border-radius:8px; } .tb-augment-slots { flex-direction:column; } }
@media (max-width: 480px) { .tb-pill,.tb-toggle-pill,.tb-btn { padding:9px 13px; } .tb-icon-btn { width:40px; height:40px; } .tb-hex { width:48px; height:52px; } .tb-hex-row.tb-hex-odd { margin-left:26px; } .tb-hex-items-overlay { bottom:-1px; } .tb-hex-item-wrap { width:16px; height:18px; } .tb-search-shortcut { display:none; } .tb-pool-type-tabs { display:none; } }


/* ===== v2.2.2 Compact TFTAcademy-like sizing ===== */
.tb-wrap { max-width: 1220px; border-radius: 18px; }
.tb-topbar { padding: 12px 16px; gap: 12px; }
.tb-topbar-left, .tb-topbar-center, .tb-topbar-right { gap: 8px; }
.tb-logo-mark { width: 22px; height: 22px; font-size: 12px; }
.tb-pill, .tb-toggle-pill, .tb-icon-btn, .tb-btn { padding: 8px 14px; font-size: 13px; }
.tb-toggle-pill { padding: 7px 12px; }
.tb-toggle-dot { width: 30px; height: 16px; }
.tb-toggle-dot::after { width: 12px; height: 12px; top: 2px; right: 2px; }
.tb-icon-btn { width: 36px; height: 36px; }
.tb-share, .tb-import-bar, .tb-json-bar { padding: 10px 16px; }

.tb-main { grid-template-columns: 200px minmax(0, 1fr) 150px; gap: 12px; padding: 12px; }
.tb-sidebar { gap: 12px; }
.tb-card { border-radius: 20px; border-width: 1px; }
.tb-card-title { padding: 14px 14px 10px; font-size: 13px; }
.tb-card-body { padding: 0 12px 12px; }
.tb-card-body-fill { min-height: 360px; max-height: 360px; overflow: auto; }
.tb-card-body-center { min-height: 160px; padding: 8px 12px 14px; }
.tb-card-body-scroll { padding: 0 10px 10px; max-height: 280px; }
.tb-card-footer { padding: 10px 14px 12px; }
.tb-left-footer { gap: 10px; font-size: 13px; }
.tb-count-chip { gap: 6px; font-size: 13px; }
.tb-empty-hint { font-size: 12px; padding: 18px 8px; }

.tb-traits-list { gap: 6px; }
.tb-trait-row { border-radius: 12px; padding: 8px; gap: 6px; }
.tb-trait-icon { width: 24px; height: 24px; border-radius: 6px; }
.tb-trait-name { font-size: 12px; }
.tb-trait-count { min-width: 26px; height: 22px; padding: 0 8px; font-size: 11px; }
.tb-trait-pips { padding-left: 32px; gap: 5px; }
.tb-trait-pip { width: 8px; height: 8px; }
.tb-trait-pip.tier-break { width: 10px; height: 10px; }

.tb-board-card { padding: 8px 10px 10px; }
.tb-board-head { grid-template-columns: 90px 1fr 110px; min-height: 36px; padding: 2px 6px 8px; font-size: 10px; }
.tb-board-head-center { font-size: 13px; }
.tb-board-wrap { min-height: 390px; padding: 6px 4px 10px; border-radius: 18px; }
.tb-board { gap: 6px; }
.tb-hex-row { gap: 8px; }
.tb-hex-row.tb-hex-odd { margin-left: 52px; }
.tb-hex { width: 78px; height: 86px; }
.tb-hex-inner { inset: 4px; }
.tb-hex-content img.tb-hex-champ-img { width: 116%; height: 116%; }
.tb-hex-name { bottom: 15px; max-width: 64px; font-size: 8px; padding: 2px 4px; }
.tb-hex-star-overlay { top: -6px; }
.tb-hex-star .tb-star-icon { font-size: 13px; }
.tb-hex-items-overlay { bottom: -2px; }
.tb-hex-item-wrap { width: 22px; height: 25px; }

.tb-bottom-grid { grid-template-columns: minmax(0, 1fr) 282px; gap: 12px; }
.tb-pool-card, .tb-items-card { padding: 12px; min-height: 220px; }
.tb-section-head { gap: 10px; margin-bottom: 10px; }
.tb-section-kicker { font-size: 10px; }
.tb-section-title { font-size: 15px; }
.tb-pool-search-wrap { max-width: 300px; gap: 8px; }
.tb-pool-search, .tb-items-search, .tb-augment-search { padding: 9px 12px; border-radius: 12px; font-size: 12px; }
.tb-search-shortcut { padding: 7px 10px; font-size: 11px; }
.tb-pool-toolbar { gap: 8px; margin-bottom: 10px; }
.tb-pool-top-filters, .tb-pool-type-tabs, .tb-item-tabs { gap: 6px; }
.tb-cost-btn, .tb-item-cat-btn { padding: 7px 11px; font-size: 11px; }
.tb-muted-tab { font-size: 12px; }
.tb-pool { gap: 6px; max-height: 180px; }
.tb-champ { width: 46px; height: 46px; border-radius: 10px; }
.tb-champ-name { left: 2px; right: 2px; bottom: 2px; font-size: 7px; padding: 1px 2px; }

.tb-items-head { gap: 8px; }
.tb-items-search { width: 120px; }
.tb-item-tabs { margin-bottom: 8px; }
.tb-item-cat-btn { padding: 6px 8px; font-size: 11px; }
.tb-items-grid { gap: 6px; max-height: 180px; }
.tb-item { width: 34px; height: 34px; border-radius: 8px; }

.tb-augment-card { padding-bottom: 10px; }
.tb-augment-slots { gap: 8px; padding: 0 10px 8px; }
.tb-augment-slot { min-height: 52px; border-radius: 12px; font-size: 22px; padding: 8px; }
.tb-augment-icon { width: 32px; height: 32px; border-radius: 9px; }
.tb-augment-name { font-size: 11px; max-width: 90px; }
.tb-augment-tier { font-size: 10px; margin-top: 2px; }
.tb-augment-picker { margin: 0 10px; border-radius: 12px; padding: 10px; }
.tb-augment-list { gap: 6px; max-height: 220px; }
.tb-augment-option { border-radius: 10px; padding: 8px; gap: 8px; }
.tb-mini-tip { padding: 0 12px 12px; font-size: 11px; }

.tb-drag-ghost-lite.is-item { width: 38px; height: 38px; border-radius: 8px; }
.tb-drag-ghost-lite.is-unit { width: 50px; height: 50px; border-radius: 10px; }
.tb-selected { padding: 10px 16px 12px; }
.tb-sel-info { font-size: 12px; }

@media (max-width: 1160px) {
  .tb-main { grid-template-columns: 1fr; }
  .tb-bottom-grid { grid-template-columns: 1fr; }
  .tb-card-body-fill { max-height: 280px; min-height: 0; }
}
@media (max-width: 768px) {
  .tb-wrap { max-width: 100%; border-radius: 14px; }
  .tb-main, .tb-topbar, .tb-share, .tb-import-bar, .tb-json-bar, .tb-selected { padding-left: 10px; padding-right: 10px; }
  .tb-board-wrap { min-height: auto; }
  .tb-hex { width: 58px; height: 64px; }
  .tb-hex-row { gap: 6px; }
  .tb-hex-row.tb-hex-odd { margin-left: 34px; }
  .tb-hex-item-wrap { width: 18px; height: 20px; }
  .tb-champ { width: 42px; height: 42px; }
  .tb-item { width: 32px; height: 32px; }
}


/* ===== v2.2.3 Bottom panels full-spread ===== */
.tb-bottom-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1.08fr) !important;
  gap: 12px;
  align-items: stretch;
}
.tb-pool-card,
.tb-items-card {
  width: 100%;
  min-width: 0;
  align-self: stretch;
}
.tb-section-head {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: end;
  column-gap: 12px;
  row-gap: 8px;
}
.tb-pool-search-wrap {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}
.tb-items-head {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: end;
}
.tb-items-search {
  width: 100%;
  min-width: 0;
}
.tb-pool-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
}
.tb-pool-type-tabs {
  justify-content: flex-end;
}
.tb-item-tabs {
  justify-content: flex-start;
  width: 100%;
}
.tb-pool,
.tb-items-grid {
  width: 100%;
  align-content: flex-start;
}
.tb-items-grid {
  padding-right: 0;
}

@media (max-width: 1160px) {
  .tb-bottom-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 920px) {
  .tb-section-head,
  .tb-items-head,
  .tb-pool-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .tb-pool-type-tabs {
    justify-content: flex-start;
  }
}


/* ===== v2.2.4 Longer bottom panels ===== */
.tb-bottom-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) !important;
  gap: 14px !important;
}
.tb-pool-card,
.tb-items-card {
  min-height: 300px !important;
}
.tb-pool-card {
  min-height: 320px !important;
}
.tb-items-card {
  min-height: 320px !important;
}
.tb-pool {
  max-height: 240px !important;
  min-height: 240px;
}
.tb-items-grid {
  max-height: 240px !important;
  min-height: 240px;
}
.tb-section-head {
  margin-bottom: 12px !important;
}
.tb-pool-toolbar {
  margin-bottom: 12px !important;
}
.tb-items-head {
  margin-bottom: 10px !important;
}

@media (max-width: 1360px) {
  .tb-bottom-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) !important;
  }
}
@media (max-width: 1160px) {
  .tb-bottom-grid {
    grid-template-columns: 1fr !important;
  }
  .tb-pool,
  .tb-items-grid {
    min-height: 220px;
    max-height: 220px !important;
  }
}
@media (max-width: 768px) {
  .tb-pool-card,
  .tb-items-card {
    min-height: 260px !important;
  }
  .tb-pool,
  .tb-items-grid {
    min-height: 190px;
    max-height: 190px !important;
  }
}


/* ===== v2.2.5 TRUE full-width bottom panels =====
   Add Units + Item List now span the whole builder width, not only the center board column. */
@media (min-width: 1161px) {
  .tb-main {
    grid-template-columns: 200px minmax(0, 1fr) 150px !important;
    grid-template-rows: auto auto !important;
    align-items: start;
  }

  .tb-center {
    display: contents !important;
  }

  .tb-sidebar-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .tb-board-card {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100%;
  }

  .tb-sidebar-right {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .tb-bottom-grid {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    margin-top: 0 !important;
  }

  .tb-pool-card,
  .tb-items-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 320px !important;
  }

  .tb-pool {
    width: 100% !important;
    max-height: 244px !important;
    min-height: 244px !important;
  }

  .tb-items-grid {
    width: 100% !important;
    max-height: 244px !important;
    min-height: 244px !important;
  }

  .tb-pool-search-wrap,
  .tb-items-search {
    max-width: none !important;
    width: 100% !important;
  }
}

@media (max-width: 1160px) {
  .tb-center {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .tb-bottom-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ===== v2.2.6 Bloghash theme hard override =====
   Bloghash theme resets global input[type=text/search] padding, border and shadow.
   Keep all builder form controls scoped and loaded after theme CSS. */
#tb-app.tb-wrap input,
#tb-app.tb-wrap textarea,
#tb-app.tb-wrap button {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  box-sizing: border-box !important;
  text-shadow: none !important;
}

#tb-app.tb-wrap input[type="text"],
#tb-app.tb-wrap input[type="search"],
#tb-app.tb-wrap textarea,
#tb-app.tb-wrap .tb-pool-search,
#tb-app.tb-wrap .tb-items-search,
#tb-app.tb-wrap .tb-augment-search,
#tb-app.tb-wrap #tb-search,
#tb-app.tb-wrap #tb-import-input,
#tb-app.tb-wrap #tb-share-code,
#tb-app.tb-wrap #tb-json-input {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 2px solid #323b4d !important;
  border-radius: 12px !important;
  background: #070b11 !important;
  background-image: none !important;
  color: #e9eef8 !important;
  outline: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
  letter-spacing: 0 !important;
}

#tb-app.tb-wrap textarea,
#tb-app.tb-wrap #tb-json-input {
  height: auto !important;
  min-height: 110px !important;
  line-height: 1.5 !important;
  padding: 12px 14px !important;
  resize: vertical !important;
}

#tb-app.tb-wrap .tb-pool-search:focus,
#tb-app.tb-wrap .tb-items-search:focus,
#tb-app.tb-wrap .tb-augment-search:focus,
#tb-app.tb-wrap input[type="text"]:focus,
#tb-app.tb-wrap input[type="search"]:focus,
#tb-app.tb-wrap textarea:focus {
  border-color: #f0c400 !important;
  background: #080d14 !important;
  box-shadow: 0 0 0 3px rgba(240,196,0,.13), inset 0 0 0 1px rgba(255,255,255,.03) !important;
}

#tb-app.tb-wrap .tb-pool-search::placeholder,
#tb-app.tb-wrap .tb-items-search::placeholder,
#tb-app.tb-wrap .tb-augment-search::placeholder,
#tb-app.tb-wrap input::placeholder,
#tb-app.tb-wrap textarea::placeholder {
  color: #7f889b !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

#tb-app.tb-wrap input:-webkit-autofill,
#tb-app.tb-wrap input:-webkit-autofill:hover,
#tb-app.tb-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e9eef8 !important;
  -webkit-box-shadow: 0 0 0 1000px #070b11 inset !important;
  caret-color: #f0c400 !important;
  border-color: #323b4d !important;
}

#tb-app.tb-wrap .tb-pool-search-wrap,
#tb-app.tb-wrap .tb-items-head,
#tb-app.tb-wrap .tb-section-head {
  min-width: 0 !important;
}

#tb-app.tb-wrap .tb-search-shortcut {
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 13px !important;
}

#tb-app.tb-wrap button,
#tb-app.tb-wrap .tb-cost-btn,
#tb-app.tb-wrap .tb-item-cat-btn,
#tb-app.tb-wrap .tb-pill,
#tb-app.tb-wrap .tb-toggle-pill,
#tb-app.tb-wrap .tb-icon-btn,
#tb-app.tb-wrap .tb-btn {
  -webkit-appearance: none !important;
  appearance: none !important;
  border-style: solid !important;
  text-decoration: none !important;
  box-shadow: none !important;
}


/* ===== v2.2.7 SVG icons + Vietnamese UI hardening ===== */
#tb-app.tb-wrap .tb-icon-btn {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  line-height: 1 !important;
  color: #e8edf7 !important;
  overflow: hidden !important;
}
#tb-app.tb-wrap .tb-icon-btn-gold {
  color: #111 !important;
}
#tb-app.tb-wrap .tb-icon-svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  flex: 0 0 auto !important;
  pointer-events: none !important;
}
#tb-app.tb-wrap .tb-icon-text {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  line-height: 1 !important;
  pointer-events: none !important;
}
/* Icon button that has a text label next to its icon (e.g. the Share button).
   Overrides the fixed 44×44 square sizing so the button auto-fits both icon + label. */
#tb-app.tb-wrap .tb-icon-btn-with-label {
  width: auto !important;
  min-width: 44px !important;
  padding: 0 12px 0 10px !important;
  gap: 7px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
#tb-app.tb-wrap .tb-icon-btn-label {
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  line-height: 1 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}
@media (max-width: 480px) {
  #tb-app.tb-wrap .tb-icon-btn-with-label { padding: 0 10px 0 8px !important; gap: 5px !important; }
  #tb-app.tb-wrap .tb-icon-btn-label { font-size: 11px !important; }
}
#tb-app.tb-wrap .tb-logo-mark {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: -.03em !important;
}
#tb-app.tb-wrap .tb-close-btn {
  min-width: 34px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}
#tb-app.tb-wrap .tb-count-label {
  color: #aeb7c7 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}
#tb-app.tb-wrap .tb-selected .tb-btn,
#tb-app.tb-wrap .tb-share .tb-btn,
#tb-app.tb-wrap .tb-import-bar .tb-btn,
#tb-app.tb-wrap .tb-json-bar .tb-btn {
  font-weight: 800 !important;
}


/* ===== v2.2.8: tên tướng chỉ hiện trên bàn cờ, không hiện trong bảng Tướng ===== */
.tb-wrap .tb-pool .tb-champ-name,
.tb-wrap .tb-champ .tb-champ-name {
  display: none !important;
}
.tb-wrap.tb-hide-board-names .tb-hex-name {
  display: none !important;
}
.tb-wrap.tb-hide-names .tb-champ-name {
  display: none !important;
}


/* ===== v2.2.9 Item category tabs synced with Trang Bị plugin ===== */
.tb-wrap .tb-item.hidden { display: none !important; }
.tb-wrap .tb-item-tabs { align-items: center; }
.tb-wrap .tb-item-cat-btn { white-space: nowrap; }
.tb-wrap .tb-items-grid { align-content: flex-start; }


/* ===== v2.3.0 Sidebar cleanup + 4 augment slots ===== */
#tb-app.tb-wrap .tb-sidebar-right {
  align-self: start !important;
}

#tb-app.tb-wrap .tb-augment-card {
  padding-bottom: 14px !important;
}

#tb-app.tb-wrap .tb-augment-slots {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 10px 12px !important;
}

#tb-app.tb-wrap .tb-augment-slot,
#tb-app.tb-wrap .tb-augment-option {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  text-align: left !important;
}

#tb-app.tb-wrap .tb-augment-slot {
  min-height: 62px !important;
  border-radius: 14px !important;
  padding: 9px 10px !important;
}

#tb-app.tb-wrap .tb-augment-slot:not(.filled) {
  justify-content: center !important;
  font-size: 22px !important;
  color: #aeb7c7 !important;
}

#tb-app.tb-wrap .tb-augment-slot.filled {
  border-style: solid !important;
  background: linear-gradient(180deg, #111824, #0b1017) !important;
}

#tb-app.tb-wrap .tb-augment-slot.filled:hover,
#tb-app.tb-wrap .tb-augment-option:hover {
  border-color: var(--tb-gold) !important;
  box-shadow: 0 0 0 1px rgba(240,196,0,.18), 0 0 16px rgba(240,196,0,.10) !important;
}

#tb-app.tb-wrap .tb-augment-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  flex: 0 0 38px !important;
}

#tb-app.tb-wrap .tb-augment-meta {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
}

#tb-app.tb-wrap .tb-augment-name {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
}

#tb-app.tb-wrap .tb-augment-tier {
  display: none !important;
}

#tb-app.tb-wrap .tb-tip-card {
  display: none !important;
}

#tb-app.tb-wrap .tb-section-head > div:empty {
  display: none !important;
}

@media (max-width: 1160px) {
  #tb-app.tb-wrap .tb-augment-slots {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
  #tb-app.tb-wrap .tb-augment-slot {
    flex: 1 1 calc(50% - 10px) !important;
  }
}

@media (max-width: 768px) {
  #tb-app.tb-wrap .tb-augment-slots {
    flex-direction: column !important;
  }
  #tb-app.tb-wrap .tb-augment-slot {
    flex-basis: auto !important;
  }
}

/* Wider right sidebar so augment names do not spill into the board area */
@media (min-width: 1161px) {
  #tb-app.tb-wrap .tb-main {
    grid-template-columns: 200px minmax(0, 1fr) 190px !important;
  }
}


/* ===== v2.3.6 star badge style sync ===== */
.tb-hex-star-overlay {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: none;
}
.tb-hex-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tb-hex-star-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 38px;
  height: 18px;
  padding: 0 9px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffd93d 0%, #f4bf00 100%);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, .42),
    0 0 10px rgba(255, 211, 61, .28),
    inset 0 1px 0 rgba(255,255,255,.22);
}
.tb-hex-star.star-2 .tb-hex-star-badge {
  min-width: 30px;
  padding: 0 8px;
}
.tb-hex-star.star-3 .tb-hex-star-badge {
  min-width: 42px;
  padding: 0 10px;
}
.tb-hex-star .tb-star-icon {
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  color: #050505;
  text-shadow: none;
}

.tb-hex-items-overlay {
  bottom: -1px;
  gap: 1px;
}
.tb-hex-item-wrap {
  width: 20px;
  height: 22px;
  margin: 0 -1px;
}
.tb-hex-item-inner {
  inset: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tb-hex-item-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@media (max-width: 768px) {
  .tb-hex-star-overlay { top: -3px; }
  .tb-hex-star-badge {
    height: 16px;
    min-width: 34px;
    padding: 0 8px;
    border-radius: 5px;
  }
  .tb-hex-star.star-2 .tb-hex-star-badge {
    min-width: 28px;
    padding: 0 7px;
  }
  .tb-hex-star.star-3 .tb-hex-star-badge {
    min-width: 38px;
    padding: 0 8px;
  }
  .tb-hex-star .tb-star-icon { font-size: 11px; }
  .tb-hex-item-wrap {
    width: 16px;
    height: 18px;
  }
}


/* ===== v2.3.4 keep champion border color stable on click ===== */
.tb-hex.tb-hex-selected {
  filter: none !important;
}
.tb-hex.tb-hex-selected::before {
  background: var(--tb-hex-border) !important;
}
.tb-hex.tb-hex-selected.tb-hex-cost-1::before { background: var(--tb-c1) !important; }
.tb-hex.tb-hex-selected.tb-hex-cost-2::before { background: var(--tb-c2) !important; }
.tb-hex.tb-hex-selected.tb-hex-cost-3::before { background: var(--tb-c3) !important; }
.tb-hex.tb-hex-selected.tb-hex-cost-4::before { background: var(--tb-c4) !important; }
.tb-hex.tb-hex-selected.tb-hex-cost-5::before { background: var(--tb-c5) !important; }


/* ===== v2.3.7 crisp board item icons ===== */
.tb-hex-items-overlay {
  bottom: -2px !important;
  gap: 0 !important;
  align-items: center !important;
}
.tb-hex-item-wrap {
  width: 24px !important;
  height: 27px !important;
  margin: 0 -1px !important;
  flex: 0 0 auto !important;
}
.tb-hex-item-bg,
.tb-hex-item-inner {
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%) !important;
}
.tb-hex-item-bg {
  inset: 0 !important;
}
.tb-hex-item-inner {
  inset: 1px !important;
  background: #080d14 !important;
  overflow: hidden !important;
}
.tb-hex-item-inner img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  image-rendering: auto !important;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: none !important;
}

/* Keep 3 items fitting neatly on compact boards */
@media (max-width: 768px) {
  .tb-hex-items-overlay { bottom: -1px !important; }
  .tb-hex-item-wrap {
    width: 18px !important;
    height: 21px !important;
    margin: 0 -1px !important;
  }
  .tb-hex-item-inner { inset: 1px !important; }
}


/* ===== v2.3.9 board item spacing + fill ===== */
.tb-hex-items-overlay {
  bottom: -2px !important;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px !important;
  z-index: 20;
}
.tb-hex-item-wrap {
  width: 23px !important;
  height: 26px !important;
  position: relative;
  margin: 0 1px !important;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.tb-hex-item-bg,
.tb-hex-item-inner {
  position: absolute;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
}
.tb-hex-item-bg {
  inset: 0;
}
.tb-hex-item-inner {
  inset: 1px !important;
  background: #101722 !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.tb-hex-item-inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
  pointer-events: none;
  transform: translateZ(0);
  image-rendering: auto;
}

@media (max-width: 768px) {
  .tb-hex-items-overlay {
    bottom: -1px !important;
    gap: 2px !important;
  }
  .tb-hex-item-wrap {
    width: 20px !important;
    height: 22px !important;
    margin: 0 1px !important;
  }
  .tb-hex-item-inner {
    inset: 1px !important;
  }
  .tb-hex-item-inner img {
    width: 100% !important;
    height: 100% !important;
  }
}

@media (max-width: 480px) {
  .tb-hex-item-wrap {
    width: 17px !important;
    height: 19px !important;
    margin: 0 1px !important;
  }
}


/* ===== v2.4.0 board item final polish ===== */
.tb-hex-items-overlay {
  bottom: -2px !important;
  gap: 2px !important;
}
.tb-hex-item-wrap {
  width: 24px !important;
  height: 27px !important;
  margin: 0 1px !important;
}
.tb-hex-items-overlay .tb-hex-item-wrap:first-child:not(:last-child),
.tb-hex-items-overlay .tb-hex-item-wrap:last-child:not(:first-child) {
  transform: translateY(-3px);
}
.tb-hex-item-inner {
  inset: 2px !important;
}
.tb-hex-item-inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 768px) {
  .tb-hex-items-overlay {
    gap: 2px !important;
  }
  .tb-hex-item-wrap {
    width: 21px !important;
    height: 23px !important;
    margin: 0 1px !important;
  }
  .tb-hex-items-overlay .tb-hex-item-wrap:first-child:not(:last-child),
  .tb-hex-items-overlay .tb-hex-item-wrap:last-child:not(:first-child) {
    transform: translateY(-2px);
  }
  .tb-hex-item-inner {
    inset: 2px !important;
  }
}

@media (max-width: 480px) {
  .tb-hex-item-wrap {
    width: 18px !important;
    height: 20px !important;
  }
}


/* ===== v2.4.1 five augment slots ===== */
#tb-app.tb-wrap .tb-augment-slots {
  gap: 9px !important;
}
#tb-app.tb-wrap .tb-augment-slot {
  min-height: 58px !important;
}
@media (max-width: 1160px) {
  #tb-app.tb-wrap .tb-augment-slot {
    flex: 1 1 calc(50% - 9px) !important;
  }
}


/* ===== v2.4.3 fix board brand wrapping ===== */
#tb-app.tb-wrap .tb-board-brand {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  line-height: 1.05 !important;
}

@media (min-width: 769px) {
  #tb-app.tb-wrap .tb-board-head {
    grid-template-columns: minmax(142px, auto) minmax(0, 1fr) minmax(130px, auto) !important;
    column-gap: 10px !important;
  }
  #tb-app.tb-wrap .tb-board-brand-left {
    min-width: 142px !important;
    font-size: 10px !important;
    letter-spacing: .105em !important;
  }
  #tb-app.tb-wrap .tb-board-brand-right {
    min-width: 130px !important;
    font-size: 10px !important;
    letter-spacing: .105em !important;
  }
  #tb-app.tb-wrap .tb-board-head-center {
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 768px) {
  #tb-app.tb-wrap .tb-board-head {
    grid-template-columns: 1fr !important;
  }
  #tb-app.tb-wrap .tb-board-brand {
    max-width: 100% !important;
    font-size: 10px !important;
    letter-spacing: .1em !important;
  }
}


/* ===== v2.4.4 mobile board layout closer to TFTAcademy (board only) ===== */
@media (max-width: 768px) {
  #tb-app.tb-wrap {
    --tb-mobile-hex: clamp(38px, 10.4vw, 48px);
    --tb-mobile-board-gap: clamp(4px, 1.45vw, 7px);
    --tb-mobile-item-w: clamp(12px, 3.2vw, 15px);
    --tb-mobile-item-h: clamp(14px, 3.6vw, 17px);
  }

  #tb-app.tb-wrap .tb-board-card {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #tb-app.tb-wrap .tb-board-head {
    display: none !important;
  }

  #tb-app.tb-wrap .tb-board-wrap {
    position: relative !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 18px 14px !important;
    border-radius: 28px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    background: linear-gradient(180deg, #060b12 0%, #03070c 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 10px 28px rgba(0,0,0,.28) !important;
    overflow: hidden !important;
  }

  #tb-app.tb-wrap .tb-board {
    gap: var(--tb-mobile-board-gap) !important;
  }

  #tb-app.tb-wrap .tb-hex-row {
    gap: var(--tb-mobile-board-gap) !important;
    justify-content: center !important;
  }

  #tb-app.tb-wrap .tb-hex-row.tb-hex-odd {
    margin-left: calc(var(--tb-mobile-hex) * 0.58) !important;
  }

  #tb-app.tb-wrap .tb-hex {
    width: var(--tb-mobile-hex) !important;
    height: calc(var(--tb-mobile-hex) * 1.12) !important;
  }

  #tb-app.tb-wrap .tb-hex-inner {
    inset: 3px !important;
  }

  #tb-app.tb-wrap .tb-hex-content img.tb-hex-champ-img {
    width: 118% !important;
    height: 118% !important;
  }

  #tb-app.tb-wrap .tb-hex-name {
    bottom: calc(var(--tb-mobile-hex) * 0.16) !important;
    max-width: calc(var(--tb-mobile-hex) * 0.92) !important;
    font-size: 7px !important;
    padding: 1px 3px !important;
  }

  #tb-app.tb-wrap .tb-hex-star-overlay {
    top: -4px !important;
  }

  #tb-app.tb-wrap .tb-hex-star .tb-star-icon {
    font-size: 10px !important;
  }

  #tb-app.tb-wrap .tb-hex-items-overlay {
    bottom: -1px !important;
  }

  #tb-app.tb-wrap .tb-hex-item-wrap {
    width: var(--tb-mobile-item-w) !important;
    height: var(--tb-mobile-item-h) !important;
  }

  #tb-app.tb-wrap .tb-hex-item-inner {
    inset: 1px !important;
  }
}

@media (max-width: 420px) {
  #tb-app.tb-wrap .tb-board-wrap {
    padding: 15px 10px !important;
    border-radius: 24px !important;
  }
}


/* ===== v2.4.5 mobile board width + hex fit tuning ===== */
@media (max-width: 768px) {
  #tb-app.tb-wrap {
    --tb-mobile-hex: clamp(36px, 9.35vw, 42px);
    --tb-mobile-board-gap: clamp(3px, 1vw, 5px);
    --tb-mobile-item-w: clamp(11px, 3vw, 14px);
    --tb-mobile-item-h: clamp(13px, 3.5vw, 16px);
  }

  #tb-app.tb-wrap .tb-main,
  #tb-app.tb-wrap .tb-topbar,
  #tb-app.tb-wrap .tb-share,
  #tb-app.tb-wrap .tb-import-bar,
  #tb-app.tb-wrap .tb-json-bar,
  #tb-app.tb-wrap .tb-selected {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #tb-app.tb-wrap .tb-board-card {
    width: 100% !important;
  }

  #tb-app.tb-wrap .tb-board-wrap {
    padding: 14px 6px 16px !important;
  }

  #tb-app.tb-wrap .tb-board {
    width: 100% !important;
    align-items: center !important;
  }

  #tb-app.tb-wrap .tb-hex-row {
    gap: var(--tb-mobile-board-gap) !important;
    width: max-content !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #tb-app.tb-wrap .tb-hex-row.tb-hex-odd {
    margin-left: calc(var(--tb-mobile-hex) * 0.54) !important;
    margin-right: auto !important;
  }

  #tb-app.tb-wrap .tb-hex {
    flex: 0 0 auto !important;
    width: var(--tb-mobile-hex) !important;
    height: calc(var(--tb-mobile-hex) * 1.12) !important;
  }
}

@media (max-width: 420px) {
  #tb-app.tb-wrap {
    --tb-mobile-hex: clamp(35px, 9.1vw, 40px);
    --tb-mobile-board-gap: clamp(3px, 0.9vw, 4px);
  }

  #tb-app.tb-wrap .tb-main,
  #tb-app.tb-wrap .tb-topbar,
  #tb-app.tb-wrap .tb-share,
  #tb-app.tb-wrap .tb-import-bar,
  #tb-app.tb-wrap .tb-json-bar,
  #tb-app.tb-wrap .tb-selected {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  #tb-app.tb-wrap .tb-board-wrap {
    padding: 12px 4px 14px !important;
    border-radius: 22px !important;
  }
}


/* ===== v2.4.6 mobile smaller 3-star badge ===== */
@media (max-width: 768px) {
  #tb-app.tb-wrap .tb-hex-star-overlay {
    top: -2px !important;
  }

  #tb-app.tb-wrap .tb-hex-star-badge {
    height: 14px !important;
    min-width: 28px !important;
    padding: 0 6px !important;
    gap: 2px !important;
    border-radius: 5px !important;
  }

  #tb-app.tb-wrap .tb-hex-star.star-2 .tb-hex-star-badge {
    min-width: 24px !important;
    padding: 0 5px !important;
  }

  #tb-app.tb-wrap .tb-hex-star.star-3 .tb-hex-star-badge {
    min-width: 32px !important;
    padding: 0 5px !important;
  }

  #tb-app.tb-wrap .tb-hex-star .tb-star-icon {
    font-size: 9px !important;
  }
}


/* ===== v2.4.7 mobile star badges smaller + more even for 2-star and 3-star ===== */
@media (max-width: 768px) {
  #tb-app.tb-wrap .tb-hex-star-overlay {
    top: -2px !important;
  }

  #tb-app.tb-wrap .tb-hex-star-badge {
    height: 13px !important;
    min-width: 24px !important;
    padding: 0 4px !important;
    gap: 1px !important;
    border-radius: 4px !important;
  }

  #tb-app.tb-wrap .tb-hex-star.star-2 .tb-hex-star-badge {
    min-width: 24px !important;
    padding: 0 4px !important;
  }

  #tb-app.tb-wrap .tb-hex-star.star-3 .tb-hex-star-badge {
    min-width: 29px !important;
    padding: 0 4px !important;
  }

  #tb-app.tb-wrap .tb-hex-star .tb-star-icon {
    font-size: 8px !important;
  }
}


/* ===== v2.4.8 mobile side spacing closer to units plugin ===== */
@media (max-width: 768px) {
  #tb-app.tb-wrap {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: calc(50% - 50vw + 12px) !important;
    margin-right: 0 !important;
    border-radius: 20px !important;
  }

  #tb-app.tb-wrap .tb-main,
  #tb-app.tb-wrap .tb-topbar,
  #tb-app.tb-wrap .tb-share,
  #tb-app.tb-wrap .tb-import-bar,
  #tb-app.tb-wrap .tb-json-bar,
  #tb-app.tb-wrap .tb-selected {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 420px) {
  #tb-app.tb-wrap {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: calc(50% - 50vw + 12px) !important;
  }

  #tb-app.tb-wrap .tb-main,
  #tb-app.tb-wrap .tb-topbar,
  #tb-app.tb-wrap .tb-share,
  #tb-app.tb-wrap .tb-import-bar,
  #tb-app.tb-wrap .tb-json-bar,
  #tb-app.tb-wrap .tb-selected {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ===== v2.4.9 Trait counter: TFTAcademy-like list, icon + tier color from Traits Page ===== */
#tb-app.tb-wrap #tb-traits-panel .tb-card-body-fill{
  padding: 0 10px 12px !important;
}

#tb-app.tb-wrap .tb-traits-list{
  gap: 10px !important;
}

#tb-app.tb-wrap .tb-trait-row{
  --trait-color: var(--trait-api-color, #343b45);
  --trait-glow: rgba(0,0,0,.24);
  display: grid !important;
  grid-template-columns: 44px 30px minmax(0,1fr) !important;
  align-items: center !important;
  column-gap: 8px !important;
  min-height: 54px !important;
  padding: 3px 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#tb-app.tb-wrap .tb-trait-row.active{
  border: 0 !important;
  box-shadow: none !important;
}

#tb-app.tb-wrap .tb-trait-hex{
  width: 44px !important;
  height: 50px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  background: var(--trait-color) !important;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.62)) drop-shadow(0 0 7px var(--trait-glow));
  overflow: hidden !important;
}

#tb-app.tb-wrap .tb-trait-hex::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 42%, rgba(0,0,0,.10));
  pointer-events:none;
}

#tb-app.tb-wrap .tb-trait-icon{
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  position: relative !important;
  z-index: 1 !important;
  filter: brightness(0) saturate(100%) contrast(1.12) opacity(.9) !important;
}

#tb-app.tb-wrap .tb-trait-icon-fb{
  width: 100% !important;
  height: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,.82);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
}

#tb-app.tb-wrap .tb-trait-icon + .tb-trait-icon-fb{
  display: none;
}

#tb-app.tb-wrap .tb-trait-count{
  width: 30px !important;
  min-width: 30px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #252b33 !important;
  color: #f3f7ff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 1px rgba(0,0,0,.38) !important;
}

#tb-app.tb-wrap .tb-trait-count.active{
  color: #ffffff !important;
  border: 0 !important;
  background: #252b33 !important;
}

#tb-app.tb-wrap .tb-trait-info{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  justify-content: center !important;
}

#tb-app.tb-wrap .tb-trait-name{
  display: block !important;
  max-width: 100% !important;
  color: #f3f6ff !important;
  font-size: 14px !important;
  line-height: 1.08 !important;
  font-weight: 950 !important;
  letter-spacing: -.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: none !important;
}

#tb-app.tb-wrap .tb-trait-breaks{
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  color: #7e8794 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

#tb-app.tb-wrap .tb-trait-break{
  color: #7e8794 !important;
}

#tb-app.tb-wrap .tb-trait-break.is-met{
  color: #dce3ef !important;
}

#tb-app.tb-wrap .tb-trait-break-sep{
  color: #596271 !important;
  font-size: 15px !important;
  line-height: .8 !important;
  margin-top: -1px !important;
}

#tb-app.tb-wrap .tb-trait-pips,
#tb-app.tb-wrap .tb-trait-top{
  display: none !important;
}

/* Màu hex đồng bộ style mốc của plugin Traits Page */
#tb-app.tb-wrap .tb-trait-row.tb-style-bronze{ --trait-color:#e3a582; --trait-glow:rgba(227,165,130,.22); }
#tb-app.tb-wrap .tb-trait-row.tb-style-silver{ --trait-color:#d9dde4; --trait-glow:rgba(217,221,228,.22); }
#tb-app.tb-wrap .tb-trait-row.tb-style-gold{ --trait-color:#f2b705; --trait-glow:rgba(242,183,5,.26); }
#tb-app.tb-wrap .tb-trait-row.tb-style-unique,
#tb-app.tb-wrap .tb-trait-row.tb-style-special{ --trait-color:#b07cff; --trait-glow:rgba(176,124,255,.24); }
#tb-app.tb-wrap .tb-trait-row.tb-style-inactive{ --trait-color:#5a5a5a; --trait-glow:rgba(90,90,90,.12); opacity:.84; }

/* Tộc/hệ chỉ có 1 mốc (thường là trait riêng lẻ tướng 5 vàng) dùng màu cam đặc biệt */
#tb-app.tb-wrap .tb-trait-row.tb-style-single{ --trait-color:#ff8a00; --trait-glow:rgba(255,138,0,.28); }
#tb-app.tb-wrap .tb-trait-row.tb-style-single .tb-trait-hex{
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 42%),
              linear-gradient(145deg, #ff4d1f 0%, #ff6b00 48%, #f6b000 100%) !important;
  filter: drop-shadow(0 0 9px rgba(255,140,0,.38)) drop-shadow(0 1px 1px rgba(0,0,0,.62));
}
#tb-app.tb-wrap .tb-trait-row.tb-style-single .tb-trait-icon{
  filter: brightness(0) saturate(100%) contrast(1.12) opacity(.96) !important;
}

#tb-app.tb-wrap .tb-trait-row.tb-style-prismatic .tb-trait-hex,
#tb-app.tb-wrap .tb-trait-row.tb-style-chromatic .tb-trait-hex{
  background: conic-gradient(
    from 180deg,
    #b5fbd1 0deg,
    #aea7f8 25.6deg,
    #b9e3bc 63deg,
    #f6fdaf 87.2deg,
    #c7fbf7 105.21deg,
    #a0f6fe 139.56deg,
    #f5ccff 169.3deg,
    #f899f3 201.86deg,
    #bfc6a0 244.3deg,
    #fe93f2 287.41deg,
    #f3f1c7 334.3deg,
    #b5fbd1 360deg
  ) !important;
  filter: drop-shadow(0 0 8px rgba(205,232,255,.58)) drop-shadow(0 1px 1px rgba(0,0,0,.62));
}

@media (max-width:1160px){
  #tb-app.tb-wrap #tb-traits-panel .tb-card-body-fill{
    max-height: 300px !important;
  }
}

@media (max-width:480px){
  #tb-app.tb-wrap .tb-trait-row{
    grid-template-columns: 40px 28px minmax(0,1fr) !important;
    column-gap: 7px !important;
    min-height: 48px !important;
  }
  #tb-app.tb-wrap .tb-trait-hex{
    width: 40px !important;
    height: 46px !important;
  }
  #tb-app.tb-wrap .tb-trait-icon{
    width: 20px !important;
    height: 20px !important;
  }
  #tb-app.tb-wrap .tb-trait-count{
    width: 28px !important;
    min-width: 28px !important;
    height: 30px !important;
    font-size: 15px !important;
  }
  #tb-app.tb-wrap .tb-trait-name{
    font-size: 13px !important;
  }
  #tb-app.tb-wrap .tb-trait-breaks{
    font-size: 11px !important;
    gap: 4px !important;
  }
}


/* ===== v2.4.13 Desktop width: keep about 50px side breathing room ===== */
@media (min-width: 1161px) {
  #tb-app.tb-wrap {
    --tb-full-width: min(1800px, calc(100vw - 100px));
    width: var(--tb-full-width) !important;
    max-width: var(--tb-full-width) !important;
    margin-left: calc(50% - (var(--tb-full-width) / 2)) !important;
    margin-right: 0 !important;
    border-radius: 22px !important;
  }

  #tb-app.tb-wrap .tb-topbar {
    grid-template-columns: 230px 1fr 210px !important;
    padding: 14px 18px !important;
    gap: 14px !important;
  }

  #tb-app.tb-wrap .tb-main {
    grid-template-columns: 255px minmax(0, 1fr) 230px !important;
    gap: 14px !important;
    padding: 14px !important;
    align-items: start !important;
  }

  #tb-app.tb-wrap .tb-sidebar,
  #tb-app.tb-wrap .tb-center {
    gap: 14px !important;
  }

  #tb-app.tb-wrap .tb-card-title {
    padding: 16px 16px 10px !important;
    font-size: 15px !important;
  }

  #tb-app.tb-wrap .tb-card-body {
    padding: 0 14px 14px !important;
  }

  #tb-app.tb-wrap .tb-card-body-fill {
    min-height: 468px !important;
    max-height: 468px !important;
  }

  #tb-app.tb-wrap .tb-card-footer {
    padding: 12px 16px 14px !important;
  }

  #tb-app.tb-wrap .tb-board-card {
    padding: 10px 12px 12px !important;
  }

  #tb-app.tb-wrap .tb-board-head {
    grid-template-columns: 120px 1fr 140px !important;
    min-height: 40px !important;
    padding: 2px 8px 10px !important;
  }

  #tb-app.tb-wrap .tb-board-head-center {
    font-size: 16px !important;
  }

  #tb-app.tb-wrap .tb-board-wrap {
    min-height: 520px !important;
    padding: 12px 10px 18px !important;
    border-radius: 22px !important;
  }

  #tb-app.tb-wrap .tb-board {
    gap: 8px !important;
  }

  #tb-app.tb-wrap .tb-hex-row {
    gap: 10px !important;
  }

  #tb-app.tb-wrap .tb-hex-row.tb-hex-odd {
    margin-left: 60px !important;
  }

  #tb-app.tb-wrap .tb-hex {
    width: 92px !important;
    height: 101px !important;
  }

  #tb-app.tb-wrap .tb-hex-inner {
    inset: 4px !important;
  }

  #tb-app.tb-wrap .tb-hex-name {
    max-width: 74px !important;
    font-size: 9px !important;
  }

  #tb-app.tb-wrap .tb-hex-item-wrap {
    width: 24px !important;
    height: 27px !important;
  }

  #tb-app.tb-wrap .tb-bottom-grid {
    grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  #tb-app.tb-wrap .tb-pool-card,
  #tb-app.tb-wrap .tb-items-card {
    min-height: 348px !important;
    padding: 14px !important;
  }

  #tb-app.tb-wrap .tb-pool,
  #tb-app.tb-wrap .tb-items-grid {
    max-height: 266px !important;
    min-height: 266px !important;
  }

  #tb-app.tb-wrap .tb-pool-search-wrap {
    max-width: none !important;
  }

  #tb-app.tb-wrap .tb-items-search {
    width: 100% !important;
  }

  #tb-app.tb-wrap .tb-champ {
    width: 50px !important;
    height: 50px !important;
  }

  #tb-app.tb-wrap .tb-item {
    width: 38px !important;
    height: 38px !important;
  }

  #tb-app.tb-wrap .tb-augment-card {
    padding-bottom: 12px !important;
  }

  #tb-app.tb-wrap .tb-augment-slots {
    gap: 10px !important;
    padding: 0 12px 12px !important;
  }

  #tb-app.tb-wrap .tb-augment-slot {
    min-height: 66px !important;
    border-radius: 14px !important;
  }
}

@media (min-width: 1500px) {
  #tb-app.tb-wrap {
    --tb-full-width: min(1860px, calc(100vw - 100px));
  }

  #tb-app.tb-wrap .tb-main {
    grid-template-columns: 270px minmax(0, 1fr) 240px !important;
  }

  #tb-app.tb-wrap .tb-board-wrap {
    min-height: 560px !important;
  }

  #tb-app.tb-wrap .tb-hex-row {
    gap: 12px !important;
  }

  #tb-app.tb-wrap .tb-hex-row.tb-hex-odd {
    margin-left: 66px !important;
  }

  #tb-app.tb-wrap .tb-hex {
    width: 98px !important;
    height: 108px !important;
  }

  #tb-app.tb-wrap .tb-bottom-grid {
    grid-template-columns: minmax(0, 1.78fr) minmax(0, 1fr) !important;
  }

  #tb-app.tb-wrap .tb-pool,
  #tb-app.tb-wrap .tb-items-grid {
    max-height: 280px !important;
    min-height: 280px !important;
  }
}

/* ===== v2.4.14 Desktop side gap hard-fix =====
   Không kéo builder ra sát viewport nữa. Chừa đúng khoảng trống theo parent/page. */
@media (min-width: 1161px) {
  html body #tb-app.tb-wrap {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 50px !important;
    margin-right: 50px !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 1500px) {
  html body #tb-app.tb-wrap {
    width: auto !important;
    max-width: none !important;
    margin-left: 50px !important;
    margin-right: 50px !important;
  }
}


/* ===== Export / Share PNG button loading state ===== */
#tb-app.tb-wrap .tb-icon-btn.is-loading,
#tb-export-btn.is-loading { opacity:.65 !important; pointer-events:none !important; }
.tb-export-root { position:fixed; left:-99999px; top:0; width:1351px; height:1164px; pointer-events:none; opacity:0; z-index:-1; }
.tb-export-root.is-active { opacity:1; }
.tb-export-stage {
    width:1351px; height:1164px; box-sizing:border-box; padding:14px;
    background:
      radial-gradient(circle at 50% 10%, rgba(24,108,255,.18), transparent 28%),
      radial-gradient(circle at 50% 100%, rgba(0,66,163,.16), transparent 34%),
      linear-gradient(180deg, #03101f 0%, #020b18 100%);
    color:#eef5ff; font-family:Arial, Helvetica, sans-serif; border:2px solid #194f97; border-radius:22px;
}
.tb-export-main-grid { display:grid; grid-template-columns:290px 1fr; gap:16px; height:700px; }
.tb-export-traits-panel,
.tb-export-board-panel,
.tb-export-section {
    background:linear-gradient(180deg, rgba(4,13,29,.96), rgba(5,15,33,.9));
    border:1px solid rgba(67,133,219,.55); border-radius:22px; box-shadow:inset 0 0 0 1px rgba(26,49,92,.45), 0 0 24px rgba(14,57,130,.18);
}
.tb-export-traits-panel { display:flex; flex-direction:column; padding:16px 16px 12px; }
.tb-export-panel-title,
.tb-export-section-title {
    position:relative; text-align:center; font-size:24px; font-weight:900; letter-spacing:1px; color:#ffffff;
}
.tb-export-panel-title::before,
.tb-export-panel-title::after,
.tb-export-section-title::before,
.tb-export-section-title::after {
    content:''; position:absolute; top:50%; width:64px; height:2px; background:linear-gradient(90deg, transparent, #d7a62c, transparent);
}
.tb-export-panel-title::before,
.tb-export-section-title::before { left:10px; }
.tb-export-panel-title::after,
.tb-export-section-title::after { right:10px; }
.tb-export-traits-list { display:flex; flex-direction:column; gap:12px; padding:16px 0; flex:1; }
.tb-export-trait-row { display:flex; align-items:center; gap:12px; }
.tb-export-trait-badge { width:52px; height:52px; border-radius:14px; background:linear-gradient(180deg,#ffce45,#f4a11a); display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; box-shadow:inset 0 0 0 1px rgba(255,255,255,.12); }
.tb-export-trait-row:nth-child(n+2) .tb-export-trait-badge { background:linear-gradient(180deg,#f0b897,#e1a277); }
.tb-export-trait-icon { width:26px; height:26px; object-fit:contain; }
.tb-export-trait-fallback { font-size:14px; font-weight:900; color:#111; }
.tb-export-trait-count { min-width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg,#2a3444,#171e2a); font-weight:900; font-size:22px; }
.tb-export-trait-info { min-width:0; }
.tb-export-trait-name { font-size:19px; font-weight:900; line-height:1.08; }
.tb-export-trait-breaks { margin-top:4px; color:#d3dbea; font-size:14px; font-weight:700; letter-spacing:.2px; }
.tb-export-traits-footer { border-top:1px solid rgba(67,133,219,.28); display:flex; justify-content:center; gap:12px; padding-top:12px; font-weight:800; font-size:16px; }
.tb-export-traits-footer strong { color:#fff; font-size:19px; }
.tb-export-divider { color:#8aa1c2; }
.tb-export-board-panel { padding:14px 16px 16px; }
.tb-export-board-head { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; margin-bottom:14px; }
.tb-export-board-brand, .tb-export-board-side { color:#8ca7ce; font-weight:900; font-size:18px; letter-spacing:.5px; }
.tb-export-board-side { text-align:right; }
.tb-export-board-title { text-align:center; font-size:30px; font-weight:900; letter-spacing:1px; color:#fff; position:relative; }
.tb-export-board-title::before, .tb-export-board-title::after { content:''; position:absolute; top:50%; width:86px; height:2px; background:linear-gradient(90deg, transparent, #cf9922, transparent); }
.tb-export-board-title::before { right:100%; margin-right:12px; }
.tb-export-board-title::after { left:100%; margin-left:12px; }
.tb-export-board-wrap { border:1px solid rgba(67,133,219,.28); border-radius:22px; padding:18px 18px 10px; min-height:610px; background:radial-gradient(circle at 50% 20%, rgba(26,82,187,.12), transparent 40%), rgba(3,11,24,.8); }
.tb-export-hex-row { display:flex; gap:18px; margin-bottom:14px; }
.tb-export-hex-row.is-odd { margin-left:78px; }
.tb-export-hex { width:110px; height:120px; position:relative; flex-shrink:0; }
.tb-export-hex-inner {
    position:absolute; inset:0; clip-path:polygon(24% 6%, 76% 6%, 96% 50%, 76% 94%, 24% 94%, 4% 50%);
    border:4px solid rgba(53,83,135,.58); background:rgba(7,16,32,.72); overflow:hidden;
}
.tb-export-hex::after { content:''; position:absolute; inset:0; clip-path:polygon(24% 6%, 76% 6%, 96% 50%, 76% 94%, 24% 94%, 4% 50%); box-shadow:0 0 0 4px rgba(28,52,95,.4) inset; pointer-events:none; }
.tb-export-cost-1 .tb-export-hex-inner, .tb-export-cost-1.tb-export-equipped-card { border-color:#8b94a4; }
.tb-export-cost-2 .tb-export-hex-inner, .tb-export-cost-2.tb-export-equipped-card { border-color:#24b96c; }
.tb-export-cost-3 .tb-export-hex-inner, .tb-export-cost-3.tb-export-equipped-card { border-color:#2b9bff; }
.tb-export-cost-4 .tb-export-hex-inner, .tb-export-cost-4.tb-export-equipped-card { border-color:#bc65ff; }
.tb-export-cost-5 .tb-export-hex-inner, .tb-export-cost-5.tb-export-equipped-card { border-color:#f0c400; }
.tb-export-hex-img { width:100%; height:100%; object-fit:cover; display:block; }
.tb-export-hex-name { position:absolute; left:10px; right:10px; bottom:12px; padding:4px 8px; background:rgba(0,0,0,.68); border-radius:999px; text-align:center; font-size:12px; font-weight:900; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tb-export-hex-stars { position:absolute; top:-8px; left:8px; display:flex; gap:2px; background:#1db4ff; border-radius:12px; padding:4px 7px; box-shadow:0 8px 14px rgba(0,0,0,.25); }
.tb-export-hex-stars span { color:#fff3a6; font-size:12px; line-height:1; }
.tb-export-hex-items { position:absolute; left:10px; right:10px; bottom:-4px; display:flex; justify-content:center; gap:3px; }
.tb-export-hex-item { width:24px; height:24px; border:2px solid #2b9bff; border-radius:7px; overflow:hidden; background:#071322; box-shadow:0 6px 12px rgba(0,0,0,.35); }
.tb-export-hex-item img { width:100%; height:100%; object-fit:cover; display:block; }
.tb-export-section { margin-top:14px; padding:16px 18px; }
.tb-export-augment-section { min-height:150px; }
.tb-export-augment-grid { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:14px; margin-top:16px; }
.tb-export-augment-card { min-height:82px; border:1px solid rgba(76,133,224,.4); border-radius:16px; background:linear-gradient(180deg,#0d1a31,#0b1627); padding:12px 14px; display:flex; align-items:center; gap:12px; }
.tb-export-augment-icon { width:44px; height:44px; border-radius:12px; border:1px solid rgba(92,132,194,.35); background:#12213a; display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
.tb-export-augment-icon img { width:100%; height:100%; object-fit:cover; }
.tb-export-augment-icon span { font-size:24px; font-weight:900; color:#d9a620; }
.tb-export-augment-name { font-size:14px; font-weight:900; color:#fff; line-height:1.2; }
.tb-export-equipped-section { min-height:258px; }
.tb-export-equipped-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px; margin-top:18px; }
.tb-export-equipped-card { min-height:150px; border:2px solid #2b9bff; border-radius:20px; background:linear-gradient(180deg,#091427,#09111e); padding:16px; display:grid; grid-template-columns:180px 1fr; gap:18px; align-items:center; }
.tb-export-equipped-main { position:relative; display:flex; align-items:flex-end; gap:14px; padding-bottom:40px; }
.tb-export-equipped-portrait-wrap { position:relative; width:140px; height:140px; border-radius:16px; overflow:hidden; background:#0c172a; }
.tb-export-equipped-portrait { width:100%; height:100%; object-fit:cover; display:block; }
.tb-export-equipped-star { position:absolute; top:8px; left:8px; min-width:34px; height:34px; border-radius:50%; background:#1ca9ff; color:#fff; font-size:22px; font-weight:900; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 12px rgba(0,0,0,.28); }
.tb-export-equipped-name { position:absolute; left:0; width:140px; bottom:0; background:#14aef5; color:#03111f; text-align:center; font-size:15px; font-weight:900; padding:8px 10px; border-radius:10px; }
.tb-export-equipped-items { display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-start; }
.tb-export-equipped-item { width:66px; height:66px; border-radius:14px; overflow:hidden; border:2px solid rgba(213,165,36,.85); background:#0b1628; box-shadow:0 8px 14px rgba(0,0,0,.25); }
.tb-export-equipped-item img { width:100%; height:100%; object-fit:cover; display:block; }
.tb-export-empty { border:1px dashed rgba(92,132,194,.35); color:#cbd7ea; border-radius:16px; padding:22px; text-align:center; font-weight:700; }
.tb-export-empty-bottom { margin-top:16px; }


/* ===== Team Builder notice popup ===== */
#tb-app.tb-wrap .tb-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#tb-app.tb-wrap .tb-notice-overlay.is-visible {
    display: flex !important;
}
#tb-app.tb-wrap .tb-notice-modal {
    position: relative;
    width: fit-content;
    max-width: calc(100vw - 36px);
    border: 2px solid rgba(240, 196, 0, .72);
    border-radius: 24px;
    background: linear-gradient(180deg, #101722 0%, #060a11 100%);
    box-shadow: 0 26px 80px rgba(0,0,0,.62), 0 0 26px rgba(240,196,0,.16);
    overflow: hidden;
    animation: tbNoticePop .18s ease-out;
}
#tb-app.tb-wrap .tb-notice-title {
    padding: 16px 54px 14px;
    text-align: center;
    color: #fff;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: linear-gradient(180deg, rgba(255,220,40,.18), rgba(255,220,40,.04));
    border-bottom: 1px solid rgba(240,196,0,.28);
}
#tb-app.tb-wrap .tb-notice-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(0,0,0,.42);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s ease;
}
#tb-app.tb-wrap .tb-notice-close:hover {
    border-color: rgba(240,196,0,.85);
    color: var(--tb-gold);
    transform: scale(1.05);
}
#tb-app.tb-wrap .tb-notice-image {
    display: block;
    width: auto;
    max-width: calc(100vw - 36px);
    height: auto;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    background: #05080d;
}
#tb-app.tb-wrap .tb-notice-auto {
    padding: 12px 18px 15px;
    text-align: center;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
    background: rgba(0,0,0,.22);
    border-top: 1px solid rgba(255,255,255,.08);
}
@keyframes tbNoticePop {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 640px) {
    #tb-app.tb-wrap .tb-notice-overlay { padding: 12px; }
    #tb-app.tb-wrap .tb-notice-modal { width: fit-content; max-width: calc(100vw - 24px); border-radius: 18px; }
    #tb-app.tb-wrap .tb-notice-title { font-size: 18px; padding: 14px 50px 12px; }
    #tb-app.tb-wrap .tb-notice-close { top: 8px; right: 8px; width: 34px; height: 34px; }
    #tb-app.tb-wrap .tb-notice-auto { font-size: 13px; padding: 10px 14px 13px; }
}

/* ============================================================
   MOBILE TABS — Tướng / Trang Bị / Nâng Cấp
   Trên desktop: ẩn thanh tab, hiển thị tất cả panel như cũ.
   Trên mobile (<=920px): hiện 3 nút riêng biệt; mỗi lần chỉ
   show 1 panel để user không phải kéo xuống xem cả 3.
   ============================================================ */
.tb-mobile-tabs {
    display: none; /* desktop: ẩn hoàn toàn */
}

@media (max-width: 920px) {
    /* ---- 3 nút tab dạng riêng biệt, không có gạch chân ---- */
    .tb-mobile-tabs {
        display: flex;
        gap: 5px;
        margin: 0 0 8px;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .tb-mtab {
        flex: 1 1 0;
        min-width: 0;
        background: rgba(13,20,30,.55);
        border: 1px solid rgba(255,255,255,.12);
        outline: none;
        color: #c5cdd9;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .01em;
        padding: 6px 4px;
        border-radius: 6px;
        cursor: pointer;
        line-height: 1.2;
        transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .tb-mtab:hover { color: #ffffff; border-color: rgba(255,255,255,.22); }
    .tb-mtab.is-active {
        color: #5fc8d8;
        border-color: #5fc8d8;
        background: rgba(95,200,216,.06);
        box-shadow: 0 0 0 1px rgba(95,200,216,.35), 0 0 8px rgba(95,200,216,.18);
    }
    /* Bỏ gạch chân hoàn toàn */
    .tb-mtab.is-active::after { content: none; display: none; }

    /* ---- Sắp xếp: Tộc/Hệ TRÊN bàn cờ ---- */
    .tb-sidebar-left  { order: 1; }   /* Tộc/Hệ trên cùng */
    .tb-center        { order: 2; }   /* Bàn cờ + tabs + bottom-grid */
    .tb-sidebar-right { order: 3; }   /* Lõi nâng cấp dưới cùng (chỉ show khi tab aug) */

    /* ---- Tộc/Hệ trên mobile: chỉ icon + số, nhỏ gọn, wrap ngang ----
       Phải prefix #tb-app.tb-wrap để thắng specificity của block
       cũ ở dòng 1521+ (1,1,0) và override @media 480px của bản cũ. */
    #tb-app.tb-wrap .tb-left-card {
        padding: 6px 8px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    #tb-app.tb-wrap .tb-left-card .tb-card-title { display: none !important; }
    #tb-app.tb-wrap .tb-left-card .tb-card-footer.tb-left-footer { display: none !important; }
    #tb-app.tb-wrap #tb-traits-panel .tb-card-body-fill {
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    #tb-app.tb-wrap .tb-traits-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: flex-start !important;
    }
    #tb-app.tb-wrap .tb-trait-row {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        grid-template-columns: none !important;
        padding: 2px 5px 2px 2px !important;
        gap: 3px !important;
        min-height: 0 !important;
        column-gap: 3px !important;
        border-radius: 7px !important;
        background: #0d141f !important;
        border: 1px solid var(--tb-border) !important;
    }

    /* Ẩn TOÀN BỘ tên + số mốc (2>4>6) + pips - dùng !important + ID prefix */
    #tb-app.tb-wrap .tb-trait-info,
    #tb-app.tb-wrap .tb-trait-name,
    #tb-app.tb-wrap .tb-trait-breaks,
    #tb-app.tb-wrap .tb-trait-break,
    #tb-app.tb-wrap .tb-trait-break-sep,
    #tb-app.tb-wrap .tb-trait-pips,
    #tb-app.tb-wrap .tb-trait-pip { display: none !important; }

    #tb-app.tb-wrap .tb-trait-top { gap: 3px !important; padding: 0 !important; }
    #tb-app.tb-wrap .tb-trait-hex {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
    }
    #tb-app.tb-wrap .tb-trait-icon {
        width: 18px !important;
        height: 18px !important;
        border-radius: 4px !important;
    }
    #tb-app.tb-wrap .tb-trait-count {
        min-width: 16px !important;
        width: auto !important;
        height: 18px !important;
        padding: 0 4px !important;
        font-size: 11px !important;
        border-radius: 5px !important;
    }
    #tb-app.tb-wrap .tb-empty-hint { padding: 8px !important; font-size: 11px !important; }

    /* ---- Toggle hiển thị panel theo tab ---- */
    body:not(.tb-mtab-aug) .tb-sidebar-right { display: none; }
    body.tb-mtab-pool  .tb-items-card  { display: none; }
    body.tb-mtab-items .tb-pool-card   { display: none; }
    body.tb-mtab-aug   .tb-bottom-grid { display: none; }
}

/* ============================================================
   SELECTED-UNIT BAR — item with × delete badge
   Icon trong bar Selected có nút × nhỏ ở góc để xóa từng item.
   ============================================================ */
#tb-app.tb-wrap .tb-sel-sep   { color: #555; margin: 0 4px; }
#tb-app.tb-wrap .tb-sel-count { color: #777; font-size: 11px; margin-left: 4px; vertical-align: middle; }

#tb-app.tb-wrap .tb-sel-item-wrap {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin: 0 6px 0 2px;
    line-height: 0;
}
#tb-app.tb-wrap .tb-sel-item {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #444;
    display: block;
    object-fit: cover;
}
#tb-app.tb-wrap .tb-sel-item-x {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 16px;
    height: 16px;
    padding: 0;
    border-radius: 50%;
    background: #d04848;
    color: #fff;
    border: 1.5px solid #0b1018;
    font-size: 12px;
    font-weight: 900;
    line-height: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,.5);
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, transform .12s ease;
}
#tb-app.tb-wrap .tb-sel-item-x:hover { background: #e85a5a; }
#tb-app.tb-wrap .tb-sel-item-x:active { transform: scale(.88); }

/* Mobile: tăng vùng chạm cho nút × để dễ bấm bằng ngón tay */
@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-sel-item       { width: 28px; height: 28px; }
    #tb-app.tb-wrap .tb-sel-item-wrap  { margin: 0 7px 0 3px; }
    #tb-app.tb-wrap .tb-sel-item-x     {
        width: 18px; height: 18px;
        font-size: 13px; line-height: 14px;
        top: -8px; right: -8px;
    }
}

/* ============================================================
   MOBILE: Pool toolbar gọn gàng — search input đi cùng hàng
   với cost buttons (Giá / 1 / 2 / 3 / 4 / 5).
   JS sẽ di chuyển DOM, CSS đảm nhận hiển thị.
   ============================================================ */
@media (max-width: 920px) {
    /* Ẩn header "Thêm tướng" + dòng search cũ */
    #tb-app.tb-wrap .tb-pool-card .tb-section-head { display: none !important; }

    /* Ẩn tab loại (Giá/Tên/Tộc/Hệ) ở giữa - không cần thiết trên mobile */
    #tb-app.tb-wrap .tb-pool-card .tb-pool-type-tabs { display: none !important; }

    /* Toolbar: ÉP cùng 1 hàng, không wrap */
    #tb-app.tb-wrap .tb-pool-card .tb-pool-toolbar {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        margin-bottom: 8px !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    #tb-app.tb-wrap .tb-pool-card .tb-pool-top-filters {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex: 0 0 auto !important;
        gap: 3px !important;
        min-width: 0 !important;
    }

    /* Cost buttons NHỎ HẲN để chừa chỗ cho search */
    #tb-app.tb-wrap .tb-pool-card .tb-cost-btn {
        padding: 5px 8px !important;
        font-size: 11px !important;
        min-width: 0 !important;
        line-height: 1.1 !important;
        border-radius: 999px !important;
    }

    /* Search wrap: co giãn theo chỗ còn lại, có thể nhỏ tới 60px */
    #tb-app.tb-wrap .tb-pool-card .tb-pool-search-wrap {
        display: flex !important;
        flex: 1 1 60px !important;
        min-width: 60px !important;
        max-width: none !important;
        width: auto !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #tb-app.tb-wrap .tb-pool-card .tb-pool-search {
        width: 100% !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 5px 9px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
        height: 28px !important;
        line-height: 18px !important;
    }
}


/* ============================================================
   v2.4.31 — Mobile tab Trang Bị: search icon cạnh nút Khác
   - Mobile: ẩn tiêu đề "Trang bị" + ô search dài mặc định.
   - Nút kính lúp nằm trong hàng category; bấm mới mở ô tìm kiếm.
   - Desktop giữ layout cũ.
   ============================================================ */
#tb-app.tb-wrap .tb-items-search-toggle {
  display: none;
}

@media (max-width: 920px) {
  #tb-app.tb-wrap .tb-items-card .tb-items-head {
    display: none !important;
  }

  #tb-app.tb-wrap .tb-items-card .tb-item-tabs {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
  }

  #tb-app.tb-wrap .tb-items-card .tb-item-cat-btn {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    padding: 7px 9px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    border-radius: 999px !important;
  }

  #tb-app.tb-wrap .tb-items-card .tb-items-search-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--tb-border) !important;
    border-radius: 999px !important;
    background: #101722 !important;
    color: #e9eef8 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    line-height: 1 !important;
    -webkit-tap-highlight-color: transparent;
  }

  #tb-app.tb-wrap .tb-items-card .tb-items-search-toggle svg {
    width: 17px !important;
    height: 17px !important;
    display: block !important;
    fill: currentColor !important;
    pointer-events: none !important;
  }

  #tb-app.tb-wrap .tb-items-card.tb-items-search-open .tb-items-search-toggle,
  #tb-app.tb-wrap .tb-items-card .tb-items-search-toggle:hover {
    border-color: #5fc8d8 !important;
    color: #ffffff !important;
    background: rgba(95,200,216,.08) !important;
    box-shadow: 0 0 0 1px rgba(95,200,216,.18) !important;
  }

  #tb-app.tb-wrap .tb-items-card .tb-item-tabs .tb-items-search {
    display: none !important;
  }

  #tb-app.tb-wrap .tb-items-card.tb-items-search-open .tb-item-tabs .tb-items-search {
    display: block !important;
    flex: 1 1 118px !important;
    width: auto !important;
    min-width: 118px !important;
    max-width: 190px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 34px !important;
  }

  #tb-app.tb-wrap .tb-items-card .tb-items-grid {
    margin-top: 0 !important;
  }
}

@media (max-width: 380px) {
  #tb-app.tb-wrap .tb-items-card .tb-item-tabs { gap: 5px !important; }
  #tb-app.tb-wrap .tb-items-card .tb-item-cat-btn {
    padding: 6px 7px !important;
    font-size: 10.5px !important;
  }
  #tb-app.tb-wrap .tb-items-card .tb-items-search-toggle {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }
}


/* ============================================================
   v1.0.44 / 2.4.32
   MOBILE TAB BAR — gộp 3 nút Tướng / Trang Bị / Nâng Cấp
   thành 1 thanh tab liền khối giống layout mẫu.
   ============================================================ */
@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-mobile-tabs {
        display: flex;
        gap: 0;
        margin: 0 0 0;
        padding: 0;
        background: linear-gradient(180deg, rgba(8,16,28,.98), rgba(4,10,18,.98));
        border: 1px solid rgba(95, 200, 216, .28);
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
        overflow: hidden;
        box-shadow: 0 10px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
    }

    #tb-app.tb-wrap .tb-mtab {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
        padding: 13px 8px;
        border: 0;
        border-right: 1px solid rgba(255,255,255,.08);
        border-radius: 0;
        background: transparent;
        color: #d6dceb;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.15;
        letter-spacing: .01em;
        box-shadow: none;
    }

    #tb-app.tb-wrap .tb-mtab:last-child {
        border-right: 0;
    }

    #tb-app.tb-wrap .tb-mtab.is-active {
        color: #67d6eb;
        background: linear-gradient(180deg, rgba(95,200,216,.16), rgba(95,200,216,.07));
        box-shadow: inset 0 -2px 0 rgba(95,200,216,.58);
        border-color: rgba(255,255,255,.08);
    }

    #tb-app.tb-wrap .tb-mtab:hover,
    #tb-app.tb-wrap .tb-mtab:focus-visible {
        color: #ffffff;
        background: rgba(255,255,255,.03);
        outline: none;
    }

    #tb-app.tb-wrap .tb-mtab.is-active:hover,
    #tb-app.tb-wrap .tb-mtab.is-active:focus-visible {
        color: #7be4f3;
        background: linear-gradient(180deg, rgba(95,200,216,.18), rgba(95,200,216,.09));
    }

    /* Panel phía dưới nối liền với thanh tab */
    #tb-app.tb-wrap .tb-bottom-grid {
        gap: 0;
    }

    #tb-app.tb-wrap .tb-bottom-grid > .tb-card,
    body.tb-mtab-aug #tb-app.tb-wrap .tb-sidebar-right .tb-card {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    #tb-app.tb-wrap .tb-pool-card,
    #tb-app.tb-wrap .tb-items-card,
    body.tb-mtab-aug #tb-app.tb-wrap .tb-sidebar-right .tb-card {
        border-top: 1px solid rgba(95, 200, 216, .12);
        box-shadow: 0 14px 28px rgba(0,0,0,.22);
    }
}

@media (max-width: 480px) {
    #tb-app.tb-wrap .tb-mtab {
        padding: 12px 4px;
        font-size: 13px;
    }
}


/* ============================================================
   v1.0.45 / 2.4.33
   MOBILE TAB + PANEL: dính liền hoàn toàn, không hở khe.
   ============================================================ */
@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-center {
        gap: 0 !important;
    }

    #tb-app.tb-wrap .tb-mobile-tabs {
        position: relative;
        z-index: 3;
        margin-bottom: 0 !important;
    }

    #tb-app.tb-wrap .tb-bottom-grid,
    body.tb-mtab-aug #tb-app.tb-wrap .tb-sidebar-right {
        margin-top: -1px !important;
    }

    #tb-app.tb-wrap .tb-pool-card,
    #tb-app.tb-wrap .tb-items-card,
    body.tb-mtab-aug #tb-app.tb-wrap .tb-sidebar-right .tb-card {
        border-top: 0 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        padding-top: 10px !important;
        box-shadow: 0 14px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.03) !important;
    }
}


/* ============================================================
   v1.0.47 / 2.4.35
   MOBILE TAB BAR TUNING
   - Cách bàn cờ ra một chút.
   - Chữ nhỏ hơn, chiều cao tab thấp hơn khoảng 25%.
   ============================================================ */
@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-mobile-tabs {
        margin-top: 8px !important;
    }

    #tb-app.tb-wrap .tb-mtab {
        padding: 9px 8px !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
    }
}

@media (max-width: 480px) {
    #tb-app.tb-wrap .tb-mobile-tabs {
        margin-top: 8px !important;
    }

    #tb-app.tb-wrap .tb-mtab {
        padding: 8px 4px !important;
        font-size: 11px !important;
        line-height: 1.05 !important;
    }
}


/* ============================================================
   v1.0.48 / 2.4.36
   TOPBAR CLEANUP
   - Desktop: ẩn chữ TFT màu vàng.
   - Mobile: ẩn cả chữ TFT và nút Mùa 17.
   ============================================================ */
#tb-app.tb-wrap .tb-logo-mark {
    display: none !important;
}

@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-topbar-left {
        display: none !important;
    }
}


/* ============================================================
   v1.0.49 / 2.4.37
   GUIDE POPUP — nút Hướng dẫn + nội dung riêng desktop/mobile.
   ============================================================ */
#tb-app.tb-wrap .tb-guide-btn {
    border-color: rgba(95,200,216,.32) !important;
    color: #e7f7ff !important;
    background: linear-gradient(180deg, rgba(95,200,216,.12), rgba(95,200,216,.04)) !important;
}

#tb-app.tb-wrap .tb-guide-btn:hover {
    border-color: rgba(95,200,216,.75) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(95,200,216,.18), 0 0 14px rgba(95,200,216,.18) !important;
}

#tb-app.tb-wrap .tb-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#tb-app.tb-wrap .tb-guide-overlay.is-visible {
    display: flex !important;
}

body.tb-guide-open {
    overflow: hidden;
}

#tb-app.tb-wrap .tb-guide-modal {
    position: relative;
    width: min(780px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    border: 1px solid rgba(95,200,216,.58);
    border-radius: 22px;
    background: linear-gradient(180deg, #101722 0%, #060a11 100%);
    box-shadow: 0 26px 80px rgba(0,0,0,.62), 0 0 26px rgba(95,200,216,.15);
    animation: tbNoticePop .18s ease-out;
}

#tb-app.tb-wrap .tb-guide-title {
    padding: 16px 56px 14px;
    text-align: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: .02em;
    background: linear-gradient(180deg, rgba(95,200,216,.18), rgba(95,200,216,.05));
    border-bottom: 1px solid rgba(95,200,216,.22);
}

#tb-app.tb-wrap .tb-guide-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(0,0,0,.42);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s ease;
}

#tb-app.tb-wrap .tb-guide-close:hover {
    border-color: rgba(95,200,216,.85);
    color: #7be4f3;
    transform: scale(1.05);
}

#tb-app.tb-wrap .tb-guide-content {
    padding: 18px;
}

#tb-app.tb-wrap .tb-guide-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(95,200,216,.24);
    border-radius: 999px;
    color: #7be4f3;
    background: rgba(95,200,216,.07);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

#tb-app.tb-wrap .tb-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#tb-app.tb-wrap .tb-guide-step {
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}

#tb-app.tb-wrap .tb-guide-step strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    margin-bottom: 6px;
}

#tb-app.tb-wrap .tb-guide-step p {
    margin: 0;
    color: #c8d1df;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 650;
}

#tb-app.tb-wrap .tb-guide-mobile {
    display: none;
}

@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-guide-overlay {
        padding: 12px;
    }

    #tb-app.tb-wrap .tb-guide-modal {
        width: min(430px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }

    #tb-app.tb-wrap .tb-guide-title {
        font-size: 18px;
        padding: 14px 48px 12px;
    }

    #tb-app.tb-wrap .tb-guide-close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
    }

    #tb-app.tb-wrap .tb-guide-desktop {
        display: none !important;
    }

    #tb-app.tb-wrap .tb-guide-mobile {
        display: block !important;
    }

    #tb-app.tb-wrap .tb-guide-content {
        padding: 14px;
    }

    #tb-app.tb-wrap .tb-guide-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    #tb-app.tb-wrap .tb-guide-step {
        padding: 11px 12px;
        border-radius: 14px;
    }

    #tb-app.tb-wrap .tb-guide-step strong {
        font-size: 13px;
        margin-bottom: 4px;
    }

    #tb-app.tb-wrap .tb-guide-step p {
        font-size: 12px;
        line-height: 1.45;
    }

    #tb-app.tb-wrap .tb-guide-btn {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}


/* v2.4.39: Share link + mã nhập game */
#tb-app.tb-wrap .tb-share {
  flex-direction: column !important;
  align-items: stretch !important;
}
#tb-app.tb-wrap .tb-share-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}
#tb-app.tb-wrap .tb-share-row input {
  flex: 1 1 auto !important;
}
#tb-app.tb-wrap .tb-share-label {
  min-width: 105px !important;
}
#tb-app.tb-wrap .tb-share-label-muted {
  color: #93c5fd !important;
}
@media (max-width: 640px) {
  #tb-app.tb-wrap .tb-share-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #tb-app.tb-wrap .tb-share-label {
    min-width: 0 !important;
  }
}

/* ===== v2.4.53 Dark Star 6 auto Minor Black Holes ===== */
.tb-hex.tb-hex-black-hole .tb-hex-inner {
    box-shadow: 0 0 0 2px rgba(150, 95, 255, .38), 0 0 18px rgba(100, 40, 220, .45);
}
.tb-hex.tb-hex-black-hole .tb-hex-content {
    background: radial-gradient(circle at 50% 45%, rgba(130, 80, 255, .72) 0%, rgba(32, 12, 64, .85) 42%, rgba(3, 4, 14, .98) 76%);
}
.tb-hex-black-hole-fb {
    display: none;
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.95) 0 6%, rgba(120,70,255,.8) 7% 24%, rgba(34,12,72,.95) 25% 54%, rgba(0,0,0,.96) 55% 100%);
    box-shadow: 0 0 18px rgba(130, 70, 255, .72), inset 0 0 12px rgba(255,255,255,.2);
    pointer-events: none;
}
.tb-hex.tb-hex-black-hole .tb-hex-name {
    color: #f2e9ff;
    text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 8px rgba(155,95,255,.65);
}

/* =============================================================================
   Smart tooltip cho Team Builder (tướng / tộc hệ / trang bị)
   - Viền tooltip tướng đổi màu theo giá tướng (1→5 vàng).
   - Header gọn, stats card, khối kỹ năng có icon, mô tả tô đậm số/%.
   - Trait tooltip: hex tier marker đổi màu theo bronze/silver/gold/prismatic.
   ============================================================================= */

.tb-smart-tooltip{
  /* Biến chủ đạo — override bằng .tb-cost-* hoặc .tb-tt-kind-* */
  --tt-accent:#94a3b8;
  --tt-accent-soft:rgba(148,163,184,.18);
  --tt-accent-strong:rgba(148,163,184,.55);
  --tt-bg-1:#10141c;
  --tt-bg-2:#0a0d13;
  --tt-line:rgba(255,255,255,.08);
  --tt-text:#f1f5fb;
  --tt-text-soft:#aab4c4;

  position:fixed; left:0; top:0;
  z-index:2147483000;
  width:min(360px, calc(100vw - 20px));
  max-height:min(72vh, 580px);
  overflow:auto;
  pointer-events:none;
  opacity:0;
  transform:translateY(4px) scale(.985);
  transition:opacity .14s ease, transform .14s ease;

  border:1.5px solid var(--tt-accent);
  border-radius:14px;
  background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--tt-accent) 14%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--tt-bg-1) 0%, var(--tt-bg-2) 100%);
  box-shadow:
    0 18px 48px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 24px -8px color-mix(in srgb, var(--tt-accent) 55%, transparent);
  color:var(--tt-text);
  padding:13px 13px 12px;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size:12.5px;
  line-height:1.42;
}
.tb-smart-tooltip.is-visible{ opacity:1; transform:translateY(0) scale(1); }
.tb-smart-tooltip::-webkit-scrollbar{ width:6px; height:6px; }
.tb-smart-tooltip::-webkit-scrollbar-thumb{ background:color-mix(in srgb, var(--tt-accent) 50%, rgba(148,163,184,.4)); border-radius:999px; }

/* ===== Viền tooltip theo giá tướng (chỉ áp dụng cho tooltip tướng) ===== */
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-1{ --tt-accent:var(--tb-c1, #8b94a4); }
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-2{ --tt-accent:var(--tb-c2, #24b96c); }
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-3{ --tt-accent:var(--tb-c3, #2b9bff); }
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-4{ --tt-accent:var(--tb-c4, #bc65ff); }
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-5{ --tt-accent:var(--tb-c5, #f0c400); }

/* Hint tone cho tooltip tộc/hệ theo bậc đang kích hoạt (nếu rê từ thanh trait đã sáng) */
.tb-smart-tooltip.tb-tt-trait-bronze{ --tt-accent:#e3a582; }
.tb-smart-tooltip.tb-tt-trait-silver{ --tt-accent:#d9dde4; }
.tb-smart-tooltip.tb-tt-trait-gold,
.tb-smart-tooltip.tb-tt-trait-single{ --tt-accent:#f2b705; }
.tb-smart-tooltip.tb-tt-trait-unique,
.tb-smart-tooltip.tb-tt-trait-special{ --tt-accent:#b07cff; }
.tb-smart-tooltip.tb-tt-trait-prismatic,
.tb-smart-tooltip.tb-tt-trait-chromatic{ --tt-accent:#7be0d4; }

/* ===== Header chung ===== */
.tb-tt-head{ display:flex; align-items:center; gap:11px; min-width:0; }
.tb-tt-head-main{ min-width:0; flex:1; }
.tb-tt-title-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
.tb-tt-title{
  font-size:18px; line-height:1.1; font-weight:900;
  color:#fff; letter-spacing:-.01em;
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.tb-tt-muted{ margin-top:4px; color:var(--tt-text-soft); font-size:12px; font-weight:700; }

/* ===== Chân dung tướng & viền theo giá ===== */
.tb-tt-portrait{
  width:60px; height:60px; border-radius:12px; overflow:hidden;
  border:2px solid var(--tt-accent);
  background:#0b1119;
  flex:0 0 auto;
  box-shadow:0 0 0 1px rgba(0,0,0,.55), 0 6px 14px -6px color-mix(in srgb, var(--tt-accent) 70%, transparent);
}
.tb-tt-portrait img{ width:100%; height:100%; object-fit:cover; display:block; }
.tb-tt-portrait.tb-cost-1{ border-color:var(--tb-c1, #8b94a4); }
.tb-tt-portrait.tb-cost-2{ border-color:var(--tb-c2, #24b96c); }
.tb-tt-portrait.tb-cost-3{ border-color:var(--tb-c3, #2b9bff); }
.tb-tt-portrait.tb-cost-4{ border-color:var(--tb-c4, #bc65ff); }
.tb-tt-portrait.tb-cost-5{ border-color:var(--tb-c5, #f0c400); }

/* ===== Pill giá tướng — nền tô theo màu giá (1→5 vàng) ===== */
.tb-tt-cost{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:5px;
  border-radius:999px;
  /* Nền dùng biến --tt-cost-bg / chữ dùng --tt-cost-fg, default cho trường hợp không có class cost. */
  background:var(--tt-cost-bg, color-mix(in srgb, var(--tt-accent) 70%, #000 0%));
  border:1px solid color-mix(in srgb, var(--tt-cost-bg, var(--tt-accent)) 65%, #000);
  color:var(--tt-cost-fg, #fff);
  padding:3px 10px;
  font-weight:900; font-size:11.5px;
  letter-spacing:.01em;
  text-shadow:0 1px 1px rgba(0,0,0,.35);
  box-shadow:0 2px 6px -2px color-mix(in srgb, var(--tt-cost-bg, var(--tt-accent)) 70%, transparent);
}
/* 1 vàng — xám */
.tb-tt-cost.tb-cost-1{ --tt-cost-bg:var(--tb-c1, #8b94a4); --tt-cost-fg:#fff; }
/* 2 vàng — xanh lá */
.tb-tt-cost.tb-cost-2{ --tt-cost-bg:var(--tb-c2, #24b96c); --tt-cost-fg:#fff; }
/* 3 vàng — xanh dương */
.tb-tt-cost.tb-cost-3{ --tt-cost-bg:var(--tb-c3, #2b9bff); --tt-cost-fg:#fff; }
/* 4 vàng — tím */
.tb-tt-cost.tb-cost-4{ --tt-cost-bg:var(--tb-c4, #bc65ff); --tt-cost-fg:#fff; }
/* 5 vàng — vàng kim, chữ tối + bóng sáng để tương phản tốt trên nền vàng */
.tb-tt-cost.tb-cost-5{
  --tt-cost-bg:var(--tb-c5, #f0c400);
  --tt-cost-fg:#2a1d00;
  text-shadow:0 1px 1px rgba(255,255,255,.28);
}

/* ===== Trait chip (dùng chung trong header & item) ===== */
.tb-tt-traits{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.tb-tt-trait-chip{
  display:inline-flex; align-items:center; gap:6px;
  max-width:160px; padding:3px 9px 3px 4px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:#e7edf7; font-weight:800; font-size:11.5px;
}
.tb-tt-trait-chip > span:last-child{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tb-tt-trait-icon, .tb-tt-champ-icon{
  width:18px; height:18px; object-fit:cover; border-radius:5px; flex:0 0 auto;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.5));
}
.tb-tt-fb{
  min-width:18px; height:18px; padding:0 4px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:6px; background:#263244; color:#fff;
  font-weight:900; font-size:10px;
}

/* ===== Stats grid ===== */
.tb-tt-stats{
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr));
  gap:6px; margin-top:11px;
}
.tb-tt-stat{
  display:flex; flex-direction:column; align-items:flex-start; gap:2px;
  min-width:0; border-radius:9px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  padding:6px 9px;
  color:var(--tt-text);
}
.tb-tt-stat b{ color:var(--tt-text-soft); font-weight:700; font-size:10.5px; letter-spacing:.02em; text-transform:uppercase; }
.tb-tt-stat i{ color:#fff; font-weight:900; font-style:normal; font-size:13.5px; line-height:1.1; }
.tb-tt-item-stats{ grid-template-columns:repeat(2, minmax(0,1fr)); }

/* ===== Mô tả & highlight số ===== */
.tb-tt-desc{ margin-top:10px; color:#e9eff8; font-weight:600; }
.tb-tt-hl-pct{ color:#f8d56a; font-weight:900; }
.tb-tt-hl-scale{ color:#7fd1ff; font-weight:900; }

/* ===== Khối kỹ năng ===== */
.tb-tt-skill{
  margin-top:11px; padding-top:11px;
  border-top:1px solid var(--tt-line);
}
.tb-tt-skill-top{ display:flex; align-items:center; gap:10px; }
.tb-tt-skill-icon-wrap{
  width:44px; height:44px; flex:0 0 auto;
  border-radius:9px; overflow:hidden;
  border:1px solid color-mix(in srgb, var(--tt-accent) 60%, transparent);
  background:#0b1119;
  box-shadow:0 0 12px -4px color-mix(in srgb, var(--tt-accent) 80%, transparent);
}
.tb-tt-skill-icon-wrap.is-empty{ display:none; }
.tb-tt-skill-icon{ width:100%; height:100%; object-fit:cover; display:block; }
.tb-tt-skill-meta{ min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.tb-tt-skill-name{ color:#fff; font-weight:900; font-size:14px; line-height:1.15; }
.tb-tt-mana{
  display:inline-flex; align-items:center; gap:5px;
  color:#9ad5ff; font-weight:900; font-size:11.5px;
}
.tb-tt-mana-dot{
  width:8px; height:8px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #b6e5ff, #2aa8ff 60%, #0e5fb8 100%);
  box-shadow:0 0 6px rgba(42,168,255,.6);
}

/* ===== Block titles dùng cho trait tooltip & item composition ===== */
.tb-tt-block-title{
  margin-top:12px; margin-bottom:7px;
  color:var(--tt-text-soft);
  text-transform:uppercase;
  letter-spacing:.07em; font-size:10.5px; font-weight:900;
  display:flex; align-items:center; gap:8px;
}
.tb-tt-block-title::after{
  content:""; flex:1; height:1px;
  background:linear-gradient(90deg, var(--tt-line), transparent);
}

/* ===== Trait tooltip: header icon lớn + tier markers hình lục giác ===== */
.tb-tt-trait-big{
  width:46px; height:46px; border-radius:11px; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--tt-accent) 16%, rgba(255,255,255,.04));
  border:1px solid color-mix(in srgb, var(--tt-accent) 55%, transparent);
  overflow:hidden;
}
.tb-tt-trait-big-img{ width:32px; height:32px; object-fit:contain; filter:drop-shadow(0 1px 2px rgba(0,0,0,.65)); }

.tb-tt-tiers{ display:flex; flex-direction:column; gap:7px; }
.tb-tt-tier{
  display:flex; gap:10px; align-items:flex-start;
  padding:8px 10px; border-radius:10px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  color:#e7eef8;
}
.tb-tt-tier-hex{
  width:30px; height:34px; flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background:linear-gradient(180deg, #2c3445, #1b2230);
  color:#f8d56a;
  position:relative;
}
.tb-tt-tier-min{
  font-weight:950; font-size:13px; color:inherit;
  text-shadow:0 1px 1px rgba(0,0,0,.55);
}
.tb-tt-tier-desc{ flex:1; min-width:0; font-weight:600; line-height:1.4; }

/* Màu lục giác mốc theo bậc — đồng bộ với .tb-trait-row.tb-style-* */
.tb-tt-tier.tb-style-bronze    .tb-tt-tier-hex{ background:linear-gradient(180deg, #e3a582, #a96947); color:#fff; }
.tb-tt-tier.tb-style-silver    .tb-tt-tier-hex{ background:linear-gradient(180deg, #e7ebf2, #9aa3b3); color:#1a2132; }
.tb-tt-tier.tb-style-gold      .tb-tt-tier-hex{ background:linear-gradient(180deg, #ffd75c, #c98b14); color:#3a2700; }
.tb-tt-tier.tb-style-unique    .tb-tt-tier-hex,
.tb-tt-tier.tb-style-special   .tb-tt-tier-hex{ background:linear-gradient(180deg, #cdb1ff, #7a4cd1); color:#fff; }
.tb-tt-tier.tb-style-single    .tb-tt-tier-hex{
  background:linear-gradient(145deg, #ff4d1f 0%, #ff6b00 48%, #f6b000 100%);
  color:#fff;
}
.tb-tt-tier.tb-style-prismatic .tb-tt-tier-hex,
.tb-tt-tier.tb-style-chromatic .tb-tt-tier-hex{
  background:conic-gradient(from 180deg, #b5fbd1, #aea7f8, #b9e3bc, #f6fdaf, #c7fbf7, #a0f6fe, #b5fbd1);
  color:#1a2132;
}

/* ===== Mini champion chip trong trait tooltip ===== */
.tb-tt-champs{ display:flex; flex-wrap:wrap; gap:6px; }
.tb-tt-champ-mini{
  display:inline-flex; align-items:center; gap:6px;
  max-width:130px; padding:3px 9px 3px 3px;
  border-radius:999px;
  border:1px solid #6b7280;
  background:rgba(255,255,255,.05);
  color:#f5f7fb; font-weight:800; font-size:11.5px;
}
.tb-tt-champ-mini span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-tt-champ-mini.tb-cost-1{ border-color:var(--tb-c1, #8b94a4); }
.tb-tt-champ-mini.tb-cost-2{ border-color:var(--tb-c2, #24b96c); }
.tb-tt-champ-mini.tb-cost-3{ border-color:var(--tb-c3, #2b9bff); }
.tb-tt-champ-mini.tb-cost-4{ border-color:var(--tb-c4, #bc65ff); }
.tb-tt-champ-mini.tb-cost-5{ border-color:var(--tb-c5, #f0c400); }

/* ===== Item tooltip ===== */
.tb-tt-item-icon{
  width:54px; height:54px; border-radius:11px; overflow:hidden;
  border:1px solid color-mix(in srgb, var(--tt-accent) 45%, rgba(148,163,184,.42));
  background:#0b1119; flex:0 0 auto;
  box-shadow:0 4px 12px -6px color-mix(in srgb, var(--tt-accent) 55%, transparent);
}
.tb-tt-item-icon img, .tb-tt-comp-item img{ width:100%; height:100%; object-fit:cover; display:block; }
.tb-tt-comp{
  display:flex; align-items:center; flex-wrap:wrap; gap:7px;
  margin-top:10px; padding-top:10px;
  border-top:1px solid var(--tt-line);
}
.tb-tt-comp-item{
  width:32px; height:32px; border-radius:8px; overflow:hidden;
  background:#0b1119;
  border:1px solid rgba(148,163,184,.4);
}
.tb-tt-plus{ color:#d7e2f0; font-weight:900; opacity:.7; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .tb-smart-tooltip{ width:min(330px, calc(100vw - 18px)); max-height:64vh; font-size:12px; padding:11px; }
  .tb-tt-title{ font-size:16px; }
  .tb-tt-stats{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .tb-tt-portrait{ width:54px; height:54px; }
  .tb-tt-skill-icon-wrap{ width:40px; height:40px; }
  .tb-tt-tier-hex{ width:28px; height:32px; }
}

/* =============================================================================
   Neo Cyber + Inter — chỉ áp dụng cho tooltip TƯỚNG (.tb-tt-kind-unit).
   Tooltip tộc/hệ và trang bị giữ nguyên style cũ.
   Accent chính = màu giá tướng (1→5 vàng) | accent phụ = hồng #ec4899.
   ============================================================================= */
.tb-smart-tooltip.tb-tt-kind-unit{
  --tt-accent-2:#ec4899;
  --tt-bg-1:#0a0e1a;
  --tt-bg-2:#070a13;
  --tt-line:rgba(148,163,184,.10);

  border-width:1px;
  border-radius:0;
  padding:14px;
  background:linear-gradient(180deg, var(--tt-bg-1) 0%, var(--tt-bg-2) 100%);
  /* Cắt góc trên-phải & dưới-trái — signature Neo Cyber */
  clip-path:polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  /* Inset glow màu giá tướng (bù lại outer shadow bị clip-path cắt mất) */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    inset 0 0 36px -14px color-mix(in srgb, var(--tt-accent) 60%, transparent);
}

/* Tiêu đề: Inter weight 500, bỏ cảm giác heavy của 900 */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-title{
  font-weight:500; letter-spacing:-.01em;
}

/* Chân dung: clip-path góc cắt, không bo tròn */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-portrait{
  border-radius:0;
  border-width:1px;
  clip-path:polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  box-shadow:none;
}

/* Pill giá: cắt vát hai đầu */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-cost{
  border-radius:0;
  border:0;
  box-shadow:none;
  clip-path:polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  padding:4px 12px;
  font-weight:500;
  letter-spacing:.04em;
  text-shadow:none;
}

/* Trait chip: bỏ pill, dùng left-border accent màu giá */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-trait-chip{
  border-radius:0;
  background:rgba(15,23,42,.7);
  border:0;
  border-left:2px solid var(--tt-accent);
  padding:4px 9px 4px 7px;
  font-weight:500;
  color:#e2e8f0;
}

/* Stats grid: card sắc cạnh, left-border hồng */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats{ gap:5px; }
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat{
  border-radius:0;
  background:rgba(15,23,42,.6);
  border:1px solid rgba(30,41,59,.8);
  border-left:2px solid var(--tt-accent-2);
  padding:7px 10px;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat b{
  font-weight:500; font-size:10px;
  color:#64748b; letter-spacing:.06em;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat i{
  font-weight:500; font-size:14px;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.01em;
}

/* Khối kỹ năng: card với top-border hồng */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill{
  background:rgba(15,23,42,.55);
  border:1px solid rgba(30,41,59,.8);
  border-top:2px solid var(--tt-accent-2);
  border-radius:0;
  padding:11px 12px;
  margin-top:12px;
}

/* Icon kỹ năng: clip-path góc cắt */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-icon-wrap{
  border-radius:0;
  border-width:1px;
  clip-path:polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  box-shadow:none;
}

.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-name{
  font-weight:500; font-size:14px;
}

/* Mana: text cyan, dot phẳng, số tab-num */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-mana{
  color:#67e8f9; font-weight:500;
  font-variant-numeric:tabular-nums;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-mana-dot{
  background:#06b6d4;
  box-shadow:none;
}

/* Mô tả & highlight số trong skill */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-desc{
  color:#94a3b8; font-weight:400;
  font-size:12px; line-height:1.6;
  margin-top:8px;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-hl-scale{
  color:#67e8f9; font-weight:500;
  font-variant-numeric:tabular-nums;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-hl-pct{
  color:#f472b6; font-weight:500;
  font-variant-numeric:tabular-nums;
}

/* Mobile: padding & clip nhỏ hơn cho viewport hẹp */
@media (max-width: 768px) {
  .tb-smart-tooltip.tb-tt-kind-unit{
    padding:12px;
    clip-path:polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  }
}

/* =============================================================================
   Tooltip fallback CSS chuyển từ inline PHP sang builder.css (v2.4.73)
   Sửa giao diện tooltip tại đây; PHP chỉ còn giữ JS fallback để popup luôn hiện.
   ============================================================================= */
.tb-smart-tooltip.tb-smart-tooltip{position:fixed;left:0;top:0;z-index:2147483600;width:min(370px,calc(100vw - 18px));max-height:min(72vh,560px);overflow:auto;pointer-events:none;opacity:0;transform:translateY(4px) scale(.98);transition:opacity .12s ease,transform .12s ease;border:1px solid rgba(228,236,246,.68);border-radius:13px;background:linear-gradient(180deg,rgba(18,22,29,.985),rgba(10,14,20,.985));box-shadow:0 18px 48px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.05) inset;color:#f4f7fb;padding:12px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;font-size:12px;line-height:1.38}.tb-smart-tooltip.is-visible{opacity:1;transform:translateY(0) scale(1)}.tb-smart-tooltip .tb-tt-head{display:flex;align-items:center;gap:10px;min-width:0}.tb-smart-tooltip .tb-tt-head-main{min-width:0;flex:1}.tb-smart-tooltip .tb-tt-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.tb-smart-tooltip .tb-tt-title{font-size:18px;line-height:1.08;font-weight:950;color:#fff;letter-spacing:-.02em;min-width:0;overflow:hidden;text-overflow:ellipsis}.tb-smart-tooltip .tb-tt-muted{margin-top:3px;color:#aeb8c7;font-size:12px;font-weight:750}.tb-smart-tooltip .tb-tt-cost{flex:0 0 auto;border-radius:999px;background:rgba(255,255,255,.10);color:#dce6f5;padding:4px 8px;font-weight:900;font-size:11px}.tb-smart-tooltip .tb-tt-portrait{width:58px;height:58px;border-radius:12px;overflow:hidden;border:2px solid #6b7280;background:#0b1119;flex:0 0 auto}.tb-smart-tooltip .tb-tt-portrait img,.tb-smart-tooltip .tb-tt-item-icon img,.tb-smart-tooltip .tb-tt-comp-item img{width:100%;height:100%;object-fit:cover;display:block}.tb-smart-tooltip .tb-cost-1{border-color:#8b94a4!important}.tb-smart-tooltip .tb-cost-2{border-color:#24b96c!important}.tb-smart-tooltip .tb-cost-3{border-color:#2b9bff!important}.tb-smart-tooltip .tb-cost-4{border-color:#bc65ff!important}.tb-smart-tooltip .tb-cost-5{border-color:#f0c400!important}.tb-smart-tooltip .tb-tt-traits{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.tb-smart-tooltip .tb-tt-trait-chip{display:inline-flex;align-items:center;gap:5px;max-width:155px;padding:3px 7px 3px 4px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.10);color:#e7edf7;font-weight:850}.tb-smart-tooltip .tb-tt-trait-chip>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tb-smart-tooltip .tb-tt-trait-icon,.tb-smart-tooltip .tb-tt-champ-icon{width:18px;height:18px;object-fit:cover;border-radius:5px;flex:0 0 auto}.tb-smart-tooltip .tb-tt-trait-big{width:44px;height:44px;border-radius:10px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;flex:0 0 auto;overflow:hidden}.tb-smart-tooltip .tb-tt-trait-big-img{width:32px;height:32px;object-fit:contain}.tb-smart-tooltip .tb-tt-fb{min-width:18px;height:18px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background:#263244;color:#fff;font-weight:950;font-size:10px}.tb-smart-tooltip .tb-tt-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px}.tb-smart-tooltip .tb-tt-stats span{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;border-radius:8px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);padding:5px 7px;color:#dbe4ef;font-weight:800}.tb-smart-tooltip .tb-tt-stats b{color:#9fc5ff;font-weight:950}.tb-smart-tooltip .tb-tt-item-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tb-smart-tooltip .tb-tt-desc{margin-top:10px;color:#edf3fb;font-weight:760}.tb-smart-tooltip .tb-tt-skill{margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.16)}.tb-smart-tooltip .tb-tt-skill-top{display:flex;align-items:center;gap:9px}.tb-smart-tooltip .tb-tt-skill-icon{width:42px;height:42px;border-radius:8px;object-fit:cover;border:1px solid rgba(0,169,255,.55);box-shadow:0 0 0 1px rgba(0,169,255,.12)}.tb-smart-tooltip .tb-tt-skill-name{color:#fff;font-weight:950;font-size:14px}.tb-smart-tooltip .tb-tt-mana{display:inline-block;margin-top:2px;color:#2aa8ff;font-weight:950}.tb-smart-tooltip .tb-tt-block-title{margin-top:11px;margin-bottom:6px;color:#b9c6d8;text-transform:uppercase;letter-spacing:.06em;font-size:10px;font-weight:950}.tb-smart-tooltip .tb-tt-tier{display:flex;gap:8px;align-items:flex-start;padding:7px 8px;border-radius:9px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);color:#e7eef8;margin-top:6px}.tb-smart-tooltip .tb-tt-tier-min{width:26px;height:22px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:#202938;color:#f8d56a;font-weight:950}.tb-smart-tooltip .tb-tt-champs{display:flex;flex-wrap:wrap;gap:6px}.tb-smart-tooltip .tb-tt-champ-mini{display:inline-flex;align-items:center;gap:5px;max-width:118px;border:1px solid #6b7280;border-radius:999px;background:rgba(255,255,255,.06);padding:3px 7px 3px 3px;color:#f5f7fb;font-weight:850}.tb-smart-tooltip .tb-tt-champ-mini span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-smart-tooltip .tb-tt-item-icon{width:52px;height:52px;border-radius:10px;overflow:hidden;border:1px solid rgba(148,163,184,.42);background:#0b1119;flex:0 0 auto}.tb-smart-tooltip .tb-tt-comp{display:flex;align-items:center;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.14)}.tb-smart-tooltip .tb-tt-comp-item{width:30px;height:30px;border-radius:7px;overflow:hidden;background:#0b1119;border:1px solid rgba(148,163,184,.38)}.tb-smart-tooltip .tb-tt-plus{color:#d7e2f0;font-weight:950}@media(max-width:768px){.tb-smart-tooltip.tb-smart-tooltip{width:min(330px,calc(100vw - 18px));max-height:64vh;font-size:11px}.tb-smart-tooltip .tb-tt-title{font-size:16px}.tb-smart-tooltip .tb-tt-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tb-smart-tooltip .tb-tt-portrait{width:52px;height:52px}}

.tb-smart-tooltip .tb-tt-desc{color:#e9eef6}.tb-smart-tooltip .tb-token-color{font-weight:700}.tb-smart-tooltip .tb-token-yellow{color:#f5c842}.tb-smart-tooltip .tb-token-orange{color:#c89b3c}.tb-smart-tooltip .tb-token-green{color:#56b045}.tb-smart-tooltip .tb-token-red{color:#f87171}.tb-smart-tooltip .tb-token-blue{color:#4dabf7}.tb-smart-tooltip .tb-token-white{color:#e8e8e8}.tb-smart-tooltip .tb-token-gray{color:#94a3b8}.tb-smart-tooltip .tb-token-icon{display:inline-flex;vertical-align:-2px;align-items:center;justify-content:center;width:14px;height:14px;margin:0 2px 0 1px;object-fit:contain}.tb-smart-tooltip .tb-token-highlight{margin:8px 0 2px;padding:8px 10px;border:1px solid rgba(255,255,255,.08);border-left:3px solid #31c6ff;border-radius:8px;background:rgba(255,255,255,.035)}.tb-smart-tooltip .tb-token-bold{font-weight:800;color:#fff}
/* v2.4.62: trait tooltip tiers/champions match Traits plugin */
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-block-title{margin-top:14px;margin-bottom:8px;color:#d8e3f3;font-size:11px;letter-spacing:.055em}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;column-gap:16px!important;margin:13px 0!important;padding:0!important;border:0!important;background:transparent!important;color:#f1f4ff!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier-min{width:38px!important;min-width:38px!important;height:42px!important;border:0!important;border-radius:0!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%)!important;font-size:14px!important;font-weight:900!important;line-height:1!important;color:#0d1220!important;text-shadow:none!important;box-shadow:none!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.55));background:#5a5a5a!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier-text{display:block;color:#f1f4ff;font-size:13px;font-weight:650;line-height:1.45}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-bronze{background:#e3a582!important;color:#141018!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-silver{background:#d9dde4!important;color:#0d1220!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-gold{background:#f2b705!important;color:#0d1220!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.55))}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-inactive{background:#5a5a5a!important;color:#111!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-unique{background:#b07cff!important;color:#1c1033!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.55))}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-prismatic,.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-chromatic{background:conic-gradient(from 180deg,#b5fbd1 0deg,#aea7f8 25.6deg,#b9e3bc 63deg,#f6fdaf 87.2deg,#c7fbf7 105.21deg,#a0f6fe 139.56deg,#f5ccff 169.3deg,#f899f3 201.86deg,#bfc6a0 244.3deg,#fe93f2 287.41deg,#f3f1c7 334.3deg,#b5fbd1 360deg)!important;color:#2b2154!important;filter:drop-shadow(0 0 8px rgba(205,232,255,.68)) drop-shadow(0 1px 1px rgba(0,0,0,.55))}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champs{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini{width:38px;height:38px;max-width:none!important;min-width:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#0b1119;padding:0!important;overflow:hidden;border:1px solid #6b7280;box-shadow:0 0 0 1px rgba(0,0,0,.35) inset}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-icon{width:100%!important;height:100%!important;border-radius:7px!important;object-fit:cover!important;display:block}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini span{display:none!important}
@media(max-width:640px){.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier{grid-template-columns:38px minmax(0,1fr)!important;column-gap:12px!important}.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier-min{width:34px!important;min-width:34px!important;height:38px!important}.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier-text{font-size:12px!important}}


.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champs{display:flex;flex-wrap:wrap;gap:8px}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini{position:relative;width:38px;height:38px;max-width:none!important;min-width:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#0b1119;padding:0!important;overflow:hidden;border:1.5px solid #6b7280;box-shadow:0 0 0 1px rgba(0,0,0,.35) inset;transition:opacity .15s ease,filter .15s ease,transform .15s ease,box-shadow .15s ease}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini img{width:100%;height:100%;display:block;object-fit:cover}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.is-offboard{opacity:.34;filter:grayscale(.2) saturate(.72) brightness(.72)}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.is-onboard{opacity:1;filter:none;transform:translateY(-1px);box-shadow:0 0 0 1px rgba(255,255,255,.08) inset,0 0 12px rgba(92,166,255,.18)}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini .tb-tt-fb{width:100%;height:100%;border-radius:0;background:#1a2232}


.tb-smart-tooltip .tb-tt-unit{display:flex;flex-direction:column;gap:10px}
.tb-smart-tooltip .tb-tt-unit .tb-tt-head{align-items:flex-start;gap:12px}
.tb-smart-tooltip .tb-tt-unit .tb-tt-portrait{width:64px;height:64px;border-radius:14px;box-shadow:0 6px 16px rgba(0,0,0,.24)}
.tb-smart-tooltip .tb-tt-unit .tb-tt-title{font-size:17px;line-height:1.05;margin-top:1px}
.tb-smart-tooltip .tb-tt-unit .tb-tt-cost{background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.08));border:1px solid rgba(255,255,255,.08);box-shadow:0 1px 0 rgba(255,255,255,.08) inset}
.tb-smart-tooltip .tb-tt-unit .tb-tt-traits{margin-top:8px;gap:6px}
.tb-smart-tooltip .tb-tt-unit .tb-tt-trait-chip{padding:4px 8px 4px 4px;background:rgba(255,255,255,.065)}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:0}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-height:48px;border-radius:10px;background:linear-gradient(180deg,rgba(44,58,80,.44),rgba(21,29,41,.58));border:1px solid rgba(148,163,184,.18);padding:8px 10px;color:#f3f7fc;box-shadow:0 1px 0 rgba(255,255,255,.04) inset}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-label{font-size:11px;line-height:1;color:#95b3df;font-weight:850;text-transform:none;letter-spacing:.01em}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-value{font-size:17px;line-height:1.05;color:#fff;font-weight:950;letter-spacing:-.02em}
.tb-smart-tooltip .tb-tt-unit .tb-tt-divider{height:1px;background:linear-gradient(90deg,rgba(255,255,255,.02),rgba(255,255,255,.16),rgba(255,255,255,.02));margin:2px 0 0}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill{margin-top:0;padding:12px;border-top:none;border-radius:12px;background:linear-gradient(180deg,rgba(14,20,28,.98),rgba(9,13,20,.98));border:1px solid rgba(255,255,255,.08);box-shadow:0 1px 0 rgba(255,255,255,.05) inset}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-top{align-items:flex-start;gap:10px}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-icon{width:46px;height:46px;border-radius:10px}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-name{font-size:16px;line-height:1.1}
.tb-smart-tooltip .tb-tt-unit .tb-tt-mana{font-size:13px;color:#39b7ff}
.tb-smart-tooltip .tb-tt-unit .tb-tt-desc{margin-top:8px;line-height:1.55;color:#eef4fd;font-weight:760}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-meta{display:flex;flex-direction:column;gap:3px;min-width:0}
@media(max-width:768px){.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tb-smart-tooltip .tb-tt-unit .tb-tt-stat-value{font-size:16px}}

/* v2.4.68: polish tooltip fallback inline (.tb-smart-tooltip) - đây là tooltip đang hiển thị thực tế */
.tb-smart-tooltip.tb-smart-tooltip{
  --tt-accent:#94a3b8;
  --tt-bg-1:#101722;
  --tt-bg-2:#080c12;
  --tt-line:rgba(255,255,255,.09);
  --tt-text:#f4f8ff;
  --tt-soft:#aebbd0;
  width:min(382px,calc(100vw - 18px))!important;
  max-height:min(72vh,590px)!important;
  padding:14px!important;
  border:1.5px solid var(--tt-accent)!important;
  border-radius:16px!important;
  background:
    radial-gradient(115% 82% at 50% -12%, color-mix(in srgb,var(--tt-accent) 18%,transparent) 0%, transparent 58%),
    linear-gradient(180deg,var(--tt-bg-1),var(--tt-bg-2))!important;
  box-shadow:0 20px 56px rgba(0,0,0,.62),0 0 0 1px rgba(255,255,255,.05) inset,0 0 28px -9px color-mix(in srgb,var(--tt-accent) 58%,transparent)!important;
  color:var(--tt-text)!important;
  font-size:12.5px!important;
  line-height:1.45!important;
}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-1{--tt-accent:var(--tb-c1,#8b94a4)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-2{--tt-accent:var(--tb-c2,#24b96c)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-3{--tt-accent:var(--tb-c3,#2b9bff)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-4{--tt-accent:var(--tb-c4,#bc65ff)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-5{--tt-accent:var(--tb-c5,#f0c400)}
.tb-smart-tooltip.tb-tt-trait-bronze{--tt-accent:#e3a582}
.tb-smart-tooltip.tb-tt-trait-silver{--tt-accent:#d9dde4}
.tb-smart-tooltip.tb-tt-trait-gold,.tb-smart-tooltip.tb-tt-trait-single{--tt-accent:#f2b705}
.tb-smart-tooltip.tb-tt-trait-unique,.tb-smart-tooltip.tb-tt-trait-special{--tt-accent:#b07cff}
.tb-smart-tooltip.tb-tt-trait-prismatic,.tb-smart-tooltip.tb-tt-trait-chromatic{--tt-accent:#7be0d4}
.tb-smart-tooltip .tb-tt-head{gap:12px!important;align-items:flex-start!important}
.tb-smart-tooltip .tb-tt-title-row{align-items:flex-start!important;gap:10px!important}
.tb-smart-tooltip .tb-tt-title{font-size:18px!important;line-height:1.08!important;font-weight:950!important;letter-spacing:-.02em!important;white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tb-smart-tooltip .tb-tt-muted{color:var(--tt-soft)!important;font-weight:800!important;margin-top:4px!important}
.tb-smart-tooltip .tb-tt-portrait{width:64px!important;height:64px!important;border-radius:15px!important;border-color:var(--tt-accent)!important;box-shadow:0 0 0 1px rgba(0,0,0,.55),0 8px 18px -8px color-mix(in srgb,var(--tt-accent) 75%,transparent)!important}
.tb-smart-tooltip .tb-tt-cost{display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;padding:4px 11px!important;font-size:11.5px!important;font-weight:950!important;white-space:nowrap!important;background:var(--tt-cost-bg,color-mix(in srgb,var(--tt-accent) 78%,#000 0%))!important;border:1px solid color-mix(in srgb,var(--tt-cost-bg,var(--tt-accent)) 65%,#000)!important;color:var(--tt-cost-fg,#fff)!important;text-shadow:0 1px 1px rgba(0,0,0,.35)!important;box-shadow:0 2px 8px -3px color-mix(in srgb,var(--tt-cost-bg,var(--tt-accent)) 78%,transparent)!important}
.tb-smart-tooltip .tb-tt-cost.tb-cost-1{--tt-cost-bg:var(--tb-c1,#8b94a4);--tt-cost-fg:#fff}
.tb-smart-tooltip .tb-tt-cost.tb-cost-2{--tt-cost-bg:var(--tb-c2,#24b96c);--tt-cost-fg:#fff}
.tb-smart-tooltip .tb-tt-cost.tb-cost-3{--tt-cost-bg:var(--tb-c3,#2b9bff);--tt-cost-fg:#fff}
.tb-smart-tooltip .tb-tt-cost.tb-cost-4{--tt-cost-bg:var(--tb-c4,#bc65ff);--tt-cost-fg:#fff}
.tb-smart-tooltip .tb-tt-cost.tb-cost-5{--tt-cost-bg:var(--tb-c5,#f0c400);--tt-cost-fg:#2a1d00;text-shadow:0 1px 1px rgba(255,255,255,.35)!important}
.tb-smart-tooltip .tb-tt-trait-chip{background:rgba(255,255,255,.065)!important;border-color:rgba(255,255,255,.12)!important;font-size:11.5px!important;box-shadow:0 1px 0 rgba(255,255,255,.035) inset!important}
.tb-smart-tooltip .tb-tt-unit{gap:11px!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats{gap:8px!important;margin-top:0!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-card{min-height:50px!important;border-radius:12px!important;background:linear-gradient(180deg,rgba(46,62,88,.50),rgba(17,25,37,.62))!important;border-color:rgba(148,163,184,.20)!important;padding:8px 10px!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-label{color:#9eb9df!important;font-weight:900!important;font-size:10.5px!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-value{font-size:17px!important;color:#fff!important;font-weight:950!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill{border-radius:14px!important;padding:12px!important;background:linear-gradient(180deg,rgba(17,24,35,.98),rgba(8,12,18,.98))!important;border:1px solid rgba(255,255,255,.09)!important;box-shadow:0 1px 0 rgba(255,255,255,.055) inset!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-icon{width:48px!important;height:48px!important;border-radius:11px!important;border:1px solid color-mix(in srgb,var(--tt-accent) 62%,transparent)!important;box-shadow:0 0 14px -5px color-mix(in srgb,var(--tt-accent) 80%,transparent)!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-name{font-size:16px!important;font-weight:950!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-desc{line-height:1.58!important;font-weight:720!important;color:#eef5ff!important}
.tb-smart-tooltip .tb-tt-block-title{display:flex!important;align-items:center!important;gap:8px!important;margin-top:13px!important;margin-bottom:8px!important;color:#d9e5f6!important;font-size:10.5px!important;letter-spacing:.075em!important}
.tb-smart-tooltip .tb-tt-block-title:after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.14),transparent)}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-desc-main{margin-top:10px!important;padding:10px 11px!important;border-radius:12px!important;background:rgba(255,255,255,.045)!important;border:1px solid rgba(255,255,255,.08)!important;line-height:1.56!important;font-weight:700!important;color:#edf4ff!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier{grid-template-columns:38px minmax(0,1fr)!important;column-gap:13px!important;margin:9px 0!important;align-items:start!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier-min{width:34px!important;min-width:34px!important;height:38px!important;border-radius:0!important;clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%)!important;font-size:13px!important;font-weight:950!important;box-shadow:0 2px 8px rgba(0,0,0,.38)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-tier-text{padding-top:1px!important;line-height:1.46!important;font-weight:650!important;color:#eef3ff!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-bronze{background:linear-gradient(180deg,#e7ad89,#9e5f3c)!important;color:#fff!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-silver{background:linear-gradient(180deg,#eef2f8,#9ca6b8)!important;color:#121827!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-gold{background:linear-gradient(180deg,#ffd95f,#c98b14)!important;color:#312000!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-single{background:linear-gradient(145deg,#ff4d1f 0%,#ff7500 52%,#f6b000 100%)!important;color:#fff!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-unique{background:linear-gradient(180deg,#d2b7ff,#7247c9)!important;color:#fff!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-prismatic,.tb-smart-tooltip .tb-tt-trait-tooltip .tb-style-chromatic{background:conic-gradient(from 180deg,#b5fbd1,#aea7f8,#b9e3bc,#f6fdaf,#c7fbf7,#a0f6fe,#f5ccff,#b5fbd1)!important;color:#202642!important;filter:drop-shadow(0 0 8px rgba(205,232,255,.62)) drop-shadow(0 1px 1px rgba(0,0,0,.45))!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champs{gap:9px!important;margin-top:8px!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini{width:42px!important;height:42px!important;min-width:42px!important;border-radius:10px!important;border-width:1.5px!important;background:#0b1119!important;box-shadow:0 0 0 1px rgba(0,0,0,.45) inset,0 4px 10px rgba(0,0,0,.18)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.tb-cost-1{border-color:var(--tb-c1,#8b94a4)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.tb-cost-2{border-color:var(--tb-c2,#24b96c)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.tb-cost-3{border-color:var(--tb-c3,#2b9bff)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.tb-cost-4{border-color:var(--tb-c4,#bc65ff)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.tb-cost-5{border-color:var(--tb-c5,#f0c400)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.is-offboard{opacity:.28!important;filter:grayscale(.28) saturate(.62) brightness(.68)!important}
.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini.is-onboard{opacity:1!important;filter:none!important;transform:translateY(-1px)!important;box-shadow:0 0 0 1px rgba(255,255,255,.10) inset,0 0 14px color-mix(in srgb,var(--tt-accent) 36%,transparent)!important}
.tb-smart-tooltip .tb-tt-item-icon{width:56px!important;height:56px!important;border-radius:12px!important;border-color:rgba(148,163,184,.45)!important}
@media(max-width:768px){.tb-smart-tooltip.tb-smart-tooltip{width:min(340px,calc(100vw - 16px))!important;padding:12px!important;font-size:12px!important}.tb-smart-tooltip .tb-tt-portrait{width:56px!important;height:56px!important}.tb-smart-tooltip .tb-tt-title{font-size:16px!important}.tb-smart-tooltip .tb-tt-trait-tooltip .tb-tt-champ-mini{width:38px!important;height:38px!important;min-width:38px!important}}



/* v2.4.70: premium unit tooltip skin - override fallback inline */
.tb-smart-tooltip.tb-smart-tooltip{
  --tt-accent:#38bdf8;
  --tt-glow:rgba(56,189,248,.35);
  --tt-panel:#0c1421;
  --tt-panel-2:#121c2c;
  --tt-border:rgba(120,205,255,.58);
  width:min(398px,calc(100vw - 18px))!important;
  padding:12px!important;
  border-radius:18px!important;
  border:1px solid var(--tt-border)!important;
  background:
    radial-gradient(110% 70% at 15% -8%, color-mix(in srgb,var(--tt-accent) 26%,transparent), transparent 58%),
    radial-gradient(90% 75% at 100% 0%, rgba(78,115,255,.18), transparent 56%),
    linear-gradient(180deg,#122034 0%,#0b1320 58%,#070b12 100%)!important;
  box-shadow:
    0 22px 55px rgba(0,0,0,.66),
    0 0 0 1px rgba(255,255,255,.055) inset,
    0 0 34px -12px var(--tt-glow)!important;
  overflow:hidden!important;
}
.tb-smart-tooltip.tb-smart-tooltip:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:2px;
  background:linear-gradient(90deg,transparent,var(--tt-accent),#9ee7ff,var(--tt-accent),transparent);
  opacity:.92;
  pointer-events:none;
}
.tb-smart-tooltip.tb-smart-tooltip:after{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  pointer-events:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10), inset 0 -1px 0 rgba(255,255,255,.035);
}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-1{--tt-accent:#9aa4b2;--tt-glow:rgba(154,164,178,.28);--tt-border:rgba(154,164,178,.56)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-2{--tt-accent:#25d77d;--tt-glow:rgba(37,215,125,.32);--tt-border:rgba(37,215,125,.52)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-3{--tt-accent:#26a8ff;--tt-glow:rgba(38,168,255,.38);--tt-border:rgba(78,190,255,.72)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-4{--tt-accent:#c46cff;--tt-glow:rgba(196,108,255,.34);--tt-border:rgba(196,108,255,.58)}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-5{--tt-accent:#ffd34d;--tt-glow:rgba(255,211,77,.34);--tt-border:rgba(255,211,77,.62)}
.tb-smart-tooltip .tb-tt-unit{gap:12px!important;position:relative!important;z-index:1!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-head{
  padding:2px 2px 0 2px!important;
  gap:12px!important;
  align-items:flex-start!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-portrait{
  width:66px!important;
  height:66px!important;
  border-radius:16px!important;
  border:1.5px solid var(--tt-accent)!important;
  background:#07101b!important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 0 18px -5px var(--tt-glow),
    0 10px 18px rgba(0,0,0,.34)!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-portrait img{transform:scale(1.035)}
.tb-smart-tooltip .tb-tt-unit .tb-tt-title-row{align-items:flex-start!important;gap:10px!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-title{
  font-size:18px!important;
  line-height:1.08!important;
  color:#fff!important;
  text-shadow:0 1px 0 rgba(0,0,0,.38)!important;
  letter-spacing:-.015em!important;
}
.tb-smart-tooltip .tb-tt-cost{
  padding:5px 11px!important;
  min-height:25px!important;
  border-radius:999px!important;
  color:#fff!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--tt-accent) 92%,#fff 8%),color-mix(in srgb,var(--tt-accent) 78%,#000 22%))!important;
  border:1px solid color-mix(in srgb,var(--tt-accent) 70%,#fff 12%)!important;
  box-shadow:0 0 14px -4px var(--tt-glow), inset 0 1px 0 rgba(255,255,255,.32)!important;
}
.tb-smart-tooltip.tb-cost-5 .tb-tt-cost{color:#2c2100!important;text-shadow:0 1px 0 rgba(255,255,255,.40)!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-traits{
  margin-top:10px!important;
  gap:7px!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-trait-chip{
  height:25px!important;
  padding:4px 9px 4px 5px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.105),rgba(255,255,255,.045))!important;
  border:1px solid rgba(190,220,255,.14)!important;
  color:#edf6ff!important;
  font-size:11.5px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 4px 12px rgba(0,0,0,.13)!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-trait-icon{
  width:17px!important;
  height:17px!important;
  border-radius:50%!important;
  background:rgba(0,0,0,.18)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.08)!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-card{
  position:relative!important;
  min-height:51px!important;
  padding:8px 10px 9px!important;
  border-radius:12px!important;
  background:
    linear-gradient(180deg,rgba(39,55,82,.86),rgba(19,30,47,.82))!important;
  border:1px solid rgba(130,168,216,.22)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 8px 16px rgba(0,0,0,.15)!important;
  overflow:hidden!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-card:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:2px;
  background:linear-gradient(180deg,var(--tt-accent),transparent);
  opacity:.62;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-label{
  color:#9db9dd!important;
  font-size:10.5px!important;
  line-height:1!important;
  font-weight:900!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats .tb-tt-stat-value{
  margin-top:2px!important;
  font-size:17px!important;
  line-height:1!important;
  color:#fff!important;
  font-weight:950!important;
  letter-spacing:-.02em!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-divider{
  margin:1px 0 0!important;
  background:linear-gradient(90deg,transparent,rgba(157,205,255,.22),transparent)!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill{
  position:relative!important;
  padding:13px!important;
  border-radius:15px!important;
  background:
    radial-gradient(95% 75% at 0% 0%, color-mix(in srgb,var(--tt-accent) 13%,transparent), transparent 62%),
    linear-gradient(180deg,rgba(14,22,35,.98),rgba(8,13,21,.98))!important;
  border:1px solid rgba(127,168,218,.18)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 10px 22px rgba(0,0,0,.20)!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill:before{
  content:"KỸ NĂNG";
  display:inline-flex;
  margin:0 0 8px 0;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(56,189,248,.10);
  border:1px solid rgba(106,203,255,.18);
  color:#9edbff;
  font-size:9px;
  line-height:1;
  font-weight:950;
  letter-spacing:.08em;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-top{gap:10px!important;align-items:center!important}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-icon{
  width:50px!important;
  height:50px!important;
  border-radius:12px!important;
  border:1px solid color-mix(in srgb,var(--tt-accent) 64%,transparent)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset,0 0 16px -5px var(--tt-glow)!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-skill-name{
  font-size:16.5px!important;
  line-height:1.1!important;
  color:#fff!important;
  font-weight:950!important;
  letter-spacing:-.018em!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-mana{
  margin-top:4px!important;
  color:#54c8ff!important;
  font-size:13px!important;
  font-weight:950!important;
}
.tb-smart-tooltip .tb-tt-unit .tb-tt-desc{
  margin-top:10px!important;
  color:#f3f8ff!important;
  font-size:12.5px!important;
  line-height:1.62!important;
  font-weight:760!important;
}
.tb-smart-tooltip .tb-token-green{color:#64df86!important;font-weight:950!important}
.tb-smart-tooltip .tb-token-yellow{color:#ffd45d!important;font-weight:950!important}
.tb-smart-tooltip .tb-token-orange{color:#f2b35b!important;font-weight:950!important}
.tb-smart-tooltip .tb-token-blue{color:#58c7ff!important;font-weight:950!important}
.tb-smart-tooltip .tb-token-red{color:#ff7b7b!important;font-weight:950!important}
.tb-smart-tooltip .tb-token-icon{width:15px!important;height:15px!important;vertical-align:-3px!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))}
@media(max-width:768px){
  .tb-smart-tooltip.tb-smart-tooltip{width:min(352px,calc(100vw - 16px))!important;padding:11px!important;border-radius:16px!important}
  .tb-smart-tooltip .tb-tt-unit .tb-tt-unit-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tb-smart-tooltip .tb-tt-unit .tb-tt-portrait{width:58px!important;height:58px!important}
  .tb-smart-tooltip .tb-tt-unit .tb-tt-title{font-size:16.5px!important}
}

/* v2.4.69: mobile chỉ tắt tooltip tướng/trang bị, giữ tooltip Tộc/Hệ */
@media(max-width:768px),(hover:none),(pointer:coarse){.tb-smart-tooltip.tb-tt-kind-unit,.tb-smart-tooltip.tb-tt-kind-item{display:none!important;opacity:0!important;visibility:hidden!important}}



/* =============================================================================
   v2.4.74 FINAL: Tooltip TƯỚNG Neo Cyber + Inter
   Ghi đè các skin cũ phía trên, chỉ áp dụng cho tooltip tướng.
   ============================================================================= */
.tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-unit{
  --tt-accent-2:#ec4899 !important;
  --tt-bg-1:#0a0e1a !important;
  --tt-bg-2:#070a13 !important;
  --tt-line:rgba(148,163,184,.10) !important;
  --tt-text:#f1f5fb !important;
  --tt-text-soft:#94a3b8 !important;
  --tt-glow:color-mix(in srgb, var(--tt-accent) 36%, transparent) !important;

  width:min(370px, calc(100vw - 18px)) !important;
  max-height:min(72vh, 560px) !important;
  padding:14px !important;
  border-width:1px !important;
  border-style:solid !important;
  border-color:color-mix(in srgb, var(--tt-accent) 72%, rgba(255,255,255,.18)) !important;
  border-radius:0 !important;
  background:linear-gradient(180deg, var(--tt-bg-1) 0%, var(--tt-bg-2) 100%) !important;
  clip-path:polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    inset 0 0 36px -14px color-mix(in srgb, var(--tt-accent) 60%, transparent),
    0 18px 48px rgba(0,0,0,.58) !important;
  overflow:auto !important;
  color:#f1f5fb !important;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif !important;
  font-size:12px !important;
  line-height:1.55 !important;
}
.tb-smart-tooltip.tb-tt-kind-unit:before,
.tb-smart-tooltip.tb-tt-kind-unit:after{
  content:none !important;
  display:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-1{--tt-accent:var(--tb-c1,#8b94a4) !important;--tt-border:var(--tb-c1,#8b94a4) !important;}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-2{--tt-accent:var(--tb-c2,#24b96c) !important;--tt-border:var(--tb-c2,#24b96c) !important;}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-3{--tt-accent:var(--tb-c3,#2b9bff) !important;--tt-border:var(--tb-c3,#2b9bff) !important;}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-4{--tt-accent:var(--tb-c4,#bc65ff) !important;--tt-border:var(--tb-c4,#bc65ff) !important;}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-5{--tt-accent:var(--tb-c5,#f0c400) !important;--tt-border:var(--tb-c5,#f0c400) !important;}

.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-unit{
  position:relative !important;
  z-index:1 !important;
  display:block !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-head{
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  min-width:0 !important;
  padding:0 !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-head-main{
  min-width:0 !important;
  flex:1 !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-title-row{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:10px !important;
  min-width:0 !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-title{
  font-size:18px !important;
  line-height:1.1 !important;
  font-weight:500 !important;
  color:#fff !important;
  letter-spacing:-.01em !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  text-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-portrait{
  width:60px !important;
  height:60px !important;
  flex:0 0 60px !important;
  border-radius:0 !important;
  border-width:1px !important;
  border-style:solid !important;
  border-color:var(--tt-accent) !important;
  clip-path:polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)) !important;
  background:#0b1119 !important;
  overflow:hidden !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-portrait img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
  transform:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-cost{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  min-height:0 !important;
  border-radius:0 !important;
  border:0 !important;
  background:var(--tt-accent) !important;
  color:#fff !important;
  box-shadow:none !important;
  clip-path:polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%) !important;
  padding:4px 12px !important;
  font-size:11.5px !important;
  line-height:1.15 !important;
  font-weight:500 !important;
  letter-spacing:.04em !important;
  text-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit.tb-cost-5 .tb-tt-cost{
  color:#2c2100 !important;
  text-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-traits{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  margin-top:8px !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-trait-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  height:auto !important;
  max-width:160px !important;
  border-radius:0 !important;
  background:rgba(15,23,42,.7) !important;
  border:0 !important;
  border-left:2px solid var(--tt-accent) !important;
  padding:4px 9px 4px 7px !important;
  color:#e2e8f0 !important;
  font-size:11.5px !important;
  line-height:1.15 !important;
  font-weight:500 !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-trait-icon{
  width:18px !important;
  height:18px !important;
  object-fit:cover !important;
  border-radius:5px !important;
  flex:0 0 auto !important;
  background:transparent !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:5px !important;
  margin-top:11px !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat,
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats span.tb-tt-stat{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:2px !important;
  min-width:0 !important;
  border-radius:0 !important;
  background:rgba(15,23,42,.6) !important;
  border:1px solid rgba(30,41,59,.8) !important;
  border-left:2px solid var(--tt-accent-2) !important;
  padding:7px 10px !important;
  color:#e2e8f0 !important;
  font-weight:400 !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat b,
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats span.tb-tt-stat b{
  color:#64748b !important;
  font-size:10px !important;
  line-height:1.05 !important;
  font-weight:500 !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat i,
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats span.tb-tt-stat i{
  color:#fff !important;
  font-size:14px !important;
  line-height:1.15 !important;
  font-weight:500 !important;
  font-style:normal !important;
  font-variant-numeric:tabular-nums !important;
  letter-spacing:-.01em !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill{
  position:relative !important;
  background:rgba(15,23,42,.55) !important;
  border:1px solid rgba(30,41,59,.8) !important;
  border-top:2px solid var(--tt-accent-2) !important;
  border-radius:0 !important;
  padding:11px 12px !important;
  margin-top:12px !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill:before{
  content:none !important;
  display:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-top{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-icon-wrap{
  width:44px !important;
  height:44px !important;
  flex:0 0 44px !important;
  border-radius:0 !important;
  border-width:1px !important;
  border-style:solid !important;
  border-color:color-mix(in srgb, var(--tt-accent) 60%, transparent) !important;
  clip-path:polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)) !important;
  overflow:hidden !important;
  background:#0b1119 !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-icon{
  width:100% !important;
  height:100% !important;
  border:0 !important;
  border-radius:0 !important;
  object-fit:cover !important;
  display:block !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-name{
  color:#fff !important;
  font-size:14px !important;
  line-height:1.15 !important;
  font-weight:500 !important;
  letter-spacing:0 !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-mana{
  display:inline-flex !important;
  align-items:center !important;
  gap:5px !important;
  margin-top:2px !important;
  color:#67e8f9 !important;
  font-size:11.5px !important;
  line-height:1.2 !important;
  font-weight:500 !important;
  font-variant-numeric:tabular-nums !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-mana-dot{
  width:8px !important;
  height:8px !important;
  border-radius:50% !important;
  background:#06b6d4 !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-desc{
  color:#94a3b8 !important;
  font-weight:400 !important;
  font-size:12px !important;
  line-height:1.6 !important;
  margin-top:8px !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-hl-scale{
  color:#67e8f9 !important;
  font-weight:500 !important;
  font-variant-numeric:tabular-nums !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-hl-pct{
  color:#f472b6 !important;
  font-weight:500 !important;
  font-variant-numeric:tabular-nums !important;
}
@media(max-width:768px){
  .tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-unit{
    width:min(330px, calc(100vw - 18px)) !important;
    padding:12px !important;
    clip-path:polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px)) !important;
  }
  .tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }
}


/* =============================================================================
   v2.4.75 HOTFIX: fallback tooltip unit skill icon
   Fix ảnh kỹ năng bị bung full width làm tên kỹ năng/mana bị xếp dọc.
   Áp dụng cho cả tooltip chính và #ttb2-smart-tooltip-fallback.
   ============================================================================= */
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-top,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-top{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-meta,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-meta{
  flex:1 1 auto!important;
  min-width:0!important;
  display:block!important;
  writing-mode:horizontal-tb!important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-icon-wrap,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-icon-wrap{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
  max-width:44px!important;
  max-height:44px!important;
  display:block!important;
  overflow:hidden!important;
  border-radius:0!important;
  border:1px solid color-mix(in srgb,var(--tt-accent) 60%,transparent)!important;
  clip-path:polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px))!important;
  background:#0b1119!important;
  box-shadow:none!important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-icon-wrap .tb-tt-skill-icon,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-icon-wrap .tb-tt-skill-icon{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  display:block!important;
  border:0!important;
  border-radius:0!important;
  transform:none!important;
  box-shadow:none!important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-top > img.tb-tt-skill-icon,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-top > img.tb-tt-skill-icon{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
  max-width:44px!important;
  max-height:44px!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:0!important;
  border:1px solid color-mix(in srgb,var(--tt-accent) 60%,transparent)!important;
  clip-path:polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px))!important;
  box-shadow:none!important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill-name,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-name{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  writing-mode:horizontal-tb!important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-mana,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-mana{
  display:inline-flex!important;
  align-items:center!important;
  white-space:nowrap!important;
  word-break:normal!important;
  writing-mode:horizontal-tb!important;
}

/* Đồng bộ Neo Cyber cho HTML fallback đang dùng .tb-tt-unit-stats/.tb-tt-stat-card */
#ttb2-smart-tooltip-fallback.tb-smart-tooltip.tb-tt-kind-unit{
  width:min(370px, calc(100vw - 18px))!important;
  max-height:min(72vh, 560px)!important;
  padding:14px!important;
  border-width:1px!important;
  border-style:solid!important;
  border-color:color-mix(in srgb, var(--tt-accent) 72%, rgba(255,255,255,.18))!important;
  border-radius:0!important;
  background:linear-gradient(180deg,#0a0e1a 0%,#070a13 100%)!important;
  clip-path:polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 18px 48px rgba(0,0,0,.58)!important;
  color:#f1f5fb!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif!important;
  font-size:12px!important;
  line-height:1.55!important;
}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit:before,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit:after{content:none!important;display:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit{display:block!important;position:relative!important;z-index:1!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-head{display:flex!important;align-items:center!important;gap:11px!important;padding:0!important;min-width:0!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-head-main{min-width:0!important;flex:1!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-title-row{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;min-width:0!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-title{font-size:18px!important;line-height:1.1!important;font-weight:500!important;color:#fff!important;letter-spacing:-.01em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-portrait{width:60px!important;height:60px!important;flex:0 0 60px!important;border-radius:0!important;border-width:1px!important;border-style:solid!important;border-color:var(--tt-accent)!important;clip-path:polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px))!important;background:#0b1119!important;overflow:hidden!important;box-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-portrait img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;transform:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-cost{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;border-radius:0!important;border:0!important;background:var(--tt-accent)!important;color:#fff!important;box-shadow:none!important;clip-path:polygon(7px 0,100% 0,calc(100% - 7px) 100%,0 100%)!important;padding:4px 12px!important;font-size:11.5px!important;line-height:1.15!important;font-weight:500!important;letter-spacing:.04em!important;text-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit.tb-cost-5 .tb-tt-cost{color:#2c2100!important;text-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-traits{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin-top:8px!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-trait-chip{display:inline-flex!important;align-items:center!important;gap:6px!important;max-width:160px!important;border-radius:0!important;background:rgba(15,23,42,.7)!important;border:0!important;border-left:2px solid var(--tt-accent)!important;padding:4px 9px 4px 7px!important;color:#e2e8f0!important;font-size:11.5px!important;line-height:1.15!important;font-weight:500!important;box-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-trait-icon{width:18px!important;height:18px!important;object-fit:cover!important;border-radius:5px!important;flex:0 0 auto!important;background:transparent!important;box-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;margin-top:11px!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit-stats .tb-tt-stat-card{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:2px!important;min-width:0!important;min-height:0!important;border-radius:0!important;background:rgba(15,23,42,.6)!important;border:1px solid rgba(30,41,59,.8)!important;border-left:2px solid #ec4899!important;padding:7px 10px!important;color:#e2e8f0!important;font-weight:400!important;box-shadow:none!important;overflow:hidden!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit-stats .tb-tt-stat-card:before{content:none!important;display:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit-stats .tb-tt-stat-label{color:#64748b!important;font-size:10px!important;line-height:1.05!important;font-weight:500!important;letter-spacing:.06em!important;text-transform:uppercase!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit-stats .tb-tt-stat-value{color:#fff!important;font-size:14px!important;line-height:1.15!important;font-weight:500!important;font-style:normal!important;font-variant-numeric:tabular-nums!important;letter-spacing:-.01em!important;margin-top:0!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-divider{display:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill{position:relative!important;background:rgba(15,23,42,.55)!important;border:1px solid rgba(30,41,59,.8)!important;border-top:2px solid #ec4899!important;border-radius:0!important;padding:11px 12px!important;margin-top:12px!important;box-shadow:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill:before{content:none!important;display:none!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill-name{color:#fff!important;font-size:14px!important;line-height:1.15!important;font-weight:500!important;letter-spacing:0!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-desc{color:#94a3b8!important;font-weight:400!important;font-size:12px!important;line-height:1.6!important;margin-top:8px!important}
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-mana{margin-top:2px!important;color:#67e8f9!important;font-size:11.5px!important;line-height:1.2!important;font-weight:500!important;font-variant-numeric:tabular-nums!important}

/* =============================================================================
   v2.4.76 FINAL: Tooltip TỘC/HỆ Neo Cyber + Inter
   Đồng bộ visual với tooltip tướng, giữ mốc màu tộc/hệ và làm tướng offboard chỉ tối nhẹ.
   ============================================================================= */
.tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-trait,
#ttb2-smart-tooltip-fallback.tb-smart-tooltip.tb-tt-kind-trait{
  --tt-accent-2:#22d3ee !important;
  --tt-bg-1:#0c1220 !important;
  --tt-bg-2:#080d18 !important;
  --tt-line:rgba(148,163,184,.12) !important;
  --tt-text:#f1f5fb !important;
  --tt-text-soft:#94a3b8 !important;
  --tt-glow:color-mix(in srgb, var(--tt-accent) 32%, transparent) !important;

  width:min(372px, calc(100vw - 18px)) !important;
  max-height:min(74vh, 580px) !important;
  padding:14px !important;
  border-width:1px !important;
  border-style:solid !important;
  border-color:color-mix(in srgb, var(--tt-accent) 72%, rgba(255,255,255,.18)) !important;
  border-radius:0 !important;
  background:
    radial-gradient(100% 70% at 8% -8%, color-mix(in srgb, var(--tt-accent) 16%, transparent), transparent 58%),
    linear-gradient(180deg, var(--tt-bg-1) 0%, var(--tt-bg-2) 100%) !important;
  clip-path:polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.035),
    inset 0 0 34px -17px color-mix(in srgb, var(--tt-accent) 62%, transparent),
    0 18px 48px rgba(0,0,0,.56) !important;
  overflow:auto !important;
  color:var(--tt-text) !important;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif !important;
  font-size:12px !important;
  line-height:1.55 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait:before,
.tb-smart-tooltip.tb-tt-kind-trait:after,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait:before,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait:after{
  content:none !important;
  display:none !important;
}
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-bronze,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-bronze{--tt-accent:#e3a582 !important;}
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-silver,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-silver{--tt-accent:#d9dde4 !important;}
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-gold,
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-single,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-gold,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-single{--tt-accent:#f2b705 !important;}
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-unique,
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-special,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-unique,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-special{--tt-accent:#b07cff !important;}
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-prismatic,
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-chromatic,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-prismatic,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-chromatic{--tt-accent:#7be0d4 !important;}

.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-trait-tooltip,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-trait-tooltip{
  position:relative !important;
  z-index:1 !important;
  display:block !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-head,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-head{
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  min-width:0 !important;
  padding:0 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-trait-big,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-trait-big{
  width:56px !important;
  height:56px !important;
  flex:0 0 56px !important;
  border-radius:0 !important;
  border:1px solid var(--tt-accent) !important;
  clip-path:polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)) !important;
  background:rgba(15,23,42,.72) !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-trait-big-img,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-trait-big-img{
  width:34px !important;
  height:34px !important;
  object-fit:contain !important;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.62)) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-head-main,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-head-main{min-width:0 !important;flex:1 !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-title,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-title{
  color:#fff !important;
  font-size:18px !important;
  line-height:1.1 !important;
  font-weight:500 !important;
  letter-spacing:-.01em !important;
  text-shadow:none !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-muted,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-muted{
  margin-top:5px !important;
  display:inline-flex !important;
  align-items:center !important;
  padding:3px 9px !important;
  border-radius:0 !important;
  clip-path:polygon(6px 0,100% 0,calc(100% - 6px) 100%,0 100%) !important;
  background:var(--tt-accent) !important;
  color:#07111d !important;
  font-size:11px !important;
  line-height:1.1 !important;
  font-weight:600 !important;
  letter-spacing:.04em !important;
}
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-unique .tb-tt-muted,
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-special .tb-tt-muted,
.tb-smart-tooltip.tb-tt-kind-trait.tb-tt-trait-bronze .tb-tt-muted,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-unique .tb-tt-muted,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-special .tb-tt-muted,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait.tb-tt-trait-bronze .tb-tt-muted{color:#fff !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-desc-main,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-desc-main{
  margin-top:12px !important;
  padding:10px 11px !important;
  border-radius:0 !important;
  background:rgba(15,23,42,.52) !important;
  border:1px solid rgba(30,41,59,.82) !important;
  border-left:2px solid var(--tt-accent-2) !important;
  color:#cbd5e1 !important;
  font-size:12px !important;
  line-height:1.6 !important;
  font-weight:400 !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-block-title,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-block-title{
  margin-top:13px !important;
  margin-bottom:8px !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  color:#94a3b8 !important;
  font-size:10px !important;
  line-height:1.1 !important;
  font-weight:500 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-block-title:after,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-block-title:after{
  content:"" !important;
  flex:1 !important;
  height:1px !important;
  background:linear-gradient(90deg, rgba(148,163,184,.22), transparent) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier{
  display:grid !important;
  grid-template-columns:38px minmax(0,1fr) !important;
  column-gap:11px !important;
  align-items:start !important;
  margin:7px 0 !important;
  padding:9px 10px !important;
  border-radius:0 !important;
  background:rgba(15,23,42,.46) !important;
  border:1px solid rgba(30,41,59,.76) !important;
  color:#e2e8f0 !important;
  box-shadow:none !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier-min,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier-min{
  width:32px !important;
  min-width:32px !important;
  height:36px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 !important;
  clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%) !important;
  font-size:13px !important;
  line-height:1 !important;
  font-weight:600 !important;
  color:#07111d !important;
  text-shadow:none !important;
  box-shadow:none !important;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.45)) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier-text,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier-text{
  display:block !important;
  padding-top:0 !important;
  color:#cbd5e1 !important;
  font-size:12px !important;
  line-height:1.55 !important;
  font-weight:400 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-bronze,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-bronze{background:#e3a582 !important;color:#111827 !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-silver,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-silver{background:#d9dde4 !important;color:#0d1220 !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-gold,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-gold{background:#f2b705 !important;color:#211600 !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-single,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-single{background:linear-gradient(145deg,#ff6a1f,#f6b000) !important;color:#fff !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-unique,
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-special,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-unique,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-special{background:#b07cff !important;color:#120821 !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-prismatic,
.tb-smart-tooltip.tb-tt-kind-trait .tb-style-chromatic,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-prismatic,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-style-chromatic{
  background:conic-gradient(from 180deg,#b5fbd1,#aea7f8,#b9e3bc,#f6fdaf,#c7fbf7,#a0f6fe,#f5ccff,#b5fbd1) !important;
  color:#202642 !important;
  filter:drop-shadow(0 0 7px rgba(205,232,255,.58)) drop-shadow(0 1px 1px rgba(0,0,0,.42)) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champs,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champs{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin-top:8px !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini{
  position:relative !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:0 !important;
  clip-path:polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)) !important;
  padding:0 !important;
  overflow:hidden !important;
  background:#0b1119 !important;
  border:1px solid #64748b !important;
  box-shadow:none !important;
  transition:opacity .15s ease, filter .15s ease, transform .15s ease !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini img,
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-icon,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini img,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-icon{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:cover !important;
  border-radius:0 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini span,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini span{display:none !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-1,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-1{border-color:var(--tb-c1,#8b94a4) !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-2,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-2{border-color:var(--tb-c2,#24b96c) !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-3,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-3{border-color:var(--tb-c3,#2b9bff) !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-4,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-4{border-color:var(--tb-c4,#bc65ff) !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-5,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.tb-cost-5{border-color:var(--tb-c5,#f0c400) !important;}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.is-offboard,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.is-offboard{
  opacity:.62 !important;
  filter:grayscale(.12) saturate(.82) brightness(.86) !important;
  transform:none !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.is-onboard,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.is-onboard{
  opacity:1 !important;
  filter:saturate(1.08) brightness(1.06) !important;
  transform:translateY(-1px) !important;
  box-shadow:0 0 0 1px rgba(255,255,255,.08) inset, 0 0 12px color-mix(in srgb, var(--tt-accent) 30%, transparent) !important;
}

/* Làm nền tooltip tướng sáng hơn một chút, vẫn giữ Neo Cyber tối nhẹ. */
.tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-unit,
#ttb2-smart-tooltip-fallback.tb-smart-tooltip.tb-tt-kind-unit{
  --tt-bg-1:#0d1322 !important;
  --tt-bg-2:#080d18 !important;
  background:linear-gradient(180deg, var(--tt-bg-1) 0%, var(--tt-bg-2) 100%) !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stat,
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-stats span.tb-tt-stat,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-unit-stats .tb-tt-stat-card{
  background:rgba(21,32,52,.70) !important;
  border-color:rgba(51,65,85,.82) !important;
}
.tb-smart-tooltip.tb-tt-kind-unit .tb-tt-skill,
#ttb2-smart-tooltip-fallback.tb-tt-kind-unit .tb-tt-skill{
  background:rgba(21,32,52,.62) !important;
  border-color:rgba(51,65,85,.82) !important;
}
@media(max-width:768px){
  .tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-trait,
  #ttb2-smart-tooltip-fallback.tb-smart-tooltip.tb-tt-kind-trait{
    width:min(330px, calc(100vw - 18px)) !important;
    padding:12px !important;
    clip-path:polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px)) !important;
  }
  .tb-smart-tooltip.tb-tt-kind-trait .tb-tt-trait-big,
  #ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-trait-big{
    width:50px !important;
    height:50px !important;
    flex-basis:50px !important;
  }
  .tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier,
  #ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier{
    grid-template-columns:34px minmax(0,1fr) !important;
    column-gap:10px !important;
  }
  .tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini,
  #ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
  }
}


/* =============================================================================
   v2.4.77 COMPACT: Tooltip TỘC/HỆ nhỏ gọn hơn để không mất hàng tướng
   ============================================================================= */
.tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-trait,
#ttb2-smart-tooltip-fallback.tb-smart-tooltip.tb-tt-kind-trait{
  width:min(332px, calc(100vw - 18px)) !important;
  max-height:min(82vh, 520px) !important;
  padding:10px !important;
  font-size:11.5px !important;
  line-height:1.42 !important;
  clip-path:polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px)) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-head,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-head{
  gap:8px !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-trait-big,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-trait-big{
  width:44px !important;
  height:44px !important;
  flex:0 0 44px !important;
  clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-trait-big-img,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-trait-big-img{
  width:27px !important;
  height:27px !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-title,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-title{
  font-size:16px !important;
  line-height:1.08 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-muted,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-muted{
  margin-top:4px !important;
  padding:2px 7px !important;
  font-size:10px !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-desc,
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-desc-main,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-desc,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-desc-main{
  margin-top:8px !important;
  padding:8px 9px !important;
  font-size:11.5px !important;
  line-height:1.45 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-block-title,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-block-title{
  margin-top:9px !important;
  margin-bottom:5px !important;
  font-size:9.5px !important;
  letter-spacing:.075em !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tiers,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tiers{
  display:block !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier,
#ttb2-smart-tooltip-fallback .tb-tt-trait-tooltip .tb-tt-tier{
  grid-template-columns:30px minmax(0,1fr) !important;
  column-gap:8px !important;
  align-items:center !important;
  margin:4px 0 !important;
  padding:6px 8px !important;
  min-height:36px !important;
  border:1px solid rgba(30,41,59,.72) !important;
  background:rgba(15,23,42,.42) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier-hex,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier-hex{
  width:26px !important;
  height:29px !important;
  min-width:26px !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier-min,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier-min,
#ttb2-smart-tooltip-fallback .tb-tt-trait-tooltip .tb-tt-tier-min{
  width:26px !important;
  min-width:26px !important;
  height:29px !important;
  font-size:11.5px !important;
  font-weight:650 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier-desc,
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier-text,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier-desc,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier-text{
  font-size:11.5px !important;
  line-height:1.35 !important;
  color:#dbe6f2 !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champs,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champs{
  gap:6px !important;
  margin-top:5px !important;
  padding-bottom:2px !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini{
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  clip-path:polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.is-offboard,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.is-offboard,
#ttb2-smart-tooltip-fallback .tb-tt-trait-tooltip .tb-tt-champ-mini.is-offboard{
  opacity:.72 !important;
  filter:grayscale(.08) saturate(.90) brightness(.94) !important;
}
.tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini.is-onboard,
#ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini.is-onboard,
#ttb2-smart-tooltip-fallback .tb-tt-trait-tooltip .tb-tt-champ-mini.is-onboard{
  opacity:1 !important;
  filter:saturate(1.1) brightness(1.08) !important;
}

@media(max-width:768px){
  .tb-smart-tooltip.tb-smart-tooltip.tb-tt-kind-trait,
  #ttb2-smart-tooltip-fallback.tb-smart-tooltip.tb-tt-kind-trait{
    width:min(306px, calc(100vw - 16px)) !important;
    max-height:min(78vh, 500px) !important;
    padding:9px !important;
  }
  .tb-smart-tooltip.tb-tt-kind-trait .tb-tt-tier,
  #ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-tier,
  #ttb2-smart-tooltip-fallback .tb-tt-trait-tooltip .tb-tt-tier{
    grid-template-columns:28px minmax(0,1fr) !important;
    padding:5px 7px !important;
    min-height:34px !important;
  }
  .tb-smart-tooltip.tb-tt-kind-trait .tb-tt-champ-mini,
  #ttb2-smart-tooltip-fallback.tb-tt-kind-trait .tb-tt-champ-mini{
    width:32px !important;
    height:32px !important;
    min-width:32px !important;
  }
}

/* v2.4.84 - Override cuối: select mùa vẫn là pill nhưng có mũi tên dropdown */
#tb-app.tb-wrap select.tb-season-select,
#tb-app.tb-wrap .tb-pill.tb-season-select {
  -webkit-appearance: menulist !important;
  appearance: auto !important;
  min-width: 130px !important;
  width: auto !important;
  display: inline-flex !important;
  cursor: pointer !important;
  padding-right: 24px !important;
}

/* ============================================================
   v1.0.95 / 2.4.88
   SEASON 18 — selector desktop + tab mùa trên mobile.
   ============================================================ */
#tb-app.tb-wrap .tb-season-mobile-tabs {
    display: none;
}

#tb-app.tb-wrap select.tb-season-select,
#tb-app.tb-wrap .tb-pill.tb-season-select {
    min-width: 172px !important;
}

@media (max-width: 920px) {
    #tb-app.tb-wrap .tb-season-mobile-tabs {
        display: flex;
        align-items: center;
        gap: 7px;
        overflow-x: auto;
        padding: 9px 10px;
        background: #080d14;
        border-bottom: 1px solid var(--tb-border-soft);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    #tb-app.tb-wrap .tb-season-mobile-tabs::-webkit-scrollbar {
        display: none;
    }

    #tb-app.tb-wrap .tb-season-mobile-btn {
        flex: 1 0 auto;
        min-width: 92px;
        border: 1px solid rgba(148, 163, 184, .28);
        border-radius: 999px;
        background: #0d141f;
        color: #b9c4d5;
        padding: 8px 12px;
        font-size: 12px;
        line-height: 1;
        font-weight: 850;
        white-space: nowrap;
        cursor: pointer;
    }

    #tb-app.tb-wrap .tb-season-mobile-btn.is-active {
        border-color: rgba(240, 196, 0, .88);
        background: linear-gradient(180deg, rgba(240, 196, 0, .22), rgba(240, 196, 0, .08));
        color: #ffe36a;
        box-shadow: 0 0 14px rgba(240, 196, 0, .12);
    }
}


/* ============================================================
   v1.0.99 / 2.4.92
   FIX XUNG ĐỘT THEME — dropdown chọn mùa chỉ có 1 mũi tên.
   Đặt cuối file để thắng mọi rule cũ và CSS select của theme.
   ============================================================ */
#tb-app.tb-wrap .tb-season-select-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    min-width: 172px !important;
    max-width: 100% !important;
    vertical-align: middle !important;
}

#tb-app.tb-wrap .tb-season-select-wrap::before {
    content: none !important;
    display: none !important;
}

#tb-app.tb-wrap .tb-season-select-wrap::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    right: 17px !important;
    width: 9px !important;
    height: 9px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-right: 2px solid #f2f5fb !important;
    border-bottom: 2px solid #f2f5fb !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: translateY(-68%) rotate(45deg) !important;
    transform-origin: center !important;
    pointer-events: none !important;
    z-index: 3 !important;
}

#tb-app.tb-wrap .tb-season-select-wrap select.tb-season-select,
#tb-app.tb-wrap select#tb-season-select.tb-season-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 172px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 46px 0 17px !important;
    border: 2px solid var(--tb-border) !important;
    border-radius: 999px !important;
    outline: none !important;
    background-color: #0c1118 !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: initial !important;
    background-size: 0 0 !important;
    box-shadow: none !important;
    color: var(--tb-text) !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    line-height: 40px !important;
    text-align: left !important;
    text-indent: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

#tb-app.tb-wrap .tb-season-select-wrap select.tb-season-select::-ms-expand,
#tb-app.tb-wrap select#tb-season-select.tb-season-select::-ms-expand {
    display: none !important;
}

#tb-app.tb-wrap .tb-season-select-wrap:hover select.tb-season-select,
#tb-app.tb-wrap .tb-season-select-wrap select.tb-season-select:focus {
    border-color: #566174 !important;
}

#tb-app.tb-wrap .tb-season-select-wrap:focus-within::after {
    border-color: var(--tb-gold) !important;
}


/* ===== v2.5.01 Pool mode: Tên / Tộc / Hệ ===== */
#tb-app.tb-wrap .tb-pool-trait-filter-row {
    display:flex;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
    margin:-2px 0 14px;
    padding:9px 0 2px;
    max-height:92px;
    overflow:auto;
}
#tb-app.tb-wrap .tb-pool-trait-filter-row::-webkit-scrollbar { height:6px; width:6px; }
#tb-app.tb-wrap .tb-pool-trait-filter-row::-webkit-scrollbar-thumb { background:#2b3443; border-radius:999px; }
#tb-app.tb-wrap .tb-pool-trait-btn {
    border:1px solid var(--tb-border);
    background:#101722;
    color:var(--tb-text-soft);
    border-radius:999px;
    padding:7px 11px;
    font-size:11px;
    line-height:1;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
    transition:.15s ease;
}
#tb-app.tb-wrap .tb-pool-trait-btn:hover { border-color:#66758c; color:#fff; }
#tb-app.tb-wrap .tb-pool-trait-btn.active {
    background:var(--tb-gold);
    border-color:var(--tb-gold);
    color:#111;
}

#tb-app.tb-wrap .tb-pool-champ-name { display:none; }
#tb-app.tb-wrap .tb-pool.tb-pool-show-names {
    row-gap:34px !important;
    padding-bottom:28px !important;
}
#tb-app.tb-wrap .tb-pool.tb-pool-show-names .tb-champ {
    overflow:visible;
    margin-left:7px;
    margin-right:7px;
}
#tb-app.tb-wrap .tb-pool.tb-pool-show-names .tb-champ > img {
    border-radius:11px;
}
#tb-app.tb-wrap .tb-pool.tb-pool-show-names .tb-pool-champ-name {
    display:block;
    position:absolute;
    top:65px;
    left:50%;
    transform:translateX(-50%);
    width:78px;
    max-width:78px;
    color:#dce4f1;
    font-size:9.5px;
    line-height:12px;
    font-weight:700;
    text-align:center;
    white-space:normal;
    overflow:hidden;
    max-height:26px;
    pointer-events:none;
    text-shadow:0 1px 2px rgba(0,0,0,.85);
}

@media (max-width:920px) {
    #tb-app.tb-wrap .tb-pool-trait-filter-row {
        margin-top:0;
        max-height:86px;
        gap:5px;
    }
    #tb-app.tb-wrap .tb-pool-trait-btn {
        padding:6px 9px;
        font-size:10px;
    }
}

/* ===== Share PNG preview modal ===== */
body.tb-export-preview-open { overflow:hidden; }
.tb-export-preview-modal {
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(1,7,16,.82);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}
.tb-export-preview-modal.is-open { display:flex; }
.tb-export-preview-dialog {
  width:min(1120px, 96vw);
  max-height:94vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(96,157,255,.55);
  border-radius:20px;
  background:linear-gradient(180deg,#071426 0%,#030b17 100%);
  box-shadow:0 26px 90px rgba(0,0,0,.58), inset 0 0 0 1px rgba(255,255,255,.025);
}
.tb-export-preview-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 18px;
  border-bottom:1px solid rgba(76,126,199,.28);
}
.tb-export-preview-title { color:#fff; font-size:18px; line-height:1.2; font-weight:900; }
.tb-export-preview-subtitle { margin-top:4px; color:#87a1c5; font-size:12px; font-weight:600; }
.tb-export-preview-x {
  width:36px;
  height:36px;
  flex:0 0 36px;
  border:1px solid rgba(137,165,205,.3);
  border-radius:10px;
  background:#0c1a2e;
  color:#dce8f8;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.tb-export-preview-x:hover { background:#142944; color:#fff; }
.tb-export-preview-body {
  min-height:0;
  flex:1;
  overflow:auto;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:16px;
  background:#020711;
}
#tb-export-preview-image {
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:calc(94vh - 155px);
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 8px 28px rgba(0,0,0,.42);
}
.tb-export-preview-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px 18px;
  border-top:1px solid rgba(76,126,199,.28);
  background:#071222;
}
.tb-export-preview-cancel,
.tb-export-preview-download {
  min-width:110px;
  box-sizing:border-box;
  border-radius:10px;
  padding:10px 18px;
  font-size:14px;
  line-height:20px;
  font-weight:800;
  text-align:center;
  text-decoration:none !important;
  cursor:pointer;
}
.tb-export-preview-cancel {
  border:1px solid rgba(143,165,194,.32);
  background:#101d2f;
  color:#d6e1ef;
}
.tb-export-preview-cancel:hover { background:#172a42; color:#fff; }
.tb-export-preview-download {
  border:1px solid #d7a62c;
  background:linear-gradient(180deg,#e3b94d,#bd8418);
  color:#07101b !important;
  box-shadow:0 5px 18px rgba(215,166,44,.2);
}
.tb-export-preview-download:hover { filter:brightness(1.08); }
@media (max-width:768px) {
  .tb-export-preview-modal { padding:8px; }
  .tb-export-preview-dialog { width:100%; max-height:96vh; border-radius:14px; }
  .tb-export-preview-head { padding:12px 12px; }
  .tb-export-preview-title { font-size:16px; }
  .tb-export-preview-body { padding:8px; }
  #tb-export-preview-image { max-height:calc(96vh - 150px); }
  .tb-export-preview-actions { padding:10px 12px; }
  .tb-export-preview-cancel,
  .tb-export-preview-download { flex:1; min-width:0; padding:10px 12px; }
}
