/* ブロックエディタ用のスタイル */
#wp-postbody {
  --postbody-fontSize: 16px;
  display: flow-root;
  overflow: hidden;
  word-break: break-all;
  font-size: var(--postbody-fontSize);
}

@media screen and (max-width: 768px) {
  #wp-postbody {
    --postbody-fontSize: 14px;
  }
}
#wp-postbody :where(.wp-block-pullquote) {
  font-size: 1em;
}
#wp-postbody::after,
#wp-postbody::before {
  clear: both;
  content: "";
  display: table;
}

#wp-postbody > * {
  margin-top: 1em;
  margin-bottom: 1em;
}
#wp-postbody > * > * {
  margin-top: 1em;
  margin-bottom: 1em;
}

#wp-postbody .wp-block-group > * {
  margin-top: 1em;
  margin-bottom: 1em;
}
#wp-postbody .wp-block-group > * > * {
  margin-top: 1em;
  margin-bottom: 1em;
}
@media screen and (max-width: 768px) {
  #wp-postbody > *,
  #wp-postbody > * > *,
  #wp-postbody .wp-block-group > *,
  #wp-postbody .wp-block-group > * > * {
    margin-top: 1em;
    margin-bottom: 0.75em;
  }
}

#wp-postbody > *:first-child {
  margin-top: 0;
}

#wp-postbody h1 {
  font-size: 2.5em;
  background-color: #007cc3;
  padding: 0.25em 0.5em;
  color: white;
  width: fit-content;
  font-weight: 700;
}

#wp-postbody h2 {
  font-weight: 700;
  font-size: 2em;
  color: #007cc3;
}

#wp-postbody h3 {
  border-left: 5px solid #007cc3;
  padding-left: 1em;
  font-weight: 700;
  font-size: 1.75em;
}

#wp-postbody h4 {
  font-size: 1.5em;
  padding-left: 0.5em;
  border-left: 3px solid #007cc3;
}

#wp-postbody h5 {
  font-size: 1.25em;
}

#wp-postbody h6 {
  font-size: 1em;
}

#wp-postbody p {
  font-size: var(--postbody-fontSize);
}

#wp-postbody strong {
  font-weight: 700;
}

#wp-postbody em {
  font-style: italic;
}

#wp-postbody tr {
  font-weight: normal;
}

#wp-postbody :is(th, td) {
  padding: 0.5em;
}

@media screen and (max-width: 768px) {
  #wp-postbody :is(th, td) {
    display: table-cell;
    width: auto;
  }
}

#wp-postbody blockquote {
  border: 1px solid #808080;
  padding: 1.5em;
}
#wp-postbody .wp-block-pullquote {
  font-size: 1em !important;
  line-height: unset !important;
  margin: 1em 0 !important;
  padding: unset !important;
}

#wp-postbody blockquote > *:first-child::before {
  content: "’’";
  font-size: 1.5em;
  margin-right: 0.5em;
  display: inline-block;
}

#wp-postbody blockquote a {
  cursor: pointer;
  text-decoration: underline;
}

#wp-postbody figure {
  margin-bottom: 0.5em;
  margin-top: 0.5em;
  max-width: 100%;
}

#wp-postbody figure.wp-block-table {
  overflow: visible;
}

#wp-postbody figcaption {
  text-align: center;
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}

#wp-postbody figure.aligncenter {
  margin-left: auto !important;
  margin-right: auto !important;
}

#wp-postbody img {
  max-width: 100%;
}

#wp-postbody :is(img.alignnone, img.alignleft, img.alignright, img.aligncenter) {
  display: block;
  height: auto;
  margin-bottom: 0.5em;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
  width: auto;
}

#wp-postbody img.alignnone {
  margin-left: 0;
}

#wp-postbody img.alignleft {
  float: left;
  margin-left: 0;
  margin-right: 0.5em;
}

#wp-postbody img.alignright {
  float: right;
  margin-left: 0.5em;
  margin-right: 0;
}

#wp-postbody ul > li {
  font-size: var(--postbody-fontSize);
  margin-top: 1em;
  padding-left: 1em;
  position: relative;
}

#wp-postbody ul > li::before {
  background: #007cc3;
  border-radius: 50%;
  content: "";
  display: block;
  height: 0.4em;
  left: 0.25em;
  position: absolute;
  top: 1em;
  width: 0.4em;
  translate: -50% -50%;
}

#wp-postbody ol {
  counter-reset: li;
}

#wp-postbody ol > li {
  font-size: var(--postbody-fontSize);
  list-style: none;
  margin-top: 1em;
  padding-left: 1.8em;
  position: relative;
}

#wp-postbody ol > li::before {
  content: counter(li) ".";
  counter-increment: li;
  font-weight: bold;
  left: 0;
  position: absolute;
  color: #007cc3;
  top: 0;
}

#wp-postbody a[href] {
  cursor: pointer;
  text-decoration: underline;
}

#wp-postbody table {
  width: 100%;
}

#wp-postbody table th {
  font-weight: 700;
}

#wp-postbody table td {
  font-weight: 400;
}

#wp-postbody dl {
  font-weight: 400;
}

#wp-postbody dt {
  font-weight: 700;
}

#wp-postbody dd {
  font-weight: 400;
  margin-bottom: 1.25rem;
}

#wp-postbody pre,
#wp-postbody code {
  white-space: pre-wrap;
}

#wp-postbody .aligncenter {
  display: block;
}

#wp-postbody .alignright {
  float: right;
  margin-left: 0.5em;
  margin-right: 0;
}

#wp-postbody .alignleft {
  float: left;
  margin-left: 0;
  margin-right: 0.5em;
}

#wp-postbody .wp-caption,
#wp-postbody [class*="wp-image"] {
  display: block;
  max-width: 100%;
  object-fit: cover;
  text-align: center;
}

#wp-postbody .wp-caption-text {
  margin-bottom: 0;
  margin-top: 0;
}

#wp-postbody .post-password-form [name="post_password"] {
  border: 1px solid #333;
  padding: 0.3em;
}

#wp-postbody .post-password-form input[name="Submit"] {
  border: 1px solid #707070;
  border-radius: 5px;
  padding: 0.3em 0.6em;
}

#wp-postbody sup {
  top: -0.5em;
}

#wp-postbody sub {
  bottom: -0.25em;
}

#wp-postbody sub,
#wp-postbody sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: initial;
}

/* プラグイン用 */
#wp-postbody .pdfemb-viewer {
  max-width: 100%;
}

#wp-postbody summary {
  cursor: pointer;
}

#wp-postbody summary::before {
  content: "▽";
  margin-right: 0.2em;
  display: inline-block;
}

#wp-postbody details > * {
  margin-top: 1em;
}

#wp-postbody details > *:first-child {
  margin-top: 0;
}

#wp-postbody .wp-element-button {
  background-color: var(--color-primary);
  color: white;
}
#wp-postbody a[href].wp-element-button {
  text-decoration: none;
}

/* wp-pagenavi */
.wp-pagenavi {
  text-align: center;
}

.wp-pagenavi a,
.wp-pagenavi span {
  display: inline-block;
  margin: 0 5px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.wp-pagenavi a:hover {
  background-color: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wp-pagenavi .current {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: bold;
  border-color: var(--color-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wp-pagenavi .first,
.wp-pagenavi .last {
  font-weight: bold;
  background-color: #f7f7f7;
  color: #333;
}

.wp-pagenavi .first:hover,
.wp-pagenavi .last:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.wp-pagenavi .previouspostslink,
.wp-pagenavi .nextpostslink {
  color: #333;
  padding: 10px 20px;
  border-radius: 3px;
}

.wp-pagenavi .previouspostslink:hover,
.wp-pagenavi .nextpostslink:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.wp-pagenavi .previouspostslink.disabled,
.wp-pagenavi .nextpostslink.disabled,
.wp-pagenavi .first.disabled,
.wp-pagenavi .last.disabled {
  background-color: #e0e0e0;
  color: #aaa;
  opacity: 0.5;
  cursor: not-allowed;
}

.wp-pagenavi a:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .wp-pagenavi a,
  .wp-pagenavi span {
    padding: 8px 12px;
    margin: 0 3px;
    font-size: 14px;
  }

  .wp-pagenavi .previouspostslink,
  .wp-pagenavi .nextpostslink {
    padding: 8px 15px;
  }
}
