/* ==== ==== ヘッダー ==== ==== */

h2.icon-header{
  display: flex;
  align-items: center;
  gap: 6px;
}

h2.icon-header img{
  border: 1px solid #808080;
  border-radius: 2px;
}

h3.icon-header{
  display: flex;
  align-items: center;
  gap: 6px;
}

h3.icon-header img{
  border: 1px solid #808080;
  border-radius: 2px;
}

h3.image-header{
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 更新履歴の日付 */
.md-typeset .release-date{
  margin-left: 0.5em;
  font-size: 0.6em;
  font-weight: normal;
  color: var(--md-default-fg-color--light);
}

/* ==== ==== 更新履歴ページ ==== ==== */
/* 日付（.release-date）があるページだけに適用 */

.md-typeset:has(.release-date) h2 + h3{
  margin-top: 2.4em;
}

.md-typeset:has(.release-date) > ul{
  font-size: 95%;
  padding-bottom: 0.5em;
}

.md-typeset:has(.release-date) ul li{
  margin-bottom: 0.3em;
}

/* 補足（インデントしたリスト） */
.md-typeset:has(.release-date) ul li ul{
  margin-top: 0.1em;
  margin-bottom: 0.3em;
  font-size: 90%;
  list-style-type: "※ ";
  color: #42698f;
}

[data-md-color-scheme="slate"] .md-typeset:has(.release-date) ul li ul{
  color: #a6bfd8;
}

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

.md-footer__inner{
  margin-top: 5rem;
}

.md-footer__link {
  align-items: center;
}

.md-footer__direction{
  display: block;
}

.md-footer__button {
    margin: 8px;
    padding: 0;
}

.md-footer__title {
    max-width: calc(100% - 40px);
    margin: 0;
    padding: 0;
}

/* ==== ==== リスト ==== ==== */

[dir=ltr] .md-typeset ul {
  margin-left: 0.5em;
}

[dir=ltr] .md-typeset ul li {
  margin-left: 1em;
}

.md-typeset ul.icon-list li {
  list-style: none;
  margin-left: 0;
}

.md-typeset ul.icon-list a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.md-typeset ul.icon-list img {
  border: 1px solid #808080;
  border-radius: 4px;
}

/* 定義リスト内 */
[dir=ltr] .md-typeset dd ul {
  font-size: 90%;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
[dir=ltr] .md-typeset dd ul li {
  margin-bottom: 0;
}

/* ==== ==== アルファベットのリスト ==== ==== */

[dir=ltr] .md-typeset ol.alpha-list {
  list-style: none;
  counter-reset: alpha-counter;
  margin-left: 0;
  padding-left: 0;
}

[dir=ltr] .md-typeset ol.alpha-list > li {
  counter-increment: alpha-counter;
  position: relative;
  margin: 0 0 0.5em 0;
  padding: 0 0 0 1.75em;
}

[dir=ltr] .md-typeset ol.alpha-list > li::before {
  content: counter(alpha-counter, upper-alpha);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 22px;
  height: 22px;
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: bold;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
}

/* ==== ==== ステップリスト ==== ==== */

.md-typeset .step-list {
  list-style: none;
  padding-left: 0;
  counter-reset: step-counter;
  margin-left: 0 !important;
}

.md-typeset .step-list li {
  position: relative;
  padding-left: 45px;
  margin-left: 0 !important;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* 縦線 */
.md-typeset .step-list li::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 12px;
  width: 2px;
  height: calc(100% - 6px);
  background-color: var(--md-primary-fg-color);
}

.md-typeset .step-list li:last-child::after {
  display: none; /* 最後の番号からは線を伸ばさない */
}

/* 番号 */
.md-typeset .step-list li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  color: var(--md-primary-bg-color);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--md-primary-fg-color);
  z-index: 1;
}

/* ==== ==== カードリンク ==== ==== */

.md-typeset .grid.cards.link-cards>ul>li{
  padding: 0;
}
.cards.link-cards a.link-cards__item{
  display: block;
  padding: 0.8rem;
}

/* ==== ==== 機能紹介カード ==== ==== */

/* スマホ幅でも2列 */
.md-typeset .grid.cards.feature-cards{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* 画像を枠いっぱいに出すため、余白は文字側に付ける */
.md-typeset .grid.cards.feature-cards>ul>li{
  padding: 0;
  overflow: hidden;
  background-color: var(--md-primary-fg-color); /* ヘッダーと同じ色 */
  border-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

.md-typeset .grid.cards.feature-cards a{
  color: var(--md-primary-bg-color);
}

.md-typeset .grid.cards.feature-cards a:hover{
  text-decoration: underline;
}

.md-typeset .grid.cards.feature-cards>ul>li>p{
  margin: 0 0.8rem;
}

/* 画像（横長 16:6） */
.md-typeset .grid.cards.feature-cards>ul>li>p:first-child{
  margin: 0 0 0.6em;
}

.md-typeset .grid.cards.feature-cards img{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  background-color: var(--md-default-fg-color--lightest); /* 画像未用意の間の仮表示 */
}

/* 画像ホバーでうっすら青く */
.md-typeset .grid.cards.feature-cards>ul>li>p:first-child>a{
  display: block;
  position: relative;
}

.md-typeset .grid.cards.feature-cards>ul>li>p:first-child>a::after{
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(128, 224, 255, 0.15);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.md-typeset .grid.cards.feature-cards>ul>li>p:first-child>a:hover::after{
  opacity: 1;
}

/* タイトル */
.md-typeset .grid.cards.feature-cards>ul>li>p:nth-child(2){
  margin-bottom: 0.3em;
}

/* タイトル（スマホ幅より広いときは少し大きく） */
@media screen and (min-width: 45em){
  .md-typeset .grid.cards.feature-cards>ul>li>p:nth-child(2){
    font-size: 1.1em;
  }
}

/* 説明文 */
.md-typeset .grid.cards.feature-cards>ul>li>p:nth-child(3){
  margin-bottom: 0.8rem;
  font-size: 0.9em;
  color: var(--md-primary-bg-color--light);
}

/* ==== ==== 作者情報 ==== ==== */

.md-typeset .author{
  display: flex;
  align-items: center;
  gap: 20px;
}

.md-typeset .author p{
  margin: 0;
}

.md-typeset img.author__avatar{
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.md-typeset .author__name{
  font-size: 1.3em;
  font-weight: bold;
}

.md-typeset .author__links p{
  display: flex;
  gap: 14px;
  margin-top: 0.4em;
}

.md-typeset .author__links a{
  color: var(--md-default-fg-color--light);
}

.md-typeset .author__links a:hover{
  color: var(--md-accent-fg-color);
}

.md-typeset .author__links .twemoji{
  width: 1.35em;
  height: 1.35em;
}

.md-typeset .author__links .twemoji svg{
  width: 1.35em;
  max-height: none;
}

/* ==== ==== アイコン付きボタン ==== ==== */

.md-typeset .md-button:has(.twemoji){
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

/* ==== ==== 画像 ==== ==== */

img.image-border {
  border: 1px solid #808080;
  border-radius: 3px;
}

img.image-block{
  display: block;
  margin-top: 0.25em;
}

img.image-icon {
  border: 1px solid #808080;
  border-radius: 3px;
  vertical-align: middle;
  position: relative;
  top: -0.1em;
}

img.image-step {
  display:block;
  margin-top: 0.25em;
}

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

.--indent{
  margin-left: 16px;
}

.--margin-top-ssss {
  margin-top: 0.25em;
}

.--margin-top-sss {
  margin-top: 0.5em;
}

.--margin-top-ss {
  margin-top: 1em;
}

.--margin-top-s {
  margin-top: 2em;
}

.--margin-top-m {
  margin-top: 3em;
}

.--margin-top-l {
  margin-top: 4em;
}

.--margin-bottom-ssss {
margin-bottom: 0.25em;
}

.--margin-bottom-sss {
margin-bottom: 0.5em;
}

.--margin-bottom-ss {
margin-bottom: 1em;
}

.--margin-bottom-s {
margin-bottom: 2em;
}

.--margin-bottom-m {
margin-bottom: 3em;
}

.--margin-bottom-l {
margin-bottom: 4em;
}