/*!
 * ameblo-widget.css - 見た目の設定。ここを編集すればデザインを変えられます。
 */

.ablog {
  /* ▼ よく変える値はここにまとめてあります */
  --ablog-border: #e0e0e0;
  --ablog-head-bg: #ffffff;
  --ablog-head-color: #333333;
  --ablog-link: #2e7bc4;
  --ablog-text: #333333;
  --ablog-muted: #888888;
  --ablog-radius: 4px;

  box-sizing: border-box;
  /* 親要素に高さが指定されていればそれに合わせて伸縮する */
  display: flex;
  flex-direction: column;
  max-height: 100%;
  border: 1px solid var(--ablog-border);
  border-radius: var(--ablog-radius);
  background: #fff;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ablog-text);
  overflow: hidden;
}

.ablog *,
.ablog *::before,
.ablog *::after { box-sizing: border-box; }

/* ---------- 見出し ---------- */

.ablog__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ablog-border);
  background: var(--ablog-head-bg);
  font-size: 15px;
  font-weight: bold;
}

.ablog__head a {
  color: var(--ablog-head-color);
  text-decoration: none;
}

.ablog__head a:hover { text-decoration: underline; }

/* ---------- 記事一覧（スクロール領域） ---------- */

.ablog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.ablog__head,
.ablog__foot { flex: 0 0 auto; }

.ablog__item {
  padding: 16px;
  border-bottom: 1px solid var(--ablog-border);
}

.ablog__item:last-child { border-bottom: 0; }

.ablog__title {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: bold;
}

.ablog__title a {
  color: var(--ablog-link);
  text-decoration: none;
}

.ablog__title a:hover { text-decoration: underline; }

.ablog__date {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ablog-muted);
}

/* ---------- 本文 ---------- */

.ablog__content { word-break: break-word; }

.ablog__content p { margin: 0 0 0.8em; }
.ablog__content p:last-child { margin-bottom: 0; }

.ablog__content img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.ablog__content a { color: var(--ablog-link); }

.ablog__content table {
  max-width: 100%;
  border-collapse: collapse;
}

/* アメブロ側の巨大な余白・行間をならす */
.ablog__content div,
.ablog__content span { line-height: inherit !important; }

/* ---------- 抜粋モード（data-mode="excerpt"）---------- */

.ablog__item--thumb {
  display: grid;
  grid-template-columns: 84px 1fr;
  grid-template-areas:
    "thumb title"
    "thumb date"
    "thumb text"
    "thumb more";
  column-gap: 12px;
  align-content: start;
}

.ablog__item--thumb .ablog__thumb   { grid-area: thumb; }
.ablog__item--thumb .ablog__title   { grid-area: title; }
.ablog__item--thumb .ablog__date    { grid-area: date; margin-bottom: 6px; }
.ablog__item--thumb .ablog__content { grid-area: text; }
.ablog__item--thumb .ablog__more    { grid-area: more; }

.ablog__thumb {
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 3px;
  background: #f4f4f4;
}

.ablog__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- その他 ---------- */

.ablog__more {
  margin: 10px 0 0;
  font-size: 13px;
}

.ablog__more a {
  color: var(--ablog-link);
  text-decoration: none;
}

.ablog__more a:hover { text-decoration: underline; }

.ablog__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--ablog-border);
  background: #fafafa;
  font-size: 13px;
  text-align: right;
}

.ablog__foot a {
  color: var(--ablog-link);
  text-decoration: none;
}

.ablog__foot a:hover { text-decoration: underline; }

.ablog__error {
  padding: 20px 16px;
  text-align: center;
  color: var(--ablog-muted);
}

.ablog__error a { color: var(--ablog-link); }

.ablog--loading {
  min-height: 120px;
  position: relative;
}

.ablog--loading::after {
  content: "読み込み中…";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  color: var(--ablog-muted);
  font-size: 13px;
}

/* ---------- スマホ ---------- */

@media (max-width: 480px) {
  .ablog__item { padding: 14px; }
  .ablog__item--thumb {
    grid-template-columns: 68px 1fr;
    column-gap: 10px;
  }
  .ablog__thumb { width: 68px; height: 68px; }
}
