/* ============================================================
   EXCELtoマークダウン変換ベベン — style.css
   （ミンミン最新版デザイン準拠）
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #FDF4EA;
  --surface:      #FFFFFF;
  --surface2:     #F5EAD8;
  --border:       rgba(73,167,206,0.15);
  --border2:      rgba(73,167,206,0.30);
  --text:         #2C2C2C;
  --muted:        #7A7A7A;
  --accent:       #49A7CE;
  --accent-dark:  #3388AD;
  --accent-light: rgba(73,167,206,0.10);
  --accent-glow:  rgba(73,167,206,0.20);
  --success:      #2DA870;
  --warning:      #D48A10;
  --danger:       #D64545;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

/* ── ヘッダー ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo-img { height: 38px; width: auto; border-radius: var(--radius-sm); display: block; }
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.logo-text small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0;
}
.header-title-group { display: flex; align-items: center; gap: 10px; flex: 1; }
.header-free-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-family: 'Noto Sans JP', sans-serif;
  flex-shrink: 0;
}

.header-usage-count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-usage-count strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ── ヒーロー ── */
.hero {
  background: linear-gradient(135deg, #FDF4EA 0%, #FEF1DA 50%, #FDF4EA 100%);
  border-bottom: 2px solid rgba(73,167,206,0.15);
  overflow: hidden;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.8rem 2rem 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.hero-text { flex: 1; padding-bottom: 2.5rem; }
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 0.92rem; color: var(--muted); line-height: 1.8; max-width: 560px; margin-bottom: 1.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #AAAAAA; flex-shrink: 0; display: inline-block; }
.hero-chara { flex-shrink: 0; width: 300px; height: 300px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.hero-chara img { width: 300px; height: 300px; object-fit: contain; object-position: bottom; display: block; }

/* ── ツール本体 ── */
.tool-section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.tool-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* ── パネル共通 ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(73,167,206,0.06);
  display: flex;
  flex-direction: column;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.panel__title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.panel__title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* 形式バッジ */
.format-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--muted);
  border: 1px solid var(--border2);
  transition: all 0.2s;
}
.format-badge.detected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* テキストエリア */
.tool-textarea {
  width: 100%;
  min-height: 300px;
  padding: 14px 16px;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  border: none;
  outline: none;
  resize: vertical;
  flex: 1;
}
.tool-textarea::placeholder {
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  line-height: 1.8;
}
.tool-textarea--output {
  background: #FAFEFF;
  color: #1a4a5a;
  cursor: default;
}
.tool-textarea--output::placeholder {
  color: var(--border2);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.85rem;
}

/* パネルフッター */
.panel-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  flex-wrap: wrap;
}
.panel-footer--meta {
  min-height: 36px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* アップロードボタン */
.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-upload:hover { background: var(--accent-light); border-color: var(--accent); }

/* クリアボタン */
.btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-clear:hover { color: var(--danger); border-color: var(--danger); }

/* コピーボタン */
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-copy:hover:not(:disabled) { background: var(--accent-dark); }
.btn-copy:disabled { background: var(--border2); cursor: not-allowed; }
.btn-copy.copied { background: var(--success); }

/* オプションバー */
.options-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-light);
  flex-wrap: wrap;
}
.option-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
}
.option-item input[type="checkbox"] { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; }

.align-selector { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.align-label { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.align-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.align-btn:hover { border-color: var(--accent); color: var(--accent); }
.align-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.output-meta { font-size: 0.75rem; color: var(--muted); }

/* ── コンテンツセクション ── */
.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
}
.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-lead { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.75rem; }

/* features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  transition: box-shadow 0.15s;
}
.feature-card:hover { box-shadow: 0 4px 16px rgba(73,167,206,0.10); }
.feature-card__icon {
  width: 44px; height: 44px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--accent);
}
.feature-card__title { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.feature-card__desc  { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }
.feature-card__desc code {
  font-family: monospace;
  font-size: 0.88em;
  background: rgba(73,167,206,0.1);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--accent-dark);
}

/* usecase */
.usecase-list { display: flex; flex-direction: column; gap: 1rem; }
.usecase-item {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.usecase-item__num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-top: 1px;
}
.usecase-item__body strong { display: block; font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 0.3rem; }
.usecase-item__body p { font-size: 0.84rem; color: var(--muted); line-height: 1.65; margin: 0; }
.usecase-item__body code {
  font-family: monospace;
  font-size: 0.88em;
  background: rgba(73,167,206,0.1);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--accent-dark);
}

/* cost table */
.cost-table-wrap { overflow-x: auto; }
.cost-table { width: 100%; max-width: 480px; border-collapse: collapse; font-size: 0.9rem; }
.cost-table th, .cost-table td { padding: 0.7rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); background: var(--surface); }
.cost-table th { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.05em; color: var(--muted); background: var(--surface2); text-transform: uppercase; }
.cost-table td:nth-child(2), .cost-table td:nth-child(3) { text-align: right; }
.cost-table th:nth-child(2), .cost-table th:nth-child(3) { text-align: right; }
.cost-table__total td { font-weight: 600; color: var(--text); background: var(--accent-light); border-top: 2px solid var(--border2); border-bottom: none; }

/* ── レスポンシブ ── */
@media (max-width: 860px) {
  .tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }
  .hero-chara { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .tool-section { padding: 1.5rem 1rem; }
  .content-section { padding: 2rem 1rem; }
  .options-bar { gap: 8px; }
  .align-selector { margin-left: 0; }
  .header-usage-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
