/* bratindex · restrained panel. Prefix: bx- */

main.shell-main.bx-main {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 72px;
}

.bx-stage {
  width: min(640px, 100%);
  margin: 18px auto 0;
  color: #e8eef6 !important;
}

.bx-table {
  position: relative;
  padding: 28px 22px 26px;
  border-radius: 12px;
  border: 1px solid rgba(196, 168, 130, 0.28);
  background: #161b22;
  color: #e8eef6 !important;
}

.bx-meter {
  position: relative;
  height: 14px;
  margin: 0 0 16px;
}

.bx-meter::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 5px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.bx-meter-mark {
  position: absolute;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c4a882;
  left: calc(7px + var(--bx-shift, 0) * (100% - 14px));
  transition: left 220ms ease;
}

.bx-table[data-pose="refuse"] .bx-meter-mark { background: #d07a72; }
.bx-table[data-pose="blur"] .bx-meter-mark { opacity: 0.35; }

.bx-drops {
  display: flex;
  gap: 3px;
  margin: 0 0 18px;
}

.bx-drop {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.bx-drop.is-wet {
  background: #c4a882;
}

.bx-table[data-mode="entry"] .bx-meter,
.bx-table[data-mode="entry"] .bx-drops,
.bx-table[data-mode="done"] .bx-drops {
  display: none;
}

.bx-copy {
  position: relative;
  color: #e8eef6 !important;
}

.bx-copy h1,
.bx-copy h2,
.bx-copy p,
.bx-copy li {
  color: #e8eef6 !important;
}

.bx-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.15;
}

.bx-lead,
.bx-note,
.bx-prompt,
.bx-one,
.bx-foot,
.bx-index-kicker {
  margin: 0 0 12px;
  line-height: 1.55;
}

.bx-lead { font-size: 1.05rem; max-width: 36em; }
.bx-note { font-size: 0.82rem; color: #9aa6b5 !important; }

.bx-coasters {
  display: flex;
  gap: 10px;
  margin: 18px 0 16px;
  flex-wrap: wrap;
}

.bx-coaster,
.bx-begin,
.bx-act,
.bx-ring {
  font: inherit;
  cursor: pointer;
}

.bx-coaster {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(196, 168, 130, 0.45);
  background: transparent;
  color: #e8eef6 !important;
  font-weight: 650;
  font-size: 0.92rem;
}

.bx-coaster[aria-pressed="true"] {
  background: #c4a882;
  border-color: #c4a882;
  color: #1a140c !important;
}

.bx-copy .bx-begin,
.bx-copy .bx-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.bx-copy .bx-begin {
  border: 1px solid #c4a882;
  background: #c4a882;
  color: #1a140c !important;
}

.bx-copy .bx-act {
  border: 1px solid rgba(196, 168, 130, 0.45);
  background: transparent;
  color: #e8eef6 !important;
}

.bx-copy .bx-begin:disabled {
  opacity: 1;
  background: transparent;
  border-color: rgba(196, 168, 130, 0.35);
  color: #b7c2ce !important;
  cursor: not-allowed;
}

.bx-begin:not(:disabled):hover {
  background: #d4bc9a;
  border-color: #d4bc9a;
}

.bx-act:hover,
.bx-coaster:hover {
  background: rgba(196, 168, 130, 0.12);
}

.bx-coaster[aria-pressed="true"]:hover {
  background: #d4bc9a;
  color: #1a140c !important;
}

.bx-coaster:focus-visible,
.bx-begin:focus-visible,
.bx-act:focus-visible,
.bx-ring:focus-visible {
  outline: 2px solid #c4a882;
  outline-offset: 2px;
}

.bx-saved {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #d7deea !important;
}

.bx-count {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #9aa6b5 !important;
}

.bx-prompt {
  font-size: 1.16rem;
  font-weight: 700;
  max-width: 36em;
  min-height: 3.2em;
  padding-left: 12px;
  box-shadow: inset 3px 0 0 transparent;
}

.bx-table.is-catch .bx-prompt {
  box-shadow: inset 3px 0 0 #c4a882;
}

.bx-table.is-pause .bx-ring:not(.is-picked) {
  opacity: 0.4;
}

.bx-rings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.bx-ring {
  min-height: 72px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1c242e;
  color: #e8eef6 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.bx-ring strong {
  font-size: 1.05rem;
  color: #f4efe8 !important;
}

.bx-ring span {
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  color: #c5d0dc !important;
}

.bx-ring:hover,
.bx-ring:focus-visible {
  border-color: #c4a882;
}

.bx-ring.is-picked {
  background: #c4a882;
  border-color: #c4a882;
}

.bx-ring.is-picked strong,
.bx-ring.is-picked span {
  color: #1a140c !important;
}

.bx-done-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.bx-index-kicker {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #c4a882 !important;
  margin: 0;
}

.bx-index {
  margin: 0;
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #f4efe8 !important;
}

.bx-kind {
  margin: 4px 0 0;
  font-size: 1.55rem;
  font-weight: 750;
}

.bx-stamp {
  display: inline-flex;
  align-self: flex-start;
  margin: 8px 0 0;
  padding: 4px 10px;
  border: 1px solid #d07a72;
  border-radius: 6px;
  color: #f0b2ac !important;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(208, 122, 114, 0.12);
}

.bx-one {
  margin-top: 14px;
}

.bx-napkin {
  margin: 4px 0 14px;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.bx-napkin li {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.5;
}

.bx-napkin li:first-child { border-top: 0; }

.bx-foot {
  font-size: 0.92rem;
  max-width: 40em;
  color: #c5d0dc !important;
}

.bx-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}

.bx-download[hidden],
.bx-stamp[hidden],
.bx-saved[hidden],
canvas[hidden] {
  display: none !important;
}

.bx-table[data-mode="entry"] .bx-play,
.bx-table[data-mode="entry"] .bx-done,
.bx-table[data-mode="play"] .bx-entry,
.bx-table[data-mode="play"] .bx-done,
.bx-table[data-mode="done"] .bx-entry,
.bx-table[data-mode="done"] .bx-play {
  display: none;
}

@media (max-width: 640px) {
  main.shell-main.bx-main { padding-bottom: 104px; }
  .bx-table { padding: 22px 14px 20px; }
  .bx-title { font-size: 1.65rem; }
  .bx-index { font-size: 3.3rem; }
  .bx-kind { font-size: 1.3rem; }
  .bx-rings { gap: 6px; }
  .bx-ring { min-height: 68px; padding: 8px 4px; }
  .bx-ring span { font-size: 0.64rem; }
  .bx-coasters { flex-direction: column; }
  .bx-coaster { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bx-meter-mark,
  .bx-ring,
  .bx-coaster,
  .bx-begin,
  .bx-act {
    transition: none;
  }
}
