/*
Theme Name: Akane
Theme URI: https://example.com/akane
Author: Your Name
Author URI: https://example.com
Description: 明朝体を基調にした、20〜30代女性向けメディアのためのオリジナルブロックテーマ。穏やかな薄紅色と豊富な記事装飾（吹き出し・ランキング・比較表・Q&A・ステップ等）をブロックエディタだけで編集できます。Core Web Vitals・SEOに配慮した軽量設計。
Version: 2.4.2
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akane
*/

/* ==========================================================================
   デザイントークン
   theme.json のプリセット変数に加え、装飾専用の変数をここで定義する。
   すべて「外観 → カスタマイズ → サイトカラー / 装飾カラー」から上書き可能。
   ========================================================================== */

:root {
	/* 装飾カラー（カスタマイザーで変更可） */
	--ak-good-bg:      #F3F9F2;
	--ak-good-line:    #CFE5CC;
	--ak-good-accent:  #5C9A57;
	--ak-caution-bg:   #FDF7EC;
	--ak-caution-line: #EEDFC2;
	--ak-caution-accent: #C08A3E;
	--ak-amazon:       #E8A24C;
	--ak-rakuten:      #BF3A3A;
	--ak-star:         #E5B93C;
	--ak-marker:       #F8D9DF; /* マーカー（薄紅） */
	--ak-marker-blue:  #D6E7F8; /* マーカー（青） */
	--ak-marker-yellow:#FCF0BC; /* マーカー（黄） */
	--ak-red:          #D64560; /* 強調レッド（太字） */
	--ak-link:         #3E7CB1; /* 本文リンク（青系） */
	--ak-link-hover:   #2E618C;
	--ak-rank-gold:    #C2A050;
	--ak-rank-silver:  #9AA0A6;
	--ak-rank-bronze:  #B0805B;

	/* 背景の2層構造（カスタマイザーで変更可） */
	--ak-site-bg:    #FAF5F6; /* サイト全体の背景 */
	--ak-content-bg: #FFFFFF; /* 記事本文エリアの背景（白） */

	/* UI用ゴシック（表・ボタン・ラベルは可読性重視でゴシック） */
	--ak-ui-font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
}

html {
	scroll-behavior: smooth; /* 目次からのアンカージャンプを滑らかに */
}

body {
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "palt";
	/* グローバルスタイルが読めない環境でも本文12pxを保証するフォールバック */
	font-size: var(--wp--preset--font-size--medium, 12px);
}

::selection {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--contrast);
}

/* アンカー付き見出しへジャンプした際、上に余白を確保 */
.entry-content h2[id],
.entry-content h3[id],
.entry-content h4[id] {
	scroll-margin-top: 2rem;
}

/* 記事・固定ページの本文エリア：白背景のカード
   （.ak-main クラスに加え、body クラス由来のセレクタでも適用するため
   　テンプレートを編集していても確実に白背景になる） */
.ak-main,
body.single main.wp-block-group,
body.page main.wp-block-group {
	width: min(100% - 2rem, 800px);
	margin-inline: auto;
	margin-block: 1.75rem 3rem;
	padding-inline: clamp(1.1rem, 4vw, 3.4rem);
	background: var(--ak-content-bg);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	box-shadow: 0 6px 24px rgba(196, 102, 122, 0.06);
}

/* エディターの執筆エリアも本文と同じ白背景に */
.is-root-container {
	background: var(--ak-content-bg);
}

a {
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
	transition: color 0.2s ease, opacity 0.2s ease;
}

img {
	height: auto; /* width/height属性とあわせてCLSを防止 */
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*, *::before, *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ==========================================================================
   ヘッダーロゴ
   カスタムロゴ登録時はサイト名テキストを隠し、ロゴのみを表示する。
   （ロゴ画像のalt属性がサイト名を担うためSEO上の欠落はない）
   ========================================================================== */

.ak-brand .wp-block-site-logo img {
	max-height: 48px;
	width: auto;
}

.ak-brand:has(.wp-block-site-logo img) .ak-brand-text {
	display: none;
}

/* ==========================================================================
   見出し — 明朝の品を活かした静かな装飾
   ========================================================================== */

.entry-content h2 {
	margin-top: 3.5rem;
	padding-bottom: 0.6em;
	border-bottom: 1px solid var(--wp--preset--color--line);
	position: relative;
}

.entry-content h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 3.5em;
	height: 3px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-soft));
	border-radius: 2px;
}

.entry-content h3 {
	margin-top: 2.75rem;
	padding-left: 0.8em;
	border-left: 3px solid var(--wp--preset--color--primary);
}

.entry-content h4 {
	margin-top: 2.25rem;
	color: var(--wp--preset--color--primary-dark);
}

.entry-content h4::before {
	content: "◆";
	margin-right: 0.35em;
	font-size: 0.8em;
	color: var(--wp--preset--color--primary-soft);
}

/* 順位バッジ */
.ak-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6em;
	margin-right: 0.5em;
	padding: 0.15em 0.55em;
	border-radius: 999px;
	font-family: var(--ak-ui-font);
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #fff;
	background: var(--wp--preset--color--primary);
	vertical-align: 0.15em;
}

.ak-rank.is-gold   { background: var(--ak-rank-gold); }
.ak-rank.is-silver { background: var(--ak-rank-silver); }
.ak-rank.is-bronze { background: var(--ak-rank-bronze); }

/* マーカー（ツールバー「∨」→「マーカー」で適用。下半分だけ塗る蛍光ペン風。
   色はカスタマイザー「装飾カラー → マーカーの色」で変更可） */
mark.ak-marker {
	background: linear-gradient(transparent 55%, var(--ak-marker) 55%);
	padding: 0 0.1em;
	border-radius: 2px;
	color: inherit;
	font-weight: 700; /* マーカー適用時は自動で太字に */
}

mark.ak-marker-blue,
mark.ak-marker-yellow {
	padding: 0 0.1em;
	border-radius: 2px;
	color: inherit;
	font-weight: 700;
}

mark.ak-marker-blue   { background: linear-gradient(transparent 55%, var(--ak-marker-blue) 55%); }
mark.ak-marker-yellow { background: linear-gradient(transparent 55%, var(--ak-marker-yellow) 55%); }

/* 赤太文字（ツールバー「∨」→「赤太文字」で適用。
   色はカスタマイザー「装飾カラー → 強調レッドの色」で変更可） */
strong.ak-red {
	color: var(--ak-red);
	font-weight: 700;
}

/* 星評価（★を色付け） */
.ak-stars {
	color: var(--ak-star);
	letter-spacing: 0.1em;
	font-family: var(--ak-ui-font);
}

/* 引用 */
.wp-block-quote {
	position: relative;
	border-radius: 0 10px 10px 0;
}

/* ==========================================================================
   吹き出し — 名前ラベル＋アイコン＋会話
   ========================================================================== */

.ak-balloon {
	display: grid;
	grid-template-columns: 76px 1fr;
	gap: 1rem;
	align-items: start;
}

.ak-balloon .ak-balloon-avatar { text-align: center; }

.ak-balloon .ak-balloon-avatar img {
	border-radius: 50%;
	border: 3px solid var(--wp--preset--color--line);
	aspect-ratio: 1;
	object-fit: cover;
}

.ak-balloon .ak-balloon-name {
	margin: 0.35em 0 0;
	font-family: var(--ak-ui-font);
	font-size: 9px;
	line-height: 1.4;
	color: var(--wp--preset--color--muted);
}

.ak-balloon .ak-balloon-body {
	position: relative;
	padding: 1em 1.3em;
	background: var(--wp--preset--color--tint);
	border-radius: 12px;
}

.ak-balloon .ak-balloon-body::before {
	content: "";
	position: absolute;
	top: 26px;
	left: -10px;
	border-style: solid;
	border-width: 8px 12px 8px 0;
	border-color: transparent var(--wp--preset--color--tint) transparent transparent;
}

.ak-balloon .ak-balloon-body > :first-child { margin-top: 0; }
.ak-balloon .ak-balloon-body > :last-child  { margin-bottom: 0; }

/* 吹き出し内のタイトル行（例：美容家コメント） */
.ak-balloon .ak-balloon-title {
	font-family: var(--ak-ui-font);
	font-weight: 700;
	font-size: 11px;
	color: var(--wp--preset--color--primary-dark);
	margin-bottom: 0.4em;
}

.ak-balloon.is-right { grid-template-columns: 1fr 76px; }
.ak-balloon.is-right .ak-balloon-avatar { order: 2; }
.ak-balloon.is-right .ak-balloon-body   { order: 1; }

.ak-balloon.is-right .ak-balloon-body::before {
	left: auto;
	right: -10px;
	border-width: 8px 0 8px 12px;
	border-color: transparent transparent transparent var(--wp--preset--color--tint);
}

/* 白背景・枠線タイプ（監修者の解説向け） */
.ak-balloon.is-line .ak-balloon-body {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--primary-soft);
}

.ak-balloon.is-line .ak-balloon-body::before {
	border-right-color: var(--wp--preset--color--primary-soft);
}

/* ==========================================================================
   ボックス各種（グループブロックのスタイル）
   ========================================================================== */

.is-style-box-good,
.is-style-box-caution,
.is-style-box-point,
.is-style-box-border,
.is-style-box-gray {
	padding: 1.4em 1.6em;
	border-radius: 12px;
}

.is-style-box-good    { background: var(--ak-good-bg);    border: 1px solid var(--ak-good-line); }
.is-style-box-caution { background: var(--ak-caution-bg); border: 1px solid var(--ak-caution-line); }
.is-style-box-point   { background: var(--wp--preset--color--tint); border: 1px solid var(--wp--preset--color--line); }
.is-style-box-border  { background: var(--wp--preset--color--base); border: 1.5px solid var(--wp--preset--color--line); }
.is-style-box-gray    { background: #F7F5F4; border: 1px solid #E9E5E3; }

.is-style-box-good > :first-child,
.is-style-box-caution > :first-child,
.is-style-box-point > :first-child,
.is-style-box-border > :first-child,
.is-style-box-gray > :first-child { margin-top: 0; }

.is-style-box-good > :last-child,
.is-style-box-caution > :last-child,
.is-style-box-point > :last-child,
.is-style-box-border > :last-child,
.is-style-box-gray > :last-child { margin-bottom: 0; }

/* タイトル付きボックス（.ak-titled-box > .ak-box-title + 中身） */
.ak-titled-box {
	border: 1.5px solid var(--wp--preset--color--primary-soft);
	border-radius: 12px;
	overflow: hidden;
}

.ak-titled-box .ak-box-title {
	margin: 0;
	padding: 0.6em 1.25em;
	background: var(--wp--preset--color--tint);
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-family: var(--ak-ui-font);
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}

.ak-titled-box .ak-box-body { padding: 1.1em 1.35em; }
.ak-titled-box .ak-box-body > :first-child { margin-top: 0; }
.ak-titled-box .ak-box-body > :last-child  { margin-bottom: 0; }

/* ==========================================================================
   キャプションボックス（タイトル付きボックス4デザイン）
   構造：.ak-cap.is-◯◯ > .ak-cap-title + .ak-cap-body
   ========================================================================== */

.ak-cap {
	border-radius: 12px;
}

.ak-cap .ak-cap-title {
	margin: 0;
	font-family: var(--ak-ui-font);
	font-weight: 700;
	font-size: 11px;
}

.ak-cap .ak-cap-body { padding: 0.8em 1.35em 1em; }
.ak-cap .ak-cap-body > :first-child { margin-top: 0; }
.ak-cap .ak-cap-body > :last-child  { margin-bottom: 0; }

/* タイトルと本文の間のブロック間隔（グループの既定gap）を打ち消して密着させる */
.ak-cap > .ak-cap-body,
.ak-titled-box > .ak-box-body { margin-block-start: 0; }

.ak-cap.is-line .ak-cap-body   { padding-top: 0.45em; }
.ak-cap.is-ribbon .ak-cap-body { padding-top: 0.7em; }

/* デザイン1：塗りつぶしバー */
.ak-cap.is-fill {
	border: 2px solid var(--wp--preset--color--primary);
	overflow: hidden;
}

.ak-cap.is-fill .ak-cap-title {
	padding: 0.5em 1.25em;
	background: var(--wp--preset--color--primary);
	color: #fff;
}

/* デザイン2：内タブ */
.ak-cap.is-tab {
	border: 2px solid var(--wp--preset--color--primary);
	overflow: hidden;
}

.ak-cap.is-tab .ak-cap-title {
	width: fit-content;
	padding: 0.3em 1.4em;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-radius: 0 0 10px 0;
}

/* デザイン3：リボン（上枠に食い込むタイトル） */
.ak-cap.is-ribbon {
	border: 2px solid var(--wp--preset--color--primary-soft);
	margin-top: 1.2em;
}

.ak-cap.is-ribbon .ak-cap-title {
	width: fit-content;
	margin: -1em auto 0;
	padding: 0.25em 1.4em;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-radius: 999px;
}

/* デザイン4：シンプルライン */
.ak-cap.is-line {
	background: var(--wp--preset--color--tint);
	border-top: 3px solid var(--wp--preset--color--primary);
	border-radius: 0 0 12px 12px;
}

.ak-cap.is-line .ak-cap-title {
	padding: 0.8em 1.35em 0;
	color: var(--wp--preset--color--primary-dark);
}

.ak-cap.is-line .ak-cap-title::before {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-right: 0.5em;
	background: var(--wp--preset--color--primary);
	transform: rotate(45deg);
}

/* 注釈 */
.is-style-notice {
	font-family: var(--ak-ui-font);
	font-size: 10px;
	line-height: 1.8;
	color: var(--wp--preset--color--muted);
}

/* PRラベル・広告表記 */
.ak-pr {
	font-family: var(--ak-ui-font);
	font-size: 10px;
	color: var(--wp--preset--color--muted);
	text-align: center;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 4px;
	padding: 0.3em 0.6em;
}

/* あおりフラッグ「＼まずはお試し！／」 */
.ak-flag {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
	font-family: var(--ak-ui-font);
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
	text-align: center;
}

.ak-flag::before,
.ak-flag::after {
	content: "";
	width: 1.4em;
	height: 1.5px;
	background: currentColor;
}

.ak-flag::before { transform: rotate(55deg); }
.ak-flag::after  { transform: rotate(-55deg); }

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

.is-style-check-list,
.is-style-good-list,
.is-style-bad-list {
	list-style: none;
	padding-left: 0;
}

.is-style-check-list li,
.is-style-good-list li,
.is-style-bad-list li {
	position: relative;
	padding-left: 1.7em;
	margin-bottom: 0.5em;
}

.is-style-check-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 1.05em;
	height: 1.05em;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm-1.2 17.4-5-5 1.7-1.7 3.3 3.3 6.9-6.9 1.7 1.7Z"/></svg>') center / contain no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm-1.2 17.4-5-5 1.7-1.7 3.3 3.3 6.9-6.9 1.7 1.7Z"/></svg>') center / contain no-repeat;
}

.is-style-good-list li::before {
	content: "◎";
	position: absolute;
	left: 0;
	color: var(--ak-good-accent);
	font-weight: 700;
}

.is-style-bad-list li::before {
	content: "△";
	position: absolute;
	left: 0;
	color: var(--ak-caution-accent);
	font-weight: 700;
}

/* 番号丸バッジ（番号付きリストで使用） */
.is-style-num-list {
	list-style: none;
	counter-reset: ak-num;
	padding-left: 0;
}

.is-style-num-list li {
	counter-increment: ak-num;
	position: relative;
	padding-left: 2em;
	margin-bottom: 0.6em;
}

.is-style-num-list li::before {
	content: counter(ak-num);
	position: absolute;
	left: 0;
	top: 0.25em;
	width: 1.4em;
	height: 1.4em;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--ak-ui-font);
	font-size: 0.82em;
	font-weight: 700;
	line-height: 1;
}

/* 矢印リスト */
.is-style-arrow-list {
	list-style: none;
	padding-left: 0;
}

.is-style-arrow-list li {
	position: relative;
	padding-left: 1.5em;
	margin-bottom: 0.5em;
}

.is-style-arrow-list li::before {
	content: "";
	position: absolute;
	left: 0.2em;
	top: 0.55em;
	width: 0.5em;
	height: 0.5em;
	border-top: 2px solid var(--wp--preset--color--primary);
	border-right: 2px solid var(--wp--preset--color--primary);
	transform: rotate(45deg);
}

/* 星リスト */
.is-style-star-list {
	list-style: none;
	padding-left: 0;
}

.is-style-star-list li {
	position: relative;
	padding-left: 1.6em;
	margin-bottom: 0.5em;
}

.is-style-star-list li::before {
	content: "★";
	position: absolute;
	left: 0;
	color: var(--ak-star);
}

/* 下線区切りリスト */
.is-style-border-list {
	list-style: none;
	padding-left: 0;
}

.is-style-border-list li {
	padding: 0.65em 0.2em;
	margin: 0;
	border-bottom: 1px dashed var(--wp--preset--color--line);
}

.is-style-border-list li:first-child { border-top: 1px dashed var(--wp--preset--color--line); }

/* ==========================================================================
   テーブル — 管理画面のテーブルブロックでそのまま編集可能
   ========================================================================== */

/* 幅が収まらないテーブルは（スタイル指定なしでも）自動で横スクロール */
.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-family: var(--ak-ui-font);
	font-size: 11px;
	line-height: 1.7;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--line);
	padding: 0.7em 0.9em;
}

.wp-block-table th {
	background: var(--wp--preset--color--tint);
	font-weight: 700;
}

/* スペック表：1列目＝項目名 */
.is-style-table-spec table { table-layout: fixed; }

.is-style-table-spec th:first-child,
.is-style-table-spec td:first-child {
	width: 9em;
	background: var(--wp--preset--color--tint);
	font-weight: 700;
}

/* 価格表：1列目やや狭め＋2列目強調 */
.is-style-table-price table { table-layout: fixed; }

.is-style-table-price td:first-child {
	width: 8em;
	background: var(--wp--preset--color--tint);
	font-weight: 700;
}

.is-style-table-price td:last-child { font-weight: 700; }

/* 比較表：横スクロール＋1列目固定（表の最小幅を3種から選択） */
[class*="is-style-table-scroll"] table { min-width: 760px; }
.is-style-table-scroll-s table { min-width: 600px; }
.is-style-table-scroll-l table { min-width: 1000px; }

[class*="is-style-table-scroll"] th:first-child,
[class*="is-style-table-scroll"] td:first-child {
	position: sticky;
	left: 0;
	background: var(--wp--preset--color--base);
	box-shadow: 1px 0 0 var(--wp--preset--color--line);
	z-index: 1;
}

[class*="is-style-table-scroll"] thead th:first-child {
	background: var(--wp--preset--color--tint);
	z-index: 2;
}

/* スクロールナビ（table-nav.php が自動で挿入。position:stickyで常に画面内に留まる） */
.ak-tnav {
	position: sticky;
	left: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	width: fit-content;
	margin-bottom: 6px;
}

.ak-tnav-btn {
	width: 26px;
	height: 26px;
	padding: 0;
	display: grid;
	place-items: center;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50%;
	background: var(--ak-content-bg);
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ak-tnav-btn::before {
	content: "";
	width: 7px;
	height: 7px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
}

.ak-tnav-btn.is-prev::before { transform: rotate(-135deg) translate(-1px, 1px); }
.ak-tnav-btn.is-next::before { transform: rotate(45deg) translate(-1px, 1px); }

.ak-tnav-btn:disabled { opacity: 0.3; cursor: default; }

.ak-thint {
	padding: 2px 10px;
	background: var(--wp--preset--color--tint);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	font-family: var(--ak-ui-font);
	font-size: 9px;
	color: var(--wp--preset--color--muted);
	transition: opacity 0.4s ease;
	white-space: nowrap;
}

.ak-thint.is-hide { opacity: 0; }

[class*="is-style-table-scroll"] tbody tr:nth-child(even) td { background: #FCF9F9; }
[class*="is-style-table-scroll"] tbody tr:hover td { background: var(--wp--preset--color--tint); }

/* 比較表内のカテゴリ区切り行：セルに ak-cat クラスを付ける */
.wp-block-table .ak-cat {
	background: var(--wp--preset--color--primary) !important;
	color: #fff;
	font-weight: 700;
	text-align: center;
}

/* ==========================================================================
   ボタン
   ========================================================================== */

/* ボタンは標準で中央配置（管理画面・本番共通。ツールバーで左/右を選んだ場合はそちらを優先） */
.wp-block-buttons:not(.is-content-justification-left):not(.is-content-justification-right):not(.is-content-justification-space-between) {
	justify-content: center;
}

/* サイズ（ボタンの親「ボタン一覧」ブロックのスタイルで選択） */
.is-style-btn-size-s .wp-block-button__link { padding: 0.55em 1.5em; font-size: 11px; }
.is-style-btn-size-l .wp-block-button__link { padding: 1em 2.6em; font-size: 14px; }

/* デフォルト＝立体（押せる感のある下エッジ＋ふわっとした影）
   「立体（標準）」スタイル（.is-style-btn-solid）はこの既定と同一。 */
.wp-block-button__link,
.ak-jslink.is-button {
	padding: 0.8em 2.2em;
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.16), 0 8px 18px rgba(196, 102, 122, 0.2);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.wp-block-button__link:hover,
.ak-jslink.is-button:hover {
	transform: translateY(2px);
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.16), 0 4px 10px rgba(196, 102, 122, 0.16);
}

.wp-block-button__link:active,
.ak-jslink.is-button:active {
	transform: translateY(4px);
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.16), 0 2px 6px rgba(196, 102, 122, 0.12);
}

/* フラット（立体をオフ） */
.is-style-btn-flat .wp-block-button__link {
	box-shadow: none;
}

.is-style-btn-flat .wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: none;
	opacity: 0.9;
}

/* 桜グラデーション */
.is-style-btn-gradient .wp-block-button__link,
.ak-jslink.is-button.is-gradient {
	background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary-soft) 120%);
}

/* キラッと光る（自動シャイン） */
.is-style-btn-shine .wp-block-button__link,
.ak-jslink.is-button.is-shine {
	position: relative;
	overflow: hidden;
}

.is-style-btn-shine .wp-block-button__link::after,
.ak-jslink.is-button.is-shine::after {
	content: "";
	position: absolute;
	top: 0;
	left: -80%;
	width: 45%;
	height: 100%;
	background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
	transform: skewX(-25deg);
	animation: ak-shine 3s ease infinite;
}

@keyframes ak-shine {
	0%   { left: -80%; }
	55%  { left: 135%; }
	100% { left: 135%; }
}

/* 枠線 */
.is-style-btn-ghost .wp-block-button__link,
.ak-jslink.is-button.is-ghost {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border: 1.5px solid var(--wp--preset--color--primary);
	box-shadow: none;
}

.is-style-btn-ghost .wp-block-button__link:hover,
.ak-jslink.is-button.is-ghost:hover {
	transform: translateY(-1px);
	box-shadow: none;
	opacity: 0.85;
}

/* CTAカラー */
.is-style-btn-amazon .wp-block-button__link,
.ak-jslink.is-button.is-amazon  { background: var(--ak-amazon);  color: #fff; }

.is-style-btn-rakuten .wp-block-button__link,
.ak-jslink.is-button.is-rakuten { background: var(--ak-rakuten); color: #fff; }

/* ==========================================================================
   マイクロコピー（CTAボタンに添える一言）
   ========================================================================== */

/* ピル型バッジ：「初回限定1,280円」など */
.ak-micro {
	display: inline-block;
	padding: 0.2em 1.1em;
	background: var(--ak-content-bg);
	border: 1.5px solid var(--wp--preset--color--primary-soft);
	border-radius: 999px;
	font-family: var(--ak-ui-font);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--primary-dark);
}

/* 吹き出し型：ボタンの真上に置く「今だけ送料無料」など */
.ak-micro-balloon {
	position: relative;
	display: inline-block;
	margin-bottom: 0.6em;
	padding: 0.3em 1.2em;
	background: var(--wp--preset--color--primary);
	border-radius: 999px;
	font-family: var(--ak-ui-font);
	font-size: 10px;
	font-weight: 700;
	color: #fff;
}

.ak-micro-balloon::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	transform: translateX(-50%);
	border-style: solid;
	border-width: 7px 6px 0;
	border-color: var(--wp--preset--color--primary) transparent transparent;
}

/* ボタン下の安心コピー：「※いつでも解約OK」など */
.ak-micro-note {
	font-family: var(--ak-ui-font);
	font-size: 9px;
	color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   JSリンク（[jslink] ショートコード出力）
   テーブルセル内でも使えるよう inline 系で構成。
   ========================================================================== */

.ak-jslink { cursor: pointer; }

/* ボタン型 */
.ak-jslink.is-button {
	display: inline-block;
	padding: 0.8em 2.2em;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--ak-ui-font);
	font-weight: 700;
	text-align: center;
	line-height: 1.5;
	user-select: none;
	vertical-align: middle; /* 文中に置いても行が崩れない */
}

.ak-jslink.is-button.is-wide { display: block; width: 100%; }

/* テキスト型 */
.ak-jslink.is-text {
	color: var(--ak-link);
	text-decoration: underline;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
}

.ak-jslink.is-text:hover { color: var(--ak-link-hover); }

/* 画像型 */
.ak-jslink.is-image { display: inline-block; line-height: 0; }
.ak-jslink.is-image img { transition: opacity 0.2s ease; }
.ak-jslink.is-image:hover img { opacity: 0.85; }

/* テーブル内のボタン型は小さめに */
.wp-block-table .ak-jslink.is-button {
	padding: 0.5em 1.2em;
	font-size: 0.85em;
	white-space: nowrap;
	box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}

/* ==========================================================================
   アコーディオン（コアの詳細ブロック）
   ========================================================================== */

.wp-block-details {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	padding: 0;
	overflow: hidden;
	font-family: var(--ak-ui-font);
}

.wp-block-details summary {
	padding: 0.85em 2.8em 0.85em 1.25em;
	background: var(--wp--preset--color--tint);
	font-weight: 700;
	font-size: 11px;
	cursor: pointer;
	list-style: none;
	position: relative;
}

.wp-block-details summary::-webkit-details-marker { display: none; }

.wp-block-details summary::after {
	content: "";
	position: absolute;
	right: 1.25em;
	top: 50%;
	width: 0.55em;
	height: 0.55em;
	border-right: 1.5px solid var(--wp--preset--color--primary);
	border-bottom: 1.5px solid var(--wp--preset--color--primary);
	transform: translateY(-70%) rotate(45deg);
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	transform: translateY(-30%) rotate(-135deg);
}

.wp-block-details > :not(summary) { padding: 0 1.25em; }
.wp-block-details > :nth-child(2) { padding-top: 1em; }
.wp-block-details > :last-child   { padding-bottom: 1em; }

/* ==========================================================================
   Q&A（FAQ）— seo.php が FAQPage 構造化データを自動生成
   ========================================================================== */

.ak-faq .wp-block-details { margin-bottom: 0.75rem; }

.ak-faq .wp-block-details summary {
	background: var(--wp--preset--color--base);
	padding-left: 3em;
}

.ak-faq .wp-block-details summary::before {
	content: "Q";
	position: absolute;
	left: 1em;
	top: 50%;
	transform: translateY(-50%);
	width: 1.5em;
	height: 1.5em;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: 0.8em;
	font-weight: 700;
}

.ak-faq .wp-block-details > :not(summary) {
	position: relative;
	padding-left: 3em;
}

.ak-faq .wp-block-details > :nth-child(2)::before {
	content: "A";
	position: absolute;
	left: 1em;
	top: 1.1em;
	width: 1.5em;
	height: 1.5em;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--gold, #C2A050);
	color: #fff;
	font-size: 0.8em;
	font-weight: 700;
	line-height: 1;
}

/* ==========================================================================
   手順ステップ
   ========================================================================== */

.ak-steps {
	counter-reset: ak-step;
	display: grid;
	gap: 0;
}

.ak-steps .ak-step {
	position: relative;
	padding: 0 0 1.75rem 3.4rem;
	counter-increment: ak-step;
}

.ak-steps .ak-step::before {
	content: counter(ak-step);
	position: absolute;
	left: 0;
	top: 0;
	width: 2.2rem;
	height: 2.2rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--ak-ui-font);
	font-weight: 700;
	z-index: 1;
}

.ak-steps .ak-step::after {
	content: "";
	position: absolute;
	left: calc(1.1rem - 1px);
	top: 2.2rem;
	bottom: 0;
	width: 2px;
	background: var(--wp--preset--color--line);
}

.ak-steps .ak-step:last-child { padding-bottom: 0; }
.ak-steps .ak-step:last-child::after { display: none; }

.ak-steps .ak-step-title {
	font-family: var(--ak-ui-font);
	font-weight: 700;
	margin: 0.25em 0 0.5em;
	color: var(--wp--preset--color--primary-dark);
}

.ak-steps .ak-step > :last-child { margin-bottom: 0; }

/* ステップ内に置いたボックス・吹き出し・画像・表の余白を整える */
.ak-steps .ak-step > * { margin-top: 0; margin-bottom: 0.9rem; }
.ak-steps .ak-step > .ak-step-title { margin-bottom: 0.5em; }

/* ==========================================================================
   目次
   ========================================================================== */

.ak-toc {
	background: var(--wp--preset--color--base);
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 1.4em 1.75em;
	font-family: var(--ak-ui-font);
	font-size: 11px;
}

.ak-toc .ak-toc-title {
	margin: 0 0 0.8em;
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.25em;
	color: var(--wp--preset--color--primary-dark);
}

.ak-toc ol {
	margin: 0;
	padding-left: 1.4em;
}

.ak-toc ol ol {
	margin-top: 0.4em;
	font-size: 0.92em;
}

.ak-toc li { margin-bottom: 0.45em; }

.ak-toc li::marker { color: var(--wp--preset--color--primary); font-weight: 700; }

.ak-toc a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.ak-toc a:hover { color: var(--wp--preset--color--primary); }

/* 目次デザイン2：シンプルライン */
.ak-toc.ak-toc--simple {
	background: transparent;
	border: none;
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 0;
	padding: 0.4em 0 0.4em 1.5em;
}

.ak-toc.ak-toc--simple .ak-toc-title {
	text-align: left;
	letter-spacing: 0.15em;
}

/* 目次デザイン3：ナンバリング */
.ak-toc.ak-toc--number > ol {
	counter-reset: aktoc;
	list-style: none;
	padding-left: 0;
}

.ak-toc.ak-toc--number > ol > li {
	counter-increment: aktoc;
	position: relative;
	padding-left: 2.6em;
	margin-bottom: 0.7em;
}

.ak-toc.ak-toc--number > ol > li::before {
	content: counter(aktoc, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0.05em;
	font-family: var(--ak-ui-font);
	font-weight: 700;
	font-size: 1.05em;
	color: var(--wp--preset--color--primary);
	letter-spacing: 0.05em;
}

.ak-toc.ak-toc--number > ol > li::after {
	content: "";
	position: absolute;
	left: 1.9em;
	top: 0.3em;
	bottom: auto;
	height: 1em;
	width: 1px;
	background: var(--wp--preset--color--line);
}

.ak-toc.ak-toc--number ol ol {
	list-style: none;
	padding-left: 0.5em;
	margin-top: 0.5em;
}

.ak-toc.ak-toc--number ol ol li {
	padding-left: 1.2em;
	position: relative;
}

.ak-toc.ak-toc--number ol ol li::before {
	content: "−";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--primary-soft);
}

/* ==========================================================================
   評価スコアグリッド
   ========================================================================== */

.ak-score {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	overflow: hidden;
	font-family: var(--ak-ui-font);
}

.ak-score .ak-score-head {
	background: var(--wp--preset--color--tint);
	padding: 0.8em 1.25em;
	margin: 0;
	font-weight: 700;
	text-align: center;
}

.ak-score .ak-score-head strong {
	color: var(--wp--preset--color--primary);
	font-size: 1.35em;
}

.ak-score .wp-block-columns { gap: 0; margin: 0; }

.ak-score .wp-block-column {
	padding: 0.8em 1.25em;
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: 10px;
}

.ak-score .wp-block-column + .wp-block-column {
	border-left: 1px solid var(--wp--preset--color--line);
}

.ak-score .wp-block-column > p { margin: 0; }

/* ==========================================================================
   口コミ・レビュー
   ========================================================================== */

/* 読者・愛用者の口コミ */
.ak-review {
	display: grid;
	grid-template-columns: 52px 1fr;
	gap: 0.9rem;
	align-items: start;
	padding: 1.1em 1.3em;
	background: #FAF8F7;
	border: 1px solid #EEE8E6;
	border-radius: 12px;
}

.ak-review .ak-review-avatar img {
	border-radius: 50%;
	aspect-ratio: 1;
	object-fit: cover;
}

.ak-review .ak-review-body > p { margin: 0 0 0.4em; }

.ak-review .ak-review-meta {
	font-family: var(--ak-ui-font);
	font-size: 10px;
	color: var(--wp--preset--color--muted);
	margin: 0;
}

/* ==========================================================================
   関連記事カード（ブログカード）
   ========================================================================== */

.ak-related {
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 12px;
	overflow: hidden;
	font-family: var(--ak-ui-font);
}

.ak-related .ak-related-label {
	margin: 0;
	padding: 0.4em 1.1em;
	background: var(--wp--preset--color--tint);
	font-size: 10px;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}

.ak-related .ak-related-row {
	margin: 0;
	gap: 0;
}

.ak-related .ak-related-row .wp-block-image { margin: 0; }

.ak-related .ak-related-row .wp-block-column:first-child img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.ak-related .ak-related-row .wp-block-column:last-child { padding: 0.9em 1.1em; }

.ak-related .ak-related-row p { margin: 0; font-size: 11px; font-weight: 700; line-height: 1.6; }

.ak-related a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.ak-related a:hover { color: var(--wp--preset--color--primary); }

/* 監修者プロフィール行（キャプションボックス内） */
.ak-profile-row { gap: 1.25rem; }

.ak-profile-row .wp-block-image { margin: 0; }

.ak-profile-row .wp-block-column:first-child img {
	border-radius: 50%;
	aspect-ratio: 1;
	object-fit: cover;
}

/* ==========================================================================
   人気記事リスト（[akane_popular] ショートコード）
   ========================================================================== */

.ak-popular {
	counter-reset: ak-pop;
	list-style: none;
	padding: 0;
	margin: 0;
}

.ak-popular li {
	counter-increment: ak-pop;
	border-bottom: 1px dashed var(--wp--preset--color--line);
}

.ak-popular li a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.8em;
	padding: 0.7em 0.2em 0.7em 2em;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.ak-popular li a::before {
	content: counter(ak-pop);
	position: absolute;
	left: 0;
	width: 1.5em;
	height: 1.5em;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--ak-ui-font);
	font-size: 10px;
	font-weight: 700;
}

.ak-popular li:nth-child(1) a::before { background: var(--ak-rank-gold); }
.ak-popular li:nth-child(2) a::before { background: var(--ak-rank-silver); }
.ak-popular li:nth-child(3) a::before { background: var(--ak-rank-bronze); }

.ak-popular .ak-popular-thumb img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.ak-popular .ak-popular-title {
	font-family: var(--ak-ui-font);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
}

.ak-popular li a:hover .ak-popular-title { color: var(--wp--preset--color--primary); }

/* 記事下の共通コンテンツ */
.ak-after-content {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--line);
}

/* ==========================================================================
   パンくずリスト
   ========================================================================== */

.ak-breadcrumb {
	font-family: var(--ak-ui-font);
	font-size: 10px;
	color: var(--wp--preset--color--muted);
}

.ak-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ak-breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-left: 0.3em;
}

.ak-breadcrumb a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.ak-breadcrumb a:hover { color: var(--wp--preset--color--primary); }

/* ==========================================================================
   更新日バッジ（記事上部）
   time要素のdatetime属性＋構造化データのdateModifiedとあわせて
   検索エンジンが更新日を認識しやすい形で表示する。
   ========================================================================== */

.ak-updated {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.25em 0.9em;
	background: var(--wp--preset--color--tint);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	font-family: var(--ak-ui-font);
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}

.ak-updated::before {
	content: "";
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 4V1L7 6l5 5V7a6 6 0 1 1-6 6H4a8 8 0 1 0 8-9Z"/></svg>') center / contain no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 4V1L7 6l5 5V7a6 6 0 1 1-6 6H4a8 8 0 1 0 8-9Z"/></svg>') center / contain no-repeat;
}

.ak-updated::after {
	content: "更新";
}

/* ==========================================================================
   記事一覧カード
   ========================================================================== */

.ak-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ak-card:hover {
	box-shadow: 0 10px 28px rgba(196, 102, 122, 0.14);
	transform: translateY(-2px);
}

.ak-card .wp-block-post-featured-image { margin: 0; }

.ak-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9; /* CLS防止 */
	object-fit: cover;
	width: 100%;
}

.ak-card .ak-card-body { padding: 1rem 1.25rem 1.25rem; }

.ak-card .wp-block-post-title {
	font-size: 12px;
	line-height: 1.7;
	font-weight: 600;
}

.ak-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.ak-card .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); }

.ak-card .wp-block-post-date {
	font-family: var(--ak-ui-font);
	font-size: 10px;
	color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   モバイル
   ========================================================================== */

@media (max-width: 600px) {
	.ak-balloon { grid-template-columns: 56px 1fr; gap: 0.75rem; }
	.ak-balloon.is-right { grid-template-columns: 1fr 56px; }
	.ak-review { grid-template-columns: 44px 1fr; }
	.ak-score .wp-block-column + .wp-block-column { border-left: none; }
	.entry-content h2 { margin-top: 2.75rem; }
}
