/*
 * Battles.
 *
 * The lobby is a stack of wide rows read left to right: what state the battle
 * is in and who is in it, the boxes it runs through with a mark on the one
 * being opened, what it costs, and what has come out of it so far on a panel
 * tinted by the mode.
 *
 * The room is a column per seat. The reels run vertically past a mark across
 * the middle, the totals sit under them, the teams add up under that, and
 * everything won so far is laid out underneath, one row per round.
 */

.bt-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.bt-panel[hidden] {
  display: none;
}

/*
 * A mode is a colour, everywhere it appears. Set once here and read by the
 * tag, by the tinted panel on a card and by the winning side in the room.
 */
[data-mode='normal'] {
  --mode: var(--gold);
}
[data-mode='group'] {
  --mode: #2f7fe0;
}
[data-mode='crazy'] {
  --mode: #e0662f;
}
[data-mode='terminal'] {
  --mode: #16b5a0;
}
[data-mode='degen'] {
  --mode: #d8352a;
}
[data-mode='jackpot'] {
  --mode: #1f9d55;
}
[data-mode='crazy-jackpot'] {
  --mode: #d98f00;
}

/* --------------------------------------------------------------- the tabs */

.bt-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px 0;
}

.bt-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1424;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.bt-tabs button:hover {
  color: #fff;
  border-color: var(--gold);
}

.bt-tabs button.is-on {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
  font-weight: 600;
}

.bt-tabs .cf-count {
  font-size: 11px;
  opacity: 0.8;
}

.bt-columns {
  display: grid;
  grid-template-columns: 300px 1fr 150px 190px;
  gap: 10px;
  margin: 10px 16px 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1424;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bt-columns span:nth-child(2),
.bt-columns span:nth-child(3),
.bt-columns span:nth-child(4) {
  text-align: center;
}

/* ------------------------------------------------------------- the lobby */

.bt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 10px 16px 16px;
  list-style: none;
}

.bt-card {
  display: grid;
  grid-template-columns: 300px 1fr 150px 190px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1424;
  overflow: hidden;
}

.bt-card.is-live {
  border-color: color-mix(in srgb, var(--mode, var(--gold)) 40%, var(--line));
}

.bt-card-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.bt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: #111c31;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bt-badge.is-live {
  background: #3a1113;
  color: #f05252;
}

.bt-badge.is-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f05252;
  box-shadow: 0 0 8px #f05252;
}

.bt-faces {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.bt-face {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #111c31;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  overflow: hidden;
}

.bt-face svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.bt-face.is-free {
  border-style: dashed;
  color: var(--text-faint);
  font-weight: 400;
}

.bt-face.is-won {
  border-color: var(--gold);
  color: var(--gold);
}

.bt-cross {
  font-size: 11px;
  color: var(--text-faint);
  padding: 0 2px;
}

.bt-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.bt-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--mode, var(--gold)) 22%, #0a1120);
  color: color-mix(in srgb, var(--mode, var(--gold)) 75%, #ffffff);
  font-size: 11px;
  text-transform: capitalize;
}

.bt-mode-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mode, var(--gold));
}

.bt-mode-tag.is-plain {
  background: #111c31;
  color: var(--text-dim);
}

.bt-mode-tag.is-plain::before {
  display: none;
}

/* ---- the strip of boxes on a card ---- */

/*
 * The boxes sit on a panel of their own inside the card, the way the old board
 * had them: a darker well with the run of artwork in it and the round counter
 * in the corner.
 */
.bt-card-boxes {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 40px 8px 12px;
  border-radius: 10px;
  background: #0a1120;
}

.bt-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.bt-strip-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
}

.bt-strip-box img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.75;
}

/* The box being opened, marked above and below the way the old board did. */
.bt-strip-box.is-now img {
  opacity: 1;
}

.bt-strip-box.is-now::before,
.bt-strip-box.is-now::after {
  content: '';
  position: absolute;
  left: 50%;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.bt-strip-box.is-now::before {
  top: -7px;
  border-top: 6px solid #fff;
}

.bt-strip-box.is-now::after {
  bottom: -7px;
  border-bottom: 6px solid #fff;
}

.bt-more {
  font-size: 11px;
  color: var(--text-faint);
}

.bt-round-count {
  position: absolute;
  right: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #111c31;
  font-size: 10px;
  color: var(--text-faint);
}

.bt-round-count svg {
  width: 11px;
  height: 11px;
}

.bt-card-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.bt-card-value b {
  font-size: 14px;
  color: var(--gold);
}

.bt-card-value small {
  font-size: 10px;
  color: var(--text-faint);
}

/*
 * The right of a card carries the mode's colour, which is how the old board
 * read at a glance: green for a jackpot, blue for a group, and so on.
 */
.bt-card-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  margin: -10px -14px -10px 0;
  padding: 10px 12px;
  background:
    radial-gradient(120% 140% at 100% 50%, color-mix(in srgb, var(--mode) 30%, transparent), transparent 70%),
    #0a1120;
}

/* The dots, which is what made that panel read as a panel. */
.bt-card-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--mode) 45%, transparent) 1px, transparent 1px);
  background-size: 9px 9px;
  mask: radial-gradient(100% 120% at 100% 50%, #000, transparent 72%);
  pointer-events: none;
}

.bt-card-right > * {
  position: relative;
  z-index: 1;
}

.bt-unboxed {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.bt-unboxed b {
  font-size: 13px;
  color: color-mix(in srgb, var(--mode) 55%, #ffffff);
}

.bt-unboxed small {
  font-size: 10px;
  color: var(--text-faint);
}

.bt-card-buttons {
  display: flex;
  gap: 6px;
}

.bt-card-buttons .button {
  min-width: 86px;
}

/* ------------------------------------------------------------ the builder */

.bt-build {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 14px;
  padding: 14px;
}

.bt-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1424;
}

.bt-choices,
.bt-toggles,
.bt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bt-choices button,
.bt-toggles button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1120;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-transform: capitalize;
}

.bt-choices button:hover,
.bt-toggles button:hover {
  color: #fff;
  border-color: var(--gold);
}

.bt-choices button.is-on,
.bt-toggles button.is-on {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
  font-weight: 600;
}

.bt-make {
  height: 40px;
  margin-top: 6px;
  border-radius: 9px;
}

.bt-chosen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: #0b1424;
}

.bt-picked-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  min-height: 90px;
}

.bt-picked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 64px;
  padding: 6px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1120;
  color: var(--text-faint);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.bt-picked:hover {
  border-color: #6b2230;
  color: #f7a2a2;
}

.bt-picked img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.bt-empty {
  font-size: 12px;
  color: var(--text-faint);
}

.bt-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
}

.bt-summary b {
  font-size: 13px;
  color: var(--gold);
}

.bt-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
}

.bt-shelf-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1424;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.bt-shelf-box:hover {
  border-color: var(--gold);
}

.bt-shelf-box img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.bt-shelf-name {
  width: 100%;
  font-size: 11px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.bt-shelf-price {
  font-size: 11px;
  color: var(--gold);
}

/* -------------------------------------------------------------- the room */

.bt-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 16px;
}

.bt-back {
  justify-self: start;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.bt-back:hover {
  color: var(--text);
}

.bt-rounds {
  font-size: 13px;
  color: var(--text-dim);
}

.bt-top-buttons {
  justify-self: end;
  display: flex;
  gap: 6px;
}

.bt-round-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1424;
  color: var(--gold);
  cursor: pointer;
}

.bt-round-button svg {
  width: 17px;
  height: 17px;
}

.bt-round-button:hover {
  border-color: var(--gold);
}

.bt-info {
  display: grid;
  grid-template-columns: minmax(150px, 260px) 1fr minmax(150px, 220px);
  align-items: center;
  gap: 12px;
  margin: 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1424;
}

.bt-info-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.bt-shape {
  font-size: 13px;
  color: var(--text-dim);
}

.bt-info-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.bt-info-box {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  opacity: 0.35;
  transition: opacity 200ms ease;
}

.bt-info-box img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.bt-info-box.is-done {
  opacity: 0.7;
}

.bt-info-box.is-now {
  opacity: 1;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  box-shadow: 0 0 0 1px var(--gold);
}

.bt-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 12px;
  color: var(--text-dim);
}

.bt-info-right b {
  color: var(--gold);
}

.bt-info-right small {
  font-size: 10px;
  color: var(--text-faint);
}

/* ---- the stage ---- */

.bt-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--seats), minmax(0, 1fr));
  gap: 8px;
  height: 340px;
  margin: 12px 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(70% 120% at 50% 50%, #16223a, #070c15);
  overflow: hidden;
}

.bt-stage.is-waiting {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  height: 260px;
}

.bt-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bt-waiting b {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 45%, transparent);
}

.bt-waiting span {
  font-size: 13px;
  color: var(--text-faint);
}

.bt-waiting-buttons {
  display: flex;
  gap: 8px;
}

/* The mark the reels stop on, straight across the middle of the stage. */
.bt-marker {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 14px rgba(245, 185, 66, 0.45);
  z-index: 2;
  pointer-events: none;
}

.bt-slot {
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.bt-slot:last-child {
  border-right: 0;
}

.bt-slot.is-won {
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

/*
 * The reel. It is a column of fixed height cards that starts with its first
 * card centred on the mark, which is what makes the landing exact: one card is
 * always one card tall.
 */
.bt-reel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 56px);
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.bt-spin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 112px;
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--tier, #6b7280) 24%, transparent), transparent 70%);
  text-align: center;
}

.bt-spin-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.bt-spin-name {
  width: 100%;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.bt-spin-value {
  font-size: 10px;
  color: var(--gold);
}

/* ---- the players under the stage ---- */

.bt-players {
  display: grid;
  grid-template-columns: repeat(var(--seats), minmax(0, 1fr));
  gap: 8px;
  margin: 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 16, 21, 0.7);
}

.bt-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bt-player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.bt-player-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bt-player-value {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 18%, #0a1120);
  font-size: 11px;
  color: var(--gold);
}

.bt-crown {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--on-lime);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---- the team bars ---- */

.bt-teams {
  display: grid;
  grid-template-columns: repeat(var(--teams), minmax(0, 1fr));
  gap: 8px;
  margin: 8px 16px;
}

.bt-team {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1424;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.bt-team b {
  font-size: 13px;
  color: var(--text);
  text-transform: none;
}

.bt-team.is-won {
  border-color: var(--gold);
}

.bt-team.is-won b {
  color: var(--gold);
}

/* ---- everything won so far ---- */

.bt-won-grid {
  display: grid;
  grid-template-columns: repeat(var(--seats), minmax(0, 1fr));
  gap: 8px;
  padding: 8px 16px 16px;
}

.bt-won-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bt-won-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px 10px;
  border-radius: 10px;
  background:
    radial-gradient(80% 70% at 50% 30%, color-mix(in srgb, var(--tier) 22%, transparent), transparent 70%),
    #0b1424;
  overflow: hidden;
}

.bt-won-rarity {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 24px;
  height: 4px;
  margin-left: -12px;
  border-radius: 4px;
  background: var(--tier);
}

.bt-won-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.bt-won-name {
  width: 100%;
  font-size: 10px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.bt-won-value {
  font-size: 11px;
  color: var(--gold);
}

@media (max-width: 1100px) {
  .bt-columns {
    display: none;
  }

  .bt-card {
    grid-template-columns: 1fr 1fr;
  }

  .bt-card-boxes,
  .bt-card-right {
    grid-column: span 2;
  }

  .bt-card-right {
    flex-direction: row;
    justify-content: space-between;
    margin: 0 -14px -10px;
  }

  .bt-build {
    grid-template-columns: 1fr;
  }

  .bt-stage,
  .bt-players,
  .bt-won-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bt-stage {
    height: 260px;
  }
}

/* ----------------------------------------- the page a battle is built on */

.bt-create-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 14px 16px 6px;
}

.bt-create-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bt-create-title b {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
}

.bt-create-title small {
  font-size: 12px;
  color: var(--text-faint);
}

.bt-create-counts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  color: var(--text-faint);
}

.bt-create-counts b {
  color: var(--gold);
}

.bt-create-body {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: 14px;
  padding: 8px 16px 16px;
  align-items: start;
}

.bt-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1424;
}

.bt-settings h3 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.bt-type {
  width: 100%;
}

/* The modes, two to a row, each with its own small mark. */
.bt-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bt-modes button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a1120;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-transform: capitalize;
}

.bt-modes button svg {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

.bt-modes button:hover {
  color: #fff;
  border-color: var(--gold);
}

.bt-modes button.is-on {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
  font-weight: 600;
}

/* ---- the switch, used by insurance and by the three toggles ---- */

.bt-switch {
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 18px;
  padding: 2px;
  border-radius: 999px;
  border: 0;
  background: #17223a;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.bt-switch > span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6b7280;
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}

.bt-switch.is-on,
.is-on > .bt-switch {
  background: color-mix(in srgb, var(--gold) 40%, #17223a);
}

.bt-switch.is-on > span,
.is-on > .bt-switch > span {
  transform: translateX(16px);
  background: var(--gold);
}

.bt-insurance {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1120;
}

.bt-insurance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bt-insurance-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.bt-insurance-name svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.bt-insurance-body[hidden] {
  display: none;
}

.bt-insurance-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.bt-insurance-body p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.bt-insurance-body b {
  color: var(--gold);
}

.bt-steps {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.bt-steps button {
  flex: 1;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.bt-steps button.is-on {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
  font-weight: 600;
}

/* ---- the right of the builder ---- */

.bt-create-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bt-toggles button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1424;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.bt-toggles button.is-on {
  color: #fff;
  border-color: var(--gold);
}

.bt-picked {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 116px;
  padding: 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1424;
  color: var(--text-faint);
  font-size: 10px;
}

.bt-picked img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.bt-picked-name {
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.bt-picked-drop {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 6px;
  background: #111c31;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.bt-picked-drop:hover {
  background: #6b2230;
  color: #fff;
}

.bt-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 116px;
  min-height: 122px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: #0b1424;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.bt-add-tile:hover {
  border-color: var(--gold);
  color: #fff;
}

.bt-add-plus {
  font-size: 22px;
  line-height: 1;
}

/* ------------------------------------------------------------ the picker */

.bt-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(3px);
}

.bt-modal[hidden] {
  display: none;
}

.bt-modal-card {
  display: flex;
  flex-direction: column;
  width: min(1060px, 100%);
  max-height: min(760px, 92vh);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.bt-modal-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 16px 6px;
}

.bt-modal-head b {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
}

.bt-modal-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px 0;
}

.bt-filters-label {
  font-size: 12px;
  color: var(--text-faint);
}

.bt-modal-filters .ed-chips {
  padding: 0;
  gap: 6px;
}

.bt-modal-filters .ed-search {
  flex: 1;
  min-width: 160px;
  height: 32px;
  border-radius: 8px;
}

.bt-modal-range {
  padding: 8px 16px 0;
}

.bt-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  overflow-y: auto;
}

.bt-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1424;
}

.bt-pick img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.bt-pick-name {
  width: 100%;
  font-size: 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.bt-pick-price {
  font-size: 12px;
  color: var(--gold);
}

.bt-pick-add {
  width: 100%;
  margin-top: 4px;
}

.bt-pick-count {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-lime);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.bt-modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #0b1424;
}

.bt-modal-count {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--on-lime);
  font-size: 12px;
  font-weight: 700;
}

.bt-modal-total {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
}

.bt-modal-total b {
  color: var(--gold);
}

@media (max-width: 900px) {
  .bt-create-head,
  .bt-create-body {
    grid-template-columns: 1fr;
  }

  .bt-create-counts {
    align-items: flex-start;
  }
}

/* The value in the middle of a card is the loudest thing on it. */
.bt-card-value b {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
}

.bt-unboxed b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
}


/* ------------------------------------------------- both currencies, stacked */

/*
 * Ether on the line and the dollar under it, wherever a value is written in
 * the room: on a card as it rolls, on a won item, on a seat's total and on
 * the battle itself.
 */
.bt-spin-value,
.bt-won-value,
.bt-team,
.bt-seat-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.bt-usd {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-faint);
}
