
/* Corn Review Rating v1.3
   "後付けカード"感を減らし、本文に自然になじむ小さな採点表 */

.crr-panel.crr-panel--compact {
  --crr-text: #2f2f2f;
  --crr-muted: #7b7469;
  --crr-line: #e6dfd3;
  --crr-gold: #c79a43;
  --crr-gold-soft: #ead7ab;

  float: right;
  width: 270px;
  max-width: 38%;
  margin: 0 0 1.1em 1.6em;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--crr-text);
  overflow: visible;
}

.crr-compact-head {
  position: relative;
  padding: 0 0 7px;
  margin-bottom: 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--crr-line);
}

.crr-compact-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 42px;
  height: 2px;
  background: var(--crr-gold);
}

.crr-compact-title {
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.crr-score-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 0;
  border: 0;
}

.crr-score-row + .crr-score-row {
  border-top: 1px solid #f0ece5;
}

.crr-score-row--total {
  background: transparent;
  padding-top: 7px;
  padding-bottom: 6px;
}

.crr-score-label {
  font-size: 0.75rem;
  line-height: 1.2;
  font-weight: 700;
  color: #4a4742;
}

.crr-score-visual {
  min-width: 0;
  display: flex;
  align-items: center;
}

.crr-score-value {
  text-align: right;
  font-size: 0.77rem;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crr-score-value--total {
  font-size: 0.78rem;
}

.crr-score-max {
  color: var(--crr-muted);
  font-weight: 500;
  font-size: 0.86em;
}

/* 星は5個が明確に見えるよう間隔を確保 */
.crr-stars {
  display: inline-flex;
  gap: 3px;
  line-height: 1;
  white-space: nowrap;
}

.crr-star {
  position: relative;
  display: inline-block;
  width: 0.95em;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0;
}

.crr-star.is-full {
  color: var(--crr-gold);
}

.crr-star.is-empty,
.crr-star.is-half {
  color: #ddd8cf;
}

.crr-star.is-half::before {
  content: "★";
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  color: var(--crr-gold);
}

.crr-mini-meter {
  display: block;
  width: 100%;
  height: 5px;
  background: #ece7df;
  border-radius: 999px;
  overflow: hidden;
}

.crr-mini-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--crr-gold-soft), var(--crr-gold));
}

/* 評価欄の横に本文を自然に回り込ませる */
.single .post_content .crr-panel--compact + p,
.single .post_content .crr-panel--compact ~ p {
  clear: none !important;
}

/* 一覧用の小さな総合評価 */
.crr-archive-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 0.5em;
  padding: 1px 6px;
  border: 1px solid #e2d7c5;
  border-radius: 999px;
  background: #fffaf2;
  color: #6e5a35;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 0.12em;
  white-space: nowrap;
}

.crr-archive-star {
  color: var(--crr-gold, #c79a43);
}

/* v1.8: 比較レビューの一覧バッジ（通常の星評価と同じ位置） */
.crr-archive-badge--compare {
  background: #f4f8f6;
  border-color: #d5e2dc;
  color: #496b5c;
}

.crr-archive-compare-icon {
  color: inherit;
  font-size: 1.05em;
  line-height: 1;
}

/* v1.9: まとめ記事バッジ。比較の緑・星評価の金色と区別できる青灰色 */
.crr-archive-badge--summary {
  background: #f3f6fa;
  border-color: #d9e2ed;
  color: #4b657b;
}

.crr-archive-summary-icon {
  color: inherit;
  font-size: 1.05em;
  line-height: 1;
}

/* スマホでは本文の上に自然に置く */
@media (max-width: 767px) {
  .crr-panel.crr-panel--compact {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1.1em;
  }

  .crr-score-row {
    grid-template-columns: 48px minmax(0, 1fr) 58px;
  }
}


/* v1.4: 総合評価は赤系バーで強調 */
.crr-mini-meter--total {
  background: #f1e5e1;
}

.crr-mini-fill--total {
  background: linear-gradient(90deg, #d99686, #c96f5b);
}

/* 総合行を少しだけ強調 */
.crr-score-row--total .crr-score-label,
.crr-score-row--total .crr-score-value {
  color: #5f3730;
}


/* v1.5: 5段階が一目で分かる5分割セグメントメーター */
.crr-mini-meter,
.crr-mini-meter--total {
  display: none !important;
}

.crr-segmented-meter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  height: 6px;
}

.crr-segment {
  position: relative;
  display: block;
  overflow: hidden;
  height: 100%;
  background: #ece7df;
  border-radius: 2px;
}

.crr-segment-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ead9b5, #c89d49);
  border-radius: inherit;
}

/* 総合評価だけ落ち着いた赤系 */
.crr-segmented-meter--total .crr-segment {
  background: #f1e5e1;
}

.crr-segment-fill--total {
  background: linear-gradient(90deg, #d99686, #c96f5b);
}

/* 0.5点などの半端な評価も最後の区画が途中まで埋まる */
.crr-segment.is-partial .crr-segment-fill {
  min-width: 0;
}

/* 5分割にした分、中央のバー領域を少し広めに */
.crr-score-row {
  grid-template-columns: 44px minmax(110px, 1fr) 40px;
}

/* /5 を非表示にして全項目の数値表記を統一 */
.crr-score-max {
  display: none !important;
}

@media (max-width: 767px) {
  .crr-score-row {
    grid-template-columns: 48px minmax(120px, 1fr) 34px;
  }
}


/* v1.6: 記事末尾にも同じ評価を再表示 */
.crr-panel.crr-panel--bottom {
  float: none;
  width: min(100%, 520px);
  max-width: 520px;
  margin: 2.4em auto 1.4em;
  transform: none !important;
}

.crr-panel--bottom .crr-compact-head {
  margin-bottom: 0;
  padding-bottom: 6px;
}

.crr-panel--bottom .crr-score-row {
  grid-template-columns: 52px minmax(140px, 1fr) 42px;
  min-height: 30px;
}

.crr-panel.crr-panel--top {
  float: right;
}

.post_content > .crr-panel--bottom {
  clear: both;
}

@media (max-width: 767px) {
  .crr-panel.crr-panel--bottom {
    width: 100%;
    max-width: 100%;
    margin: 1.8em 0 1.2em;
  }
}


/* v1.9.1: SWELL「レビュー一覧」の追加CSSによる「 / 5」の誤表示を防止。
   「比較」「まとめ」は点数ではないため、スコア用の末尾表記を出さない。
   通常レビューの「 / 5」には影響しません。 */
.crr-archive-badge--compare::after,
.crr-archive-badge--summary::after {
  content: none !important;
  display: none !important;
}
