/* --- 基盤デザイン --- */
.bb-tool-island { 
  margin: -60px auto 80px; 
  padding: 40px; background: #fff; border-radius: 12px; 
  box-shadow: 0 30px 60px rgba(0,0,0,.1); border: 1px solid #edf2f7; 
  max-width: 1040px; box-sizing: border-box; text-align: left;
}

@media (max-width: 768px) {
  .bb-tool-island { margin-top: -80px !important; padding: 16px !important; }
}

.bb-tool-island .tool-main-header { text-align: center; margin-bottom: 30px; }
.bb-tool-island .tool-main-title { font-size: 28px; font-weight: 900; color: #1e293b; margin-bottom: 8px; }
.bb-tool-island .tool-main-sub { font-size: 14px; color: #64748b; }

.bb-tool-island .bb-mini { 
  display: flex; align-items: center; gap: 8px; font-size: 11px; 
  color: #64748b; font-weight: 800; text-transform: uppercase; margin-bottom: 10px;
}
.bb-tool-island .bb-mini::before { content: ""; width: 4px; height: 14px; background: #a78bfa; border-radius: 2px; }

/* モード切替 */
.bb-tool-island .mode-switcher { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px;
    margin-top: 40px; }
.bb-tool-island .mode-btn { 
  padding: 10px 24px; border-radius: 50px; border: 2px solid #e2e8f0; 
  background: #fff; font-weight: 800; color: #64748b; cursor: pointer; transition: 0.2s; font-size: 13px;
}
.bb-tool-island .mode-btn.active { border-color: #a78bfa; background: #f5f3ff; color: #a78bfa; }

/* 解析結果・カード (垂直中央揃え) */
.bb-tool-island .bb-result-upper { 
  background: #f8fafc; border-radius: 20px; padding: 25px; margin-bottom: 25px; border: 1px solid #edf2f7;
}
.bb-tool-island .stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.bb-tool-island .stat-card { 
  background: #fff; padding: 15px; border-radius: 15px; border: 1px solid #e2e8f0; 
  display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100px;
}
.bb-tool-island .stat-label { font-size: 10px; font-weight: 800; color: #94a3b8; margin-bottom: 5px; }
.bb-tool-island .stat-value { font-size: 20px; font-weight: 900; color: #1e293b; line-height: 1; }
.bb-tool-island .stat-card.main .stat-value { color: #a78bfa; font-size: 30px; }
.bb-tool-island .stat-card.highlight { background: #fff5f7; border-color: #fce7f3; }
.bb-tool-island .stat-card.highlight .stat-value { color: #f472b6; }

/* Lighthouse ゲージ */
.bb-tool-island .lh-score-container { text-align: center; margin-bottom: 20px; }
.bb-tool-island .lh-gauge-wrapper { position: relative; width: 110px; height: 110px; margin: 0 auto; }
.bb-tool-island .lh-gauge { transform: rotate(-90deg); width: 110px; height: 110px; }
.bb-tool-island .lh-gauge circle { fill: none; stroke-width: 8; }
.bb-tool-island .lh-gauge-bg { stroke: #e2e8f0; }
.bb-tool-island .lh-gauge-value { stroke-dasharray: 339.292; transition: 0.6s ease; stroke-linecap: round; }
.bb-tool-island .lh-score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 34px; font-weight: 800; transition: color 0.3s; }
.bb-tool-island .lh-score-label { font-size: 12px; font-weight: 800; color: #64748b; margin-top: 10px; }

/* 診断リスト */
.bb-tool-island .lh-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-bottom: 1px solid #f1f5f9; font-size: 14px; font-weight: 600; text-align: left; }
.bb-tool-island .lh-item.ng::before { content: "▲"; color: #ff3333; margin-right: 8px; }
.bb-tool-island .lh-item.warn::before { content: "■"; color: #ffa500; margin-right: 8px; }
.bb-tool-island .lh-item.ok::before { content: "●"; color: #00cc66; margin-right: 8px; }

/* キーワード & 単価設定 */
.bb-tool-island .bb-input-external-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px; gap: 20px; }
.bb-tool-island .bb-kw-field { width: 100%; border: 2px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; font-size: 15px; outline: none; transition: 0.2s; background: #fcfcfd; box-sizing: border-box; }
.bb-tool-island .bb-kw-field:focus { border-color: #a78bfa; background: #fff; box-shadow: 0 0 0 4px rgba(167,139,250,0.1); }
.bb-tool-island .price-setting { font-size: 13px; font-weight: 800; color: #64748b; white-space: nowrap; margin-bottom: 6px; }
.bb-tool-island .price-setting input { width: 60px; border: 2px solid #e2e8f0; border-radius: 8px; padding: 6px; text-align: center; font-weight: 800; }

/* 入力エリア */
.bb-tool-island .bb-textarea-wrapper { border: 2px solid #e2e8f0; border-radius: 16px; padding: 20px; background: #fff; box-sizing: border-box; }
.bb-tool-island textarea#main-input { width: 100%; height: 350px; border: none; font-size: 16px; line-height: 1.8; outline: none; resize: vertical; }

/* プロンプトボックス */
.bb-tool-island .prompt-box { width: 100%; display: flex; flex-direction: column; }
.bb-tool-island .prompt-box textarea { 
  width: 100%; height: 220px; background: #f8fafc; border: 2px solid #a78bfa; 
  border-radius: 16px; padding: 20px; font-family: ui-monospace, monospace;
  font-size: 14px; line-height: 1.6; color: #334155; resize: vertical; box-sizing: border-box; outline: none;
}

/* ボタン装飾 */
.bb-tool-island .bb-copy-btn-small { padding: 8px 16px; font-size: 11px; font-weight: 800; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; color: #64748b; }
.bb-tool-island .btn--generate { 
  appearance: none; background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%) !important; 
  color: #fff !important; min-height: 58px; border-radius: 50px; font-weight: 900; border: none !important; 
  width: 100%; cursor: pointer; margin-top: 20px; box-shadow: 0 10px 15px -3px rgba(167, 139, 250, 0.4); transition: 0.3s;
}
.bb-tool-island .btn--generate:hover { transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgba(167, 139, 250, 0.5); }
