/* Battle: teams and card picker */
.teams { display: flex; flex-direction: column; gap: 16px; }
.team-bar { display: flex; align-items: stretch; gap: 8px; }
.team-list { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; scrollbar-width: none; padding: 1px; }
.team-list::-webkit-scrollbar { display: none; }
.team-arrow { flex: 0 0 38px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--text-2); cursor: pointer; transition: color .15s, border-color .15s, opacity .15s; }
.team-arrow svg { width: 18px; height: 18px; }
.team-arrow:hover:not(:disabled) { color: var(--text); border-color: var(--pink); }
.team-arrow:disabled { opacity: .35; cursor: default; }
.team-bar.no-overflow .team-arrow { display: none; }
.team-pick { flex: 0 0 230px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); text-align: left; cursor: pointer; transition: border-color .15s; }
.team-pick:hover { border-color: var(--line-2); }
.team-pick.active { border-color: var(--pink); background: linear-gradient(180deg, #ff4db314, var(--panel)); }
.tp-top { display: flex; align-items: center; gap: 8px; }
.tp-top b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-active { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: #3ddc9722; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .08em; vertical-align: middle; }
.tp-sub { font-size: 12px; color: var(--text-3); }
.tp-faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tp-faces img, .tp-faces i { width: 100%; aspect-ratio: 5/7; object-fit: cover; border-radius: 5px; background: var(--bg-2); border: 1px dashed var(--line); }
.tp-faces img { border: none; }
.team-new { flex: 0 0 210px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 10px; border-radius: var(--r); border: 1px dashed var(--line-2); background: var(--panel); }
.team-new .input { flex: 1; min-width: 0; height: 40px; }
.team-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; flex-wrap: wrap; }
.team-head h2 { font-family: var(--font-display); font-size: 22px; display: flex; align-items: center; gap: 8px; }
.team-head .muted { font-size: 13px; }
.team-actions { display: flex; gap: 8px; }
.slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.slot { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: var(--panel); border: 1px solid color-mix(in srgb, var(--rc, var(--line)) 45%, var(--line)); overflow: hidden; }
.slot-label { position: absolute; z-index: 2; top: 6px; left: 6px; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: #0b0916d9; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; backdrop-filter: blur(6px); }
.slot-art { position: relative; padding: 0; border: none; background: var(--bg-2); cursor: zoom-in; }
.slot-art img { width: 100%; aspect-ratio: 5/7; object-fit: cover; }
.slot-lv { position: absolute; right: 6px; bottom: 6px; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: #0b0916d9; font-size: 11px; font-weight: 700; }
.slot-body { padding: 8px 9px 9px; display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--rc, var(--line)); }
.slot-name { display: flex; align-items: center; gap: 5px; min-width: 0; }
.slot-name img { width: 16px; height: 16px; flex-shrink: 0; }
.slot-name b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 4px; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.slot-actions { display: flex; gap: 4px; }
.slot-actions button { flex: 1; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.slot-actions button:hover { color: var(--text); border-color: var(--line-2); }
.slot-actions button[data-clear]:hover { color: var(--red); }
.empty-slot { align-items: center; justify-content: center; gap: 6px; min-height: 260px; border-style: dashed; color: var(--text-3); font-weight: 600; font-size: 13px; cursor: pointer; transition: color .15s, border-color .15s; }
.empty-slot:hover { color: var(--text); border-color: var(--pink); }
.empty-slot .plus { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed currentColor; font-size: 22px; }
.team-info { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 10px; }
.ti-box { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ti-box label, .team-modes label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.ti-box b { font-size: 14px; }
.ti-box small { font-size: 12px; color: var(--text-2); }
.ti-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 4px; }
.ti-stats span { display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.ti-stats i { font-style: normal; font-size: 15px; }
.ti-stats small { font-size: 10px; color: var(--text-3); font-weight: 700; }
.team-modes { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.mode-row { display: flex; flex-wrap: wrap; gap: 6px; }
.team-modes small { font-size: 12px; }
.picker { position: relative; width: min(860px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; padding: 20px; overflow: hidden; }
.picker h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 12px; padding-right: 40px; }
.picker-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; overflow-y: auto; min-height: 0; padding: 2px; }
.pk { position: relative; display: flex; flex-direction: column; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--line)); background: var(--panel); text-align: left; cursor: pointer; transition: transform .15s, border-color .15s; }
.pk:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--rc); }
.pk:disabled { opacity: .4; cursor: not-allowed; }
.pk img { width: 100%; aspect-ratio: 5/7; object-fit: cover; }
.pk-body { padding: 6px 8px 8px; display: flex; flex-direction: column; border-top: 2px solid var(--rc); }
.pk-body b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-body small { font-size: 10.5px; color: var(--text-3); }
.pk-flag { position: absolute; top: 5px; left: 5px; height: 18px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 5px; background: var(--pink); color: #fff; font-size: 10px; font-weight: 800; }
@media (max-width: 1100px) {
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-info { grid-template-columns: 1fr 1fr; }
  .ti-overall { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .team-bar { flex-wrap: wrap; }
  .team-list { flex-basis: calc(100% - 92px); }
  .team-new { flex: 1 1 100%; flex-direction: row; padding: 8px; }
  .team-pick { flex-basis: 200px; }
}
@media (max-width: 760px) {
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-info { grid-template-columns: 1fr; }
  .ti-stats { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .picker { padding: 16px; max-height: 92vh; }
  .picker-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Battle replay viewer */
.br-bd { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: #05030acc; backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.br-bd.open { opacity: 1; visibility: visible; }
.br-box { position: relative; width: min(980px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.br-head { display: flex; align-items: baseline; gap: 12px; padding-right: 44px; flex-wrap: wrap; }
.br-head h3 { font-family: var(--font-display); font-size: 20px; }
.br-turn { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.br-field { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: radial-gradient(ellipse at center, #a855f714, transparent 70%), var(--bg-2); border: 1px solid var(--line); }
.br-team { display: flex; flex-direction: column; gap: 8px; }
#brT2 { flex-direction: column-reverse; }
.br-tname { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.br-tname.mine b { color: var(--green); }
.br-tname.theirs b { color: var(--red); }
.br-tname small { color: var(--text-3); font-size: 12px; }
/* Full 5:7 card art; column width follows viewport height so both teams fit without scrolling */
.br-cards { --cw: clamp(92px, calc((100vh - 400px) * .357), 165px); display: grid; grid-template-columns: repeat(5, minmax(0, var(--cw))); justify-content: center; gap: 8px; }
.br-cards.n1 { grid-template-columns: minmax(0, 220px); }
.br-cards.n2 { grid-template-columns: repeat(2, minmax(0, var(--cw))); }
.br-cards.n3 { grid-template-columns: repeat(3, minmax(0, var(--cw))); }
.br-cards.n4 { grid-template-columns: repeat(4, minmax(0, var(--cw))); }
.br-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--rc, #888) 40%, var(--line)); transition: transform .2s, box-shadow .2s, opacity .3s, filter .3s; }
.br-card.acting { transform: translateY(-4px) scale(1.03); box-shadow: 0 0 0 2px var(--rc, var(--pink)), 0 0 24px color-mix(in srgb, var(--rc, #ff4db3) 50%, transparent); z-index: 1; }
#brT2 .br-card.acting { transform: translateY(4px) scale(1.03); }
.br-card.ult { animation: br-ult .7s ease; }
.br-card.hit .br-art { animation: br-shake .35s ease; }
.br-card.dead { opacity: .35; filter: grayscale(1); }
.br-art { position: relative; aspect-ratio: 5/7; border-radius: 8px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; font-size: 28px; }
.br-card.boss .br-art { aspect-ratio: 16/9; }
.br-art img { width: 100%; height: 100%; object-fit: cover; }
.br-pop { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.br-pop span { position: absolute; font-family: var(--font-display); font-weight: 900; font-size: 20px; text-shadow: 0 2px 8px #000, 0 0 2px #000; animation: br-pop 1.1s ease forwards; }
.br-pop .dmg { color: #fff; }
.br-pop .crit { color: #ffd23f; font-size: 26px; }
.br-pop .heal { color: var(--green); }
.br-name { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-name img { width: 14px; height: 14px; flex-shrink: 0; }
.br-hp { height: 6px; border-radius: 999px; background: #ffffff14; overflow: hidden; }
.br-hp span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3ddc97, #8bf5c4); transition: width .45s ease; }
.br-hp span.low { background: linear-gradient(90deg, #ff5b6e, #ff9a6e); }
.br-hpn { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.br-fx { position: absolute; top: 8px; right: 8px; display: flex; gap: 1px; font-size: 13px; filter: drop-shadow(0 1px 2px #000); }
.br-action { min-height: 30px; display: grid; place-items: center; text-align: center; font-size: 14px; }
.br-action .mine b { color: var(--green); }
.br-action .theirs b { color: var(--red); }
.br-action em { font-style: normal; font-weight: 800; color: #ffd23f; }
.br-result { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: var(--r); text-align: center; border: 1px solid var(--line); background: var(--bg-2); }
.br-result h4 { font-family: var(--font-display); font-size: 26px; }
.br-result.win { border-color: #3ddc9766; background: linear-gradient(180deg, #3ddc971a, var(--bg-2)); }
.br-result.loss { border-color: #ff5b6e55; background: linear-gradient(180deg, #ff5b6e14, var(--bg-2)); }
.br-result .hub-row { justify-content: center; }
.br-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.br-log { list-style: none; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.br-log li { padding: 3px 0 3px 8px; border-left: 2px solid transparent; }
.br-log li.mine { border-left-color: var(--green); }
.br-log li.theirs { border-left-color: var(--red); }
.br-log small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.br-log i { font-style: normal; color: var(--text); }
.br-log .neg { color: #ff8f9b; }
.br-log .pos { color: var(--green); }
@keyframes br-pop { 0% { transform: translateY(6px) scale(.7); opacity: 0; } 15% { transform: translateY(0) scale(1.15); opacity: 1; } 100% { transform: translateY(-34px) scale(1); opacity: 0; } }
@keyframes br-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes br-ult { 0% { box-shadow: 0 0 0 0 #ffd23f; } 50% { box-shadow: 0 0 0 6px #ffd23f88, 0 0 40px #ffd23f88; } 100% { box-shadow: 0 0 0 2px var(--rc, var(--pink)); } }
@media (max-width: 640px) {
  .br-bd { padding: 0; place-items: end stretch; }
  .br-box { max-height: 100vh; border-radius: 18px 18px 0 0; padding: 14px; }
  .br-cards, .br-cards.n4 { gap: 5px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .br-cards.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .br-card { padding: 4px; }
  .br-name { font-size: 10px; }
  .br-hpn { display: none; }
}
@media (prefers-reduced-motion: reduce) { .br-card, .br-hp span { transition: none; } .br-pop span, .br-card.hit .br-art, .br-card.ult { animation: none; } }

/* Battle modes */
.bm-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .bm-grid { grid-template-columns: 1fr; } }
.bm-hero, .bm-play { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.bm-play > p, .bm-hero > p { font-size: 14px; line-height: 1.55; }
.bm-rank { display: flex; align-items: center; gap: 16px; }
.bm-rank small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.bm-rank h2 { font-family: var(--font-display); font-size: 26px; display: flex; align-items: center; gap: 8px; }
.bm-rank > img.bm-rank-ic { width: 72px; height: 72px; }
.bm-rank-ic { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; }
.bm-el { width: 26px; height: 26px; }
.bm-progress small { font-size: 12.5px; color: var(--text-2); }
.bm-progress .hub-bar { margin-top: 6px; }
.bm-title { font-family: var(--font-display); font-size: 24px; }
.bm-attempts { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bm-attempts b { font-family: var(--font-display); font-size: 34px; line-height: 1; }
.bm-attempts span { color: var(--text-2); font-size: 14px; }
.bm-attempts small { flex-basis: 100%; font-size: 12.5px; color: var(--text-3); }
.bm-go { width: 100%; height: 48px; font-size: 15px; }
.bm-warn { padding: 10px 12px; border-radius: var(--r-sm); background: #ffb02e14; border: 1px solid #ffb02e44; font-size: 13px; color: var(--text-2); }
.bm-warn a, .bm-play a:not(.btn) { color: var(--pink); }
.bm-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #ffffff55; border-top-color: #fff; animation: bm-spin .8s linear infinite; vertical-align: -2px; }
@keyframes bm-spin { to { transform: rotate(360deg); } }
.bm-details { padding: 0; }
.bm-details summary { list-style: none; cursor: pointer; padding: 16px 18px; }
.bm-details summary::-webkit-details-marker { display: none; }
.bm-details summary h3::after { content: ' ▾'; color: var(--text-3); }
.bm-details[open] summary h3::after { content: ' ▴'; }
.bm-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bm-details .bm-tiers { padding: 0 18px 18px; }
.bm-tiers > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; }
.bm-tiers > div.on { border-color: var(--pink); background: linear-gradient(180deg, #ff4db31a, var(--bg-2)); }
.bm-tiers img { width: 22px; height: 22px; }
.bm-tiers small { color: var(--text-3); font-size: 11.5px; }
.bm-tiers span { font-weight: 700; }
.bm-results { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.bm-results > div { flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg-2); border-left: 3px solid var(--line); }
.bm-results > div.win { border-left-color: var(--green); }
.bm-results > div.loss { border-left-color: var(--red); }
.bm-results b { font-size: 14px; }
.bm-results small { grid-column: 1; font-size: 12px; color: var(--text-3); }
.bm-results .btn { grid-row: 1 / 3; grid-column: 2; }
.hub-dlg .hub-stat-row { margin-bottom: 4px; }

.bm-floor { width: 86px; height: 86px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 22px; background: var(--brand-grad); color: #fff; }
.bm-floor small { color: #ffffffcc !important; }
.bm-floor b { font-family: var(--font-display); font-size: 32px; line-height: 1; }
.bm-tower.el-FIRE { background: linear-gradient(160deg, #ff5b2e1f, var(--panel) 55%); }
.bm-tower.el-WATER { background: linear-gradient(160deg, #2e8bff1f, var(--panel) 55%); }
.bm-tower.el-GRASS { background: linear-gradient(160deg, #3ddc971f, var(--panel) 55%); }
.bm-buffs { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-buff-pick { display: grid; gap: 8px; }
.bm-buff-pick button { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; text-align: left; color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.bm-buff-pick button:hover { border-color: var(--pink); transform: translateY(-1px); }
.bm-buff-pick span { grid-row: 1 / 3; font-size: 26px; }
.bm-buff-pick b { font-size: 14.5px; }
.bm-buff-pick small { font-size: 12.5px; color: var(--text-2); }
.hub-table td small { font-size: 12px; }

.bm-boss { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); overflow: hidden; margin-bottom: 14px; }
@media (max-width: 760px) { .bm-boss { grid-template-columns: 1fr; } }
.bm-boss-art { background: var(--bg-2); display: grid; place-items: center; font-size: 80px; min-height: 220px; }
.bm-boss-art img { width: 100%; height: 100%; object-fit: cover; }
.bm-boss-info { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.bm-boss-info h2 { font-family: var(--font-display); font-size: 28px; }
.bm-boss-info p { font-size: 14px; }
.bm-boss-hp .hub-bar { height: 14px; }
.bm-boss-hp .hub-bar span { background: linear-gradient(90deg, #ff5b6e, #ffb02e); }
.bm-boss-hp small { display: block; margin-top: 6px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bm-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bm-stats span { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: var(--r-sm); background: var(--bg-2); }
.bm-stats small { font-size: 10.5px; color: var(--text-3); font-weight: 700; }
.bm-stats b { font-size: 15px; }
.bm-skills { display: grid; gap: 6px; }
.bm-skills div { padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg-2); }
.bm-skills b { display: block; font-size: 13.5px; }
.bm-skills small { font-size: 12.5px; color: var(--text-2); }
.bm-weak { padding: 10px 12px; border-radius: var(--r-sm); background: #3ddc9712; border: 1px solid #3ddc9740; }

.bm-mini-team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bm-mini-team img { width: 100%; aspect-ratio: 5/7; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 60%, transparent); }
.bm-banned { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.bm-banned div { display: flex; flex-direction: column; gap: 4px; }
.bm-banned img { width: 100%; aspect-ratio: 5/7; object-fit: cover; border-radius: 8px; filter: grayscale(.6); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 60%, transparent); }
.bm-banned small { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-bracket { display: flex; gap: 14px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.bm-round { flex: 0 0 200px; display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.bm-round > small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.bm-match { display: flex; flex-direction: column; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.bm-match span { padding: 6px 10px; font-size: 13px; color: var(--text-2); }
.bm-match span + span { border-top: 1px solid var(--line); }
.bm-match span.win { color: var(--text); font-weight: 700; background: #3ddc9714; }
.bm-match span.me { box-shadow: inset 3px 0 0 var(--pink); }
.bm-match .btn { margin: 6px; }

.bm-person { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; padding: 0; text-align: left; min-width: 0; }
.bm-person img { width: 34px; height: 34px; border-radius: 50%; }
.bm-person b { font-size: 14px; }
.bm-person small { font-size: 12px; color: var(--text-3); }
.bm-duel { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); flex-wrap: wrap; }
.bm-duel > small { font-size: 12px; color: var(--text-3); }
.bm-hist { display: flex; flex-direction: column; overflow: hidden; }
.bm-hist > .hub-empty, .bm-hist > .panel { border: 0; }
.bm-hrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.bm-hrow:last-child { border-bottom: 0; }
.bm-res { justify-self: start; padding: 3px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; background: var(--bg-2); color: var(--text-2); }
.bm-hrow.win .bm-res { background: #3ddc9722; color: var(--green); }
.bm-hrow.loss .bm-res { background: #ff5b6e22; color: var(--red); }
.bm-hwho { min-width: 0; }
.bm-hwho b, .bm-hwho .link { display: block; font-size: 14px; font-weight: 700; }
.bm-hwho small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.link { border: 0; background: none; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
button.link:hover { color: var(--pink); }
.br-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.br-result-actions .btn { min-width: 150px; }
