/* expressions_list.css : Idioms / Grammar 一覧ページ共通 */
/* 上部に固定ヘッダ(44px) + 固定サブバー(48px) があるため、
   .expr-wrap の上部 padding をその分確保する */
.expr-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(44px + 48px + 24px) 20px 80px;
}

.expr-title {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 6px;
  color: #1a1a1a;
}

.expr-sub {
  color: #666;
  margin: 0 0 24px;
  font-size: 14px;
}

/* chip filter */
.expr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.expr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.expr-chip:hover { border-color: #999; }

.expr-chip.is-active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.expr-chip .chip-count {
  font-size: 11px;
  opacity: 0.7;
}
.expr-chip.is-active .chip-count { opacity: 0.9; }

/* grammar: 親カテゴリ chip と子サブタイプ chip の階層表現 */
.expr-chip-cat {
  font-weight: 600;
}
.expr-chip-sub {
  font-size: 12px;
  padding: 6px 11px;
  background: #f7f6f1;
  border-color: #e2e0d8;
  color: #555;
}
.expr-chip-sub:hover { border-color: #c9c5b4; }
.expr-chip-sub.is-active {
  background: #4a4a4a;
  color: #fff;
  border-color: #4a4a4a;
}

/* card list */
.expr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* === 読み物スタイル（枠なし、表現を主役に）=== */
.expr-card {
  background: transparent;
  border: none;
  border-top: 1px solid #e8e6e0;
  border-radius: 0;
  box-shadow: none;
  padding: 32px 4px 28px;
  list-style: none;
}
.expr-list .expr-card:first-child {
  border-top: none;
  padding-top: 16px;
}
.expr-list .expr-card:last-child {
  border-bottom: 1px solid #e8e6e0;
}

/* type バッジを上部に */
.expr-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* 表現本体（主役）*/
.expr-expression-big {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  color: #c8862a;
  margin: 0 0 14px;
  letter-spacing: -0.005em;
}

/* 意味・字義 */
.expr-meanings {
  margin: 0 0 18px;
}

/* 作品タグ + 例文 */
.expr-context {
  margin-top: 4px;
}
.expr-context .expr-work-tag {
  margin-bottom: 10px;
}

.expr-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.expr-type-idiom       { background: #e8f1ff; color: #1d4ed8; }
.expr-type-metaphor    { background: #fce7f3; color: #be185d; }
.expr-type-archaic     { background: #f3e8ff; color: #7c3aed; }
.expr-type-collocation { background: #ecfdf5; color: #047857; }
.expr-type-perfect     { background: #fef3c7; color: #b45309; }
.expr-type-subjunctive { background: #e0f2fe; color: #0369a1; }

.expr-diff,
.expr-subtype {
  font-size: 11px;
  color: #777;
  background: #f4f3ee;
  padding: 2px 7px;
  border-radius: 4px;
}

.expr-sentence {
  font-size: 18px;
  line-height: 1.7;
  color: #1a1a1a;
  margin: 0;
}

/* 旧 .expr-expression は使わなくなるが互換のため残す
   （個別作品ページや Grammar 側がまだ使っているため） */
.expr-expression {
  font-size: 14px;
  color: #c8862a;
  margin: 0 0 8px;
}

.expr-meaning {
  font-size: 13px;
  color: #555;
  margin: 4px 0;
  line-height: 1.6;
}

.expr-notes {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px dashed #e8e6e0;
}

.expr-label {
  display: inline-block;
  font-weight: 600;
  color: #888;
  font-size: 12px;
  margin-right: 6px;
}

.expr-empty {
  text-align: center;
  color: #888;
  padding: 60px 20px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .expr-wrap { padding: calc(44px + 48px + 16px) 14px 60px; }
  .expr-title { font-size: 22px; }
  .expr-sentence { font-size: 16px; }
}

/* 表現保存：星ボタン（Premium 限定） */
.expr-save-btn {
  position: absolute;
  top: 14px;
  right: 4px;
  background: transparent;
  border: none;
  color: #c4c0b0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s, transform 0.1s;
  z-index: 2;
}
.expr-save-btn:hover {
  color: #c8862a;
  transform: scale(1.1);
}
.expr-save-btn.is-saved {
  color: #c8862a;
}
.expr-save-btn:focus {
  outline: 2px solid rgba(200,134,42,0.4);
  outline-offset: 2px;
  border-radius: 4px;
}
/* 星ボタンを置くため expr-card に position relative を付与 */
.expr-card {
  position: relative;
}

/* 「★ 保存済み」chip：ゴールドアクセントで他と区別 */
.expr-chip-saved {
  border-color: #f0d9a8;
  color: #c8862a;
}
.expr-chip-saved:hover {
  border-color: #c8862a;
  background: #fff8ed;
}
.expr-chip-saved.is-active {
  background: #c8862a;
  color: #fff;
  border-color: #c8862a;
}

/* 日本語訳（Grammar 用、Idioms 側でも将来使えるよう汎用に）*/
.expr-sentence-ja {
  font-size: 15px;
  line-height: 1.75;
  color: #6a6a6a;
  margin: 8px 0 0;
  padding-left: 0;
  font-weight: 400;
}
