/* 
 * Add your own CSS code
 */

body {
  &.home-template,
  &.pagination-templateblogindex-template {
    .hero {
      display: none;
    }
  }
}

.hero__image {
  margin: 0;
  img {
    border-radius: initial;
  }
}

.post__image>img {
  max-height: 500px;
  width: auto;
}

.content__share {
  display: none;
}

/*
 * お問い合わせフォーム
 */
#contact-form {
  .field {
    margin-bottom: 16px;
  }

  label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
  }

  input,
  textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  textarea {
    min-height: 140px;
  }

  button {
    padding: 12px 24px;
    cursor: pointer;
  }

  #status {
    margin-top: 12px;
    font-weight: bold;
  }
}

/*
 * サイドバー
 */
.layout-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  &.wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  &>main {
    width: 100%;
    min-width: 0;
  }
}

.custom-sidebar {
  width: 100%;
  padding: 1em;
}
/* デスクトップ画面（横幅900px以上：2カラム・右側サイドバー） */
@media (min-width: 900px) {
  .layout-container {
    flex-direction: row;
    align-items: flex-start;
    &>main {
      flex: 1;
    }
  }
  .custom-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
  }
}
.sidebar-widget__title {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tag-list__item a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.85rem;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 4px;
  text-decoration: none;
}
.tag-list__item a:hover {
  opacity: 0.7;
}


/*
 * ページネーション
 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  /* ボタン同士の隙間 */
  margin: 3rem 0;
  padding: 0;
  list-style: none;
}
.pagination::before,
.pagination::after {
  display: none;
}
.pagination__item,
.pagination li a,
.pagination li strong,
.pagination li span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #ffffff;
  color: #333333;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  transition: all 0.2s ease;
}
a.pagination__item:hover,
.pagination li a:hover {
  background-color: #f5f5f5;
  border-color: #cccccc;
  color: #000000;
}
.pagination__item.is-active,
.pagination li.active a,
.pagination li strong {
  background-color: #222222;
  border-color: #222222;
  color: #ffffff;
  font-weight: 700;
  pointer-events: none;
}

/*
 * モード（ライト・ダーク）切り替え
 */
.top {
  position: relative;
}
.theme-toggle {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dark) !important;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover,
.theme-toggle:focus,
.theme-toggle:active,
.theme-toggle:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--dark) !important;
  outline: none !important;
  box-shadow: none !important;
}
@media (hover: hover) {
  .theme-toggle:hover {
    opacity: 0.7;
  }
}
@media (min-width: 56.25em) {
  .top {
    padding-right: 4rem;
  }
}
.theme-toggle .icon-moon {
  display: inline-block;
}
.theme-toggle .icon-sun {
  display: none;
}
/* OSがダークモード設定時のデフォルトアイコン */
@media (prefers-color-scheme: dark) {
  .theme-toggle .icon-moon {
    display: none;
  }
  .theme-toggle .icon-sun {
    display: inline-block;
  }
}
/* クラスによる強制指定（OS設定より優先） */
html.dark-mode .theme-toggle .icon-moon {
  display: none !important;
}
html.dark-mode .theme-toggle .icon-sun {
  display: inline-block !important;
}
html.light-mode .theme-toggle .icon-moon {
  display: inline-block !important;
}
html.light-mode .theme-toggle .icon-sun {
  display: none !important;
}
/* Simpleテーマ現行のカラー変数を上書き（ダークモード用） */
:root.dark-mode {
  --page-bg: #181818 !important;
  --white: #181818 !important;
  --black: #ffffff !important;
  --dark: #e4e4e7 !important;
  --text-color: #d4d4d8 !important;
  --headings-color: #ffffff !important;
  --link-color: #ffffff !important;
  --link-color-hover: #a1a1aa !important;
  --gray-1: #a1a1aa !important;
  --gray-2: #71717a !important;
  --light: #27272a !important;
  --lighter: #3f3f46 !important;
  --border-color: #2e2e32 !important;
  --color: #ffc074 !important;
  --nav-link-color: #ffffff !important;
  --nav-link-color-hover: #ffffffb3 !important;
  --logo-color: #ffffff !important;
}
/* ヘッダーや本文の背景・文字色にも確実に適用 */
:root.dark-mode body,
:root.dark-mode .top {
  background-color: var(--page-bg) !important;
  color: var(--text-color) !important;
}
/* OSがダークモードの端末でも確実にライトモードにするための変数上書き */
:root.light-mode {
  --page-bg: #ffffff !important;
  --white: #ffffff !important;
  --black: #17181e !important;
  --helper: #ffffff !important;
  --dark: #17181e !important;
  --gray: #57585a !important;
  --light: #cacbcf !important;
  --lighter: #f3f3f3 !important;
  --color: #d73a42 !important;
  --text-color: #17181e !important;
  --headings-color: #17181e !important;
  --link-color: #17181e !important;
  --link-color-hover: #d73a42 !important;
  --nav-link-color: #17181e !important;
  --nav-link-color-hover: #17181e !important;
  --logo-color: #17181e !important;
  --border-color: #cacbcf !important;
}
:root.light-mode body,
:root.light-mode .top {
  background-color: var(--page-bg) !important;
  color: var(--text-color) !important;
}

/*
 * 外部リンク
 */
.shortcodelink {
  display: none;
}

/*
 * カエレバ
 */
.kaereba-box {
  display: none;
}

/*
 * 吹き出し
 */
.fkds-bubble {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 1.5em 0;
}
.fkds-speaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 72px;
  text-align: center;
}
.fkds-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.fkds-name {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: #555;
  word-break: break-all;
}
.fkds-body {
  position: relative;
  background: #f1f5f9;
  color: #1e293b;
  padding: 12px 16px;
  border-radius: 10px;
  line-height: 1.7;
}
/* 左向きの吹き出しの尻尾 */
.fkds-body::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -8px;
  border-style: solid;
  border-width: 7px 8px 7px 0;
  border-color: transparent #f1f5f9 transparent transparent;
}