/* ============================================================
   2chara BREAK Tool - Complete Clean Stylesheet (2026-09-19)
   ============================================================ */

/* BREAKツール切り替えタブ */
.break-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
}
.break-switcher .break-link {
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85em;
  transition: all 0.15s ease;
}
.break-switcher .break-link:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}
.break-switcher .break-link.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  pointer-events: none;
}

/* 2chara 共通 Flexbox レイアウト */
.kakko-flex {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  margin: 15px 0;
}
.kakko-flex > div {
  flex: 1 1 320px;
  min-width: 280px;
}
.kakko-flex textarea {
  width: 100%;
  min-height: 220px;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .kakko-flex { flex-direction: column; }
}

/* ============================================================
   ライトテーマ強制上書き補正 (CSS変数 + フォント色)
   ============================================================ */
:root {
  --text: #1f2937 !important;
  --text-primary: #1f2937 !important;
  --muted: #6b7280 !important;
}

html {
  background-color: #f8f9fc !important;
}

body,
body.page-2chara-break,
body.break-tool {
  min-width: 320px;
  margin: 0;
  background-color: #f8f9fc !important;
  color: #1f2937 !important;
  --text: #1f2937 !important;
  --text-primary: #1f2937 !important;
  --muted: #6b7280 !important;
}

/* ヘッダー・ナビゲーションの中央寄せ（幅1040px基準） */
body > nav,
body > header,
body > h1,
body.page-2chara-break > h1,
body.break-tool > h1,
#common-nav-container,
.container,
main.container,
.main-container {
  width: min(100% - 32px, 1040px) !important;
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

body > h1,
body.page-2chara-break > h1,
body.break-tool > h1 {
  margin-top: 16px !important;
  margin-bottom: 8px !important;
  color: #1f2937 !important;
}

/* 入力欄・出力欄の視認性担保 */
textarea,
input[type="text"],
input[type="search"],
select,
body.page-2chara-break textarea,
body.break-tool textarea {
  color: #1f2937 !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  caret-color: #1f2937 !important;
  border-radius: 6px;
}

textarea::placeholder,
input::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

/* チップ・タグ・出力結果のテキスト */
.chip,
.tag-chip,
.token,
.result-area,
.prompt-output {
  color: #1f2937 !important;
}

@media (max-width: 640px) {
  body > h1,
  body.page-2chara-break > h1,
  body.break-tool > h1,
  #common-nav-container,
  .container {
    width: calc(100% - 20px) !important;
  }
}
/* ==================================================
   文字のズレ・レイアウト崩れ修正用スタイル (v3.4 fix)
   ================================================== */
.chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  vertical-align: middle;
  padding: 4px 8px !important;
  gap: 6px !important;
}
.chip > span:first-child {
  display: inline-block;
  vertical-align: middle;
}
.chip-del {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px;
  height: 16px;
  line-height: 1 !important;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%;
  margin-left: 2px;
  transform: translateY(-1px);
}
.step-title { display: flex !important; align-items: center !important; gap: 8px; }
.step-badge { display: inline-flex !important; align-items: center !important; justify-content: center !important; line-height: 1 !important; }
.chara-label { display: flex !important; align-items: center !important; gap: 8px; margin-bottom: 6px; }
.chara-label .badge { display: inline-flex !important; align-items: center !important; justify-content: center !important; line-height: 1 !important; }
.llm-card { display: flex !important; align-items: center !important; justify-content: center !important; gap: 6px; line-height: 1.2 !important; }
.llm-icon { display: inline-block; line-height: 1; }