/*
  トーン&マナー参考: tabirai.net/car/ の配色・フォントを踏襲（構成は独自）
  - プライマリ: 紺 #003894 / アクセント（CTA）: オレンジ #f08300
  - 背景: 薄い水色系 #F4FBFF, #E8F2FA
  - ボタンはピル型（border-radius: 25px）
  - フォント: Roboto（英数字）+ 日本語ゴシック体
*/

:root {
  --color-primary: #003894;
  --color-accent: #f08300;
  --color-bg-light: #F4FBFF;
  --color-bg-light2: #E8F2FA;
  --color-border: #E6EEF5;
  --color-text: #333333;
  --color-text-sub: #707070;
  --color-text-mute: #999999;
  --color-white: #ffffff;
  --radius-pill: 25px;
  --radius-card: 12px;
  --font-base: 'Roboto', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans',
    'Yu Gothic Medium', 'Meiryo', sans-serif;
  --max-width: 800px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  font-size: 15px;
}

h1, h2, h3, h4, p, ul {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ===== 共通レイアウト ===== */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 16px;
}

.section__heading {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-primary);
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 3px solid var(--color-accent);
}

/* プレースホルダー画像 */

.placeholder-img {
  background: var(--color-bg-light2);
  border: 1px dashed var(--color-primary);
  color: var(--color-text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

/* ===== メインビジュアル（正方形） ===== */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 8px;
  text-align: center;
}

.hero__image {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: var(--radius-card);
}

/* ===== テキストエリア ===== */

.text-image__text p {
  color: var(--color-text-sub);
  margin-bottom: 16px;
}

.text-image__text p:last-child {
  margin-bottom: 0;
}

/* ===== ランキングブロック ===== */

.ranking {
  background: var(--color-bg-light);
  border-radius: var(--radius-card);
  padding: 28px 16px;
  position: relative;
}

.ranking__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ranking__badge {
  display: inline-block;
  flex-shrink: 0;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: bold;
  font-size: 14px;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
}

.ranking__head + a {
  display: block;
}

.ranking__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  margin-bottom: 16px;
}

/* 実写画像を使う場合：正方形固定を解除し、元の縦横比のまま表示 */
.ranking__image.ranking__image--photo {
  aspect-ratio: auto;
  height: auto;
  object-fit: unset;
}

.ranking__name {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-primary);
}

.ranking__name a {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
}

.ranking__name a::after {
  content: '↗';
  display: inline-block;
  margin-left: 4px;
  color: var(--color-accent);
  font-weight: bold;
}

.ranking__catch {
  margin-bottom: 16px;
}

.ranking__catch-mark {
  display: inline;
  background: linear-gradient(transparent 65%, #ffff00 65%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: #f5046d;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.9;
}

.ranking__features {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking__features li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
}

.ranking__features li::before {
  content: '✓ ';
  color: var(--color-accent);
  font-weight: bold;
}

.ranking__detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.ranking__detail-item {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 16px;
}

.ranking__detail-item h4 {
  color: var(--color-primary);
  font-size: 15px;
  margin-bottom: 8px;
}

.ranking__detail-item p {
  color: var(--color-text-sub);
  font-size: 14px;
}

/* 1位のみ：詳細説明が画像+テキストの構成 */

.ranking__detail-item__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

/* 実写画像を使う場合：幅300px固定、高さは縮尺を維持 */
.ranking__detail-item__image.ranking__detail-item__image--photo {
  width: 300px;
  max-width: 100%;
  aspect-ratio: auto;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.ranking__reviews {
  margin-bottom: 24px;
}

.ranking__reviews-heading {
  font-size: 15px;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.review-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  margin-bottom: 10px;
}

.review-card__meta {
  font-size: 13px;
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 4px;
}

.review-card__body {
  font-size: 13px;
  color: var(--color-text-sub);
}

/* ===== 実施中キャンペーン ===== */

.campaign-box {
  background: var(--color-white);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.campaign-box__label {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: bold;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.campaign-box__text {
  font-size: 13px;
  color: var(--color-text-sub);
}

.campaign-box__banner {
  width: 300px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px auto 0;
  font-size: 12px;
}

/* プレースホルダー（実画像未設定）の場合のみ固定比率で箱を確保 */
.campaign-box__banner.placeholder-img {
  aspect-ratio: 300 / 214;
}

/* ===== CTAボタン ===== */

.cta-microcopy {
  text-align: center;
  color: var(--color-accent);
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
}

.btn-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: bold;
  font-size: 16px;
  padding: 16px;
  border-radius: var(--radius-pill);
}

.btn-cta--spaced {
  margin-bottom: 24px;
}

/* ===== 編集部コメント（吹き出し） ===== */

.editor-comment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 20px;
}

.editor-comment__icon {
  width: 56px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 10px;
  padding: 4px;
  position: relative;
  z-index: 1;
}

.editor-comment__icon.editor-comment__icon--photo {
  aspect-ratio: auto;
  height: auto;
  padding: 0;
  border: none;
  object-fit: cover;
}

.editor-comment__bubble {
  position: relative;
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 18px 16px 14px;
  margin-top: -8px;
}

.editor-comment__bubble::after,
.editor-comment__bubble::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}

.editor-comment__bubble::after {
  top: -9px;
  border-bottom: 9px solid var(--color-border);
}

.editor-comment__bubble::before {
  top: -8px;
  border-bottom: 8px solid var(--color-white);
}

.editor-comment__label,
.editor-comment__text {
  text-align: center;
}

.editor-comment__label {
  font-size: 12px;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.editor-comment__text {
  font-size: 13px;
  color: var(--color-text-sub);
}

/* ===== お問い合わせフォーム ===== */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-cta.contact-form__submit {
  max-width: none;
  width: 100%;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__label {
  font-weight: bold;
  color: var(--color-text);
  font-size: 14px;
}

.contact-form__required {
  color: var(--color-accent);
  font-size: 11px;
  font-weight: normal;
  margin-left: 4px;
}

.contact-form__input,
.contact-form__textarea {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}

.contact-form__textarea {
  resize: vertical;
}

.contact-form__submit {
  border: none;
  cursor: pointer;
  margin-top: 8px;
}

/* ===== フッター ===== */

.site-footer {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 20px 16px;
  font-size: 12px;
}

.site-footer a {
  color: var(--color-white);
  text-decoration: underline;
}

/* ===== タブレット以上 ===== */

@media (min-width: 768px) {
  body {
    font-size: 16px;
  }

  .ranking {
    padding: 40px;
  }

  .ranking__image {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .ranking__detail {
    flex-direction: row;
  }

  .ranking__detail-item {
    flex: 1;
  }

  .btn-cta {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}
