.bs-wrap {
  width: 100%;
  max-width: 720px;
}

/* ---- ビルド入力折りたたみ ---- */
.bs-build-details {
  margin-bottom: 20px;
  border: 1px solid #000;
  border-radius: 14px;
  padding: 14px;
}

.bs-build-details .status-sim {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.bs-build-details .status-sim h1 {
  display: none;
}

.bs-build-summary {
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.bs-build-summary::-webkit-details-marker { display: none; }

.bs-build-summary::before {
  content: "▶";
  font-size: 11px;
  transition: transform 0.2s;
  display: inline-block;
}

.bs-build-details[open] > .bs-build-summary::before {
  transform: rotate(90deg);
}

.bs-build-details[open] > .bs-build-summary {
  margin-bottom: 12px;
}

/* ---- 戦闘設定 ---- */
.bs-build-section {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #000;
  border-radius: 14px;
}

.bs-section-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

.bs-build-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bs-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bs-label-text {
  white-space: nowrap;
}

.bs-npan-input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #000;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
}

.bs-floor-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---- タブ ---- */
.bs-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bs-tab-btn {
  flex: 1;
}

.bs-tab-btn[aria-pressed="true"] {
  background: rgba(0,0,0,0.08);
  box-shadow: 0 0 0 2px #000 inset;
}

.bs-panel-section {
  padding: 4px 0;
}

/* ---- ボタン ---- */
.bs-run-btn {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid #000;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px #000 inset;
}

.bs-run-btn:active {
  transform: scale(0.99);
}

.bs-search-btn {
  margin-top: 12px;
  background: #f0f7ff;
}

.bs-search-equip-wrap {
  margin-top: 8px;
}

/* ---- 結果 ---- */
.bs-results {
  margin-top: 16px;
}

.bs-area-section {
  margin-bottom: 16px;
}

.bs-area-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;
}

.bs-monster-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bs-monster-item {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.bs-ok {
  color: #1a7a3a;
  font-weight: 700;
  margin-top: 8px;
}

.bs-ng {
  color: #c0392b;
  font-weight: 700;
  margin-top: 8px;
}

.bs-monster-search {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 16px;
  padding: 10px;
  border: 1px solid #000;
  border-radius: 10px;
}

/* ---- 装備探索結果 ---- */
.bs-equip-result-section {
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.bs-equip-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #666;
  margin: 12px 0 6px;
}

.bs-set-bonus {
  color: #b8860b;
  font-weight: 700;
  font-size: 13px;
  margin: 4px 0;
}

.bs-equip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.bs-equip-table tr {
  border-bottom: 1px solid #eee;
}

.bs-equip-table td {
  padding: 6px 8px;
}

.bs-equip-slot {
  width: 52px;
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

.bs-equip-stat {
  width: 80px;
  text-align: right;
  font-weight: 700;
  color: #1a5fa8;
  white-space: nowrap;
}
.bs-glv-needed {
  color: #c0392b;
  font-weight: 700;
  padding: 6px 8px;
  font-size: 14px;
  white-space: nowrap;
}

.bs-glv-ok {
  color: #1a7a3a;
  font-weight: 700;
  padding: 6px 8px;
  font-size: 14px;
  white-space: nowrap;
}

/* ---- ステポイント分析ボックス ---- */
.bs-statpoint-box {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: rgba(0,0,0,.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bs-statpoint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex-wrap: wrap;
}

.bs-statpoint-label {
  color: #555;
}

.bs-statpoint-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- 振り分け上限計算 ---- */
.bs-point-limit-fold {
  margin: 12px 0;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,.01);
}

.bs-point-limit-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
}

.bs-point-limit-total {
  font-size: 18px;
  font-weight: 700;
  color: #1a5fa8;
  font-variant-numeric: tabular-nums;
}

/* ---- ステポイント分析ボックス ---- */
.bs-statpoint-box {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: rgba(0,0,0,.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bs-statpoint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex-wrap: wrap;
}

.bs-statpoint-label {
  color: #555;
}

.bs-statpoint-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- 乱数・多段数 横並びグループ ---- */
.bs-inline-group {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.bs-field-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bs-field-label {
  font-size: 13px;
  font-weight: bold;
  color: #333;
}

.bs-field-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bs-spd-note {
  font-size: 12px;
  color: #d44;
  margin-top: 2px;
}

/* ---- 探索セクション見出し色分け ---- */
.bs-area-title[class*="title-"] {
  padding: 6px 10px;
  border-radius: 8px;
  margin: 0 0 8px;
  color: #fff;
  border-bottom: none;
}

.bs-area-title.title-atk  { background: #cc0033; }
.bs-area-title.title-int  { background: #0055cc; }
.bs-area-title.title-spd  { background: #222222; }
.bs-area-title.title-hit  { background: #e07800; }
.bs-area-title.title-crit { background: #cc9900; color: #222; }
.bs-area-title.title-def  { background: #6600aa; }
.bs-area-title.title-mdef { background: #440077; }
.bs-area-title.title-luk  { background: #e07800; }
.bs-area-title.title-vit  { background: #555555; }

/* セクション間の仕切り線 */
.bs-section-divider {
  border: none;
  border-top: 2px solid #ddd;
  margin: 20px 0;
}

/* 振り分けポイント合計入力欄を全桁表示 */
#basePointTotal {
  width: 140px;
}
