/* ============================================================
   リセット・基底
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', 'Yu Gothic', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f0f2f5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   ヘッダー
   ============================================================ */
header {
  background: #1e3a5f;
  color: #fff;
  padding: 0 20px;
  height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  gap: 12px;
}

header h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

header .header-github {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
  white-space: nowrap;
}
header .header-github:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

header .header-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   アプリ全体レイアウト
   ============================================================ */
.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ============================================================
   設定パネル（左サイドバー）
   ============================================================ */
.settings-panel {
  width: 210px;
  min-width: 210px;
  background: #fff;
  border-right: 1px solid #d8dde3;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-group {
  border-bottom: 1px solid #e8eaed;
  padding: 14px 14px 12px;
}

.settings-group h3 {
  font-size: 11px;
  font-weight: 700;
  color: #5a6a7e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 13px;
  color: #333;
}

.setting-row label {
  white-space: nowrap;
  color: #555;
  font-size: 12px;
}

.setting-row .range-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
}

input[type="number"] {
  width: 52px;
  padding: 3px 6px;
  border: 1px solid #c8cdd3;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  background: #fafafa;
  color: #1a1a1a;
  transition: border-color 0.15s;
}
input[type="number"]:focus {
  outline: none;
  border-color: #1e3a5f;
  background: #fff;
}

.sep { color: #999; font-size: 12px; }

.font-size-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-grow: 1;
  justify-content: flex-end;
}
.font-size-inputs input[type="range"] {
  width: 65px;
  flex-shrink: 1;
  height: 6px;
  -webkit-appearance: none;
  background: #e1e4e8;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.font-size-inputs input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e3a5f;
  cursor: pointer;
}
.font-size-inputs input[type="number"] {
  width: 38px;
  padding: 2px 4px;
  text-align: center;
}
.font-size-inputs .unit {
  font-size: 12px;
  color: #777;
}

/* 方向ボタン */
.dir-group {
  display: flex;
  gap: 4px;
}

.dir-btn {
  padding: 4px 10px;
  border: 1px solid #c8cdd3;
  border-radius: 4px;
  background: #fafafa;
  font-size: 14px;
  cursor: pointer;
  color: #444;
  transition: all 0.15s;
}
.dir-btn:hover { background: #e8eef5; border-color: #1e3a5f; }
.dir-btn.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

/* 汎用ボタン */
button {
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn-primary {
  background: #1e3a5f;
  color: #fff;
  border: 1px solid #1e3a5f;
  padding: 6px 14px;
}
.btn-primary:hover { background: #2a4f7c; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  background: #fff;
  color: #1e3a5f;
  border: 1px solid #1e3a5f;
  padding: 6px 12px;
}
.btn-secondary:hover { background: #e8eef5; }

.btn-danger {
  background: #fff;
  color: #c0392b;
  border: 1px solid #e0a0a0;
  padding: 4px 10px;
  font-size: 12px;
}
.btn-danger:hover { background: #fdf0f0; }

.btn-ghost {
  background: none;
  color: #5a6a7e;
  border: 1px dashed #b0bac5;
  padding: 6px 12px;
  width: 100%;
  margin-top: 4px;
}
.btn-ghost:hover { background: #f0f4f8; border-color: #1e3a5f; color: #1e3a5f; }

.btn-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* ============================================================
   メインコンテンツ
   ============================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f0f2f5;
}

/* ============================================================
   タブ
   ============================================================ */
.tabs {
  display: flex;
  background: #fff;
  border-bottom: 2px solid #d8dde3;
  flex-shrink: 0;
}

.tab-btn {
  padding: 11px 22px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #6b7c8e;
  cursor: pointer;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: #1e3a5f; }
.tab-btn.active {
  color: #1e3a5f;
  border-bottom-color: #1e3a5f;
  font-weight: 700;
}

/* ============================================================
   タブコンテンツ
   ============================================================ */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.tab-content.active { display: block; }

/* ============================================================
   波形編集タブ
   ============================================================ */
.editor-section {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d8dde3;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.editor-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.editor-section-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
}

.editor-hint {
  font-size: 11px;
  color: #8a9aaa;
  margin-bottom: 8px;
}

canvas {
  display: block;
  border: 1px solid #d0d5db;
  border-radius: 4px;
  background: #fff;
  max-width: 100%;
  cursor: crosshair;
}

/* エディタ用 canvas は crosshair を継承 */
#editorCanvasA, #editorCanvasB { cursor: crosshair; }

/* ============================================================
   プレビュータブ
   ============================================================ */
.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d8dde3;
}

.preview-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #444;
}

.preview-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.preview-row canvas {
  flex-shrink: 0;
}

/* ============================================================
   設問作成タブ
   ============================================================ */
.problem-builder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-controls {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d8dde3;
  padding: 18px 20px;
}

.problem-controls h3 {
  font-size: 13px;
  font-weight: 700;
  color: #5a6a7e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.control-row label {
  font-size: 13px;
  color: #444;
  white-space: nowrap;
}

select {
  padding: 5px 10px;
  border: 1px solid #c8cdd3;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  background: #fafafa;
  color: #1a1a1a;
  cursor: pointer;
}
select:focus { outline: none; border-color: #1e3a5f; }

.problem-params {
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f5f7fa;
  border-radius: 6px;
  border: 1px solid #e0e5ec;
  margin-bottom: 12px;
}
.problem-params label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #444;
}

/* ============================================================
   選択肢モード（Type3 / Type4）
   ============================================================ */
.choices-section {
  margin: 8px 0 12px;
  padding: 10px 14px;
  background: #f5f7fa;
  border: 1px solid #e0e5ec;
  border-radius: 6px;
}

.choices-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* トグルボタン（チェックボックスではなくボタンで実装。確認ダイアログとの整合のため） */
.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid #c8cdd3;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-btn:hover { border-color: #1e3a5f; }
.toggle-btn .toggle-knob {
  display: inline-block;
  width: 26px;
  height: 16px;
  background: #d0d5db;
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
}
.toggle-btn .toggle-knob::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.15s;
}
.toggle-btn.on {
  border-color: #1e3a5f;
  color: #1e3a5f;
  background: #eef3fa;
}
.toggle-btn.on .toggle-knob {
  background: #1e3a5f;
}
.toggle-btn.on .toggle-knob::after {
  left: 12px;
}

.choices-status {
  font-size: 11px;
  color: #8a9aaa;
}

.choices-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d8dde3;
}

.choices-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.choices-count-input {
  width: 56px;
}

.choices-hint {
  font-size: 11px;
  color: #6b7c8e;
}

.choices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-item {
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  padding: 10px 12px;
}

.choice-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.choice-item-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a5f;
}

.choice-item-correct-badge {
  display: inline-block;
  padding: 1px 8px;
  background: #1e3a5f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.choice-item-clear-btn {
  margin-left: auto;
  background: #fff;
  color: #c0392b;
  border: 1px solid #e0a0a0;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
}
.choice-item-clear-btn:hover { background: #fdf0f0; }

/* ============================================================
   設問出力 — 選択肢の表示
   ============================================================ */
.choices-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.choices-display .choice-display-item {
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  padding: 10px 12px;
}
.choices-display .choice-display-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.choices-display .choice-display-correct {
  display: inline-block;
  padding: 1px 8px;
  background: #1e8a4f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
}

/* ============================================================
   設問出力
   ============================================================ */
.output-section {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d8dde3;
  padding: 18px 20px;
}

.output-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8eaed;
}

.answer-section {
  border-left: 4px solid #1e3a5f;
}

.problem-text {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #1a1a1a;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e8eaed;
}

.answer-value {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a5f;
  padding: 10px 16px;
  background: #eef3fa;
  border-radius: 6px;
  margin-bottom: 14px;
  border: 1px solid #c5d5e8;
}

.answer-note {
  font-size: 12px;
  color: #6b7c8e;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.canvas-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.dl-btn {
  background: #fff;
  color: #1e3a5f;
  border: 1px solid #1e3a5f;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 4px;
  flex-shrink: 0;
}
.dl-btn:hover { background: #e8eef5; }

/* ============================================================
   エクスポートコントロール
   ============================================================ */
#exportControls {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d8dde3;
  align-items: center;
}

#exportControls span {
  font-size: 12px;
  color: #6b7c8e;
  margin-right: 4px;
}

.export-btn {
  background: #1e3a5f;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 5px;
}
.export-btn:hover { background: #2a4f7c; }
.export-btn.secondary {
  background: #fff;
  color: #1e3a5f;
  border: 1px solid #1e3a5f;
  font-weight: 500;
}
.export-btn.secondary:hover { background: #e8eef5; }

/* ============================================================
   1目盛サイズ（任意設定・折りたたみ）
   ============================================================ */
.cell-size-details {
  margin: 6px 0 4px;
  padding: 6px 0 2px;
  border-top: 1px dashed #e0e3e8;
  font-size: 12px;
}
.cell-size-details > summary {
  cursor: pointer;
  color: #6b7c8e;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 0;
  list-style: none;
  user-select: none;
}
.cell-size-details > summary::-webkit-details-marker { display: none; }
.cell-size-details > summary::before {
  content: '▸ ';
  font-size: 10px;
  color: #8a9aaa;
}
.cell-size-details[open] > summary::before {
  content: '▾ ';
}
.cell-size-details > summary:hover { color: #1e3a5f; }
.cell-size-hint {
  font-size: 10px;
  color: #8a9aaa;
  line-height: 1.4;
  margin: 4px 0 6px;
}
.cell-size-input {
  width: 56px;
}
.wave-only-row {
  margin-top: 6px;
}
.wave-only-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3a4a5a;
  cursor: pointer;
  user-select: none;
}
.wave-only-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #1e3a5f;
}

/* ============================================================
   描画スタイル プリセットボタン
   ============================================================ */
.style-preset-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.style-preset-btn {
  flex: 1;
  padding: 5px 6px;
  border: 1px solid #c8cdd3;
  border-radius: 4px;
  background: #fafafa;
  font-size: 12px;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.style-preset-btn:hover { background: #e8eef5; border-color: #1e3a5f; color: #1e3a5f; }
.style-preset-btn.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

/* ============================================================
   描画スタイル モーダル
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: #fff;
  border-radius: 10px;
  padding: 28px 32px 24px;
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e5ec;
}

.style-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}
.style-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #5a6a7e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  border-bottom: 2px solid #e0e5ec;
}
.style-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
}
.style-table tr:last-child td { border-bottom: none; }
.style-label {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.style-hint {
  font-size: 10px;
  color: #8a9aaa;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.style-table input[type="color"] {
  width: 36px;
  height: 28px;
  padding: 1px 2px;
  border: 1px solid #c8cdd3;
  border-radius: 4px;
  cursor: pointer;
}
.style-num {
  width: 56px;
  text-align: center;
}
.style-dp {
  width: 90px;
  padding: 3px 6px;
  border: 1px solid #c8cdd3;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  color: #333;
}
.style-dp:disabled {
  background: #f0f2f5;
  color: #aaa;
  border-color: #e0e3e8;
}

.style-note {
  font-size: 11px;
  color: #8a9aaa;
  margin-bottom: 18px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid #e0e5ec;
}

/* ============================================================
   解説スナップショット グリッド（Type 3 y-t 解説）
   ============================================================ */
.ref-canvas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.ref-canvas-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ============================================================
   反射波設定セクション — ヘッダー行（見出し＋削除ボタンを横並び）
   ============================================================ */
.settings-group-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.settings-group-header-row h3 {
  margin-bottom: 0;
}
.btn-sm {
  padding: 3px 8px;
  font-size: 11px;
}

/* ============================================================
   スクロールバー調整
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f2f5; }
::-webkit-scrollbar-thumb { background: #b0bac5; border-radius: 3px; }

/* ============================================================
   トースト通知
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(30, 58, 95, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  pointer-events: none;
  animation: toast-in 0.25s ease forwards, toast-out 0.4s ease 3.2s forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
::-webkit-scrollbar-thumb:hover { background: #8a9aaa; }

/* ============================================================
   正弦波パラメータ UI
   ============================================================ */

/* 正弦波パラメータブロック（モード切替で表示） */
#waveASineParams,
#waveBSineParams {
  border-top: 1px dashed #c8cdd3;
  margin-top: 6px;
  padding-top: 6px;
}

/* チェックボックス行 */
.sine-check-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.sine-check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 正弦波プレビュー領域（Phase 3 で使用） */
.sine-preview-hint {
  font-size: 12px;
  color: #888;
  padding: 8px 0 4px 0;
  text-align: center;
}

/* ============================================================
   正弦波 distractor UI（Phase 5）
   ============================================================ */
.sine-distractor-params {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 6px 8px;
  background: #f5f7fa;
  border-radius: 4px;
  margin: 4px 0;
}

.sine-distractor-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  white-space: nowrap;
}

.sine-distractor-label input[type="number"] {
  width: 60px;
}

.sine-distractor-prog-params {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 4px;
}

.sine-submode-row {
  display: flex;
  gap: 4px;
}

/* ============================================================
   UI 改善（2026-05-07）
   ============================================================ */

/* グリッド適用ヒントテキスト */
.apply-hint {
  font-size: 10px;
  color: #8a9aaa;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* 波 A / 波 B セクション — ヘッダーを目立たせる */
.wave-section > h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  color: #1e3a5f;
  letter-spacing: 0.02em;
  border-left: 3px solid #1e3a5f;
  padding-left: 8px;
  margin-bottom: 10px;
}

/* 描画スタイル見出し行（h3 + ⓘ を横並び） */
.section-heading-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.section-heading-row > h3 {
  margin-bottom: 0;
}

/* ⓘ ポップアップ（CSS only / checkbox トグル利用） */
.info-toggle-input {
  display: none;
}

.info-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #1e3a5f;
  background: #fff;
  color: #1e3a5f;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  user-select: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.info-icon-btn:hover {
  background: #1e3a5f;
  color: #fff;
}
.info-toggle-input:checked ~ .style-preset-row + * { /* unused */ }

.info-inline-content {
  display: none;
  padding: 8px 10px;
  background: #eef3fa;
  border-radius: 5px;
  border-left: 3px solid #1e3a5f;
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1.7;
  color: #333;
}
.info-inline-content p { margin-bottom: 2px; }
.info-inline-content p:last-child { margin-bottom: 0; }
.info-inline-content strong { color: #1e3a5f; }

.info-toggle-input:checked + .info-inline-content {
  display: block;
}

/* ミニ補助ボタンのスタイル */
.btn-sub-xs {
  background: #ffffff;
  color: #1e3a5f;
  border: 1px solid #d0dbe5;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  font-size: 10px;
  padding: 2px 6px;
}
.btn-sub-xs:hover {
  background: #e8eef5;
  border-color: #1e3a5f;
}
.btn-sub-xs:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
