/*
Theme Name: konst
Theme URI: https://konst.jp/
Author: konst
Author URI: https://konst.jp/
Description: A minimal design studio theme for konst — a welfare and design atelier based in Karuizawa.
Version: 1.0.16
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: konst
*/


/* ==========================================================================
   EDITOR STYLES — ブロックエディタ内のフロントエンド再現スタイル
   フロントエンドの .single-post-content / .narrative-text--single に対応
   ========================================================================== */

/* ---------- CSS変数（main.cssのルートを引き継ぐ） ---------- */
.editor-styles-wrapper {
  --color-text: #009868;
  --color-text-muted: #009868;
  --color-bg: #fff;
  --color-green: #009868;
  --color-border: #c0e0d2;
  --font-body: 'Noto Sans JP', 'Helvetica Neue', 'Helvetica', sans-serif;
  --font-heading: 'Helvetica Neue', 'Helvetica', 'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', 'Helvetica Neue', 'Helvetica', sans-serif;
  --font-en: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

/* ---------- エディタ全体のベーススタイル ---------- */
.editor-styles-wrapper {
  font-family: 'Noto Sans JP', 'Helvetica Neue', 'Helvetica', sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.1vw + 10px, 17px);
  line-height: 2.1;
  color: #009868;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- コンテンツ幅の制限（フロントエンドの .narrative-text--single: max-width 640px） ---------- */
.editor-styles-wrapper .is-root-container > * {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 本文段落（.single-post-content p） ---------- */
.editor-styles-wrapper p {
  font-family: 'Noto Sans JP', 'Helvetica Neue', 'Helvetica', sans-serif;
  font-size: clamp(1rem, 1.3vw + 4px, 1.15rem);
  line-height: 2.4;
  margin-bottom: 2.5rem;
  color: #009868;
  font-weight: 300;
}

/* ---------- 見出し（.single-post-content h2/h3/h4） ---------- */
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
  font-family: 'Noto Serif JP', 'Helvetica Neue', 'Helvetica', sans-serif;
  font-weight: 400;
  line-height: 1.8;
  color: #009868;
  margin-top: clamp(3rem, 6vw, 5rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.editor-styles-wrapper h2 {
  font-size: clamp(1.3rem, 2.2vw + 4px, 1.7rem);
}

.editor-styles-wrapper h3 {
  font-size: clamp(1.15rem, 1.8vw + 4px, 1.4rem);
}

.editor-styles-wrapper h4 {
  font-size: clamp(1rem, 1.5vw + 4px, 1.2rem);
}

/* ---------- 画像（.single-post-content img / figure） ---------- */
.editor-styles-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.editor-styles-wrapper figure.wp-block-image,
.editor-styles-wrapper .wp-block-image figure {
  max-width: 100%;
  margin: clamp(2rem, 5vw, 4rem) 0;
}

.editor-styles-wrapper figure.wp-block-image img,
.editor-styles-wrapper .wp-block-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.editor-styles-wrapper figcaption,
.editor-styles-wrapper .wp-block-image figcaption {
  font-size: 0.85rem;
  color: #009868;
  margin-top: 0.75rem;
  line-height: 1.8;
}

/* ---------- alignwide / alignfull を制限 ---------- */
.editor-styles-wrapper .alignwide,
.editor-styles-wrapper .alignfull,
.editor-styles-wrapper .wp-block-image.alignwide,
.editor-styles-wrapper .wp-block-image.alignfull {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* ---------- リンク ---------- */
.editor-styles-wrapper a {
  color: #009868;
  text-decoration: none;
  border-bottom: 1px solid #c0e0d2;
  padding-bottom: 1px;
}

/* ---------- リスト ---------- */
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
  margin-bottom: 2rem;
  padding-left: 1.5em;
  color: #009868;
  font-size: clamp(1rem, 1.3vw + 4px, 1.15rem);
  line-height: 2.2;
}

.editor-styles-wrapper li {
  margin-bottom: 0.5rem;
}

/* ---------- 引用（blockquote） ---------- */
.editor-styles-wrapper blockquote,
.editor-styles-wrapper .wp-block-quote {
  border-left: 3px solid #009868;
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  font-style: italic;
  color: #009868;
}

.editor-styles-wrapper .wp-block-quote p {
  font-family: 'Noto Serif JP', 'Helvetica Neue', 'Helvetica', sans-serif;
  font-style: italic;
  margin-bottom: 0;
}

/* ---------- strongタグ ---------- */
.editor-styles-wrapper strong {
  font-weight: 500;
}

/* ---------- iframeや埋め込み ---------- */
.editor-styles-wrapper iframe,
.editor-styles-wrapper .wp-block-embed {
  max-width: 100%;
  margin: 2rem 0;
  border-radius: 3px;
}

/* ---------- 区切り線 ---------- */
.editor-styles-wrapper hr,
.editor-styles-wrapper .wp-block-separator {
  border: none;
  border-top: 1px solid #c0e0d2;
  margin: 3rem 0;
}

/* ---------- コードブロック ---------- */
.editor-styles-wrapper pre,
.editor-styles-wrapper code {
  font-size: 0.9rem;
  background: #f0f0ee;
  border-radius: 3px;
}

/* ---------- ボックスサイズ ---------- */
.editor-styles-wrapper *,
.editor-styles-wrapper *::before,
.editor-styles-wrapper *::after {
  box-sizing: border-box;
}

/* columns */
.single-post-content .wp-block-columns img {
	margin-top: 0;
	margin-bottom: 0;
}