/* =============================================
   全体
============================================= */
body {
  background: #f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #2c3e50;
}

.excel-dict {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

/* =============================================
   ヘッダー
============================================= */
.excel-dict-header {
  text-align: center;
  margin-bottom: 50px;
}

.excel-dict-header h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 10px;
}

.excel-dict-header p {
  color: #666;
  font-size: 16px;
}

/* =============================================
   検索フォーム
============================================= */
.excel-dict-search {
  background: #fff;
  padding: 35px 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

/* ---------- メイン検索 ---------- */
.search-main {
  margin-bottom: 35px;
}

.search-main label {
  display: block;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}

.search-main input {
  width: 100%;
  height: 60px;
  font-size: 18px;
  padding: 0 20px;
  border-radius: 14px;
  border: 2px solid #e0e0e0;
  transition: 0.2s;
}

.search-main input:focus {
  border-color: #107c10;
  box-shadow: 0 0 0 3px rgba(16,124,16,0.15);
  outline: none;
}

/* ---------- 共通ブロック ---------- */
.search-block {
  margin-bottom: 30px;
}

.block-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
  color: #333;
}

/* ---------- レベル選択 ---------- */
.level-select {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.level-select label {
  cursor: pointer;
}

.level-select input {
  display: none;
}

.level-select span {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f1f3f5;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
}

.level-select input:checked + span {
  background: #107c10;
  color: #fff;
}

/* ---------- カテゴリ ---------- */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips label {
  cursor: pointer;
}

.category-chips input {
  display: none;
}

.category-chips span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.category-chips input:checked + span {
  background: #107c10;
  color: #fff;
}

/* ---------- リセット ---------- */
.reset-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  margin-top: 10px;
}

.reset-btn:hover {
  text-decoration: underline;
}

/* =============================================
   検索結果サマリー
============================================= */
.result-summary {
  margin: 20px 0 30px;
  font-size: 15px;
  font-weight: 600;
  color: #555;
}

/* =============================================
   カード一覧
============================================= */
.excel-dict-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

/* ---------- カード ---------- */
.excel-card {
  background: #fff;
  border-radius: 16px;
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  border-left: 6px solid #ccc;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  transition: 0.2s;
}

.excel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

/* ---------- カテゴリタグ ---------- */
.category-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  background: #f0f0f0;
  color: #666;
}

.category-tag[data-cat="文字列"] {
  background: #e3f2fd;
  color: #1565c0;
}

.category-tag[data-cat="日付"] {
  background: #fff3e0;
  color: #ef6c00;
}

.category-tag[data-cat="論理"] {
  background: #ede7f6;
  color: #5e35b1;
}


/* ---------- 関数名 ---------- */
.excel-card h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #1a1a1a;
}

/* ---------- 説明 ---------- */
.excel-card p {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ---------- フッター ---------- */
.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #888;
}

.excel-card a {
  color: #107c10;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid rgba(16,124,16,0.3);
}

.excel-card a:hover {
  border-bottom-color: rgba(16,124,16,1);
}

/* =============================================
   モバイル
============================================= */
@media (max-width: 600px) {

  .excel-dict-search {
    padding: 25px;
  }

  .level-select,
  .category-chips {
    gap: 8px;
  }

  .excel-dict-list {
    grid-template-columns: 1fr;
  }
}