/*
 * Block Styles for Secret Page
 */
/*
 * Block Editor / Front shared styles
 * - フロント: 固定ページテンプレートの本文領域
 * - エディタ: .editor-styles-wrapper 配下
 */

:root {
  /* Gutenberg preset (一部ブロックが参照) */
  --wp--preset--font-size--large: 3rem;

  /* このページ用の調整はここだけ触ればOK */
  --page-block--base-font-size: 1.25rem;
  --page-block--base-font-size-sp: 1rem;
  --page-block--heading-line-height: 1.4;
  --page-block--text-line-height: 1.8;
  --page-block--text-line-height-sp: 1.75;
  --page-block--h2-margin-block: 5rem 2rem;
  --page-block--h2-margin-block-sp: 3rem 1.5rem;
  --page-block--h3-font-size: 1.75rem;
  --page-block--para-gap: 16px;
  --page-block--columns-gap: 3rem;
  --page-block--columns-gap-sp: 2.5rem;
  --page-block--media-margin-bottom: 10px;
  --page-block--link-hover-opacity: 0.7;

  /* list blocks */
  --page-block--list-margin-block: 1.25rem;
  --page-block--list-padding-inline: 1.5em;
  --page-block--list-item-gap: 0.4em;

  /* 画像を正方形にしたい場合は 1 を設定 */
  --page-block--image-aspect-ratio: 1;
  --page-block--image-object-fit: cover;
}

@media (max-width: 768px) {
  :root {
    --wp--preset--font-size--large: 2rem;
  }
}

/*
 * Disable theme responsive rem-scaling for this template only.
 * style.css: html { font-size: calc(100vw * 10 / 1200); }
 */
html:has(body:is(.page-template-page, .page-template-page-php)) {
  font-size: 16px;
}

@media (max-width: 768px) {
  html:has(body:is(.page-template-page, .page-template-page-php)) {
    font-size: 14px;
  }
}

/* Base text size (theme側の小さすぎるremスケール対策) */
:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) {
  font-size: var(--page-block--base-font-size);
  line-height: var(--page-block--text-line-height);
}

@media (max-width: 768px) {
  :is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) {
    font-size: var(--page-block--base-font-size-sp);
    line-height: var(--page-block--text-line-height-sp);
  }
}

/* reset.css が p/h* に line-height:1 を直指定するため、ここで上書き */
:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(p, li) {
  line-height: var(--page-block--text-line-height);
}

@media (max-width: 768px) {
  :is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(p, li) {
    line-height: var(--page-block--text-line-height-sp);
  }
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(h2, h3, h4, h5, h6, .wp-block-heading, h2.wp-block-heading, h3.wp-block-heading, h4.wp-block-heading) {
  line-height: var(--page-block--heading-line-height);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(h2.wp-block-heading) {
  font-weight: bold;
  margin-block: var(--page-block--h2-margin-block);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(h2.wp-block-heading + h3.wp-block-heading) {
  margin-top: 1.5rem;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(h3.wp-block-heading) {
  font-size: var(--page-block--h3-font-size);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(p.wp-block-paragraph) {
  line-height: var(--page-block--text-line-height);
  overflow-wrap: anywhere;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(p.wp-block-paragraph + p.wp-block-paragraph) {
  margin-top: var(--page-block--para-gap);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(.wp-block-columns + .wp-block-columns) {
  margin-top: var(--page-block--columns-gap);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(.wp-block-column img) {
  display: block;
  margin-bottom: var(--page-block--media-margin-bottom);
  width: 100%;
  height: auto;
  object-fit: var(--page-block--image-object-fit);
  aspect-ratio: var(--page-block--image-aspect-ratio);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(a.wp-block-tiptip-hyperlink-group-block) {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(a.wp-block-tiptip-hyperlink-group-block:hover) {
  opacity: var(--page-block--link-hover-opacity);
}

/* Lists (ul/ol + wp-block-list) */
:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(ul, ol, .wp-block-list) {
  list-style-position: outside;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(ul, .wp-block-list:not(ol)) {
  list-style-type: disc;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(ol, .wp-block-list.ol) {
  list-style-type: decimal;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(ul, ol, .wp-block-list) {
  margin-block: var(--page-block--list-margin-block);
  padding-inline-start: var(--page-block--list-padding-inline);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(ul, ol, .wp-block-list) > li {
  line-height: var(--page-block--text-line-height);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(ul, ol, .wp-block-list)
  > li::marker {
  color: currentColor;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(ul, ol, .wp-block-list) > li + li {
  margin-top: var(--page-block--list-item-gap);
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(ul, ol, .wp-block-list)
  :is(ul, ol, .wp-block-list) {
  margin-block: 0.75rem;
}

@media (max-width: 768px) {
  :is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(h2.wp-block-heading) {
    margin-block: var(--page-block--h2-margin-block-sp);
  }

  :is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
    :is(.wp-block-columns + .wp-block-columns) {
    margin-top: var(--page-block--columns-gap-sp);
  }
}

/* End */

body:is(.page-template-page, .page-template-page-php) {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* 横スクロール完全防止（長いURL/英数字対策） */
html:has(body:is(.page-template-page, .page-template-page-php)),
body:is(.page-template-page, .page-template-page-php) {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 2.0;
}

p {
	line-height: 1.6;
}

p + p,
ul + p {
	margin-top: 2rem;
}

ol, ul {
    list-style-position: inside;
	font-size: var(--wp--preset--font-size--medium) !important;
	line-height: 1.8;
	margin-top: 1rem;
}


ul {
    list-style: disc inside;
}

ol {
	list-style: decimal inside;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) {
  overflow-x: hidden;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(p, li, a, span, strong, em, code) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(a) {
  word-break: break-all;
}

/* code/pre は折り返してスクロールさせない */
:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(pre, code) {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 埋め込み/画像/表などのはみ出し抑止 */
:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(img, iframe, video, embed, object, svg) {
  max-width: 100%;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper)
  :is(.wp-block-embed, .wp-block-video, .wp-block-image) {
  max-width: 100%;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(table) {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

:is(body:is(.page-template-page, .page-template-page-php) .main .container, .editor-styles-wrapper) :is(th, td) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.main {
  padding-block: 8rem 10rem;
  position: relative;
}

.container {
  max-width: 800px;
  margin-inline: auto;
  box-sizing: unset;
  padding-inline: 1.5rem;
}

.headerToggle {
  display: none;
}

.is-active.headerToggle span {
  background: var(--colorWhite);
}

@media (max-width: 768px) {
  .topImage::before {
    display: none;
  }
}

.title {
  text-align: center;
  color: var(--colorBlue);
  font-size: 2.5rem;
  line-height: 1.5;
  text-wrap: balance;
  font-weight: 700;
}

.pageBackLink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  color: var(--colorBlue);
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: opacity 0.3s;
}

.pageBackLink__icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  margin-top: 2px;
}

.pageBackLink:hover {
  border-bottom-color: currentColor;
  opacity: var(--page-block--link-hover-opacity);
}

@media (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }

  .title span {
    display: inline-block;
  }
}

ul {
    list-style: disc;
    list-style-position: inside;
}

.wp-block-list .wp-block-list {
	padding-left: 1.25em;
	list-style: circle;
	list-style-position: inside;
}

.footer__nav li {
	list-style: none;
}