@charset "UTF-8";

@import url(color.css);

:root {
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scrollable {
  display: grid;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

a {
  text-decoration: none;
  color: var(--color-link);

  &:hover {
    text-decoration: underline;
    color: var(--color-link-hover);
  }
}

button,
.button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  padding: 0.5rem 1.25rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  align-items: center;
  user-select: none;
  color: var(--color-button-fg);
  background-color: var(--color-button-bg);
  box-shadow: 0 0 0 1px var(--color-button-bd);

  &:hover {
    text-decoration: none;
    color: var(--color-button-fg);
    filter: brightness(1.375);
  }
}

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

pre {
  white-space: pre-wrap;
  max-width: 100%;
}

h1 {
  padding: 0;
  margin: 0;
  font-size: 1.750rem;
  font-weight: 700;
}

h2 {
  padding: 0;
  margin: 0;
  font-size: 1.750rem;
  font-weight: 700;
}

h3 {
  padding: 0;
  margin: 0;
  font-size: 1.500rem;
  font-weight: 700;
}

h4 {
  padding: 0;
  margin: 0;
  font-size: 1.250rem;
  font-weight: 700;
}

h5 {
  padding: 0;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

h6 {
  padding: 0;
  margin: 0;
  font-size: 1.000rem;
  font-weight: 700;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.5;
  letter-spacing: 0.1em;
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-fg);
  background-color: var(--color-bg);
}

.base {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--color-base-fg);
  background-color: var(--color-base-bg);
}

.wrap {
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 1240px;
}

.header {
  padding: 0.5rem 0;
  color: var(--color-header-fg);
  background-color: var(--color-header-bg);
  box-shadow: 0 -1px 0 var(--color-header-bd) inset;
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  min-height: 3rem;
  color: var(--color-header-inner-fg);
  background-color: var(--color-header-inner-bg);
}

.header-title {
  font-weight: 500;
  font-size: 1.5rem;
}

.header-title-link {
  color: var(--color-header-title);

  &:hover {
    text-decoration: none;
    color: var(--color-header-title);
  }
}

.footer {
  padding: 0.5rem;
  color: var(--color-footer-fg);
  background-color: var(--color-footer-bg);
  box-shadow: 0 1px 0 var(--color-footer-bd) inset;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 1.5rem;
  color: var(--color-footer-inner-fg);
  background-color: var(--color-footer-inner-bg);

  p {
    margin: 0;
  }
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: var(--color-content-fg);
  background-color: var(--color-content-bg);
}

.content-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--color-content-inner-fg);
  background-color: var(--color-content-inner-bg);
  box-shadow: -1px 0 0 var(--color-content-inner-bd), 1px 0 0 var(--color-content-inner-bd);

  @media screen and (min-width: 960px) {
    flex-direction: row;
  }
}

.main {
  color: var(--color-main-fg);
  background-color: var(--color-main-bg);

  @media screen and (min-width: 960px) {
    width: calc(100% - 300px - 3rem);
  }
}

.main-inner {
  padding: 1.5rem;

  > :first-child {
    margin-top: 0;
  }

  > :last-child {
    margin-bottom: 0;
  }

  @media screen and (min-width: 960px) {}
}

.sidebar {
  color: var(--color-sidebar-fg);
  background-color: var(--color-sidebar-bg);
  box-shadow: 0 1px 0 var(--color-sidebar-bd) inset;

  > :first-child {
    margin-top: 0;
  }

  > :last-child {
    margin-bottom: 0;
  }

  @media screen and (min-width: 960px) {
    width: calc(300px + 3rem);
    box-shadow: 1px 0 0 var(--color-sidebar-bd) inset;
  }
}

.sidebar-inner {
  padding: 1.5rem;
}

.post-title {
  margin-bottom: 1.5rem;
  line-height: 1.25;
  letter-spacing: 0.05em;
}

.post-body {
  margin-bottom: 2rem;
  line-height: 1.75;

  >* {
    margin-top: 0;
    margin-bottom: 1.5rem;
  }
}

.post-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-content-inner-bd);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  letter-spacing: 0;
  color: var(--color-postmeta-fg);
  background-color: var(--color-postmeta-bg);
  box-shadow: 0 -1px 0 var(--color-postmeta-bd) inset, 0 1px 0 var(--color-postmeta-bd) inset;

  .post-category,
  .post-tag {
    color: inherit;

    &:hover {
      color: var(--color-link-hover);
    }
  }

  i {
    margin-right: 0.25rem;
  }
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
  padding: 0;

  .post-item {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--color-content-inner-bd);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .post-item-header {
    .post-title {
      margin-bottom: 0.75rem;
    }

    .post-meta {
      margin-bottom: 0;
    }
  }

  .post-item-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    @media screen and (min-width: 540px) {
      display: block;
    }

  }

  .post-thumbnail {
    overflow: hidden;
    border-radius: 4px;
    background-color: var(--color-postmeta-bg);
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 3 / 2;
    width: 100%;
    max-width: 300px;

    @media screen and (min-width: 540px) {
      float: right;
      width: 300px;
      max-width: calc(33.3% - 1rem);
      margin: 0 0 0.5rem 0.5rem;
    }

    a {
      display: block;
      height: 100%;
    }

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    &:hover img {
      transform: scale(1.05);
    }
  }

  .post-summary {
    flex: 1;

    >p:first-child {
      margin-top: 0;
    }

    >p:last-of-type {
      margin-bottom: 0;
    }
  }

  .post-link {
    color: inherit;

    &:hover {
      text-decoration: none;
      color: var(--color-link-hover);
    }
  }

  .post-more {
    margin-top: 1rem;
    margin-left: 50%;
    display: inline-block;
    transform: translate(-50%, 0);
  }
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin: 1.5rem -0.5rem;
  padding: 0;
  list-style: none;
  .page-item {
    padding: 0 0.125rem;
    .page-link {
      display: block;
      text-align: center;
      padding: 0 0.125rem;
      font-size: 0.875rem;
      line-height: 2rem;
      min-width: 2rem;
      border-radius: 1rem;
      color: var(--color-bg);
      background-color: var(--color-link);
      &:hover {
        text-decoration: none;
        filter: brightness(150%);
      }
    }
    &.disabled .page-link {
      background-color: #aaaaaa;
      &:hover {
        filter: none;
        cursor: default;
        user-select: none;
      }
    }
    &.active .page-link {
      background-color: var(--color-link-hover);
      &:hover {
        filter: none;
        cursor: default;
        user-select: none;
      }
    }
    &:first-child, &:last-child {
      /* display: none; */
    }
  }
}
/*
.page-only {
  display: none !important;
}
.page .page-only {
  display: initial !important;
}
*/


/* 目次 */

.post-toc {
  margin-top: 2em;
  background-color: #f0f0f0;
}
.post-body .post-toc {
  margin-top: 3em;
}
/* チェックボックスを非表示 */
.toc-check {
  display: none;
}
/* ラベル部分の修飾 */
.toc-label {
  background: #666666;
  color: #fff;
  display: flex;
  margin: 1em 0 0;
  padding: 10px 10px 0 20px;
  height: 44px;
  cursor: pointer;
}
/* チェックボックスにチェックが入っていない（メニュー非表示）状態の修飾 */
.toc-chapter {
  height: 0;
  opacity: 0;
  overflow: hidden;
}
/* メニュー非表示時のアイコン */
.toc-label:after{
  content: '\f107';
  display: block;
  font-family: FontAwesome;
  font-weight: 700;
  padding: 0 0 0 0.5rem;
}
/* チェックボックスにチェックが入った（メニュー表示）状態の修飾 */
.toc-check:checked ~ .toc-chapter {
  height: auto;
  opacity: 1;
  padding: 1.5rem 0.5rem 1.5rem 1rem;
}
/* メニュー表示時のアイコン */
.toc-check:checked ~ .toc-label:after {
  content: '\f106';
}
/* メニューの修飾 */
#TableOfContents ul {
  list-style-type: decimal;
  margin: 0;
}
#TableOfContents li {
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}
#TableOfContents > ul > li ul {
  display: block;
  margin: 0.75rem 0 1rem 0.75rem;
  padding: 0;
  font-size: 0.925em;
  list-style-type: disc;
}
#TableOfContents > ul > li > ul > li ul {
  list-style-type: circle;
}

.sidebar {
  .widget {
    margin-bottom: 2rem;
    a {
      color: #336;
      &:hover {
        color: var(--color-link-hover);
      }
    }
  }
  .widget-header {
    margin: 0;
    padding: 0 0 0.125rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-left: 0.25rem solid #444;
  }
  .widget-body {
    padding: 0.75rem 0;
    font-size: 0.875rem;
    overflow: hidden;
    > :first-child {
      margin-top: 0;
    }
    > :first-child {
      margin-bottom: 0;
    }
  }
  .widget-post-list {
    ul {
      padding: 0;
      list-style-type: none;
      border-top: 1px dotted #999;
     li {
        padding: 0.5rem 0.25rem;
        letter-spacing: 0;
        line-height: 1.5;
        word-break: break-all;
        border-bottom: 1px dotted #999;
      }
    }
  }
  .widget-taxonomies {
    .post-term {
      display: inline-block;
      padding: 0 0 0.5rem 0;
      margin: 0 0.5rem 0 0;
      letter-spacing: 0;
      line-height: 1.25;
      word-break: break-all;
      .post-term-nums {
        &:before {
          content: ' (';
        }
        &:after {
          content: ')';
        }
      }
    }
  }

}
