/* CancerWith Blog - はてなブログ風デザイン */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  background: #f8f9fa;
  margin: 0;
  padding: 0;
  color: #171C1F;
  line-height: 1.8;
}

a {
  color: #4760CF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto !important;
}

/* Header */
#blog-title {
  background: #fff;
  text-align: center;
  padding: 40px 20px;
}

#blog-title-inner {
  max-width: 720px;
  margin: 0 auto;
}

#blog-title h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: bold;
}

#blog-title h1 a {
  color: #171C1F;
}

#blog-title h1 a:hover {
  text-decoration: none;
  color: #4760CF;
}

/* Container */
#content-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Entry List (Archive) */
.archive-entries {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.archive-entry {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  gap: 20px;
  padding: 20px;
}

.archive-entry-header {
  flex: 1;
}

.entry-thumb-link {
  flex-shrink: 0;
}

.entry-thumb {
  width: 200px;
  height: 112px;
  object-fit: cover;
  border-radius: 4px;
}

.archive-entry-header .entry-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 8px;
  line-height: 1.5;
}

.archive-entry-header .entry-title a {
  color: #171C1F;
}

.archive-entry-header .entry-title a:hover {
  color: #4760CF;
  text-decoration: none;
}

.entry-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.date {
  font-size: 0.9rem;
  color: #999;
}

.hatena-bookmark-count {
  display: inline-flex;
  align-items: center;
}

.categories {
  margin-top: 8px;
}

.categories a {
  display: inline-block;
  background: #f0f0f0;
  color: #666;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 3px;
  margin-right: 6px;
}

.categories a:hover {
  background: #4760CF;
  color: #fff;
  text-decoration: none;
}

/* Single Entry */
.entry {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  margin-bottom: 24px;
}

.entry-header {
  margin-bottom: 32px;
}

.entry-title {
  font-weight: bold;
  font-size: 1.6rem;
  line-height: 1.4;
  margin: 0 0 16px;
}

.entry-content {
  line-height: 1.9;
  font-size: 17px;
}

/* 画像のアスペクト比を強制的に修正 */
.entry-content img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
}

.entry-content .hatena-fotolife {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
}

.entry-content figure {
  margin: 1.5em 0;
}

.entry-content figure img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
}

.entry-content h2 {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 2em 0 1em;
  padding-bottom: 8px;
  border-bottom: 2px solid #4760CF;
}

.entry-content h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1.5em 0 0.75em;
}

.entry-content p {
  margin: 0 0 1.5em;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content blockquote {
  border: 1px solid #eee;
  color: #666;
  margin: 2em 0;
  padding: 1em 1.2em;
  font-size: 0.95rem;
  background: #fafafa;
}

.entry-content figcaption {
  font-size: 0.85rem;
  color: #999;
  text-align: center;
  margin-top: 8px;
}

/* SNS シェアボタン */
.social-buttons {
  margin-top: 48px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.social-buttons-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 16px;
  color: #171C1F;
}

.social-buttons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  transition: opacity 0.2s;
}

.social-button:hover {
  opacity: 0.8;
  text-decoration: none;
  color: #fff;
}

.social-button svg {
  flex-shrink: 0;
}

.social-button-x {
  background: #000;
}

.social-button-facebook {
  background: #1877f2;
}

.social-button-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.hatena-bookmark-button {
  display: inline-flex;
  align-items: center;
}

/* メルマガ登録フォーム */
.newsletter-form {
  margin-top: 32px;
  padding: 24px;
  background: #fff;
  border: 2px solid #4760CF;
  border-radius: 8px;
}

.newsletter-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 8px;
  color: #4760CF;
}

.newsletter-description {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 16px;
}

.entry-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.entry-footer a {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #4760CF;
  color: #4760CF;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s;
}

.entry-footer a:hover {
  background: #4760CF;
  color: #fff;
  text-decoration: none;
}

/* Pagination */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 20px 0;
}

.pager a {
  padding: 10px 20px;
  background: #fff;
  border-radius: 5px;
  color: #4760CF;
}

.pager a:hover {
  background: #4760CF;
  color: #fff;
  text-decoration: none;
}

.pager-info {
  color: #999;
}

/* Page Title */
.archive-heading {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #4760CF;
}

/* Footer */
#footer {
  background: #171C1F;
  color: #fff;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  min-width: 0;
}

.footer-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4760CF;
  color: #fff;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  color: #ccc;
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
}

.footer-list a:hover {
  color: #fff;
}

/* 月別アーカイブ折りたたみ（フッター用） */
.archive-year {
  margin-bottom: 8px;
}

.archive-year summary {
  cursor: pointer;
  font-weight: bold;
  padding: 6px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  font-size: 0.9rem;
}

.archive-year summary::-webkit-details-marker {
  display: none;
}

.archive-year summary::before {
  content: '▶';
  font-size: 0.6em;
  transition: transform 0.2s;
}

.archive-year[open] summary::before {
  transform: rotate(90deg);
}

.archive-year summary:hover {
  color: #fff;
}

.archive-month-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
}

.archive-month-list li {
  margin-bottom: 4px;
}

.archive-month-list a {
  color: #999;
  padding: 2px 0;
  display: block;
  font-size: 0.85rem;
}

.archive-month-list a:hover {
  color: #fff;
}

.footer-copyright {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #333;
  color: #999;
  font-size: 0.85rem;
}

.footer-copyright p {
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .archive-entry {
    flex-direction: column-reverse;
  }

  .entry-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .entry {
    padding: 24px;
  }

  .entry-title {
    font-size: 1.3rem;
  }

  .social-buttons-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .social-button {
    width: 100%;
    justify-content: center;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* はてなブログ埋め込み対応 */
.embed-card {
  border: 1px solid #eee;
  border-radius: 4px;
}

.hatena-citation {
  display: block;
  font-size: 0.85rem;
  color: #999;
  margin-top: 4px;
}

/* 記事内の特殊スタイル（対談等） */
.takahashi {
  color: #0d763a;
  font-weight: bold;
  margin-right: 0.5em;
}

.ninomiya {
  color: #f92373;
  font-weight: bold;
  margin-right: 0.5em;
}

.katsumata {
  color: #8e0183;
  font-weight: bold;
  margin-right: 0.5em;
}

.nitasaka {
  color: #4760cf;
  font-weight: bold;
  margin-right: 0.5em;
}

.underline {
  background: linear-gradient(transparent 70%, #eeff41 0);
  text-decoration: none;
}

.button {
  background: #4760CF;
  padding: 1em 1.8em;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1em;
  transition: background-color 0.3s;
}

.button:hover {
  background: #1336CF;
  color: #fff;
}
