

























.tb-page {
  --tb-line:      var(--rule-strong);
  --tb-line-soft: var(--rule);
  --tb-panel:     var(--bg-raised);
  --tb-panel-2:   var(--bg-raised);
  --tb-gold:      var(--accent);
  --tb-blue:      var(--accent-blue);
  --tb-green:     var(--accent-green);
  --tb-red:       var(--accent-red);
  --tb-dim:       var(--text-muted);
  --tb-faint:     var(--text-faint);
  --tb-r:         var(--radius);
  




  --tb-card-zoom: .95;
  --tb-card-w:    181px;
  --tb-card-h:    149px;
  
  --tb-rib:       16px;
}
.tb-app { display: grid; gap: .5rem; margin: 1rem 0; }
.tb-loading { padding: 2rem; text-align: center; opacity: .7; }





.tb-app :focus-visible,
.tb-panel :focus-visible,
.tb-picker :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.tb-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}






.tb-bar {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem;
  padding: .5rem .75rem; border: 1px solid var(--tb-line);
  border-left: 3px solid var(--tb-gold); border-radius: var(--tb-r);
  background: var(--tb-panel);
}
.tb-name { display: flex; align-items: center; gap: .3rem; flex: 1 1 8rem; min-width: 0; }
.tb-name__pen { color: var(--tb-faint); font-size: .9rem; flex: 0 0 auto; }






.tb-name__input {
  min-width: 0; width: 100%; min-height: 34px; padding: .2rem .5rem;
  border: 1px solid var(--tb-line); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text);
  font: inherit; font-size: .95rem;
  transition: border-color .15s ease;
}
.tb-name__input::placeholder { color: var(--tb-faint); }





.tb-name__input:hover,
.tb-name__input:focus { border-color: var(--text-muted); outline: none; }
.tb-name__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.tb-metric { display: flex; flex-direction: column; line-height: 1.05; flex: 0 0 auto; }
.tb-metric__l {
  font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; color: var(--tb-dim);
}
.tb-metric__v {
  font-family: var(--font-game); font-size: 1.7rem;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.tb-metric--pl .tb-metric__v { color: var(--tb-green); }
.tb-metric--ab .tb-metric__v { color: var(--tb-gold); }


.tb-info { flex: 0 0 auto; margin-left: auto; }
.tb-info__btn {
  display: flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 1px solid var(--tb-line); background: var(--tb-panel-2);
  color: var(--tb-dim); font-family: var(--font-game); font-size: .95rem;
  cursor: pointer; list-style: none;
}
.tb-info__btn::-webkit-details-marker { display: none; }



.tb-info__btn:hover,
.tb-info[open] .tb-info__btn { border-color: var(--text-muted); color: var(--text); }



.tb-info__body {
  position: absolute; left: 0; right: 0; top: calc(100% + .3rem); z-index: 30;
  display: grid; gap: .35rem;
  padding: .6rem .7rem; border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--bg-raised); box-shadow: 0 12px 28px #000a;
}


.tb-kpis { display: flex; flex-wrap: wrap; gap: .2rem .9rem; padding: 0 .2rem; }
.tb-kpi { font-size: .78rem; color: var(--tb-dim); font-variant-numeric: tabular-nums; }
.tb-kpi b { color: var(--text); font-weight: 700; }
.tb-kpi--hint { color: var(--tb-faint); }
.tb-kpi--delta.is-up   { color: var(--tb-green); }
.tb-kpi--delta.is-down { color: var(--tb-red); }





.tb-party { display: grid; gap: .45rem; }
.tb-row { border: 1px solid var(--tb-line-soft); border-radius: var(--tb-r); padding: .4rem .5rem .55rem; }




.tb-row--battle  { border-color: var(--tb-line); }
.tb-row__label {
  display: flex; align-items: center; flex-wrap: wrap; gap: .45rem;
  margin: 0 0 .4rem; font-family: var(--font-game); font-size: .9rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text);
}
.tb-row__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tb-faint); flex: 0 0 auto; }



.tb-row--battle .tb-row__dot { background: var(--tb-blue); }
.tb-row__sub { font-family: var(--font-barlow); font-size: .72rem; letter-spacing: .04em; color: var(--tb-dim); text-transform: none; }

.tb-h2 { margin: 0; }


.tb-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }



.tb-slot {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .35rem; border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--tb-panel);
}




.tb-slot--bench { border-color: var(--tb-line-soft); background: var(--bg); }






.tb-slot__card { position: relative; line-height: 0; width: max-content; max-width: 100%; flex: 0 0 auto; }
.tb-slot__card .chara-card { zoom: var(--tb-card-zoom); margin: 0; pointer-events: none; }
.tb-slot__card .chara-card:hover { transform: none; }


@supports not (zoom: 1) {
  .tb-slot__card { width: var(--tb-card-w); height: var(--tb-card-h); overflow: hidden; }
  .tb-slot__card .chara-card { transform: scale(.63); transform-origin: top left; }
}





.tb-slot__cardwrap {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  min-width: 0; max-width: 100%;
}



.tb-slot__name {
  max-width: 100%; overflow-wrap: anywhere;
  font-size: .72rem; line-height: 1.5; text-align: center; color: var(--text);
  

  display: block; text-decoration: none;
}
.tb-slot__name:hover, .tb-slot__name:focus-visible { text-decoration: underline; }




.tb-slot__meta { margin-top: auto; font-size: .68rem; color: var(--tb-faint); font-variant-numeric: tabular-nums; }

.tb-slot__x {
  position: absolute; top: 2px; right: 2px; z-index: 15;
  width: 24px; height: 24px; padding: 0; line-height: 22px;
  border: 0; border-radius: 50%; background: #0009; color: var(--text);
  font-size: 1rem; cursor: pointer;
}


.tb-slot__x:hover { background: #000c; color: var(--tb-red); }




.tb-slot--empty {
  align-items: center; justify-content: center;
  min-height: calc(var(--tb-card-h) + 1.4rem);
  border-style: dashed; background: repeating-linear-gradient(45deg, transparent 0 8px, #ffffff08 8px 16px);
  color: var(--tb-faint); font: inherit; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; text-align: center; cursor: pointer;
}
.tb-slot--empty::before { content: "+"; font-size: 1.9rem; line-height: 1; opacity: .7; }
.tb-slot--empty:hover { border-color: var(--text-muted); color: var(--tb-dim); }




.tb-slot--empty.is-armed {
  border-style: solid; border-color: var(--tb-gold); color: var(--tb-gold);
  background: rgba(255, 206, 110, .07);
  box-shadow: 0 0 0 1px rgba(255, 206, 110, .35);
}
.tb-slot--empty.is-armed::before { content: "\2193"; animation: tb-bob .9s ease-in-out infinite; }
.tb-slot__hint { display: block; max-width: 100%; }

.is-armed > .tb-slot__hint::after { content: "\0020\00B7\0020pick a card"; }

@keyframes tb-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }



@keyframes tb-flash { from { box-shadow: 0 0 0 3px rgba(255, 206, 110, .6); } to { box-shadow: 0 0 0 3px rgba(255, 206, 110, 0); } }
.tb-slot.is-new { animation: tb-flash .7s ease-out 1; }







.tb-slot.is-leader { border-color: var(--tb-gold); box-shadow: 0 0 0 1px rgba(255, 206, 110, .28); }



.tb-lead {
  position: absolute; left: -3px; top: 6%; bottom: 6%; z-index: 16;
  display: flex; align-items: stretch; justify-content: flex-start;
  width: var(--tb-rib); min-height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.tb-lead__rib {
  display: flex; align-items: center; justify-content: center;
  width: var(--tb-rib); padding: 3px 0; border-radius: 2px;
  writing-mode: vertical-rl;
  background: #0d1017e6; color: #c6cce0; border: 1px solid #ffffff26;
  font-family: var(--font-game); font-size: 9px; letter-spacing: .08em; line-height: 1;
  box-shadow: 0 1px 4px #000a;
}
.tb-lead:hover .tb-lead__rib { background: #23262f; border-color: var(--tb-gold); color: var(--tb-gold); }
.tb-lead.is-leader .tb-lead__rib {
  background: linear-gradient(180deg, #ffce6e, #d9891a); color: #241701;
  border-color: #f0b04a;
}









.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 34px; min-width: 34px; padding: .3rem .8rem;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--bg-raised); color: var(--text);
  font: inherit; font-size: .85rem; line-height: 1.2; cursor: pointer;
  transition: border-color .15s ease;
}



.tb-btn:hover:not([disabled]) { border-color: var(--text-muted); }
.tb-btn[disabled] { opacity: .45; cursor: not-allowed; }
.tb-btn--danger:hover:not([disabled]) { border-color: var(--tb-red); color: var(--tb-red); }

.tb-btn.is-done { border-color: var(--tb-green); color: var(--tb-green); }




.tb-btn--tool[aria-pressed="true"] {
  border-color: var(--tb-gold); color: var(--tb-gold); background: var(--bg);
}
.tb-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.tb-role {
  min-height: 24px; max-width: 100%; padding: .1rem .3rem;
  background: var(--bg-raised); color: var(--text); border: 1px solid var(--tb-line);
  border-radius: var(--tb-r); font: inherit; font-size: .78rem;
}




.tb-zenq { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--tb-faint); }
.tb-zenq__l { text-transform: uppercase; letter-spacing: .06em; }
.tb-zenq select {
  min-height: 24px; padding: .1rem .2rem;
  background: var(--bg-raised); color: var(--text); border: 1px solid var(--tb-line);
  border-radius: var(--tb-r); font: inherit; font-size: .74rem;
}


.tb-picker { margin-top: 1rem; }






.tb-picker { container-type: inline-size; container-name: tbpick; }







@container tbpick (width < 350px) {
  .tb-picker .chara-card { zoom: .368; }
}
@container tbpick (350px <= width < 437px) {
  .tb-picker .chara-card { zoom: .46; }
}
.tb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .5rem; }




.tb-modes { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-bottom: .6rem; }
.tb-seg { display: grid; gap: .2rem; }
.tb-seg__l {
  font-family: var(--font-barlow); font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tb-faint);
}



.tb-seg__g {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 2px;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--bg-raised);
}
.tb-seg__b {
  padding: .25rem .7rem; border: 0; border-radius: calc(var(--tb-r) - 1px);
  background: none; color: var(--tb-dim); cursor: pointer;
  font: inherit; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  min-height: 30px;
}


.tb-seg__b:hover { color: var(--text); }









.tb-seg__b[aria-pressed="true"] {
  background: var(--bg); color: var(--tb-gold); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--tb-gold);
}
@media (pointer: coarse), (hover: none) {
  .tb-seg__b { min-height: 40px; flex: 1 1 auto; }
}






.tb-opt-ctl {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 34px; padding: 0 .55rem; cursor: pointer;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--bg-raised); color: var(--tb-dim); font-size: .78rem;
  transition: border-color .15s ease;
}
.tb-opt-ctl:hover { color: var(--text); border-color: var(--text-muted); }
.tb-opt-ctl input, .tb-opt-ctl select { cursor: pointer; accent-color: var(--tb-gold); }
.tb-opt-ctl select {
  background: var(--bg); color: var(--text); font: inherit;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r); padding: .1rem .2rem;
}






.tb-opt-ctl__hint {
  width: 1.05rem; height: 1.05rem; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--tb-line); background: var(--bg);
  color: var(--tb-dim); font-size: .65rem; line-height: 1;
}

.tb-picker .chara-card { position: relative; }



.tb-picker .chara-card[data-tb] > .chara-card__frame {
  filter: brightness(.62) saturate(.7);
  outline: 2px solid #ffd84d; outline-offset: -2px; border-radius: var(--radius-card);
}
.tb-picker .chara-card[data-tb="leader"] > .chara-card__frame { outline-color: #ff9f1c; }
.tb-picker .chara-card[data-tb]::after {
  

  content: "Party"; position: absolute; top: 24px; left: -2px; z-index: 12;
  padding: 2px 11px 2px 7px;
  background: #ffd84d; color: #2a1d00;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; line-height: 1.3;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 0 100%);
  box-shadow: 0 2px 5px #0009;
}
.tb-picker .chara-card[data-tb="leader"]::after {
  content: "Leader"; background: linear-gradient(180deg, #ffb03a, #e8830f); color: #2a1300;
}
.tb-picker .chara-card[data-tb]:hover { transform: none; }





.tb-picker .chara-card[data-miss] > .chara-card__frame {
  filter: grayscale(1) brightness(.45);
  outline: 2px dashed var(--tb-red); outline-offset: -2px; border-radius: var(--radius-card);
}
.tb-picker .chara-card[data-miss]:not([data-tb])::after {
  content: "Not owned"; position: absolute; top: 24px; left: -2px; z-index: 12;
  padding: 2px 11px 2px 7px;
  background: var(--tb-red); color: #2a0009;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; line-height: 1.3;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 0 100%);
  box-shadow: 0 2px 5px #0009;
}


.tb-picker.is-marking,
#tb-party.is-marking { outline: 2px dashed var(--tb-red); outline-offset: 6px; border-radius: var(--tb-r); }
.tb-picker.is-marking .chara-card,
#tb-party.is-marking .tb-slot__card { cursor: not-allowed; }
.tb-picker.is-marking .chara-card:hover > .chara-card__frame,
#tb-party.is-marking .tb-slot__card:hover { outline: 2px solid var(--tb-red); outline-offset: -2px; border-radius: var(--radius-card); }
.tb-btn--ghost { border-style: dashed; }





.tb-picker .chara-card[data-no]::before {
  content: attr(data-no); position: absolute; top: 100px; right: 5px; z-index: 12;
  padding: 1px 5px; border-radius: var(--tb-r);
  background: #000000ad; color: var(--text);
  font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums;
}
.tb-page:not(.is-nums) .tb-picker .chara-card[data-no]::before,
.tb-page:not(.is-nums) .tb-slot__meta { display: none; }



.tb-picker .chara-card.is-capped { display: none; }
.tb-more { display: flex; margin: .75rem auto 0; }
.tb-more[hidden] { display: none; }


.tb-app.is-arming ~ .tb-picker .chara-card { cursor: copy; }



.tb-app.is-arming ~ .tb-picker::before {
  content: "Armed slot waiting \2014\0020pick a character"; display: block;
  position: sticky; top: 50px; z-index: 20; margin-bottom: .5rem;
  padding: .35rem .7rem; border: 1px solid var(--tb-gold); border-radius: var(--tb-r);
  background: var(--bg-raised); color: var(--tb-gold); font-size: .8rem; text-align: center;
}



.tb-count {
  margin-top: .5rem; font-size: var(--t-dense);
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}










.tb-panel { display: grid; gap: .6rem; margin-top: 1.5rem; }
.tb-panel > summary {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem;
  cursor: pointer; list-style: none; padding: .4rem .1rem;
  border-bottom: 1px solid var(--tb-line);
}
.tb-panel > summary::-webkit-details-marker { display: none; }



.tb-panel > summary::before {
  content: '\25B6'; font-size: .7em; color: var(--tb-gold);
  transition: transform .15s ease; transform-origin: 50% 55%;
}
.tb-panel[open] > summary::before { transform: rotate(90deg); }
.tb-panel__hint { font-size: .72rem; color: var(--tb-faint); font-weight: 400; letter-spacing: 0; text-transform: none; }
.tb-synergy { display: grid; gap: .6rem; }




.tb-member { border: 1px solid var(--tb-line-soft); border-radius: var(--tb-r); padding: .6rem .75rem; background: none; }


.tb-member__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem;
  margin-bottom: .45rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--tb-line-soft);
}
.tb-member__name { font-weight: 700; font-size: .95rem; }
.tb-member__id { font-size: .72rem; color: var(--tb-faint); font-variant-numeric: tabular-nums; }



.tb-badge { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .4rem; border-radius: var(--tb-r); }
.tb-badge--role {
  font-size: .7rem; padding: .05rem .4rem; border-radius: var(--tb-r);
  background: none; border: 1px solid var(--tb-line); color: var(--tb-dim);
}
.tb-badge--leader {
  font-size: .7rem; padding: .05rem .4rem; border-radius: var(--tb-r);
  background: none; border: 1px solid var(--tb-gold); color: var(--tb-gold);
}


.tb-member--dead { border-color: rgba(255, 122, 140, .3); }
.tb-member--dead .tb-badge--role { border-color: var(--tb-red); color: var(--tb-red); }



.tb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .3rem .7rem; }
.tb-stat {
  min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  gap: 0 .35rem; padding: .25rem .4rem; border-radius: var(--tb-r); background: #ffffff05;
}
.tb-stat__l { grid-column: 1 / -1; font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--tb-faint); }
.tb-stat__v { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }



.tb-stat__d { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--sc, var(--tb-green)); }





.tb-stat[data-stat] { box-shadow: inset 2px 0 0 var(--sc, transparent); }
.tb-stat[data-stat] .tb-stat__l { color: var(--sc, var(--tb-faint)); }




[data-stat="hp"]  { --sc: #6fdd8b; }
[data-stat="sa"]  { --sc: #ff7a6b; }
[data-stat="sd"]  { --sc: #c9705f; }
[data-stat="ba"]  { --sc: #6fb8ff; }
[data-stat="bd"]  { --sc: #5f8dc9; }
[data-stat="cri"] { --sc: #ffce6e; }




.tb-stat.is-target { background: rgba(255, 206, 110, .1); }
.tb-stat.is-target .tb-stat__l { font-weight: 700; }











@media (min-width: 1100px) {
  .tb-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tb-stat[data-stat="hp"]  { grid-column: 1; }
  .tb-stat[data-stat="sa"]  { grid-column: 2; }
  .tb-stat[data-stat="ba"]  { grid-column: 3; }
  .tb-stat[data-stat="sd"]  { grid-column: 4; }
  .tb-stat[data-stat="bd"]  { grid-column: 5; }
  .tb-stat[data-stat="cri"] { grid-column: 6; }
}


.tb-sources { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .18rem; }
.tb-src {
  




  display: grid;
  grid-template-columns: minmax(9rem, 16rem) 5rem 5.6rem 15rem minmax(10rem, 1fr);
  align-items: baseline; gap: .25rem .5rem;
  padding: .25rem .45rem; border-left: 2px solid var(--tb-line); border-radius: 0 var(--tb-r) var(--tb-r) 0;
  background: #ffffff04; font-size: .8rem; color: var(--text);
}
.tb-src__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-src__why { min-width: 0; }
@media (max-width: 999px) {
  .tb-src { display: flex; flex-wrap: wrap; align-items: baseline; }
}
.tb-src__id { font-size: .7rem; color: var(--tb-faint); font-variant-numeric: tabular-nums; }



.tb-src__kind {
  font-size: .66rem; letter-spacing: .07em; text-transform: uppercase;
  padding: .05rem .35rem; border-radius: var(--tb-r);
  background: none; border: 1px solid var(--tb-line); color: var(--tb-dim);
}
.tb-src__kind--zenkai { border-color: var(--tb-gold); color: var(--tb-gold); }
.tb-src__boosts { color: var(--tb-green); font-variant-numeric: tabular-nums; }
.tb-src__boosts b { font-weight: 700; }


.tb-src__boosts b[data-stat],
.tb-equip__s b[data-stat] { color: var(--sc, var(--tb-green)); }

.tb-src__why { color: var(--tb-dim); font-size: .75rem; }
.tb-src__why::before { content: "\2014\0020"; }
.tb-src__why code { font-family: inherit; color: #c9a3ff; }


.tb-src--leader { border-left-color: var(--tb-gold); background: rgba(255, 206, 110, .05); }
.tb-src--leader .tb-src__why { color: var(--tb-gold); }




.tb-src--after { border-left-color: #b18cff; background: rgba(177, 140, 255, .06); }
.tb-src--after .tb-src__why { color: #c4a6ff; }

.tb-src--dead { border-left-color: var(--tb-red); background: rgba(255, 122, 140, .05); opacity: .85; }
.tb-src--dead .tb-src__boosts { color: var(--tb-faint); text-decoration: line-through; }
.tb-src--dead .tb-src__why { color: var(--tb-red); }


.tb-misses { margin-top: .4rem; font-size: .78rem; }
.tb-misses > summary {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 24px;
  padding: .1rem .5rem; border: 1px dashed var(--tb-line); border-radius: var(--tb-r);
  color: var(--tb-dim); cursor: pointer; list-style: none;
}
.tb-misses > summary::-webkit-details-marker { display: none; }
.tb-misses > summary::before { content: "\25B8"; font-size: .7rem; }
.tb-misses[open] > summary::before { content: "\25BE"; }
.tb-misses ul { list-style: none; margin: .35rem 0 0; padding: 0 0 0 .4rem; display: grid; gap: .15rem; }
.tb-misses li { color: var(--tb-faint); }





.tb-opt { border: 1px solid var(--tb-line-soft); border-radius: var(--tb-r); background: none; padding: .55rem .7rem; }
.tb-opt__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .7rem; font-size: .85rem; }
.tb-opt__head b { font-family: var(--font-game); letter-spacing: .06em; text-transform: uppercase; }
.tb-opt__sub { font-size: .72rem; color: var(--tb-faint); }
.tb-opt__list { list-style: none; margin: .45rem 0 0; padding: 0; display: grid; gap: .15rem; }
.tb-opt__row {
  display: grid; grid-template-columns: 1.3rem 1.6rem minmax(0, 1fr) 5rem 3rem auto;
  align-items: center; gap: .5rem; padding: .2rem .3rem; border-radius: var(--tb-r);
  font-size: .8rem; color: var(--tb-dim);
}
.tb-opt__row.is-picked { background: rgba(111, 221, 139, .09); color: var(--text); }
.tb-opt__rank { color: var(--tb-faint); font-variant-numeric: tabular-nums; text-align: right; }
.tb-opt__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-opt__bar { height: 6px; border-radius: 3px; background: #ffffff12; overflow: hidden; }
.tb-opt__bar > i { display: block; height: 100%; background: var(--tb-blue); }
.tb-opt__row.is-picked .tb-opt__bar > i { background: var(--tb-green); }
.tb-opt__score { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }





.tb-opt > summary, .tb-alts > summary, .tb-alt-group > summary, .tb-member > summary {
  cursor: pointer; list-style: none;
}
.tb-opt > summary::-webkit-details-marker, .tb-alts > summary::-webkit-details-marker,
.tb-alt-group > summary::-webkit-details-marker, .tb-member > summary::-webkit-details-marker { display: none; }
.tb-opt > summary::before, .tb-alts > summary::before,
.tb-alt-group > summary::before, .tb-member > summary::before {
  content: "\25B8"; font-size: .7rem; color: var(--tb-faint);
}
.tb-opt[open] > summary::before, .tb-alts[open] > summary::before,
.tb-alt-group[open] > summary::before, .tb-member[open] > summary::before { content: "\25BE"; }



.tb-opt__ico {
  width: 1.6rem; height: 1.6rem; border-radius: var(--tb-r);
  object-fit: cover; background: #ffffff08;
}
.tb-member__head .tb-opt__ico, .tb-alt-group__h .tb-opt__ico { align-self: center; }
.tb-opt__row .tb-opt__ico { align-self: center; }



.tb-math { margin-top: .35rem; font-size: .75rem; }
.tb-math > summary {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 24px;
  padding: .1rem .5rem; border: 1px dashed var(--tb-line); border-radius: var(--tb-r);
  color: var(--tb-dim); cursor: pointer; list-style: none;
}
.tb-math > summary::-webkit-details-marker { display: none; }
.tb-math > summary::before { content: "\25B8"; font-size: .7rem; }
.tb-math[open] > summary::before { content: "\25BE"; }
.tb-math ul { list-style: none; margin: .35rem 0 0; padding: 0 0 0 .4rem; display: grid; gap: .15rem; }
.tb-math li { color: var(--tb-faint); font-variant-numeric: tabular-nums; }
.tb-math li b { color: var(--text); font-weight: 600; }


.tb-note { margin: 0; padding: .3rem .55rem; border-left: 2px solid var(--tb-line); font-size: .78rem; color: var(--tb-dim); }
.tb-note b { color: var(--text); }
.tb-note code { font-family: inherit; color: #c9a3ff; }
.tb-note--pl { border-left-color: var(--tb-green); }
.tb-note--pl b:first-child { color: var(--tb-green); }
.tb-note--ab { border-left-color: var(--tb-gold); }
.tb-note--ab b:first-child { color: var(--tb-gold); }
.tb-note--leader { border-left-color: var(--tb-gold); }




.tb-note--bench { border-left-color: var(--tb-line); }
.tb-note--target { border-left-color: var(--tb-gold); }


.tb-wtable {
  


  justify-self: start; width: auto;
  margin: .1rem 0 .1rem .55rem; border-collapse: collapse;
  font-size: .75rem; color: var(--tb-dim);
  border-left: 2px solid var(--tb-gold);
}
.tb-wtable th, .tb-wtable td { padding: .12rem .6rem; text-align: right; font-weight: 400; }
.tb-wtable th:first-child, .tb-wtable td:first-child { text-align: left; }
.tb-wtable thead th { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tb-faint); }
.tb-wtable tbody th { color: var(--text); }
.tb-wtable td { font-variant-numeric: tabular-nums; }
.tb-hint { opacity: .7; font-size: .78rem; margin: 0; }








@media (min-width: 761px) {
  



  .tb-picker [data-filters] { margin-bottom: .5rem; }
  .tb-picker .ffold .filters__row {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    gap: .4rem; margin-bottom: .5rem;
  }
  

  .tb-picker .ffold .fgroup { flex: 1 1 9rem; max-width: 14rem; }
  .tb-picker .filters__row--find {
    display: flex; align-items: flex-end; gap: .4rem; margin-bottom: 0;
  }
  

  


  .tb-picker [data-filters] .filters__select,
  .tb-picker [data-filters] .filters__search,
  .tb-picker [data-filters] .filters__submit { height: 34px; margin: 0; }
  
  .tb-picker [data-filters] .filters__search { flex: 1 1 10rem; max-width: 20rem; }
}




@media (max-width: 760px) {
  .tb-app { --tb-card-zoom: .46; --tb-card-w: 88px; --tb-card-h: 72px; }
  

  .tb-slots { gap: .3rem; }
  .tb-row { padding: .35rem .4rem .45rem; }
  .tb-row__label { font-size: .82rem; margin-bottom: .3rem; }
  .tb-row__sub { flex: 1 0 100%; }
  .tb-slot { padding: .25rem; }
  .tb-bar { padding: .45rem .55rem; gap: .35rem .7rem; }
  .tb-metric__v { font-size: 1.35rem; }
  .tb-name { flex: 1 0 100%; }
  




  


  .tb-picker [data-filters] { display: contents; }
  


  .tb-picker .filters__row--find {
    position: sticky; top: 50px; z-index: 15; display: flex; gap: .4rem;
    padding: .25rem 0; background: var(--bg); box-shadow: 0 8px 10px -10px #000;
  }
  
  .tb-app.is-arming ~ .tb-picker .filters__row--find { top: calc(50px + 2.6rem); }
  

  .tb-picker .ffold .filters__row { display: grid; gap: .4rem; }
  

  .tb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-stat__l { grid-column: 1; }
  .tb-stat__d { grid-column: 2; grid-row: 1; text-align: right; }
  .tb-stat__v { grid-column: 1 / -1; }
  .tb-opt__row { grid-template-columns: 1.2rem 1.5rem minmax(0, 1fr) 2.6rem; }
  .tb-opt__bar { display: none; }
  .tb-actions .tb-btn, .tb-tools .tb-btn { flex: 1 1 auto; }
}


@media (max-width: 400px) {
  


  .tb-app { --tb-rib: 14px; }
  .tb-slot__name { font-size: .68rem; }
}














.tb-eqrow {
  







  --eqk: .58;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 4px;
  width: 100%;
}



.tb-eqrow .tb-eqthumb, .tb-eqrow .tb-eq--set .tb-eqthumb { --tb-eqk: var(--eqk); }
.tb-eqrow .tb-eq { min-height: calc(118px * var(--eqk) + 10px); }
.tb-eqrow .tb-eq-edit { order: 2; grid-column: 1 / -1; margin-top: 2px; }






@media (max-width: 760px) {
  .tb-eqrow { --eqk: .32; gap: 3px; }          
}



.tb-eq-edit {
  display: flex; align-items: center; justify-content: center; gap: .25rem;
  

  min-width: 1.35rem; min-height: 26px; padding: .15rem .3rem;
  border: 1px dashed var(--tb-line); border-radius: var(--tb-r);
  background: none; color: var(--tb-dim); font: inherit; font-size: .68rem;
  line-height: 1; cursor: pointer;
}
.tb-eq-edit:hover { border-color: var(--text-muted); color: var(--text); }
.tb-eq-edit.is-armed { border-style: solid; border-color: var(--tb-gold); color: var(--tb-gold); background: #ffce6e1f; }
.tb-eq-edit__t { text-transform: uppercase; letter-spacing: .05em; font-size: .62rem; }
.tb-eq-edit__n { font-weight: 700; }
.tb-eq-edit__d { color: var(--tb-faint); font-weight: 400; }


.tb-eq {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 54px; border-radius: var(--tb-r);
  border: 1px dashed var(--tb-line); background: #ffffff08;
}
.tb-eq--empty { color: var(--tb-faint); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; }
.tb-eq--empty:hover { border-color: var(--text-muted); color: var(--text); background: #ffffff12; }
.tb-eq--empty.is-armed { border-style: solid; border-color: var(--tb-gold); color: var(--tb-gold); background: #ffce6e1f; }
.tb-eq--set { border-style: solid; border-color: var(--tb-line); background: var(--tb-panel-2); padding: 2px; }

.tb-eq__go { display: block; line-height: 0; border-radius: calc(var(--tb-r) - 2px); }
.tb-eq__go:hover .tb-eqthumb, .tb-eq__go:focus-visible .tb-eqthumb { filter: brightness(1.15); }








.tb-eqthumb { --tb-eqk: .4; }
.tb-eq--set .tb-eqthumb { --tb-eqk: .44; }
.tb-eqthumb {
  display: block; flex: 0 0 auto;
  width: calc(118px * var(--tb-eqk)); height: calc(118px * var(--tb-eqk));
}






.tb-eqthumb .eq-thumb { display: block; transform: scale(var(--tb-eqk)); transform-origin: top left; }
.tb-eq__x {
  position: absolute; top: -5px; right: -5px; width: 17px; height: 17px; padding: 0;
  border: 1px solid var(--tb-line); border-radius: 50%; background: var(--bg-sunken);
  color: var(--tb-dim); font-size: .7rem; line-height: 1; cursor: pointer;
}
.tb-eq__x:hover { color: var(--tb-red); border-color: var(--tb-red); }




.tb-page.is-eqmode .tb-picker [data-filters],
.tb-page.is-eqmode .tb-picker [data-grid],
.tb-page.is-eqmode .tb-picker .tb-count,
.tb-page.is-eqmode .tb-picker > .tb-more { display: none; }


.tb-page.is-eqmode .tb-app.is-arming ~ .tb-picker::before { content: none; }
.tb-page.is-eqmode .tb-app.is-arming ~ .tb-picker .chara-card { cursor: default; }






.tb-eqpick {
  --tb-line: var(--rule-strong); --tb-panel: var(--bg-raised); --tb-panel-2: var(--bg-raised);
  --tb-gold: var(--accent); --tb-blue: var(--accent-blue);
  --tb-dim: var(--text-muted); --tb-faint: var(--text-faint);
  --tb-r: var(--radius);
  display: grid; gap: .5rem;
}
.tb-eqpick:empty { display: none; }
.tb-eqpick__head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tb-eqpick__head h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.tb-eqpick__head .tb-btn { margin-left: auto; }
.tb-eqpick__note { margin: 0; font-size: .78rem; color: var(--tb-dim); }





.tb-eqlist {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem;
}








.tb-eqrow2 {
  display: grid; gap: .15rem;
  border: 1px solid var(--tb-line-soft); border-radius: var(--tb-r);
  background: none;
}
.tb-eqrow2:has(.tb-eqopt:hover:not(:disabled)) { border-color: var(--text-muted); }



.tb-eqopt {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr);
  




  grid-template-rows: auto minmax(2.5em, auto) auto 1fr auto;
  justify-items: center; gap: .2rem;
  width: 100%; height: 100%; text-align: center;
  padding: .5rem .45rem; border: 0; border-radius: var(--tb-r);
  background: none; color: inherit; font: inherit; cursor: pointer;
}
.tb-eqopt .tb-eqthumb { --tb-eqk: .62; }
.tb-eqopt:hover:not(:disabled) { background: var(--bg-raised); }
.tb-eqopt:disabled { opacity: .5; cursor: default; }
.tb-eqopt__n { display: grid; justify-items: center; font-size: .8rem; min-width: 0; overflow-wrap: anywhere; }
.tb-eqopt__r { font-size: .7rem; color: var(--tb-faint); }







.tb-eqopt__awk {
  position: absolute; top: .3rem; right: .3rem;
  padding: .05rem .35rem; border-radius: var(--tb-r);
  border: 1px solid var(--tb-gold); background: var(--bg); color: var(--tb-gold);
  font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.tb-eqopt__s { font-size: .78rem; color: var(--tb-dim); }
.tb-eqopt__s b { color: var(--tb-gold); font-weight: 700; }
.tb-eqopt__w { font-size: .7rem; color: var(--tb-gold); text-transform: uppercase; letter-spacing: .06em; }







.tb-eqopt__rest {
  margin: 0; padding: 0 .5rem .4rem; font-size: .68rem;
  color: var(--tb-faint); text-align: center;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.tb-eqrow2.is-worn { border-color: var(--tb-gold); }






.tb-eqpick.is-marking { outline: 2px dashed var(--tb-red); outline-offset: 6px; }
.tb-eqpick__mark { color: var(--tb-red); }
.tb-eqrow2[data-miss] { border-color: var(--tb-red); }
.tb-eqrow2[data-miss] > .tb-eqopt { filter: grayscale(1); opacity: .5; }
.tb-eqrow2[data-miss]::after {
  content: "Not owned"; justify-self: center;
  margin: 0 .5rem .35rem; padding: .05rem .35rem; border-radius: var(--tb-r);
  border: 1px solid var(--tb-red); background: var(--bg); color: var(--tb-red);
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}



.tb-equips { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .25rem; }
.tb-equip {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .1rem .5rem;
  align-items: center; padding: .3rem .4rem;
  border-left: 2px solid var(--tb-line); background: #ffffff06; border-radius: var(--tb-r);
}

.tb-equip .tb-eqthumb { grid-row: 1 / span 2; --tb-eqk: .34; }
.tb-equip__n { font-size: .82rem; }
.tb-equip__s { font-size: .76rem; color: var(--tb-dim); }
.tb-equip__s b { color: var(--tb-gold); }
.tb-equip__opts, .tb-equip__rest { grid-column: 2; }
.tb-equip__opts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.tb-equips__opt { display: flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--tb-faint); }
.tb-equips__opt select {
  max-width: 15rem; padding: .1rem .2rem; font-size: .7rem;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--bg-raised); color: var(--text);
}
.tb-equip__rest { font-size: .7rem; color: var(--tb-faint); }


.tb-conds { grid-column: 2; list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .1rem; }
.tb-cond { display: flex; align-items: baseline; gap: .35rem; font-size: .7rem; color: var(--tb-faint); }
.tb-cond__dot {
  flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%;
  background: #ffffff26; border: 1px solid var(--tb-line);
}
.tb-cond.is-on { color: var(--tb-dim); }
.tb-cond.is-on .tb-cond__dot { background: var(--tb-green); border-color: transparent; }


.tb-opt__hpz {
  margin-left: .4rem; padding: .05rem .3rem; border-radius: var(--tb-r);
  font-size: .68rem; letter-spacing: .02em; white-space: nowrap;
  color: var(--ink); background: var(--tb-green);
}
.tb-opt__row.is-hpz .tb-opt__rank { color: var(--tb-green); }

b.is-cond { color: var(--tb-green); }


b.is-pure { color: var(--tb-blue); }




.tb-stat__d .is-pure {
  font-style: normal; margin-left: .25rem;
  color: var(--sc, var(--tb-blue)); border-bottom: 1px dotted currentColor;
}



















.tb-scan, .tb-alts, .tb-opt__use {
  --tb-line: var(--rule-strong); --tb-panel: var(--bg-raised); --tb-panel-2: var(--bg-raised);
  --tb-blue: var(--accent-blue); --tb-green: var(--accent-green); --tb-red: var(--accent-red);
  --tb-dim: var(--text-muted); --tb-faint: var(--text-faint);
  --tb-r: var(--radius);
}





.tb-scanbar { flex: 1 0 100%; }
.tb-scan { display: grid; gap: .2rem; }

.tb-scan__bar { height: 6px; border-radius: 3px; background: #ffffff12; overflow: hidden; }



.tb-scan__bar > i {
  display: block; height: 100%; border-radius: inherit;
  background: var(--tb-blue);
  

  transition: width .15s linear;
}


.tb-scan__txt { font-size: .72rem; color: var(--tb-faint); font-variant-numeric: tabular-nums; }



.tb-alts {
  display: grid; gap: .5rem; margin-top: .5rem;
  padding: .55rem .7rem; border: 1px solid var(--tb-line-soft); border-radius: var(--tb-r);
  background: none;
}
.tb-alts__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .7rem; font-size: .85rem; }
.tb-alts__head b { font-family: var(--font-game); letter-spacing: .06em; text-transform: uppercase; }
.tb-alts__sub { font-size: .72rem; color: var(--tb-faint); font-variant-numeric: tabular-nums; }

.tb-alt-group { display: grid; gap: .2rem; }


.tb-alt-group__h {
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem;
  min-width: 0; overflow-wrap: anywhere;
  font-size: .8rem; font-weight: 600; color: var(--text);
}
.tb-alt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.tb-alt {
  display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) 3.2rem auto;
  align-items: center; gap: .25rem .5rem;
  padding: .25rem .3rem; border: 1px solid transparent; border-radius: var(--tb-r);
  font-size: .8rem; color: var(--tb-dim);
}


.tb-alt.is-picked {
  border-color: rgba(111, 221, 139, .35); background: rgba(111, 221, 139, .09); color: var(--text);
}
.tb-alt__rank { color: var(--tb-faint); font-variant-numeric: tabular-nums; text-align: right; }




.tb-alt--mine {
  grid-template-columns: 2.7rem minmax(0, 1fr) 3.2rem auto;
  border-top: 1px dashed var(--tb-line); border-radius: 0; margin-top: .2rem; padding-top: .4rem;
}
.tb-alt--mine .tb-alt__rank {
  color: var(--tb-gold); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
}


.tb-alt__pieces { display: flex; flex-wrap: wrap; gap: .15rem .45rem; min-width: 0; }
.tb-alt__piece { display: flex; align-items: center; gap: .25rem; min-width: 0; }




.tb-alt .tb-eqthumb { --tb-eqk: .25; }




.tb-alt__pn { min-width: 0; overflow-wrap: anywhere; font-size: .72rem; }


.tb-alt__v { text-align: right; font-variant-numeric: tabular-nums; color: var(--tb-green); }
.tb-alt__v.is-down { color: var(--tb-red); }




.tb-alt__use, .tb-opt__use {
  padding: .12rem .5rem; border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  background: var(--bg-raised); color: var(--tb-dim);
  font: inherit; font-size: .68rem; line-height: 1.7; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; cursor: pointer;
}


.tb-alt__use:hover:not([disabled]),
.tb-opt__use:hover:not([disabled]) { border-color: var(--text-muted); color: var(--text); }


.tb-alt__use[disabled] { opacity: .45; border-style: dashed; cursor: default; }




.tb-opt__use { grid-column: -1; }

@media (max-width: 560px) {
  

  .tb-eqlist { grid-template-columns: minmax(0, 1fr); }
  .tb-eqopt .tb-eqthumb { --tb-eqk: .5; }

  


  .tb-app { --tb-card-zoom: .5; --tb-card-w: 95px; --tb-card-h: 79px; }
  .tb-slot { padding: .25rem; }
  .tb-slots { gap: .3rem; }
  .tb-eqrow { --eqk: .26; gap: 2px; }

  





  .tb-alt { display: flex; flex-wrap: wrap; }
  

  .tb-alt__pieces { flex: 1 0 100%; order: 2; }
  .tb-alt__v { flex: 1 1 auto; text-align: left; }
}

@media (pointer: coarse), (hover: none) {
  



  .tb-eq--empty { min-height: 44px; }
  .tb-eq__x { display: none; }
  .tb-eq-edit { min-height: 44px; }
  .tb-eqopt { min-height: 56px; }
  .tb-eqpick [data-eqsearch] { min-height: 44px; }
  .tb-equips__opt select { min-height: 36px; }
}

@media (pointer: coarse), (hover: none) {
  

  .tb-slot__x {
    position: static; width: 100%; height: 44px; line-height: 44px;
    border-radius: var(--tb-r); background: #ffffff0d;
  }
  .tb-role, .tb-btn, .tb-misses > summary, .tb-math > summary, .tb-name__input { min-height: 44px; }
  


  .tb-zenq select { min-height: 44px; font-size: .78rem; }
  




  .tb-alt__use, .tb-opt__use { min-height: 44px; min-width: 44px; }
  .tb-role { width: 100%; }
  .tb-info__btn { width: 44px; height: 44px; }
  


  .tb-lead { width: 44px; }
  
  .tb-picker .filters__search, .tb-picker select, .tb-picker input[type="text"],
  .tb-picker button { min-height: 44px; min-width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .tb-slot--empty.is-armed::before,
  .tb-slot.is-new { animation: none; }
  
  .tb-scan__bar > i { transition: none; }
}








.tb-side { display: grid; gap: .7rem; align-content: start; min-width: 0; }









.tb-side__metrics {
  display: grid; gap: .45rem;
  padding: .65rem .8rem .7rem;
  border: 1px solid var(--tb-line-soft);
  border-top: 2px solid var(--tb-gold);
  border-radius: var(--radius-panel);
  background: none;
}
.tb-side__metrics .tb-metric {
  flex-direction: row; align-items: baseline; justify-content: space-between;
  gap: .6rem; display: flex;
}



.tb-side__metrics .tb-metric__v { font-size: 1.35rem; letter-spacing: .01em; }
.tb-side__metrics .tb-metric--ab .tb-metric__v { font-size: 1.7rem; }



.tb-side .tb-modes { display: grid; gap: .55rem; margin: 0; }
.tb-side .tb-seg__g { display: flex; width: 100%; }




.tb-side .tb-seg__b { flex: 1 1 0; min-width: 5.4rem; }



.tb-side .tb-tools {
  display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin: 0;
  align-items: center;
}
.tb-side .tb-scanbar { grid-column: 1 / -1; }







.tb-btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--ink); font-weight: 600;      
  letter-spacing: var(--track-caps); text-transform: uppercase;
}
.tb-btn--primary:hover:not([disabled]) { background: #ffd98a; border-color: transparent; }
.tb-btn--primary:active:not([disabled]) { transform: translateY(1px); }























.tb-picker .filters__submit {
  background: var(--bg-raised); border-color: var(--tb-line); color: var(--text);
}
.tb-picker .filters__submit:hover { background: var(--bg-raised); border-color: var(--text-muted); }








.tb-picker .tb-count { margin: .5rem 0 .6rem; }





.tb-eqopt__s, .tb-equip__s, .tb-opt__sub, .tb-eqpick__note, .tb-eqpick__slot,
.tb-eq-edit, .tb-alt-group__h, .tb-more, .tb-alts__more { font-variant-numeric: tabular-nums; }






.tb-side__ctl {
  display: grid; gap: .7rem;
  padding: .7rem .75rem;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-panel);
}






.tb-eqpick__head {
  padding: .5rem .6rem;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-panel);
}
.tb-eqpick__head h3 { margin: 0 auto 0 0; font-size: 1rem; font-weight: 600; }
.tb-eqpick__head .tb-btn { margin-left: 0; }




.tb-alts__more { display: flex; justify-content: center; margin-top: .3rem; }



@media (pointer: coarse), (hover: none) {
  .tb-opt-ctl { min-height: 44px; }
}




@media (prefers-reduced-motion: reduce) {
  .tb-btn, .tb-opt-ctl, .tb-name__input { transition: none; }
  .tb-btn--primary:active:not([disabled]) { transform: none; }
}


@media (min-width: 1100px) {
  .tb-app {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: .7rem 1rem;
    align-items: start;
    

    --tb-card-zoom: .62;
    --tb-card-w: 118px;
    --tb-card-h: 97px;
  }
  .tb-bar { grid-column: 1 / -1; }
  .tb-party { grid-column: 1; }
  .tb-actions { grid-column: 1; }
  .tb-side {
    grid-column: 2; grid-row: 2 / span 2;
    position: sticky; top: .6rem;
  }
}





.tb-custom {
  display: flex; align-items: flex-start; gap: .6rem .8rem; flex-wrap: wrap;
  margin: 0 0 .8rem;
}
.tb-custom__row { display: flex; gap: .6rem .8rem; flex-wrap: wrap; }
.tb-custom__row:empty { display: none; }
.tb-custom__item { display: grid; gap: .25rem; justify-items: center; }
.tb-custom__ctl { display: flex; gap: .4rem; }
.tb-custom__btn {
  font: inherit; font-size: .72rem; cursor: pointer;
  color: var(--tb-dim); background: none;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  padding: .15rem .5rem;
}
.tb-custom__btn:hover { border-color: var(--text-muted); color: var(--text); }




.tb-custom__eq {
  justify-items: start; align-content: start;
  min-width: 9rem; max-width: 13rem;
  padding: .35rem .5rem;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
}
.tb-custom__eqn { font-size: .8rem; color: var(--text); overflow-wrap: anywhere; }
.tb-custom__eqr { font-size: .7rem; color: var(--tb-dim); }







.chara-card[data-custom] .chara-card__frame::before {
  content: 'CONCEPT';
  position: absolute; right: 4px; top: 26px; z-index: 1;
  font-size: .55rem; letter-spacing: .12em; font-weight: 700;
  color: #fff; background: rgba(0, 0, 0, .55);
  padding: .1rem .4rem; border-radius: 3px;
  pointer-events: none;
}




.tb-slot__name--edit {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; text-decoration: underline dotted;
}




.tb-eqopt__own {
  display: flex; align-items: center; gap: .4rem;
  margin: .25rem 0 0; padding: 0 .4rem .35rem;
}
.tb-eqopt__tag {
  font-size: .55rem; letter-spacing: .12em; font-weight: 700;
  color: var(--tb-dim); border: 1px solid var(--tb-line); border-radius: 3px;
  padding: .1rem .35rem;
}


.tb-cdlg {
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text);
  padding: 0; width: min(560px, calc(100vw - 2rem));
}
.tb-cdlg::backdrop { background: rgba(0, 0, 0, .55); }
.tb-cdlg__box { padding: 1rem; display: grid; gap: .6rem; }
.tb-cdlg__h { margin: 0; font-size: 1.05rem; }
.tb-cdlg__hint { margin: 0; font-size: .8rem; color: var(--text-muted); }
.tb-cdlg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; }
.tb-cdlg__grid label { display: grid; gap: .2rem; font-size: .75rem; color: var(--text-muted); }


label.tb-cdlg__chk { display: flex; align-items: center; gap: .4rem; align-self: end; }
.tb-cdlg__chk input { accent-color: var(--accent); }
.tb-cdlg input[type="text"], .tb-cdlg input[type="number"], .tb-cdlg select {
  font: inherit; font-size: .85rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: .3rem .45rem; min-width: 0;
}
.tb-cdlg__sec {
  font-weight: 600; font-size: .85rem;
  border-top: 1px solid var(--rule); padding-top: .6rem;
}
.tb-cdlg__sub { font-weight: 400; font-size: .72rem; color: var(--text-muted); margin-left: .4rem; }
.tb-cdlg__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tb-cdlg__tags:empty { display: none; }
.tb-cdlg__pill {
  font: inherit; font-size: .75rem; cursor: pointer; color: var(--text);
  background: none; border: 1px solid var(--rule-strong); border-radius: 999px;
  padding: .15rem .55rem;
}
.tb-cdlg__pill:hover { border-color: var(--accent-red); color: var(--accent-red); }
.tb-cdlg__addrow { display: flex; gap: .4rem; }
.tb-cdlg__addrow input { flex: 1; }



.tb-edlg__slot {
  border: 1px solid var(--tb-line); border-radius: var(--tb-r);
  padding: .1rem .7rem .7rem; margin: .6rem 0;
}
.tb-edlg__slothead {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; margin-top: .6rem; font-size: .82rem;
}
.tb-edlg__text {
  width: 100%; font: inherit; font-size: .8rem; resize: vertical;
  color: var(--text); background: transparent;
  border: 1px solid var(--tb-line); border-radius: var(--tb-r); padding: .35rem .5rem;
}
.tb-cdlg__zrow { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .35rem; }
.tb-cdlg__pct { width: 4.5rem; }
.tb-cdlg__to { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }



.tb-cdlg__zval { display: contents; }
.tb-cdlg__x {
  font: inherit; cursor: pointer; color: var(--text-muted);
  background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: .1rem .45rem;
}
.tb-cdlg__x:hover { border-color: var(--accent-red); color: var(--accent-red); }
.tb-cdlg__donorpick { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-muted); }
.tb-cdlg__donorpick input { flex: 1; }
.tb-cdlg__donor { margin: 0; font-size: .78rem; color: var(--accent-green); min-height: 1em; }
.tb-cdlg__foot {
  display: flex; gap: .5rem; justify-content: flex-end;
  border-top: 1px solid var(--rule); padding-top: .7rem;
}
@media (max-width: 480px) {
  .tb-cdlg__grid { grid-template-columns: 1fr; }
}
@media (pointer: coarse), (hover: none) {
  .tb-custom__btn, .tb-cdlg__pill, .tb-cdlg__x,
  .tb-cdlg input[type="text"], .tb-cdlg input[type="number"], .tb-cdlg select { min-height: 44px; }
}









@media (max-width: 1099px) {
  .tb-side { display: contents; }
  









  .tb-side__metrics {
    order: -1;
    position: sticky; top: 50px; z-index: 17;
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem;
    padding: .35rem .6rem;
    background: var(--bg);
  }
}
