:root {
    --tup-bg: #0b1220;
    --tup-surface: #111a2c;
    --tup-surface-2: #16233b;
    --tup-line: rgba(255, 255, 255, 0.08);
    --tup-text: #f5f7fb;
    --tup-muted: #9fb0cf;
    --tup-gold: #d9b15f;
    --tup-radius-card: 18px;
    --tup-radius-inner: 12px;
    --tup-radius-sm: 8px;
    --tup-transition: 0.18s ease;
}

body.tup-unit-detail,
body.tup-unit-archive {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(72, 108, 255, 0.18), transparent 28%),
        radial-gradient(circle at top left, rgba(217, 177, 95, 0.15), transparent 24%),
        var(--tup-bg);
    color: var(--tup-text);
    font-family: "Segoe UI", sans-serif;
}
.tup-wrap, .tup-detail-page { color: var(--tup-text); }
.tup-wrap.is-standalone, .tup-detail-shell { max-width: 1200px; margin: 0 auto; padding: 32px 18px 56px; box-sizing: border-box; }
.tup-wrap.is-shortcode-archive { width: 100%; }
.tup-wrap.is-revival-archive { color: var(--tup-text); }
.tup-wrap.is-revival-archive * { box-sizing: border-box; }
.tup-detail-shell .tup-panel, .tup-detail-shell .tup-detail-grid, .tup-detail-shell .tup-panel--comps { margin-bottom: 16px; }
.tup-hero, .tup-detail-hero, .tup-panel, .tup-comp-card { border: 1px solid var(--tup-line); box-shadow: 0 12px 40px rgba(0,0,0,0.28); }

/* ── Card ── */
.tup-card {
    overflow: hidden; border-radius: var(--tup-radius-card);
    background: linear-gradient(180deg, rgba(20,32,55,0.96), rgba(10,16,27,0.98));
    transition: transform var(--tup-transition), box-shadow var(--tup-transition), border-color var(--tup-transition);
    border: 1.5px solid var(--cost-color, #444);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    position: relative;
}
.tup-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--cost-color, transparent); opacity: 0.55; z-index: 1;
    border-radius: var(--tup-radius-card) var(--tup-radius-card) 0 0;
}
.tup-card:hover {
    transform: translateY(-5px);
    border-color: var(--cost-color, #666);
    box-shadow: 0 0 24px color-mix(in srgb, var(--cost-color, #888) 28%, transparent), 0 12px 36px rgba(0,0,0,0.45);
}
.tup-card.tup-hidden { display: none; }

/* ── Hero ── */
.tup-hero {
    display: grid; grid-template-columns: 1fr 160px; gap: 18px;
    align-items: center; padding: 28px 32px; border-radius: 22px; margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(18,28,49,0.96), rgba(10,18,32,0.92));
    position: relative; overflow: hidden;
}
.tup-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #6366f1, var(--tup-gold), #6366f1); opacity: 0.55;
}
.tup-eyebrow { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--tup-gold); margin-bottom: 12px; opacity: 0.85; }
.tup-hero h1, .tup-detail-hero-content h1 {
    margin: 0 0 12px; font-size: clamp(38px, 6vw, 68px); line-height: 1; font-weight: 800; letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 40%, var(--unit-cost-color, #d9b15f) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    color: #ffffff; text-shadow: none; filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
}
.tup-hero p, .tup-detail-skill-desc, .tup-copy, .tup-empty-state { color: var(--tup-muted); line-height: 1.7; }
.tup-hero-stat { border-radius: var(--tup-radius-inner); padding: 20px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); text-align: center; }
.tup-hero-stat strong { display: block; font-size: 40px; line-height: 1; margin-bottom: 6px; }

/* ── Filter bar ── */
.tup-filterbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
    padding: 12px 16px; background: rgba(255,255,255,0.02); border: 1px solid var(--tup-line); border-radius: var(--tup-radius-inner);
}
.tup-cost-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.tup-cost-btn, .tup-trait-filter select, .tup-search-wrap input, .tup-back-link {
    border-radius: 10px; border: 1px solid var(--tup-line); background: rgba(255,255,255,0.04); color: var(--tup-text);
}
.tup-cost-btn { padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all var(--tup-transition); }
.tup-cost-btn.active, .tup-cost-btn:hover { background: rgba(217,177,95,0.15); border-color: rgba(217,177,95,0.6); }
.tup-cost-btn.tup-c1 { color: #8d9097; border-color: rgba(141,144,151,0.3); }
.tup-cost-btn.tup-c2 { color: #3fbf74; border-color: rgba(63,191,116,0.3); }
.tup-cost-btn.tup-c3 { color: #34a3ff; border-color: rgba(52,163,255,0.3); }
.tup-cost-btn.tup-c4 { color: #cf72ff; border-color: rgba(207,114,255,0.3); }
.tup-cost-btn.tup-c5 { color: #ffb81f; border-color: rgba(255,184,31,0.3); }
.tup-cost-btn.tup-c7 { color: #ff5c7a; border-color: rgba(255,92,122,0.35); }
.tup-cost-btn.tup-c1.active, .tup-cost-btn.tup-c1:hover { background: rgba(141,144,151,0.14); border-color: #8d9097; }
.tup-cost-btn.tup-c2.active, .tup-cost-btn.tup-c2:hover { background: rgba(63,191,116,0.14); border-color: #3fbf74; }
.tup-cost-btn.tup-c3.active, .tup-cost-btn.tup-c3:hover { background: rgba(52,163,255,0.14); border-color: #34a3ff; }
.tup-cost-btn.tup-c4.active, .tup-cost-btn.tup-c4:hover { background: rgba(207,114,255,0.14); border-color: #cf72ff; }
.tup-cost-btn.tup-c5.active, .tup-cost-btn.tup-c5:hover { background: rgba(255,184,31,0.14); border-color: #ffb81f; }
.tup-cost-btn.tup-c7.active, .tup-cost-btn.tup-c7:hover { background: rgba(255,92,122,0.15); border-color: #ff5c7a; }
.tup-trait-filter select, .tup-search-wrap input { padding: 9px 12px; min-height: 42px; font-size: 13px; transition: border-color var(--tup-transition); }
.tup-trait-filter select:focus, .tup-search-wrap input:focus { outline: none; border-color: rgba(217,177,95,0.5); }
.tup-trait-filter { position: relative; }
.tup-trait-filter select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: none !important; padding-right: 36px; cursor: pointer; }
.tup-trait-filter::after { content: ''; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--tup-muted); pointer-events: none; }
.tup-search-wrap { flex: 1; min-width: 220px; }

/* ── Grid / Card body ── */
.tup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tup-card-link { display: block; color: inherit; text-decoration: none !important; }

/* Chặn theme bên ngoài ép underline lên link card tướng (đặc biệt archive tái hiện). */
.tup-card .tup-card-link,
.tup-card .tup-card-link:hover,
.tup-card .tup-card-link:focus,
.tup-card .tup-card-link:visited,
.tup-card .tup-card-link *,
.tup-card .tup-card-link:hover *,
.tup-card .tup-card-link:focus * {
    text-decoration: none !important;
    text-underline-offset: 0 !important;
}
.tup-card-img { position: relative; aspect-ratio: 1.1; background: var(--cost-bg, #182034); overflow: hidden; }
.tup-card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(8,14,24,0.85) 100%); }
.tup-card-img img, .tup-detail-hero-bg img, .tup-comp-unit-img img, .tup-item-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.tup-card:hover .tup-card-img img { transform: scale(1.04); }
.tup-card-cost-badge { position: absolute; left: 12px; bottom: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(5,8,16,0.82); backdrop-filter: blur(8px); font-size: 11px; font-weight: 700; color: var(--cost-color, #fff); border: 1px solid var(--cost-color, rgba(255,255,255,0.2)); z-index: 2; }
.tup-card-lock-badge { position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: linear-gradient(135deg, rgba(254,240,138,.96), rgba(245,158,11,.92)); color: #241200; font-size: 11px; font-weight: 800; letter-spacing: .02em; box-shadow: 0 10px 24px rgba(245,158,11,.30); border: 1px solid rgba(255,255,255,.28); }
.tup-card-lock-badge svg { width: 13px; height: 13px; fill: currentColor; display: block; }
.tup-card--locked .tup-card-img::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(251,191,36,.20), transparent 35%); z-index: 1; pointer-events: none; }
.tup-card-body { padding: 16px; }
@media (max-width: 560px) {
    .tup-card-lock-badge { padding: 6px 8px; font-size: 10px; }
    .tup-card-lock-badge span { display: none; }
}
.tup-card-name-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tup-card-name { font-size: 22px; font-weight: 700; color: var(--cost-color, var(--tup-text)); }
.tup-card-headline, .tup-card-meta, .tup-badge, .tup-detail-headline { color: var(--tup-muted); }
.tup-card-headline { margin-top: 6px; min-height: 20px; font-size: 13px; }
.tup-card-traits, .tup-detail-traits, .tup-comp-traits, .tup-card-meta, .tup-item-row, .tup-comp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tup-trait-tag, .tup-detail-traits span, .tup-comp-traits span, .tup-badge { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); font-size: 11px; transition: background var(--tup-transition); }
.tup-trait-tag:hover { background: rgba(255,255,255,0.09); }
.tup-card-meta { margin-top: 12px; font-size: 12px; }
.tup-no-result, .tup-empty-state { grid-column: 1/-1; padding: 24px; text-align: center; border-radius: var(--tup-radius-inner); background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.07); }
.tup-back-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; text-decoration: none; margin-bottom: 18px; font-size: 13px; transition: background var(--tup-transition), border-color var(--tup-transition); border-radius: 10px; }
.tup-back-link:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); }

/* ── Detail hero ── */
.tup-detail-hero { position: relative; overflow: hidden; border-radius: 24px; min-height: 420px; display: grid; align-items: end; margin-bottom: 18px; background: linear-gradient(180deg, rgba(18,29,50,0.75), rgba(9,15,26,0.98)); border: 1.5px solid var(--unit-cost-color, var(--tup-line)); box-shadow: 0 0 40px rgba(0,0,0,0.45), 0 0 28px color-mix(in srgb, var(--unit-cost-color, transparent) 18%, transparent); }
.tup-detail-hero-bg { position: absolute; inset: 0; }
.tup-detail-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,11,19,0.93), rgba(7,11,19,0.18)); }
.tup-detail-hero-content { position: relative; z-index: 1; padding: 36px; max-width: 760px; }
.tup-detail-headline { font-size: 17px; margin: 0 0 14px; }
.tup-detail-skill { display: flex; gap: 10px; align-items: center; margin-top: 18px; font-size: 14px; }
.tup-skill-icon { width: 26px; height: 26px; border-radius: 6px; border: 1.5px solid rgba(200,155,60,.35); object-fit: cover; flex-shrink: 0; }
.tup-detail-skill span { color: var(--tup-gold); }
.tup-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* ── Panel ── */
.tup-panel { border-radius: var(--tup-radius-card); padding: 24px; background: linear-gradient(180deg, rgba(17,26,44,0.96), rgba(10,17,29,0.99)); position: relative; overflow: hidden; }
.tup-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,177,95,0.25), transparent); }
.tup-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid rgba(217,177,95,0.15); }
.tup-panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #e8d5a3; display: flex; align-items: center; gap: 8px; }
.tup-panel-icon { font-size: 16px; }
.tup-panel-head span, .tup-comp-stats span, .tup-stat-card span { color: var(--tup-muted); font-size: 12px; }

/* ── Items ── */
.tup-item-row { gap: 10px; }
.tup-item-card { width: 110px; padding: 12px; border-radius: var(--tup-radius-inner); background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); text-align: center; transition: background var(--tup-transition), border-color var(--tup-transition), transform var(--tup-transition); }
.tup-item-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(217,177,95,0.25); transform: translateY(-2px); }
.tup-item-card img { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 12px; }
.tup-item-card span { display: block; font-size: 12px; color: var(--tup-muted); }

/* ── Stats grid ── */
.tup-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tup-stat-card { padding: 14px 16px; border-radius: var(--tup-radius-inner); background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; transition: background var(--tup-transition), transform var(--tup-transition); }
.tup-stat-card:hover { background: rgba(255,255,255,0.055); transform: translateY(-1px); }
.tup-stat-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--tup-gold); opacity: 0.4; }
.tup-stat-card strong { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 20px; color: var(--tup-gold); line-height: 1.2; }
.tup-stat-card span { font-size: 11px; color: #4a5f78; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Comp list ── */
.tup-comp-list { display: grid; gap: 14px; }
.tup-comp-card { padding: 20px; border-radius: 18px; background: rgba(255,255,255,0.025); transition: background var(--tup-transition), border-color var(--tup-transition); }
.tup-comp-card:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.tup-comp-top { display: flex; justify-content: space-between; gap: 18px; }
.tup-comp-name { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.tup-comp-stats { display: flex; gap: 18px; text-align: right; }
.tup-comp-stats strong { display: block; font-size: 20px; }
.tup-comp-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; margin-top: 16px; }
.tup-comp-unit { text-align: center; }
.tup-comp-unit-img { width: 68px; height: 68px; margin: 0 auto 8px; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255,255,255,0.08); transition: border-color var(--tup-transition); }
.tup-comp-unit:hover .tup-comp-unit-img { border-color: rgba(217,177,95,0.4); }
.tup-comp-unit-items { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px; }
.tup-comp-unit-items img { width: 20px; height: 20px; border-radius: 5px; }
.tup-badge.tier-s { color: #ffd372; }
.tup-badge.tier-a { color: #82c7ff; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .tup-hero, .tup-detail-grid, .tup-comp-top { grid-template-columns: 1fr; display: grid; }
    .tup-comp-stats { text-align: left; justify-content: flex-start; flex-wrap: wrap; }
    .tup-detail-hero { min-height: 360px; }
}
@media (max-width: 640px) {
    .tup-wrap.is-standalone, .tup-detail-shell { padding: 18px 12px 40px; }
    .tup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tup-card-name { font-size: 18px; }
    .tup-panel, .tup-detail-hero-content, .tup-hero { padding: 18px; }
    .tup-item-card { width: calc(50% - 6px); }
}

/* ── Tactics badge ── */
.tup-tactics-badge { display: inline-block; font-size: 10px; font-weight: 600; color: #4fa3e8; background: rgba(79,163,232,0.12); border: 1px solid rgba(79,163,232,0.3); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; cursor: help; }
.tup-detail-skill-desc img { width: 16px; height: 16px; vertical-align: middle; display: inline; margin: 0 1px; }

/* ── Tokens ── */
.tup-detail-skill-desc .tup-token-color { font-weight: 600; }
.tup-token-icon { display: inline-block; width: 1em; height: 1em; vertical-align: middle; position: relative; top: -0.07em; margin: 0 1px; flex-shrink: 0; }
.tup-token-icon--ap    { filter: drop-shadow(0 0 3px rgba(167,139,250,.75)); }
.tup-token-icon--ad    { filter: drop-shadow(0 0 3px rgba(245,158,11,.70)); }
.tup-token-icon--armor { filter: drop-shadow(0 0 3px rgba(251,191,36,.65)); }
.tup-token-icon--hp    { filter: drop-shadow(0 0 3px rgba(248,113,113,.70)); }
.tup-token-icon--mr    { filter: drop-shadow(0 0 3px rgba(96,165,250,.70)); }
.tup-token-icon--as    { filter: drop-shadow(0 0 3px rgba(52,211,153,.70)); }
.tup-token-icon--mana  { filter: drop-shadow(0 0 3px rgba(129,140,248,.70)); }

/* ── Trait Phiêu ── */
.tup-trait-phieu { background: linear-gradient(90deg, #f472b6, #fb923c, #facc15, #4ade80, #60a5fa, #c084fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; font-style: normal; letter-spacing: 0.02em; text-shadow: none; filter: brightness(1.1); }

/* ── Skill highlight ── */
.tup-skill-highlight { position: relative; margin: 16px 0; padding: 14px 18px 14px 20px; border-radius: var(--tup-radius-sm); font-size: 1rem; line-height: 1.7; color: #fef9c3; background: linear-gradient(90deg, rgba(245,200,66,.22) 0%, rgba(245,200,66,.07) 100%); border-left: 4px solid #f5c842; border-top: 1px solid rgba(245,200,66,.2); border-bottom: 1px solid rgba(245,200,66,.1); box-shadow: 0 0 0 1px rgba(245,200,66,.06), 0 0 20px rgba(245,200,66,.10) inset; }
.tup-skill-highlight::before { content: '✦'; position: absolute; top: 50%; left: -11px; transform: translateY(-50%); font-size: 13px; color: #f5c842; background: #0f1623; padding: 2px 3px; line-height: 1; border-radius: 2px; text-shadow: 0 0 8px rgba(245,200,66,.8); }
.tup-skill-highlight .tup-token-color { font-weight: 700; }
.tup-skill-highlight .tup-token-icon  { filter: brightness(1.3) drop-shadow(0 0 3px rgba(245,200,66,.5)); }

/* ── Build list ── */
.tup-build-list { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; }
.tup-build-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: var(--tup-radius-inner); position: relative; overflow: hidden; transition: background var(--tup-transition), border-color var(--tup-transition), transform .12s; }
.tup-build-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px 0 0 3px; opacity: 0; transition: opacity var(--tup-transition); background: linear-gradient(180deg, rgba(245,184,31,.9), rgba(245,184,31,.2)); }
.tup-build-row:hover { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.09); transform: translateX(3px); }
.tup-build-row:hover::before { opacity: 1; }
.tup-build-tier { flex-shrink: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; border-radius: var(--tup-radius-sm); border: 1.5px solid; }
.tup-build-items { display: flex; align-items: center; gap: 5px; flex: 1; }
.tup-build-item { width: 40px; height: 40px; border-radius: var(--tup-radius-sm); overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: border-color var(--tup-transition), transform .12s; }
.tup-build-row:hover .tup-build-item { border-color: rgba(217,177,95,.45); transform: scale(1.05); }
.tup-build-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tup-build-stats { display: flex; gap: 0; flex-shrink: 0; margin-left: auto; }
.tup-build-stat { display: flex; flex-direction: column; align-items: center; min-width: 50px; padding: 0 8px; border-left: 1px solid rgba(255,255,255,.05); }
.tup-build-stat:first-child { border-left: none; }
.tup-build-stat strong { font-size: 14px; font-weight: 700; color: var(--tup-text); line-height: 1.2; }
.tup-build-stat span { font-size: 9.5px; color: #3d5570; white-space: nowrap; margin-top: 2px; letter-spacing: .04em; text-transform: uppercase; }
.tup-build-delta--good strong { color: #4ade80; }
.tup-build-delta--bad  strong { color: #f87171; }
@media (max-width: 500px) {
    .tup-build-row { padding: 8px 10px; gap: 7px; flex-wrap: nowrap; }
    .tup-build-item { width: 36px; height: 36px; }
    .tup-build-items { gap: 4px; min-width: 112px; flex: 0 0 auto; }
    .tup-build-stats { display: flex; gap: 0; margin-left: auto; }
    .tup-build-stat--win, .tup-build-stat--games { display: none !important; }
    .tup-build-stat { min-width: 50px; padding: 0 6px; }
    .tup-build-stat strong { font-size: 13px; }
    .tup-build-stat span { font-size: 9px; }
}

/* ── TCM Comp Cards ── */
.tup-tcm-list { display: flex; flex-direction: column; gap: 10px; }
.tup-tcm-card { background: #161824; border: 1px solid #222535; border-radius: var(--tup-radius-card); overflow: hidden; transition: border-color var(--tup-transition), box-shadow var(--tup-transition); }
.tup-tcm-card:hover { border-color: #353850; box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
.tup-tcm-card-hero { border: 1.5px solid #c89b3c; box-shadow: 0 0 16px rgba(200,155,60,.12); }
.tup-tcm-header { display: grid; grid-template-columns: 200px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; position: relative; overflow: hidden; }
.tup-tcm-bg { position: absolute; right: 0; top: 0; width: 220px; height: 100%; background-size: cover; background-position: center top; opacity: .13; mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 40%, rgba(0,0,0,.8) 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 40%, rgba(0,0,0,.8) 100%); pointer-events: none; }
.tup-tcm-left { display: flex; align-items: center; gap: 10px; z-index: 1; min-width: 0; }
.tup-tcm-tier { width: 34px; height: 34px; border-radius: var(--tup-radius-sm); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; color: #fff; }
.tup-tcm-tier-S { background: linear-gradient(135deg,#c89b3c,#a67c2e); box-shadow: 0 0 10px rgba(200,155,60,.3); }
.tup-tcm-tier-A { background: linear-gradient(135deg,#4a7fa5,#3a6590); }
.tup-tcm-tier-B { background: linear-gradient(135deg,#3a6b4a,#2d5a3d); }
.tup-tcm-tier-C { background: linear-gradient(135deg,#555,#444); }
.tup-tcm-info { min-width: 0; }
.tup-tcm-name { font-size: 13px; font-weight: 700; color: #e8e0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.tup-tcm-badges { display: flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.tup-tcm-badge { padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.tup-tcm-badge-speed  { background: #0d1b2a; color: #6aaed6; }
.tup-tcm-badge-easy   { background: #0d2a0d; color: #6dbf7a; }
.tup-tcm-badge-medium { background: #2a1a0d; color: #d6a86a; }
.tup-tcm-badge-hard   { background: #2a0d1a; color: #d66a9a; }
.tup-tcm-badge-hero   { background: linear-gradient(135deg,#2a1f0a,#3a2a10); color: #ffd700; border: 1px solid rgba(200,155,60,.3); }
.tup-tcm-hero-icon    { margin-right: 2px; }
.tup-tcm-units-inline { display: flex; gap: 3px; z-index: 1; align-items: flex-end; flex-wrap: nowrap; overflow: hidden; }
.tup-tcm-u { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 62px; }
.tup-tcm-u-stars { font-size: 13px; line-height: 1; letter-spacing: 1px; text-align: center; height: 16px; display: flex; align-items: center; justify-content: center; }
.tup-tcm-stars-2 { color: #c0c0c0; text-shadow: 0 0 6px rgba(192,192,192,.5); }
.tup-tcm-stars-3 { color: #ffd700; text-shadow: 0 0 8px rgba(255,200,0,.6),0 0 3px rgba(255,160,0,.8); }
.tup-tcm-u-img { width: 56px; height: 56px; border-radius: var(--tup-radius-sm); border: 1.5px solid #3a3d50; background: #1e2130; overflow: hidden; transition: border-color var(--tup-transition), box-shadow var(--tup-transition); }
.tup-tcm-u.carry .tup-tcm-u-img { border-color: #c89b3c !important; box-shadow: 0 0 10px rgba(200,155,60,.4); }
.tup-tcm-u.carry .tup-tcm-u-name { color: #c89b3c; font-weight: 700; }
.tup-tcm-u-link { display: block; width: 100%; height: 100%; }
.tup-tcm-u-link img, .tup-tcm-u-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tup-tcm-u-items { display: flex; gap: 1px; justify-content: center; height: 16px; margin-top: 1px; }
.tup-tcm-item-icon { width: 16px; height: 16px; border-radius: 3px; border: 1px solid #2a2d3a; background: #161824; object-fit: cover; display: block; }
.tup-tcm-u-name { font-size: 9px; color: #666; text-align: center; width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; height: 11px; margin-top: 1px; }
.tup-tcm-stats { display: flex; gap: 16px; flex-shrink: 0; z-index: 1; }
.tup-tcm-stat-box { text-align: center; }
.tup-tcm-stat-val { display: block; font-size: 16px; font-weight: 700; color: #8899aa; line-height: 1.2; }
.tup-tcm-stat-val.good { color: #6dbf7a; }
.tup-tcm-stat-val.mid  { color: #d6a86a; }
.tup-tcm-stat-label { display: block; font-size: 9px; color: #44506a; margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }
.tup-tcm-chev { color: #3a3d50; font-size: 10px; transition: transform var(--tup-transition); flex-shrink: 0; margin-left: 4px; z-index: 1; }
.tup-tcm-chev.open { transform: rotate(180deg); color: #c89b3c; }
.tup-tcm-detail { background: #10121a; border-top: 1px solid #1a1d28; padding: 18px 20px; }
.tup-tcm-traits-bar { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid #1a1d28; background: #13151f; margin: -18px -20px 14px -20px; padding: 10px 20px; }
.tup-tcm-trait-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 11px; background: #1a2038; color: #7a8daa; border: 1px solid #252a40; transition: background var(--tup-transition); }
.tup-tcm-trait-badge:hover { background: #202640; }
.tup-tcm-trait-badge img { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; }
.tup-tcm-trait-name { font-weight: 500; }
.tup-tcm-trait-count { font-weight: 700; color: #c89b3c; font-size: 12px; }
.tup-tcm-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tup-tcm-detail-left, .tup-tcm-detail-right { display: flex; flex-direction: column; gap: 14px; }
.tup-tcm-detail-label { font-size: 10px; color: #4a5570; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px; font-weight: 700; }
.tup-tcm-deploy-list { display: flex; flex-direction: column; gap: 7px; }
.tup-tcm-deploy-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: #161824; border-radius: var(--tup-radius-sm); border: 1px solid #1e2130; transition: border-color var(--tup-transition); }
.tup-tcm-deploy-row:hover { border-color: #2a2d40; }
.tup-tcm-deploy-lv { font-size: 11px; font-weight: 700; color: #c89b3c; min-width: 44px; flex-shrink: 0; }
.tup-tcm-deploy-units { display: flex; gap: 4px; flex-wrap: wrap; }
.tup-tcm-deploy-unit { width: 36px; height: 36px; border-radius: 6px; border: 1px solid #2a2d3a; overflow: hidden; background: #1e2130; display: block; transition: border-color var(--tup-transition), transform .12s; }
.tup-tcm-deploy-unit:hover { border-color: #c89b3c; transform: scale(1.06); }
.tup-tcm-deploy-unit img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tup-tcm-deploy-notes { font-size: 12px; color: #7a8890; line-height: 1.65; padding: 8px 12px; background: #161824; border-radius: 6px; border: 1px solid #1e2130; }
.tup-tcm-phase-notes { display: flex; flex-direction: column; gap: 7px; }
.tup-tcm-phase-block { background: rgba(255,255,255,.025); border-radius: var(--tup-radius-sm); overflow: hidden; border: 1px solid rgba(255,255,255,.05); }
.tup-tcm-phase-title { font-size: 10px; font-weight: 700; padding: 5px 10px; letter-spacing: .6px; text-transform: uppercase; }
.tup-tcm-phase-early { background: rgba(100,180,100,.12); color: #7dbb7d; border-bottom: 1px solid rgba(100,180,100,.15); }
.tup-tcm-phase-mid   { background: rgba(200,155,60,.12);  color: #c89b3c; border-bottom: 1px solid rgba(200,155,60,.15); }
.tup-tcm-phase-late  { background: rgba(200,90,90,.12);   color: #d66a6a; border-bottom: 1px solid rgba(200,90,90,.15); }
.tup-tcm-phase-content { font-size: 12px; color: #8899aa; line-height: 1.65; padding: 8px 10px; }
.tup-tcm-tips-content { font-size: 12px; color: #8899aa; line-height: 1.7; padding: 10px 14px; background: #161824; border-radius: var(--tup-radius-sm); border: 1px solid #1e2130; border-left: 3px solid #c89b3c; }
.tup-tcm-builder-embed { padding: 10px; background: #161824; border-radius: var(--tup-radius-sm); border: 1px solid #1e2130; text-align: center; }
.tup-tcm-btn-builder { display: inline-block; padding: 8px 20px; background: linear-gradient(135deg,#c89b3c,#a67c2e); color: #fff; border-radius: 7px; font-size: 13px; font-weight: 600; text-decoration: none; transition: opacity var(--tup-transition), transform var(--tup-transition); }
.tup-tcm-btn-builder:hover { opacity: .9; transform: translateY(-1px); }
.tup-tcm-suggest-items { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tup-tcm-si-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #161824; border-radius: var(--tup-radius-sm); border: 1px solid #1e2130; transition: border-color var(--tup-transition); }
.tup-tcm-si-row:hover { border-color: #2a2d40; }
.tup-tcm-si-champ { width: 32px; height: 32px; border-radius: 6px; border: 1.5px solid #3a3d50; overflow: hidden; flex-shrink: 0; }
.tup-tcm-si-champ img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tup-tcm-si-info { flex: 1; min-width: 0; }
.tup-tcm-si-name { font-size: 10px; font-weight: 600; color: #c89b3c; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tup-tcm-si-items-row { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.tup-tcm-si-items-row img { width: 22px; height: 22px; border-radius: 4px; border: 1px solid #2a2d3a; background: #1e2130; object-fit: cover; }
.tup-tcm-si-items-row img.tup-tcm-si-artifact { border-color: #9b59b6; }
.tup-tcm-si-arrow { font-size: 8px; color: #3a3d50; margin: 0 1px; flex-shrink: 0; }
.tup-tcm-augments-section { opacity: .6; }
.tup-tcm-augments-placeholder { display: flex; align-items: center; justify-content: center; min-height: 40px; }
.tup-tcm-aug-coming { font-size: 12px; color: #3a4560; font-style: italic; border: 1px dashed #252838; border-radius: var(--tup-radius-sm); padding: 8px 20px; display: block; width: 100%; text-align: center; }
.tup-tcm-hex-board { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; align-items: center; }
.tup-tcm-hbd-row { display: flex; gap: 4px; justify-content: center; }
.tup-tcm-hbd-odd { margin-left: 34px; }
.tup-tcm-hbd-wrap { display: flex; flex-direction: column; align-items: center; width: 56px; flex-shrink: 0; }
.tup-tcm-hbd-hex { width: 56px; height: 62px; clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); background: #22253a; position: relative; flex-shrink: 0; }
.tup-tcm-hbd-hex:not(.tup-tcm-hbd-filled) { opacity: .3; }
.tup-tcm-hbd-inner { position: absolute; inset: 2px; clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); background: #161824; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tup-tcm-hbd-content { width: 100%; height: 100%; position: relative; overflow: hidden; }
.tup-tcm-hbd-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 115%; height: 115%; object-fit: cover; }
.tup-tcm-hbd-stars { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #ffd700; letter-spacing: 1px; text-shadow: 0 0 4px #ff8800,0 1px 3px rgba(0,0,0,.9); z-index: 3; line-height: 1; white-space: nowrap; }
.tup-tcm-hbd-items { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; z-index: 3; }
.tup-tcm-hbd-items img { width: 14px; height: 14px; border-radius: 2px; border: 1px solid rgba(0,0,0,.5); object-fit: cover; background: #111; }
.tup-tcm-hbd-name { font-size: 8px; color: #666; text-align: center; width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; margin-top: 2px; }
@media (max-width: 900px) {
    .tup-tcm-header { grid-template-columns: 160px 1fr auto auto; gap: 8px; padding: 8px 10px; }
    .tup-tcm-u { width: 44px; }
    .tup-tcm-u-img { width: 38px; height: 38px; border-radius: 6px; }
    .tup-tcm-u-name { width: 44px; font-size: 8px; }
    .tup-tcm-u-stars { font-size: 11px; height: 14px; }
    .tup-tcm-item-icon { width: 13px; height: 13px; }
    .tup-tcm-u-items { height: 14px; }
    .tup-tcm-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .tup-tcm-header { grid-template-columns: 1fr; gap: 6px; }
    .tup-tcm-units-inline { flex-wrap: wrap; }
    .tup-tcm-stats { position: absolute; top: 10px; right: 10px; }
    .tup-tcm-chev { display: none; }
    .tup-tcm-suggest-items { grid-template-columns: 1fr; }
    .tup-tcm-detail { padding: 12px 10px; }
    .tup-tcm-traits-bar { margin: -12px -10px 10px -10px; padding: 8px 10px; }
    .tup-tcm-trait-name { display: none; }
}

/* ── Stat icons ── */
.tup-stat-card strong { display: flex; align-items: center; gap: 5px; }
.tup-stat-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; opacity: .9; }
.tup-stat-icon--hp       { filter: drop-shadow(0 0 2px rgba(248,113,113,.5)); }
.tup-stat-icon--ad       { filter: drop-shadow(0 0 2px rgba(245,158,11,.5)); }
.tup-stat-icon--ap       { filter: drop-shadow(0 0 2px rgba(192,132,252,.5)); }
.tup-stat-icon--as       { filter: drop-shadow(0 0 2px rgba(52,211,153,.5)); }
.tup-stat-icon--armor    { filter: drop-shadow(0 0 2px rgba(251,191,36,.5)); }
.tup-stat-icon--mr       { filter: drop-shadow(0 0 2px rgba(96,165,250,.5)); }
.tup-stat-icon--mana     { filter: drop-shadow(0 0 2px rgba(129,140,248,.5)); }
.tup-stat-icon--crit     { filter: drop-shadow(0 0 2px rgba(251,146,60,.5)); }
.tup-stat-icon--crit_dmg { filter: drop-shadow(0 0 2px rgba(239,68,68,.5)); }
.tup-stat-icon--range    { filter: drop-shadow(0 0 2px rgba(148,163,184,.4)); }

/* ── Skill desc ── */
.tup-detail-skill-desc { line-height: 1.75; font-size: 15px; color: #c0ccdc; }
.tup-detail-skill-desc .tup-desc-label { color: #e2d5b3; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.tup-detail-skill-desc .tup-token-color { font-weight: 600; }
.tup-detail-skill-desc .tup-token-icon { width: 15px; height: 15px; vertical-align: middle; margin: 0 1px -1px; display: inline-block; }
.tup-unlock-box { margin-top: 18px; max-width: 680px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(10,15,24,.96), rgba(18,24,34,.94)); border: 1px solid rgba(245,184,31,.34); box-shadow: 0 12px 30px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(10px); }
.tup-unlock-box-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tup-unlock-box-head strong { color: #ffe7a3; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.tup-unlock-box-icon { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #1f1302; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 8px 20px rgba(245,158,11,.25); }
.tup-unlock-box-icon svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.tup-unlock-box-body { color: #e8edf5; font-size: 15px; line-height: 1.7; font-weight: 600; }

/* ── Breadcrumb ── */
.tup-breadcrumb { padding: 8px 0 12px; font-size: 12px; color: #4a5a70; }
.tup-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tup-breadcrumb li { display: flex; align-items: center; gap: 4px; }
.tup-breadcrumb li:not(:last-child)::after { content: '›'; color: #28364a; }
.tup-breadcrumb a { color: #4a5a70; text-decoration: none !important; transition: color var(--tup-transition); }
.tup-breadcrumb a:hover { color: #f5c842; text-decoration: none !important; }
.tup-breadcrumb li[aria-current="page"] { color: #7a8898; }

/* ── Detail topbar & search ── */
.tup-detail-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; position: relative; z-index: 30; }
.tup-detail-topbar .tup-breadcrumb { flex: 1 1 auto; min-width: 0; padding: 8px 0 10px; }
.tup-unit-search { width: min(300px, 38vw); flex: 0 0 auto; position: relative; }
.tup-unit-search-box { position: relative; display: flex; align-items: center; min-height: 42px; border-radius: 21px; border: 1px solid rgba(96,165,250,.35); background: linear-gradient(135deg, rgba(15,24,42,.97), rgba(9,14,26,.99)); box-shadow: 0 0 0 3px rgba(59,130,246,.04), 0 4px 16px rgba(0,0,0,.26); transition: border-color var(--tup-transition), box-shadow var(--tup-transition), transform var(--tup-transition); }
.tup-unit-search-box:hover { border-color: rgba(96,165,250,.60); box-shadow: 0 0 0 3px rgba(59,130,246,.07), 0 6px 24px rgba(0,0,0,.32), 0 0 20px rgba(59,130,246,.16); transform: translateY(-1px); }
.tup-unit-search:focus-within .tup-unit-search-box, .tup-unit-search.is-open .tup-unit-search-box { border-color: rgba(96,165,250,.85); box-shadow: 0 0 0 3px rgba(59,130,246,.10), 0 8px 28px rgba(0,0,0,.34), 0 0 26px rgba(59,130,246,.22); transform: translateY(-1px); }
.tup-unit-search-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: #60a5fa; flex: 0 0 42px; opacity: .9; }
.tup-unit-search-icon svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.tup-unit-search-input { width: 100%; height: 42px; min-width: 0; padding: 0 40px 0 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; color: #eef6ff !important; font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.tup-unit-search-input::placeholder { color: #5a7898; font-weight: 400; }
.tup-unit-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.tup-unit-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 999px; background: rgba(148,163,184,.12); color: #a0b4c8; cursor: pointer; line-height: 1; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; transition: background var(--tup-transition), color var(--tup-transition); }
.tup-unit-search-clear:hover { background: rgba(248,113,113,.16); color: #fecaca; }
.tup-unit-search-results { position: absolute; top: calc(100% + 8px); right: 0; width: min(390px, 88vw); max-height: 380px; overflow: auto; padding: 8px; border-radius: 16px; border: 1px solid rgba(96,165,250,.24); background: linear-gradient(180deg, rgba(14,22,40,.99), rgba(8,13,22,.99)); box-shadow: 0 20px 56px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.03) inset; backdrop-filter: blur(12px); }
.tup-unit-search-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border-radius: 10px; color: #e5edf7; text-decoration: none !important; border: 1px solid transparent; transition: background var(--tup-transition), border-color var(--tup-transition), transform var(--tup-transition); }
.tup-unit-search-item:hover, .tup-unit-search-item.is-active { background: rgba(59,130,246,.11); border-color: rgba(96,165,250,.22); transform: translateX(2px); }
.tup-unit-search-item.is-current { background: rgba(217,177,95,.09); border-color: rgba(217,177,95,.20); }
.tup-unit-search-cost { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--tup-radius-sm); font-size: 12px; font-weight: 800; border: 1px solid currentColor; background: rgba(255,255,255,.03); }
.tup-unit-search-cost.tup-c1 { color: #a5acb8; }
.tup-unit-search-cost.tup-c2 { color: #4ade80; }
.tup-unit-search-cost.tup-c3 { color: #60a5fa; }
.tup-unit-search-cost.tup-c4 { color: #d8b4fe; }
.tup-unit-search-cost.tup-c5 { color: #fbbf24; }
.tup-unit-search-cost.tup-c7 { color: #ff5c7a; }
.tup-unit-search-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.tup-unit-search-name { font-weight: 700; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tup-unit-search-traits { font-size: 11px; color: #7a90ac; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tup-unit-search-current { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: #f5c842; padding: 3px 7px; border-radius: 999px; background: rgba(217,177,95,.10); border: 1px solid rgba(217,177,95,.20); }
.tup-unit-search-empty { padding: 14px 12px; color: #7a8898; font-size: 13px; text-align: center; }
@media (max-width: 700px) {
    .tup-detail-topbar { align-items: stretch; flex-direction: column; gap: 8px; }
    .tup-unit-search { width: 100%; }
    .tup-unit-search-results { left: 0; right: 0; width: 100%; }
}

/* ── Item links ── */
.tup-item-link, .tup-tcm-item-link, .tup-tcm-si-item-link, .tup-tcm-hbd-item-link { color: inherit; text-decoration: none !important; cursor: pointer; }
.tup-item-link:focus-visible, .tup-tcm-item-link:focus-visible, .tup-tcm-si-item-link:focus-visible, .tup-tcm-hbd-item-link:focus-visible { outline: 2px solid rgba(245,184,31,.7); outline-offset: 2px; }
a.tup-build-item, a.tup-item-card, .tup-tcm-item-link, .tup-tcm-si-item-link, .tup-tcm-hbd-item-link { display: inline-flex; align-items: center; justify-content: center; }
a.tup-item-card { display: block; }
a.tup-build-item:hover, a.tup-item-card:hover, .tup-tcm-item-link:hover, .tup-tcm-si-item-link:hover, .tup-tcm-hbd-item-link:hover { filter: brightness(1.1); }

/* ── Fix padding đều trên dưới cho description ── */
.tup-hero p:last-child,
.tup-panel > p:last-child,
.tup-detail-hero-content p:last-child,
.tup-copy:last-child {
    margin-bottom: 0;
}

/* ── Fix spacing đều trên dưới description trong panel ── */
.tup-panel > .tup-copy {
    margin-top: 0;
    margin-bottom: 0;
}
.tup-panel .tup-stats-grid {
    margin-top: 20px;
}

/* ── Thông tin tướng: redesign giống file briar_unit_info_redesign.html ── */
.tup-panel--info {
    font-family: "Segoe UI", sans-serif;
    background: #0f1117 !important;
    border: 0.5px solid #2a2d3a !important;
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: #c8cdd8;
    box-shadow: none !important;
}
.tup-panel--info::before { display: none !important; }
.tup-panel--info .tup-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    margin: 0;
    border-bottom: 0.5px solid #2a2d3a;
    background: #13161f;
}
.tup-panel--info .tup-panel-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8892a0;
}
.tup-panel--info .tup-panel-icon {
    font-size: 16px;
    color: #00aaaa;
    line-height: 1;
    filter: none;
}
.tup-panel--info .tup-panel-head > span:not(.tup-panel-icon) { display: none; }
.tup-panel--info > .tup-info-intro,
.tup-panel--info > .tup-info-blocks,
.tup-panel--info > .tup-stats-grid,
.tup-panel--info > .tup-empty-state {
    margin-left: 20px;
    margin-right: 20px;
}
.tup-panel--info > .tup-info-intro:first-of-type,
.tup-panel--info > .tup-info-blocks:first-of-type,
.tup-panel--info > .tup-stats-grid:first-of-type,
.tup-panel--info > .tup-empty-state:first-of-type {
    margin-top: 20px;
}
.tup-panel--info > .tup-info-intro {
    background: #0e2230;
    border-left: 3px solid #00aaaa;
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.75;
    color: #b0c8d8;
}
.tup-panel--info .tup-info-intro strong {
    color: #c8cdd8;
    font-weight: 500;
}
.tup-panel--info .tup-info-blocks {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tup-panel--info .tup-info-block {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 0 18px 0;
    margin: 0 0 18px 0;
    box-shadow: none !important;
    transition: none;
}
.tup-panel--info .tup-info-block:not(:last-child) {
    border-bottom: 0.5px solid #2a2d3a !important;
}
.tup-panel--info .tup-info-block:hover { background: transparent !important; }
.tup-panel--info .tup-info-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.tup-panel--info .tup-info-block-icon {
    width: auto;
    min-width: 15px;
    text-align: center;
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1;
    color: #00aaaa;
    filter: grayscale(1) sepia(1) hue-rotate(130deg) saturate(2.2) brightness(1.05);
}
.tup-panel--info .tup-info-block-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #00aaaa !important;
    letter-spacing: 0;
}
.tup-panel--info .tup-info-block-body {
    font-size: 14px;
    line-height: 1.8;
    color: #8892a0;
    padding-left: 23px;
}
.tup-panel--info .tup-info-block-body strong {
    color: #c8cdd8;
    font-weight: 500;
}
.tup-panel--info .tup-info-hl,
.tup-panel--info .tup-highlight {
    display: inline;
    background: #0e2230;
    color: #7dcfcf;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 13px;
    font-weight: 500;
    border: 0;
    white-space: nowrap;
}

.tup-panel--info .tup-info-image {
    display: block;
    margin: 12px 0 4px;
    line-height: 0;
}
.tup-panel--info .tup-info-img,
.tup-panel--info .tup-info-block-body img,
.tup-panel--info .tup-info-intro img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #2a2d3a;
    background: #07111c;
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.tup-panel--info .tup-info-block-body a img,
.tup-panel--info .tup-info-intro a img {
    transition: transform .16s ease, border-color .16s ease;
}
.tup-panel--info .tup-info-block-body a:hover img,
.tup-panel--info .tup-info-intro a:hover img {
    transform: translateY(-1px);
    border-color: #00aaaa;
}
.tup-panel--info .tup-info-tip,
.tup-panel--info .tup-tip {
    margin: 0 20px 20px;
    background: #171d2b;
    border: 0.5px solid #2a2d3a;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #8892a0;
    line-height: 1.7;
}
.tup-panel--info .tup-info-tip strong,
.tup-panel--info .tup-tip strong { color: #c8cdd8; }
.tup-panel--info .tup-stats-grid {
    margin-top: 2px;
    margin-bottom: 20px;
    padding-top: 18px;
    border-top: 0.5px solid #2a2d3a;
}
.tup-panel--info .tup-stat-card {
    background: #171d2b;
    border: 0.5px solid #2a2d3a;
    border-radius: 8px;
    box-shadow: none;
}
.tup-panel--info .tup-stat-card::after {
    background: #00aaaa;
    opacity: 0.45;
}
.tup-panel--info .tup-stat-card span {
    color: #8892a0;
}
.tup-panel--info .tup-stat-card strong {
    color: #c8cdd8;
}

@media (max-width: 600px) {
    .tup-panel--info .tup-panel-head { padding: 13px 16px; }
    .tup-panel--info > .tup-info-intro,
    .tup-panel--info > .tup-info-blocks,
    .tup-panel--info > .tup-stats-grid,
    .tup-panel--info > .tup-empty-state {
        margin-left: 16px;
        margin-right: 16px;
    }
    .tup-panel--info > .tup-info-intro {
        padding: 12px 14px;
        font-size: 13px;
    }
    .tup-panel--info .tup-info-block-body {
        padding-left: 21px;
        font-size: 13px;
    }
}
.tup-panel--info > .tup-panel-head + .tup-info-blocks,
.tup-panel--info > .tup-panel-head + .tup-stats-grid,
.tup-panel--info > .tup-panel-head + .tup-empty-state {
    margin-top: 20px;
}

/* ===== Related comps v1.6.3: đồng bộ giao diện từ TFT Comp Manager ===== */
.tup-panel--comps .tup-tcm-synced-badge { font-size: 11px; color: #4caf50; margin-left: 4px; opacity: .85; vertical-align: middle; }
.tup-panel--comps .tup-tcm-u { position: relative; z-index: 1; }
.tup-panel--comps .tup-tcm-u-fb {
    display: none;
    width: 100%; height: 100%;
    align-items: center; justify-content: center;
    font-size: 11px; color: #94a3b8; background: #252838;
}
.tup-panel--comps .tup-tcm-stat-top4 { color: #7fbbf0; }

/* Trait badges giống Comp Manager / Team Builder */
.tup-panel--comps .tup-tcm-traits-bar-v2 {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid #1e2130;
    background: #161824;
    margin: -18px -20px 12px -20px;
    padding: 9px 20px;
}
.tup-panel--comps .tcm-trait-badge {
    --tcm-trait-color: var(--tcm-trait-api-color, #343b45);
    --tcm-trait-glow: rgba(0,0,0,.24);
    display: grid;
    grid-template-columns: 30px 24px auto;
    align-items: center;
    column-gap: 6px;
    min-height: 34px;
    padding: 0;
    min-width: 0;
    max-width: 100%;
    background: transparent;
    border: 0;
    color: #f3f6ff;
}
.tup-panel--comps .tcm-trait-hex {
    width: 30px; height: 34px;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    background: var(--tcm-trait-color);
    clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.62)) drop-shadow(0 0 7px var(--tcm-trait-glow));
    overflow: hidden;
}
.tup-panel--comps .tcm-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;
}
.tup-panel--comps .tcm-trait-icon {
    width: 15px; height: 15px; max-width: 15px; max-height: 15px;
    object-fit: contain; position: relative; z-index: 1;
    filter: brightness(0) saturate(100%) contrast(1.12) opacity(.9);
}
.tup-panel--comps .tcm-trait-icon-fb {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(0,0,0,.82); font-size: 8px; font-weight: 950;
    position: relative; z-index: 1;
}
.tup-panel--comps .tcm-trait-icon + .tcm-trait-icon-fb { display: none; }
.tup-panel--comps .tcm-trait-count {
    width: 24px; min-width: 24px; height: 24px;
    border-radius: 8px; background: #252b33; color: #f3f7ff;
    font-size: 15px; font-weight: 900; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 1px rgba(0,0,0,.38);
}
.tup-panel--comps .tcm-trait-main { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.tup-panel--comps .tcm-trait-name-text {
    display: block; color: #f3f6ff; font-size: 11px; line-height: 1.05; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tup-panel--comps .tcm-trait-badge.tcm-style-bronze { --tcm-trait-color:#e3a582; --tcm-trait-glow:rgba(227,165,130,.22); }
.tup-panel--comps .tcm-trait-badge.tcm-style-silver { --tcm-trait-color:#d9dde4; --tcm-trait-glow:rgba(217,221,228,.22); }
.tup-panel--comps .tcm-trait-badge.tcm-style-gold { --tcm-trait-color:#f2b705; --tcm-trait-glow:rgba(242,183,5,.26); }
.tup-panel--comps .tcm-trait-badge.tcm-style-unique,
.tup-panel--comps .tcm-trait-badge.tcm-style-special { --tcm-trait-color:#b07cff; --tcm-trait-glow:rgba(176,124,255,.24); }
.tup-panel--comps .tcm-trait-badge.tcm-style-inactive { --tcm-trait-color:#5a5a5a; --tcm-trait-glow:rgba(90,90,90,.12); opacity:.84; }
.tup-panel--comps .tcm-trait-badge.tcm-style-single { --tcm-trait-color:#ff8a00; --tcm-trait-glow:rgba(255,138,0,.28); }
.tup-panel--comps .tcm-trait-badge.tcm-style-single .tcm-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%);
    filter: drop-shadow(0 0 9px rgba(255,140,0,.38)) drop-shadow(0 1px 1px rgba(0,0,0,.62));
}
.tup-panel--comps .tcm-trait-badge.tcm-style-prismatic .tcm-trait-hex,
.tup-panel--comps .tcm-trait-badge.tcm-style-chromatic .tcm-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);
    filter: drop-shadow(0 0 8px rgba(205,232,255,.58)) drop-shadow(0 1px 1px rgba(0,0,0,.62));
}

/* Phase sync */
.tup-panel--comps .tup-tcm-phase-title { display: flex; align-items: center; gap: 8px; }
.tup-panel--comps .tup-tcm-phase-level {
    margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
    padding: 1px 8px; border-radius: 12px; font-size: 11px; font-weight: 700;
    color: #c89b3c; background: rgba(200,155,60,.18); border: 1px solid rgba(200,155,60,.35);
}
.tup-panel--comps .tup-tcm-phase-units { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px 10px; }
.tup-panel--comps .tup-tcm-phase-unit { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.tup-panel--comps .tup-tcm-phase-unit-stars { font-size: 8px; color: #ffd700; text-align: center; line-height: 1; min-height: 9px; }
.tup-panel--comps .tup-tcm-phase-unit-link { display: block; position: relative; }
.tup-panel--comps .tup-tcm-phase-unit-link img {
    width: 38px; height: 38px; border-radius: 6px; border: 2px solid #3a3a3a; object-fit: cover; transition: border-color .2s;
}
.tup-panel--comps .tup-tcm-phase-unit-link:hover img { border-color: #c89b3c; }
.tup-panel--comps .tup-tcm-phase-unit-fb {
    display: none; width: 38px; height: 38px; border-radius: 6px; background: #2a2a2a; border: 2px solid #3a3a3a;
    align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #888;
}
.tup-panel--comps .tup-tcm-phase-unit-name { font-size: 9px; color: #888; text-align: center; max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tup-panel--comps .tup-tcm-view-post-btn,
.tup-panel--comps .tup-tcm-open-builder-btn,
.tup-panel--comps .tup-tcm-copy-code-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 18px; font-size: 12px; font-weight: 700; border-radius: 8px;
    text-decoration: none !important; cursor: pointer; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.tup-panel--comps .tup-tcm-view-post-btn {
    margin: 10px auto 0; width: fit-content; color: #90caf9;
    background: linear-gradient(135deg, rgba(66,165,245,.12), rgba(100,181,246,.06)); border: 1px solid rgba(66,165,245,.3);
}
.tup-panel--comps .tup-tcm-open-builder-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 4px 0 8px; }
.tup-panel--comps .tup-tcm-open-builder-btn { color: #e2e8f0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.tup-panel--comps .tup-tcm-copy-code-btn {
    color: #ffd54f; background: linear-gradient(135deg, rgba(200,155,60,.18), rgba(255,213,79,.10)); border: 1px solid rgba(200,155,60,.45);
    font-family: inherit;
}
.tup-panel--comps .tup-tcm-copy-code-btn.copied { color: #69f0ae; border-color: rgba(105,240,174,.5); background: rgba(105,240,174,.1); }

/* Compact carry build rows synced từ Comp Manager */
.tup-panel--comps .tftpro-carries-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; justify-content: stretch; padding: 8px 0;
}
.tup-panel--comps .tftpro-cc.tftpro-cc-builds {
    width: auto; padding: 10px; border: 1px solid rgba(148,163,184,.12); border-radius: 14px;
    background: linear-gradient(180deg, rgba(30,41,59,.52), rgba(15,23,42,.62)); box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.tup-panel--comps .tftpro-cc-compact-main { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 10px; align-items: center; }
.tup-panel--comps .tftpro-cc-builds .tftpro-cc-img { width: 52px !important; height: 52px !important; border-radius: 11px !important; border-width: 2px !important; }
.tup-panel--comps .tftpro-cc-stars { font-size: 13px; text-align: center; height: 18px; line-height: 18px; color: #ffd54f; margin-bottom: 2px; }
.tup-panel--comps .tftpro-stars-3 { color: #ffd54f; text-shadow: 0 0 6px rgba(255,213,79,.6); }
.tup-panel--comps .tftpro-cc-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tup-panel--comps .tftpro-cc-titlebox { min-width: 0; flex: 1; }
.tup-panel--comps .tftpro-cc-name { margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.15; font-weight: 800; text-align: left; }
.tup-panel--comps .tftpro-cc-build-list { display: flex; flex-direction: column; gap: 6px; }
.tup-panel--comps .tftpro-cc-build-list-secondary { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(148,163,184,.10); }
.tup-panel--comps .tftpro-cc-build-row {
    display: grid; grid-template-columns: 24px minmax(0,1fr) auto auto; align-items: center; gap: 6px; min-width: 0;
    padding: 5px 7px; border-radius: 10px; border: 1px solid rgba(148,163,184,.10); background: rgba(15,23,42,.58);
}
.tup-panel--comps .tftpro-cc-primary-row { padding: 6px 7px; }
.tup-panel--comps .tftpro-cc-build-row-artifact { border-color: rgba(245,158,11,.26); background: linear-gradient(90deg, rgba(245,158,11,.08), rgba(15,23,42,.58)); }
.tup-panel--comps .tftpro-build-tier {
    min-width: 24px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; font-size: 10px; font-weight: 900; line-height: 1; border: 1px solid rgba(148,163,184,.30); background: rgba(148,163,184,.12); color: #94a3b8;
}
.tup-panel--comps .tftpro-build-tier-s { background: rgba(245,184,31,.16); border-color: #f5b81f; color: #f5b81f; }
.tup-panel--comps .tftpro-build-tier-a { background: rgba(63,191,116,.16); border-color: #3fbf74; color: #3fbf74; }
.tup-panel--comps .tftpro-build-tier-b { background: rgba(52,163,255,.14); border-color: #34a3ff; color: #34a3ff; }
.tup-panel--comps .tftpro-build-tier-c { background: rgba(148,160,184,.14); border-color: #94a0b8; color: #94a0b8; }
.tup-panel--comps .tftpro-build-tier-h { background: rgba(200,155,60,.18); border-color: #c89b3c; color: #ffd56a; }
.tup-panel--comps .tftpro-cc-build-items { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.tup-panel--comps .tftpro-cc-build-items .tup-item-tip,
.tup-panel--comps .tftpro-cc-build-items .tftpro-item-tip {
    display: inline-flex; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 6px; overflow: hidden; background: #0f172a; border: 1px solid rgba(148,163,184,.22);
}
.tup-panel--comps .tftpro-cc-build-items .tup-item-tip img,
.tup-panel--comps .tftpro-cc-build-items .tftpro-item-tip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tup-panel--comps .tftpro-cc-build-row-artifact .tftpro-cc-build-items .tup-item-tip,
.tup-panel--comps .tftpro-cc-build-row-artifact .tftpro-cc-build-items .tftpro-item-tip { border-color: rgba(245,158,11,.55); }
.tup-panel--comps .tftpro-build-kind { display: none; }
.tup-panel--comps .tftpro-build-kind-artifact {
    display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 7px; border-radius: 999px;
    border: 1px solid rgba(245,158,11,.42); background: rgba(245,158,11,.10); color: #f59e0b; font-size: 10px; font-weight: 800; white-space: nowrap;
}
.tup-panel--comps .tftpro-build-label { color: #7c8aa4; font-size: 10px; font-weight: 800; text-transform: uppercase; text-align: right; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .14s ease; }
.tup-panel--comps .tftpro-cc-build-row:hover .tftpro-build-label { opacity: 1; visibility: visible; }
.tup-panel--comps .tftpro-cc-empty { margin-top: 8px; padding: 10px; border: 1px dashed rgba(148,163,184,.25); border-radius: 10px; color: #94a3b8; font-size: 12px; text-align: center; }
.tup-panel--comps .tftpro-carries-more-wrap { margin-top: 10px; }
.tup-panel--comps .tftpro-carries-toggle {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px;
    border-radius: 12px; border: 1px solid rgba(148,163,184,.16); background: rgba(15,23,42,.62); color: #cbd5e1;
    font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit;
}
.tup-panel--comps .tftpro-carries-toggle-icon { font-size: 14px; line-height: 1; transition: transform .16s ease; }
.tup-panel--comps .tftpro-carries-toggle.is-open .tftpro-carries-toggle-icon { transform: rotate(180deg); }
.tup-panel--comps .tftpro-carries-more { margin-top: 10px; }

/* Augment bar */
.tup-panel--comps .tftpro-augs-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 10px 8px; align-items: flex-start; justify-content: flex-start; }
.tup-panel--comps .tftpro-aug-item { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; width: 60px; cursor: pointer; }
.tup-panel--comps .tftpro-aug-icon-img { position: relative; width: 45px; height: 45px; border-radius: 8px; border: 2px solid #3d5068; background: #14202e; overflow: hidden; transition: transform .15s, border-color .15s, box-shadow .15s; }
.tup-panel--comps .tftpro-aug-item:hover .tftpro-aug-icon-img { transform: translateY(-2px); }
.tup-panel--comps .tftpro-aug-t-silver .tftpro-aug-icon-img { border-color: #8b95a5; }
.tup-panel--comps .tftpro-aug-t-gold .tftpro-aug-icon-img { border-color: #b8930f; }
.tup-panel--comps .tftpro-aug-t-diamond .tftpro-aug-icon-img { border-color: #3b6fe0; }
.tup-panel--comps .tftpro-aug-icon-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tup-panel--comps .tftpro-aug-fb { width: 100%; height: 100%; background: #3d5068; color: #b0b8c8; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tup-panel--comps .tftpro-aug-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 9px; color: #b0b8c8; text-align: center; margin-top: 3px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: normal; }

@media (max-width: 768px) {
    .tup-panel--comps .tftpro-carries-grid { grid-template-columns: 1fr; gap: 10px; }
    .tup-panel--comps .tftpro-cc.tftpro-cc-builds { padding: 9px; }
    .tup-panel--comps .tftpro-cc-compact-main { grid-template-columns: 50px minmax(0,1fr); gap: 9px; }
    .tup-panel--comps .tftpro-cc-builds .tftpro-cc-img { width: 48px !important; height: 48px !important; }
    .tup-panel--comps .tftpro-cc-build-row { grid-template-columns: 22px minmax(0,1fr) auto auto; gap: 5px; padding: 5px 6px; }
    .tup-panel--comps .tftpro-cc-build-items .tup-item-tip,
    .tup-panel--comps .tftpro-cc-build-items .tftpro-item-tip { width: 22px; height: 22px; flex-basis: 22px; }
    .tup-panel--comps .tftpro-build-label { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) {
    .tup-panel--comps .tup-tcm-traits-bar-v2 { padding: 7px 10px; gap: 6px; margin: -12px -10px 10px -10px; }
    .tup-panel--comps .tcm-trait-badge { grid-template-columns: 28px 22px auto; min-height: 30px; column-gap: 5px; }
    .tup-panel--comps .tcm-trait-hex { width: 28px; height: 32px; }
    .tup-panel--comps .tcm-trait-icon { width: 14px; height: 14px; max-width: 14px; max-height: 14px; }
    .tup-panel--comps .tcm-trait-count { width: 22px; min-width: 22px; height: 22px; font-size: 11px; }
    .tup-panel--comps .tcm-trait-name-text { font-size: 10px; }
    .tup-panel--comps .tftpro-augs-bar { padding: 8px 6px; gap: 8px 10px; }
    .tup-panel--comps .tftpro-aug-item { width: 52px; }
    .tup-panel--comps .tftpro-aug-icon-img { width: 38px; height: 38px; border-radius: 7px; }
    .tup-panel--comps .tftpro-aug-label { font-size: 8px; }
}


/* Speed v3: trang chi tiết tướng chỉ render card đội hình tóm tắt */
.tup-panel--comps .tup-tcm-native-wrap{margin-top:2px;}
.tup-panel--comps .tup-tcm-native-wrap .tcm-list{display:flex;flex-direction:column;gap:10px;}
.tup-panel--comps .tup-tcm-native-wrap .tcm-detail-label{
  display:inline-flex;align-items:center;gap:6px;width:fit-content;max-width:100%;
  padding:5px 10px;border-radius:999px;
  background:linear-gradient(135deg,rgba(200,155,60,.17),rgba(200,155,60,.06));
  border:1px solid rgba(200,155,60,.30);box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  color:#f1d38a;font-size:11px;font-weight:800;letter-spacing:.55px;margin-bottom:10px;
}
.tup-panel--comps .tup-tcm-native-wrap .tcm-detail-section + .tcm-detail-section{margin-top:2px;}
.tup-panel--comps .tup-tcm-native-wrap .tcm-deploy-list{gap:10px;}
.tup-panel--comps .tup-tcm-native-wrap .tcm-deploy-row{background:#141b25;border-color:rgba(255,255,255,.08);}
.tup-panel--comps-summary .tup-tcm-header-static{cursor:default;}
.tup-panel--comps-summary .tup-tcm-card-summary .tup-tcm-header{padding-right:14px;}
.tup-tcm-actions{position:relative;z-index:3;display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;min-width:110px;}
.tup-tcm-action-btn{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:6px 10px;border-radius:999px;border:1px solid rgba(245,184,31,.32);background:rgba(245,184,31,.12);color:#f5d27a;text-decoration:none;font-size:12px;font-weight:700;line-height:1;white-space:nowrap;}
.tup-tcm-action-btn:hover{background:rgba(245,184,31,.2);color:#fff;text-decoration:none;}
.tup-tcm-action-btn-builder{border-color:rgba(56,189,248,.32);background:rgba(56,189,248,.1);color:#9bdcff;}
.tup-panel--comps-summary .tup-tcm-bg[data-bg]{background-image:none!important;}
@media (max-width: 768px){
  .tup-tcm-actions{width:100%;justify-content:flex-start;margin-top:8px;}
  .tup-tcm-action-btn{font-size:11px;min-height:26px;padding:5px 9px;}
}


/* ── Revival archive spacing polish ── */
.tup-wrap.is-revival-archive.is-shortcode-archive {
    padding-top: 8px !important;
    margin-top: -42px;
}
.tup-wrap.is-revival-archive .tup-breadcrumb {
    padding-top: 0;
    padding-bottom: 10px;
}
.tup-wrap.is-revival-archive .tup-hero {
    padding: 24px 32px;
    margin-bottom: 18px;
}
.tup-wrap.is-revival-archive .tup-hero p {
    max-width: 850px;
}
@media (max-width: 768px) {
    .tup-wrap.is-revival-archive.is-shortcode-archive {
        margin-top: -14px;
        padding-top: 10px !important;
    }
    .tup-wrap.is-revival-archive .tup-hero {
        padding: 20px 18px;
    }
}

/* ── Detail: Ấn Tộc Hệ Tối Ưu ──
   Hiển thị ngang + đồng màu với 2 panel Trang bị mạnh nhất / Trang bị tạo tác */
.tup-panel--emblems {
    background: linear-gradient(180deg, rgba(17,26,44,0.96), rgba(10,17,29,0.99)) !important;
    border: 1px solid var(--tup-line) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.28) !important;
    border-radius: var(--tup-radius-card);
    padding: 24px;
    overflow: hidden;
}
.tup-panel--emblems::before {
    background: linear-gradient(90deg, transparent, rgba(217,177,95,0.25), transparent) !important;
}
.tup-panel--emblems .tup-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(217,177,95,0.15);
}
.tup-panel--emblems .tup-panel-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e8d5a3;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tup-panel--emblems .tup-build-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding: 2px 0 0;
}
.tup-panel--emblems .tup-build-list::-webkit-scrollbar { display: none; }
.tup-panel--emblems .tup-build-row {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 9px 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: var(--tup-radius-inner);
    transform: none;
}
.tup-panel--emblems .tup-build-row:hover {
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.09);
    transform: translateY(-1px);
}
.tup-panel--emblems .tup-build-row::before {
    opacity: 0;
    background: linear-gradient(180deg, rgba(245,184,31,.9), rgba(245,184,31,.2));
}
.tup-panel--emblems .tup-build-row:hover::before { opacity: 1; }
.tup-panel--emblems .tup-build-tier {
    grid-column: 1;
    grid-row: 1;
    width: 34px;
    height: 34px;
    font-size: 14px;
}
.tup-panel--emblems .tup-build-items {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}
.tup-panel--emblems .tup-build-item {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    border-color: rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.tup-panel--emblems .tup-build-row:hover .tup-build-item {
    border-color: rgba(217,177,95,.45);
    transform: scale(1.04);
}
.tup-panel--emblems .tup-build-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tup-panel--emblems .tup-build-stat {
    min-width: 0;
    padding: 0 5px;
    border-left: 1px solid rgba(255,255,255,.05);
}
.tup-panel--emblems .tup-build-stat:first-child { border-left: none; }
.tup-panel--emblems .tup-build-stat strong {
    font-size: 14px;
    line-height: 1.1;
    color: var(--tup-text);
}
.tup-panel--emblems .tup-build-stat span {
    font-size: 9px;
    line-height: 1.05;
    color: #3d5570;
    white-space: nowrap;
}
.tup-panel--emblems .tup-build-delta--good strong { color: #4ade80; }
.tup-panel--emblems .tup-build-delta--bad strong { color: #f87171; }
@media (max-width: 1024px) {
    .tup-panel--emblems .tup-build-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .tup-panel--emblems { padding: 18px; }
    .tup-panel--emblems .tup-panel-head { margin-bottom: 20px; }

    /* Mobile: cho section Ấn dùng layout hàng ngang giống 2 tab Trang bị phía trên */
    .tup-panel--emblems .tup-build-list {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 6px;
        padding: 2px 0;
        overflow: visible;
    }
    .tup-panel--emblems .tup-build-row {
        display: flex;
        grid-template-columns: none;
        grid-template-rows: none;
        align-items: center;
        width: auto;
        gap: 7px;
        padding: 8px 10px;
        flex-wrap: nowrap;
        transform: none;
    }
    .tup-panel--emblems .tup-build-row:hover { transform: none; }
    .tup-panel--emblems .tup-build-tier {
        grid-column: auto;
        grid-row: auto;
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        font-size: 13px;
    }
    .tup-panel--emblems .tup-build-items {
        grid-column: auto;
        grid-row: auto;
        flex: 0 0 auto;
        min-width: 112px;
        gap: 4px;
        overflow: hidden;
    }
    .tup-panel--emblems .tup-build-item {
        width: 36px;
        height: 36px;
        border-radius: var(--tup-radius-sm);
    }
    .tup-panel--emblems .tup-build-stats {
        grid-column: auto;
        grid-row: auto;
        width: auto;
        margin-left: auto;
        display: flex;
        gap: 0;
        flex: 0 0 auto;
    }
    .tup-panel--emblems .tup-build-stat--win,
    .tup-panel--emblems .tup-build-stat--games { display: none !important; }
    .tup-panel--emblems .tup-build-stat {
        min-width: 50px;
        padding: 0 6px;
        border-left: 1px solid rgba(255,255,255,.05);
    }
    .tup-panel--emblems .tup-build-stat strong { font-size: 13px; }
    .tup-panel--emblems .tup-build-stat span { font-size: 9px; }
}
@media (max-width: 380px) {
    .tup-panel--emblems .tup-build-row { gap: 6px; padding-left: 8px; padding-right: 8px; }
    .tup-panel--emblems .tup-build-items { min-width: 100px; }
    .tup-panel--emblems .tup-build-item { width: 32px; height: 32px; }
    .tup-panel--emblems .tup-build-stat { min-width: 46px; padding: 0 4px; }
}


/* === Item tooltip giống TFT Comp Manager: dùng chung shortcode tạo tác + trang tướng === */
.tup-item-tip { cursor: help; }
.tup-item-tip, .tup-item-tip * { text-decoration: none !important; }
.tup-item-card.tup-item-tip { width: 78px; min-height: 78px; display: inline-flex !important; align-items: center; justify-content: center; }
.tup-item-card.tup-item-tip img { margin: 0 auto !important; width: 58px; height: 58px; }
.tup-item-card.tup-item-tip span { display: none !important; }

.tcm-tooltip {
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    width: min(292px, calc(100vw - 22px));
    min-width: 260px;
    max-width: 292px;
    max-height: min(520px, calc(100vh - 24px));
    padding: 12px 13px;
    border-radius: 10px;
    background: #111827;
    border: 1px solid #1f2937;
    color: #d1d5db;
    box-shadow: 0 16px 40px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.025) inset;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(3px) scale(.99);
    transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
    will-change: left, top, opacity, transform;
    overflow: visible;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.tcm-tooltip.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); transition-delay: 0s; }
.tcm-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -7px;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #111827;
    border-left: 1px solid #1f2937;
    border-bottom: 1px solid #1f2937;
    border-radius: 2px;
}
.tcm-tooltip.tcm-pos-left::after {
    left: auto;
    right: -7px;
    border-left: 0;
    border-bottom: 0;
    border-right: 1px solid #1f2937;
    border-top: 1px solid #1f2937;
}
.tcm-tooltip-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 10px; row-gap: 0; align-items: center; }
.tcm-tip-tooltip-img { grid-column: 1; grid-row: 1 / span 2; width: 46px; height: 46px; align-self: start; }
.tcm-tip-tooltip-img img {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    border: 2px solid #374151 !important;
    background: linear-gradient(135deg,#1a3a5c,#0d2035) !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: block;
}
.tcm-tip-tooltip-body { display: contents; }
.tcm-tip-tt-name {
    grid-column: 2;
    grid-row: 1;
    margin: 1px 0 4px;
    padding: 0;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: 0;
    min-width: 0;
}
.tcm-tip-tt-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 0;
    background: #1f2937;
    color: #9ca3af;
    font-size: 9px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.tcm-tip-tt-desc {
    grid-column: 1 / -1;
    grid-row: 3;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 11.5px;
    line-height: 1.65;
    color: #9ca3af;
    word-break: normal;
    overflow-wrap: anywhere;
}
.tcm-tip-tt-desc::before { content: ''; display: block; height: 1px; background: #1f2937; margin: 8px 0; }
.tcm-tip-tt-unique {
    display: inline-flex;
    align-items: center;
    margin: 0 0 8px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(245,158,11,.28);
    background: #292218;
    color: #f59e0b;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 800;
}
.tcm-tip-tt-stat-list { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; margin: 0 0 8px; }
.tcm-tip-tt-stat {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: #1f2937;
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    white-space: normal;
}
.tcm-tip-tt-stat-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 14px; filter: none; }
.tcm-tip-stat-img { width: 15px !important; height: 15px !important; max-width: 15px !important; max-height: 15px !important; object-fit: contain !important; display: block !important; filter: drop-shadow(0 0 4px rgba(105,180,255,.24)) !important; }
.tcm-tip-tt-stat-label { flex: 1 1 auto; min-width: 0; color: #d1d5db; font-weight: 500; }
.tcm-tip-tt-stat-val { margin-left: auto; color: #34d399; font-weight: 800; white-space: nowrap; }
.tcm-tip-desc-stat { display: inline-flex; align-items: center; justify-content: center; min-width: auto; margin: 0 2px; padding: 1px 6px; border-radius: 4px; border: 0; background: #292218; color: #f59e0b; font-weight: 800; line-height: 1.3; white-space: nowrap; text-shadow: none; }
.tcm-tip-tt-empty { color: #6b7280; font-style: italic; font-size: 11.5px; line-height: 1.65; }
.tcm-tip-tt-action {
    float: right;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg,#f59e0b,#f97316);
    color: #111827 !important;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(249,115,22,.25);
}
.tcm-tip-tt-action:hover { filter: brightness(1.06); }
@media (max-width: 640px) {
    .tcm-tooltip {
        left: 8px !important;
        right: 8px !important;
        bottom: 12px !important;
        top: auto !important;
        width: auto;
        min-width: 0;
        max-width: none;
        border-radius: 12px 12px 0 0;
        transform: translateY(8px);
    }
    .tcm-tooltip.visible { transform: translateY(0); pointer-events: auto; }
    .tcm-tooltip::after { display: none; }
    .tcm-tip-tt-name { font-size: 14px; min-height: 27px; }
    .tcm-tip-tt-desc { font-size: 12px; line-height: 1.55; }
    .tcm-tip-tt-action { float: right; margin-top: -2px; }
}


/* Tabs chuyển nhanh giữa trang tướng mùa hiện tại và các mùa lưu riêng */
.tup-season-tabs {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 18px;
    overflow-x: auto;
    padding: 2px 1px 6px;
    scrollbar-width: thin;
}
.tup-season-tab {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 178px;
    min-height: 58px;
    padding: 10px 16px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 12px;
    background: rgba(15,23,42,.82);
    color: #cbd5e1 !important;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(2,6,23,.16);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.tup-season-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(96,165,250,.55);
    background: rgba(30,41,59,.95);
}
.tup-season-tab span {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    white-space: nowrap;
}
.tup-season-tab small {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.tup-season-tab.is-active {
    border-color: rgba(245,184,31,.75);
    background: linear-gradient(135deg, rgba(245,184,31,.18), rgba(30,41,59,.96));
    color: #f8fafc !important;
    box-shadow: 0 10px 26px rgba(245,184,31,.12);
}
.tup-season-tab.is-active small { color: #f5b81f; }
@media (max-width: 640px) {
    .tup-season-tabs { margin-bottom: 14px; gap: 8px; }
    .tup-season-tab { min-width: 158px; min-height: 54px; padding: 9px 13px; }
    .tup-season-tab span { font-size: 13px; }
}

/* Header khối đội hình: tiêu đề + số lượng bên phải, hub link ngoài cùng bên phải */
.tup-panel--comps .tup-panel-head {
    align-items: center;
}
.tup-panel--comps .tup-comps-head-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.tup-panel--comps .tup-comps-head-title h2 {
    min-width: 0;
}
.tup-panel--comps .tup-comps-count {
    flex: 0 0 auto;
    color: var(--tup-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
}
.tup-panel--comps .tup-comps-head-divider {
    display: block;
    width: 1px;
    height: 14px;
    flex: 0 0 1px;
    background: rgba(148,163,184,.28);
}
.tup-panel--comps .tup-comps-head-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    white-space: nowrap;
    margin-left: auto;
}
.tup-panel--comps .tup-comps-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #aeb9cc !important;
    font-size: 11.5px;
    line-height: 1.35;
    font-weight: 600;
    text-decoration: none !important;
    transition: color .18s ease;
}
.tup-panel--comps .tup-comps-hub-link strong {
    color: #00ff84;
    font-weight: 750;
}
.tup-panel--comps .tup-comps-hub-arrow {
    color: #00ff84 !important;
    font-size: 12px;
    transition: transform .18s ease;
}
.tup-panel--comps .tup-comps-hub-link:hover {
    color: #e7edf7 !important;
}
.tup-panel--comps .tup-comps-hub-link:hover .tup-comps-hub-arrow {
    transform: translateX(2px);
}
@media (max-width: 640px) {
    .tup-panel--comps .tup-panel-head {
        align-items: flex-start;
        gap: 8px;
    }
    .tup-panel--comps .tup-comps-head-title {
        gap: 6px;
        flex-wrap: wrap;
    }
    .tup-panel--comps .tup-comps-count {
        font-size: 10.5px;
    }
    .tup-panel--comps .tup-comps-hub-link {
        font-size: 10.5px;
    }
    .tup-panel--comps .tup-comps-hub-link strong {
        font-weight: 700;
    }
}
@media (max-width: 430px) {
    .tup-panel--comps .tup-panel-head {
        flex-wrap: wrap;
    }
    .tup-panel--comps .tup-comps-head-meta {
        width: 100%;
        justify-content: flex-end;
    }
    .tup-panel--comps .tup-comps-hub-link {
        max-width: 100%;
        white-space: normal;
        text-align: right;
        justify-content: flex-end;
        line-height: 1.2;
    }
}

