/*
 * 相談窓口(2026-10-10〜。includes/class-ai-consultation-window.php)。
 *
 * 色・枠線・角の丸み・背景・文字の大きさは、窓口ごとの設定が外枠(.aiw)のCSSの変数で入る
 * (--aiw-main / --aiw-button / --aiw-button-text / --aiw-text / --aiw-border / --aiw-border-w /
 *  --aiw-radius / --aiw-bg / --aiw-bg-image / --aiw-fs / --aiw-font)。
 *
 * 貼ったページのデザインと混ざらないように:
 * - ここの指定はすべて .aiw の中だけに効く(ページ側へは漏れない)。
 * - ページ側の見出し・ボタン・リンクの指定が入り込まないよう、窓口の部品は余白・文字・枠を自分で決め直す
 *   (.aiw .aiw-xxx の2段の指定で、テーマの body.xxx :where(...) などより強くしてある)。
 * - ご案内(LP)は今と同じデザインにするため、窓口の色の変数を .ai-deep__lp で元の値に戻す。
 */

/* ---------------------------------------------------------------------
 * 色のまとめ(2026-10-10)。色そのものは管理画面「相談窓口」のカラーで変える(8色)。
 * ここで書いている初期値は、設定が無いときのためだけのもの(入口イメージの色)。
 *   --aiw-main / --aiw-sub / --aiw-accent : グラデーション(スタートボタン・題名の「AI」)の始まり・真ん中・終わり
 *                                           main は飾りの線・進み具合のバー、accent(を少し濃くした色)は「1分」などの強調文字にも使う
 *   --aiw-text   : 文字  --aiw-muted: 薄い文字(文字の色から作る)
 *   --aiw-bg     : 入口の背景  --aiw-border: 枠線・飾りの円
 *   --aiw-button / --aiw-button-text : 相談中の画面の選んだ選択肢・次へのボタン
 * --------------------------------------------------------------------- */
.aiw {
	--aiw-main: #43c9f5;
	--aiw-sub: #8c78ff;
	--aiw-accent: #f57ccf;
	--aiw-text: #183f73;
	--aiw-bg: #f6fbff;
	--aiw-border: #b7dcfb;
	--aiw-button: #183f73;
	--aiw-button-text: #fff;
	--aiw-muted: color-mix(in srgb, var(--aiw-text) 62%, #fff);
	--aiw-gradient: linear-gradient(105deg, var(--aiw-main), var(--aiw-sub) 55%, var(--aiw-accent));
	--aiw-glow: color-mix(in srgb, var(--aiw-main) 30%, transparent);
	--aiw-font-resolved: var(--aiw-font, "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, sans-serif);
	--aiw-main-soft: color-mix(in srgb, var(--aiw-main) 10%, #fff);
	--aiw-main-pale: color-mix(in srgb, var(--aiw-main) 4%, #fff);
	display: block;
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	text-align: left;
}

.aiw *,
.aiw *::before,
.aiw *::after {
	box-sizing: border-box;
}

/* ===== 相談フォームの外枠(.ai-deep)を窓口の色にする(LPは下で元に戻す) ===== */

.aiw .ai-deep {
	--ai-accent: var(--aiw-main);
	--ai-band: var(--aiw-main-soft);
	--ai-band-deep: color-mix(in srgb, var(--aiw-main) 14%, #fff);
	--ai-page: var(--aiw-main-pale);
	--ai-primary: var(--aiw-button);
	--ai-primary-dark: color-mix(in srgb, var(--aiw-button) 82%, #000);
	--ai-navy: var(--aiw-text);
	--ai-text: var(--aiw-text);
	--ai-text-muted: color-mix(in srgb, var(--aiw-text) 78%, #fff);
	--ai-border: var(--aiw-border);
	font-family: var(--aiw-font-resolved);
	font-size: calc(16px * var(--aiw-fs, 1));
	color: var(--aiw-text);
	padding: 56px 0;
	max-width: none;
	scroll-margin-top: 80px;
}

.aiw .ai-deep__question { font-size: calc(1.2rem * var(--aiw-fs, 1)); }
.aiw .ai-deep__sub { font-size: calc(.92rem * var(--aiw-fs, 1)); }
.aiw .ai-deep__option,
.aiw .ai-deep__btn,
.aiw .ai-deep__textarea,
.aiw .ai-deep__summary,
.aiw .ai-deep__loading-text { font-size: calc(1rem * var(--aiw-fs, 1)); font-family: inherit; }

.aiw .ai-deep__btn--primary,
.aiw .ai-deep__btn--primary:hover {
	color: var(--aiw-button-text);
}

/* ご案内(LP)は今と同じデザインのまま。窓口の色・文字の大きさを元の値に戻す。 */
.aiw .ai-deep__lp {
	--ai-accent: #3396fd;
	--ai-band: #ebf5fd;
	--ai-band-deep: #e3f1fa;
	--ai-page: #f5fafe;
	--ai-primary: #0273e9;
	--ai-primary-dark: #0161c6;
	--ai-navy: #1b3554;
	--ai-text: #33404f;
	--ai-text-muted: #5c6a7c;
	--ai-border: #dde5ee;
	font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #33404f;
}

/* ご案内(LP)の一番外側の枠(2026-10-10 ユーザー指示「どこからどこまでがLPか分かりにくい」)。
   テーマの塗りのボタン(button-depth.css)と同じ考え方の「ほんの少し立体感」: 上端の細い白いハイライト+薄い線+やわらかい影。
   左右の余白は各LPのCSSのまま(PC 20px・スマホ 8px)。角を丸めるので中身は枠の形で切り取る
   (overflow: clip は追従する部品の動きを妨げない)。窓口の中だけ。トップページのLPは横幅いっぱいのまま。 */
.aiw .ai-deep__lp > .ai-lp {
	overflow: clip;
	border: 4px ridge #d3dde7; /* 2026-10-10 ユーザー指示「ボーダーのridgeに」 */
	border-radius: 24px;
	box-shadow:
		0 2px 6px rgba(27, 53, 84, .06),
		0 18px 48px rgba(27, 53, 84, .12);
}

@media (max-width: 767px) {
	.aiw .ai-deep__lp > .ai-lp {
		border-radius: 16px;
	}
}

/* ===== 入口(2026-10-10 ユーザー提供の入口イメージ ai-consultation-entrance.html を移植) ===== */

.aiw .aiw-card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	/* 左右の余白はご案内(LP)と同じ(PC 20px・767px以下 8px。各LPのCSSの .ai-lp と同じ値) */
	width: calc(100% - 40px);
	max-width: 1100px;
	margin: 0 auto;
	padding: 64px 24px 50px;
	border: var(--aiw-border-w, 0) solid var(--aiw-border);
	border-radius: var(--aiw-radius, 32px);
	background:
		radial-gradient(ellipse at 50% 40%, #fff 0 15%, transparent 55%),
		linear-gradient(145deg, var(--aiw-bg), #fff 54%, color-mix(in srgb, var(--aiw-main) 12%, #fff));
	box-shadow: 0 24px 70px color-mix(in srgb, var(--aiw-text) 8%, transparent);
	color: var(--aiw-text);
	text-align: center;
}

/* 背景の大きな白い円と、右下の淡い円(白い円は2026-10-10 ユーザー指示で、題名の後ろに来るよう下げた) */
.aiw .aiw-card::before,
.aiw .aiw-card::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
	border: 1px solid color-mix(in srgb, var(--aiw-main) 23%, transparent);
	border-radius: 50%;
}

.aiw .aiw-card::before {
	width: 780px;
	height: 780px;
	top: -470px; /* 円の大きさ・位置は ai-consultation-window-wave.css(動く波)で上書きされる */
	left: 50%;
	transform: translateX(-50%);
	box-shadow: 0 0 80px var(--aiw-glow), inset 0 0 50px rgba(255, 255, 255, .8);
}

/* .aiw-card::after は、動く波(ai-consultation-window-wave.css)が波を描くのに使う。右手前の淡い円は下の .aiw-foot::after。 */

/* 薄い模様: メインの色の小さな点を重ねる */
.aiw.aiw--bg-pattern .aiw-card {
	background:
		radial-gradient(color-mix(in srgb, var(--aiw-main) 18%, transparent) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
		radial-gradient(ellipse at 50% 40%, #fff 0 15%, transparent 55%),
		linear-gradient(145deg, var(--aiw-bg), #fff 54%, color-mix(in srgb, var(--aiw-main) 12%, #fff));
}

/* 画像: 文字が読めるよう、画像の上に白い面を薄く敷く */
.aiw.aiw--bg-image .aiw-card {
	background: linear-gradient(rgba(255, 255, 255, .84), rgba(255, 255, 255, .84)), var(--aiw-bg-image, none) center / cover;
}

.aiw.aiw--bg-transparent .aiw-card {
	background: transparent;
	box-shadow: none;
}

/* ---------------------------------------------------------------------
 * 右手前の淡い円を元の作りに戻す(2026-10-10 ユーザー指示「右手前にあった円は元の色味に戻して」)。
 * 動く波のファイルは、この円をカードの背景(中心から外へ薄くなる円)に作り替えている。元の作り(円の左上が色づき、外へ薄くなる・細い縁取り)は
 * 注意書きの欄(.aiw-foot。いつもある)の ::after で描き、カードの背景も元に戻す。
 * 波のファイルは原本のまま残すため、こちらは .aiw-card を2つ重ねて指定を強くし、波のファイルより後から効くようにしている。
 * --------------------------------------------------------------------- */
.aiw .aiw-card.aiw-card {
	background:
		radial-gradient(ellipse at 50% 40%, #fff 0 15%, transparent 55%),
		linear-gradient(145deg, var(--aiw-bg), #fff 54%, color-mix(in srgb, var(--aiw-main) 12%, #fff));
}

.aiw.aiw--bg-pattern .aiw-card.aiw-card {
	background:
		radial-gradient(color-mix(in srgb, var(--aiw-main) 18%, transparent) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
		radial-gradient(ellipse at 50% 40%, #fff 0 15%, transparent 55%),
		linear-gradient(145deg, var(--aiw-bg), #fff 54%, color-mix(in srgb, var(--aiw-main) 12%, #fff));
}

.aiw.aiw--bg-image .aiw-card.aiw-card {
	background: linear-gradient(rgba(255, 255, 255, .84), rgba(255, 255, 255, .84)), var(--aiw-bg-image, none) center / cover;
}

.aiw.aiw--bg-transparent .aiw-card.aiw-card {
	background: transparent;
}

.aiw .aiw-card > .aiw-foot::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 600px;
	height: 600px;
	bottom: -400px;
	right: -160px;
	border: 1px solid color-mix(in srgb, var(--aiw-main) 23%, transparent);
	border-radius: 50%;
	background: radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--aiw-main) 22%, #fff), transparent 65%);
	pointer-events: none;
}

.aiw .aiw-entry,
.aiw .aiw-others {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.aiw [hidden] {
	display: none !important;
}

.aiw .aiw-catch,
.aiw .aiw-title,
.aiw .aiw-note,
.aiw .aiw-guide,
.aiw .aiw-free,
.aiw .aiw-others__heading,
.aiw .aiw-others__lead,
.aiw .aiw-notes,
.aiw .aiw-notes li {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--aiw-font-resolved);
	text-transform: none;
	list-style: none;
}

/* 「1分であなた専用のサイトを作ります」 */
.aiw .aiw-catch {
	margin: 0 0 14px;
	font-size: calc(clamp(15px, 2.1vw, 21px) * var(--aiw-fs, 1));
	font-weight: 750;
	line-height: 1.7;
	letter-spacing: .08em;
	color: var(--aiw-text);
}

.aiw .aiw-catch strong {
	font-weight: 800;
	/* 「おわり」の色を少し濃くした色(2026-10-10 ユーザー提案「一分のところを終わりのカラーに」)。
	   以前は「まんなか」の色で、読めるよう濃くした「まんなか」がグラデーションの中で浮いていた。 */
	color: color-mix(in srgb, var(--aiw-accent) 80%, #000);
}

/* 題名(「AI」はグラデーションの文字) */
.aiw .aiw-title-wrap {
	position: relative;
}

.aiw .aiw-title {
	position: relative;
	margin: 0 0 30px;
	font-size: calc(clamp(30px, 4.4vw, 50px) * var(--aiw-fs, 1));
	font-weight: 850;
	line-height: 1.18;
	letter-spacing: .035em;
	color: var(--aiw-text);
	text-wrap: balance;
}

.aiw .aiw-gradient {
	background: var(--aiw-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.aiw .aiw-title::before,
.aiw .aiw-title::after {
	content: "✦";
	position: absolute;
	font-size: 20px;
	color: var(--aiw-main);
	animation: aiw-sparkle 3.2s ease-in-out infinite;
}

.aiw .aiw-title::before { left: -30px; top: 44%; }
.aiw .aiw-title::after { right: -28px; top: 8%; color: var(--aiw-accent); animation-delay: 1.4s; }

.aiw .aiw-orbit {
	position: absolute;
	z-index: -1;
	left: 50%;
	top: 53%;
	width: min(440px, 90vw);
	height: 120px;
	border: 1.5px solid color-mix(in srgb, var(--aiw-main) 60%, transparent);
	border-left-color: transparent;
	border-bottom-color: transparent;
	border-radius: 50%;
	transform: translate(-50%, -50%) rotate(-8deg);
	pointer-events: none;
}

/* ボタン(テーマのボタンの指定を受けないよう、見た目をすべて決め直す) */
.aiw .aiw-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	width: min(100%, 680px);
}

/* 「選んでもらう」の窓口(2026-10-13〜): ボタンはスタートだけなので、1つを真ん中に */
.aiw .aiw-actions.aiw-actions--single {
	grid-template-columns: minmax(0, 1fr);
	width: min(100%, 340px);
}

/* PCは題名を1行にする(改行はスマホだけ) */
.aiw .aiw-title-br {
	display: none;
}

.aiw .aiw-start,
.aiw .aiw-escape,
.aiw .aiw-other {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	font-family: var(--aiw-font-resolved);
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background-color .2s ease, border-color .2s ease;
}

.aiw .aiw-start,
.aiw .aiw-escape {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	width: 100%;
	border-radius: 999px;
	letter-spacing: .035em;
}

.aiw .aiw-start {
	min-height: 66px;
	padding: 16px 22px;
	border: 1px solid rgba(255, 255, 255, .9);
	background: var(--aiw-gradient);
	color: var(--aiw-button-text);
	font-size: calc(18px * var(--aiw-fs, 1));
	font-weight: 800;
	line-height: 1.3;
	box-shadow: 0 12px 28px color-mix(in srgb, var(--aiw-sub) 25%, transparent), inset 0 1px 1px rgba(255, 255, 255, .75);
}

.aiw .aiw-start:hover {
	background: var(--aiw-gradient);
	color: var(--aiw-button-text);
	transform: translateY(-3px);
	filter: saturate(1.08);
	box-shadow: 0 16px 32px color-mix(in srgb, var(--aiw-sub) 32%, transparent);
}

.aiw .aiw-escape {
	min-height: 66px;
	padding: 12px 22px;
	border: 1.5px solid color-mix(in srgb, var(--aiw-muted) 65%, #fff);
	background: rgba(255, 255, 255, .64);
	color: var(--aiw-muted);
	font-size: calc(15px * var(--aiw-fs, 1));
	font-weight: 800;
	line-height: 1.4;
	box-shadow: inset 0 1px 0 #fff;
}

.aiw .aiw-escape:hover {
	background: #fff;
	color: var(--aiw-text);
	transform: translateY(-3px);
}

/* ボタンを押したときの動き(2026-10-10 ユーザー提供のCSSをそのまま)。
   スタート・歯周病以外の相談をする: 押すとむにっと潰れ、離すとぽよんと弾んで戻る */
.aiw .aiw-start,
.aiw .aiw-escape {
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background-color .2s ease, border-color .2s ease, scale .55s cubic-bezier(.3, 2.2, .45, .8);
}

.aiw .aiw-start:focus:not(:focus-visible),
.aiw .aiw-escape:focus:not(:focus-visible) {
	animation: aiw-poyon .6s ease-out;
}

.aiw .aiw-start:active,
.aiw .aiw-escape:active {
	scale: 1.06 .88;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background-color .2s ease, border-color .2s ease, scale .08s ease-out;
	animation: aiw-squish .12s ease-out forwards;
}

/* マウスを乗せたときも「ぷるん」と弾む(2026-10-10 ユーザー指示「ぷるんってやつ ホバーでなる様に」)。
   スマホにはホバーが無いので、マウスのある画面だけ(押したときの動きは上のまま)。 */
@media (hover: hover) and (pointer: fine) {
	.aiw .aiw-start:hover,
	.aiw .aiw-escape:hover {
		animation: aiw-poyon .6s ease-out;
	}
}

@keyframes aiw-squish {
	to { scale: 1.06 .88; }
}

@keyframes aiw-poyon {
	0% { scale: 1.06 .88; }
	25% { scale: .94 1.08; }
	45% { scale: 1.04 .96; }
	65% { scale: .98 1.02; }
	100% { scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.aiw .aiw-start:focus:not(:focus-visible),
	.aiw .aiw-escape:focus:not(:focus-visible),
	.aiw .aiw-start:hover,
	.aiw .aiw-escape:hover,
	.aiw .aiw-start:active,
	.aiw .aiw-escape:active { animation: none; scale: none; }
}

.aiw .aiw-arrow {
	font-size: 23px;
	font-weight: 400;
	line-height: 1;
}

.aiw .aiw-start:focus-visible,
.aiw .aiw-escape:focus-visible,
.aiw .aiw-other:focus-visible,
.aiw .aiw-privacy:focus-visible {
	outline: 3px solid var(--aiw-sub);
	outline-offset: 4px;
}

.aiw .aiw-note {
	margin-top: 18px;
	font-size: calc(12.5px * var(--aiw-fs, 1));
	line-height: 1.8;
	letter-spacing: .02em;
	color: var(--aiw-muted);
}

/* 小さい字の1行目(一言・目安・無料の案内)。間を「・」の代わりに余白で区切る */
.aiw .aiw-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 2px 18px;
	margin-top: 22px;
}

.aiw .aiw-meta > .aiw-note,
.aiw .aiw-meta > .aiw-guide,
.aiw .aiw-meta > .aiw-free {
	margin: 0;
}

/* 目安(質問の数・所要時間)と無料の案内 */
.aiw .aiw-guide {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	margin-top: 10px;
	font-size: calc(13px * var(--aiw-fs, 1));
	line-height: 1.6;
	color: var(--aiw-muted);
}

.aiw .aiw-badge span {
	margin-right: 6px;
}

.aiw .aiw-badge strong {
	font-weight: 700;
	color: var(--aiw-text);
}

.aiw .aiw-free {
	margin-top: 4px;
	font-size: calc(12.5px * var(--aiw-fs, 1));
	line-height: 1.7;
	color: var(--aiw-muted);
}

/* 逃げ道の一覧の「← 戻る」 */
.aiw .aiw-escape.aiw-escape--back {
	width: auto;
	min-height: 44px;
	margin-top: 16px;
	padding: 8px 22px;
}

@keyframes aiw-sparkle {
	0%, 100% { opacity: .55; scale: .85; }
	50% { opacity: 1; scale: 1.15; }
}

/* 逃げ道を押した先: 項目の一覧 */
.aiw .aiw-others__heading {
	font-size: calc(22px * var(--aiw-fs, 1));
	font-weight: 700;
	line-height: 1.5;
	color: var(--aiw-text);
}

.aiw .aiw-others__lead {
	margin-top: 6px;
	font-size: calc(14px * var(--aiw-fs, 1));
	line-height: 1.7;
	color: var(--aiw-muted);
}

.aiw .aiw-others__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	width: 100%;
	margin-top: 20px;
}

.aiw .aiw-other {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-height: 64px;
	padding: 12px 16px;
	border: 1px solid var(--aiw-border);
	border-radius: calc(var(--aiw-radius, 20px) * .5);
	background: #fff;
	color: var(--aiw-text);
	text-align: left;
}

.aiw .aiw-other:hover {
	border-color: var(--aiw-main);
	background: var(--aiw-main-pale);
	color: var(--aiw-text);
}

.aiw .aiw-other__name {
	font-size: calc(16px * var(--aiw-fs, 1));
	font-weight: 700;
	line-height: 1.5;
}

.aiw .aiw-other__desc {
	font-size: calc(12.5px * var(--aiw-fs, 1));
	line-height: 1.6;
	color: color-mix(in srgb, var(--aiw-text) 75%, #fff);
}

/* 注意書き・相談内容の取り扱い(小さい字の2行目。区切り線なしで1行に並べる) */
.aiw .aiw-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 2px 16px;
	margin-top: 6px;
}

.aiw .aiw-notes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 14px;
}

.aiw .aiw-notes li {
	font-size: calc(12px * var(--aiw-fs, 1));
	line-height: 1.8;
	color: var(--aiw-muted);
}

.aiw .aiw-privacy,
.aiw .aiw-privacy:visited {
	display: inline-block;
	font-family: var(--aiw-font-resolved);
	font-size: calc(12px * var(--aiw-fs, 1));
	line-height: 1.8;
	color: var(--aiw-sub);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 太字を使わない(太字用のフォントが無いサイト向け)。ご案内(LP)には効かせない。 */
.aiw.aiw--no-bold .aiw-card *,
.aiw.aiw--no-bold .ai-deep > :not(.ai-deep__lp),
.aiw.aiw--no-bold .ai-deep > :not(.ai-deep__lp) * {
	font-weight: 400 !important;
}

/* =====================================================================
 * 相談中の画面: トップページの相談室(Dental World)の質問カードと同じデザイン(2026-10-10 ユーザー指示)。
 * 「← 街に戻る」は出さない。中央に大きく置き、PCでは選択肢を2列にする。
 * 相談中(質問・要約・スケール・読み込み中)は窓口のJSが .ai-deep に is-talking を付ける。
 * カードの見出し行(.aiw-head。項目名のチップ=ほかの項目への切り替え)も窓口のJSが足す。
 * 色: 相談室のネイビー → ボタンの色、エリア色 → メインの色、薄い面 → メインの色を薄めた色。
 * ===================================================================== */

.aiw .aiw-head {
	display: none;
}

.aiw .ai-deep.is-talking {
	display: flex;
	flex-direction: column;
	gap: 0;
	position: relative;
	width: min(880px, calc(100% - 40px));
	margin: 48px auto 64px;
	padding: 28px 36px 24px;
	/* 質問が変わるたびに相談フォームがカードの上端へ動かすので、追従ヘッダーの分をあける */
	scroll-margin-top: 140px;
	border: 0;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 24px 64px color-mix(in srgb, var(--aiw-text) 14%, transparent), 0 0 0 1px var(--aiw-border);
	font-size: calc(15px * var(--aiw-fs, 1));
	line-height: 1.6;
}

.aiw .ai-deep.is-talking > .aiw-head { order: 0; }
.aiw .ai-deep.is-talking > .ai-deep__progress { order: 1; }
.aiw .ai-deep.is-talking > .ai-deep__alert { order: 2; }
.aiw .ai-deep.is-talking > .ai-deep__panel { order: 3; }
.aiw .ai-deep.is-talking > .ai-deep__nav { order: 4; }

.aiw .ai-deep.is-talking .aiw-head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 16px;
}

/* 項目名のチップ=切り替えボタン */
.aiw .aiw-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	margin: 0;
	padding: 6px 12px 6px 10px;
	border: 1px solid var(--aiw-border);
	border-radius: 999px;
	background: #fff;
	color: var(--aiw-text);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
}

.aiw .aiw-chip:hover,
.aiw .aiw-chip[aria-expanded="true"] {
	border-color: var(--aiw-button);
	background: #fff;
	color: var(--aiw-text);
}

.aiw .aiw-chip__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--aiw-main);
}

.aiw .aiw-chip__caret {
	font-size: 10px;
	opacity: .6;
}

.aiw .aiw-switch {
	position: absolute;
	left: 0;
	top: calc(100% + 6px);
	z-index: 5;
	width: min(300px, 100%);
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 32px color-mix(in srgb, var(--aiw-text) 22%, transparent);
}

.aiw .aiw-switch li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aiw .aiw-switch li::before {
	content: none;
}

.aiw .aiw-switch__title {
	padding: 4px 8px 6px;
	font-size: 11px;
	color: color-mix(in srgb, var(--aiw-text) 70%, #fff);
}

.aiw .aiw-switch__item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--aiw-text);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.aiw .aiw-switch__item:hover,
.aiw .aiw-switch__item:focus-visible {
	background: var(--aiw-main-pale);
	color: var(--aiw-text);
	outline: none;
}

/* ===== 吹き出し横のAIの光の玉(本体の相談室の玉をCSSで軽く再現。2026-10-10 ユーザー指示) =====
   窓口のJSが .aiw-orb を今出ている質問の画面へ移す(質問の吹き出しの左。読み込み中は「…」の上の真ん中)。
   話している間は is-speaking(声の輪が広がる)、次の質問を待つ間は is-thinking(速く脈打ち、輪が速く回る)。 */
.aiw .aiw-orb {
	display: none;
}

.aiw .ai-deep.is-talking .ai-deep__panel {
	position: relative;
}

.aiw .ai-deep.is-talking .ai-deep__panel > .aiw-orb {
	display: block;
	position: absolute;
	left: 0;
	top: 20px;
	width: 50px;
	height: 50px;
	pointer-events: none;
}

.aiw .ai-deep.is-talking .ai-deep__panel--loading > .aiw-orb {
	position: relative;
	left: auto;
	top: auto;
	width: 64px;
	height: 64px;
	margin: 0 auto 18px;
}

.aiw .aiw-orb__core {
	position: absolute;
	inset: 16%;
	border-radius: 50%;
	background:
		radial-gradient(circle at 40% 36%, #fff 0 18%, rgba(255, 255, 255, .75) 28%, transparent 52%),
		radial-gradient(circle at 50% 50%, #e8fbff 0 30%, #7fe7ff 62%, #2f8fd0 100%);
	box-shadow: 0 0 12px rgba(127, 231, 255, .9), 0 0 30px rgba(127, 231, 255, .45), 0 0 50px rgba(140, 100, 230, .25);
	animation: aiw-orb-breathe 3.2s ease-in-out infinite;
}

.aiw .aiw-orb__ring {
	position: absolute;
	inset: 2%;
	border: 1.5px solid rgba(127, 231, 255, .55);
	border-color: rgba(127, 231, 255, .75) transparent rgba(190, 170, 255, .6) transparent;
	border-radius: 50%;
	animation: aiw-spin 7s linear infinite;
}

.aiw .aiw-orb__ring--2 {
	inset: -10%;
	border-width: 1px;
	border-color: transparent rgba(127, 231, 255, .45) transparent rgba(127, 231, 255, .3);
	animation-duration: 11s;
	animation-direction: reverse;
}

.aiw .aiw-orb__wave {
	position: absolute;
	inset: 16%;
	border-radius: 50%;
	border: 2px solid rgba(127, 231, 255, .7);
	opacity: 0;
}

.aiw .ai-deep.is-speaking .aiw-orb__wave {
	animation: aiw-wave 1.1s ease-out infinite;
}

.aiw .ai-deep.is-speaking .aiw-orb__wave--2 {
	animation-delay: .55s;
}

.aiw .ai-deep.is-thinking .aiw-orb__core {
	animation-duration: 1.1s;
}

.aiw .ai-deep.is-thinking .aiw-orb__ring {
	animation-duration: 1.8s;
}

.aiw .ai-deep.is-thinking .aiw-orb__ring--2 {
	animation-duration: 2.6s;
}

@keyframes aiw-spin {
	to { transform: rotate(360deg); }
}

@keyframes aiw-wave {
	0% { transform: scale(1); opacity: .8; }
	100% { transform: scale(1.9); opacity: 0; }
}

/* 質問の文は1文字ずつ出し(窓口のJS)、出し終わってから選択肢を出す(本体と同じ) */
.aiw .ai-deep.is-talking .ai-deep__question .aiw-ch {
	opacity: 0;
	animation: aiw-ch .08s linear forwards;
}

@keyframes aiw-ch {
	to { opacity: 1; }
}

.aiw .ai-deep.is-talking .ai-deep__options,
.aiw .ai-deep.is-talking .ai-deep__free,
.aiw .ai-deep.is-talking [data-multi-submit],
.aiw .ai-deep.is-talking .ai-deep__sub,
.aiw .ai-deep.is-talking .ai-deep__multi-hint,
.aiw .ai-deep.is-talking .ai-deep__scale {
	transition: opacity .35s ease, transform .35s ease;
}

.aiw .ai-deep.is-talking .is-typing .ai-deep__options,
.aiw .ai-deep.is-talking .is-typing .ai-deep__free,
.aiw .ai-deep.is-talking .is-typing [data-multi-submit],
.aiw .ai-deep.is-talking .is-typing .ai-deep__sub,
.aiw .ai-deep.is-talking .is-typing .ai-deep__multi-hint,
.aiw .ai-deep.is-talking .is-typing .ai-deep__scale {
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.aiw .aiw-orb__core,
	.aiw .aiw-orb__ring,
	.aiw .aiw-orb__wave,
	.aiw .ai-deep.is-talking .ai-deep__spinner,
	.aiw .ai-deep.is-talking .ai-deep__spinner::before,
	.aiw .ai-deep.is-talking .ai-deep__spinner::after {
		animation: none !important;
	}
}

/* カードの中の既存の画面(質問・要約・スケール・読み込み中) */
.aiw .ai-deep.is-talking .ai-deep__panel {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.aiw .ai-deep.is-talking .ai-deep__progress {
	max-width: none;
	margin: 0 0 18px;
}

.aiw .ai-deep.is-talking .ai-deep__progress-bar {
	height: 4px;
	background: var(--aiw-main-soft);
}

.aiw .ai-deep.is-talking .ai-deep__progress-bar > span {
	background: var(--aiw-main);
}

/* 「質問 N」+ 丸いアイコン(メインの色)+ 吹き出し */
.aiw .ai-deep.is-talking .ai-deep__panel[data-aiw-qno]:not([data-view="loading"]):not([data-view="summary"])::before {
	content: attr(data-aiw-qno);
	display: block;
	margin: 0 0 6px 64px;
	font-size: 12px;
	line-height: 1.4;
	color: color-mix(in srgb, var(--aiw-text) 70%, #fff);
}

.aiw .ai-deep.is-talking .ai-deep__question {
	position: relative;
	margin: 0 0 4px 64px;
	padding: 14px 18px;
	border-radius: 4px 18px 18px 18px;
	background: var(--aiw-main-pale);
	font-size: calc(18px * var(--aiw-fs, 1));
	font-weight: 400; /* ゴシックの太さ500は使わない(2026-10-15。サイト全体で400・700だけ) */
	line-height: 1.6;
	color: var(--aiw-text);
}

/* 次の質問を待っている間は、くるくる回る印の代わりに「…」(本体と同じ。真ん中の点が本体、左右の点は ::before / ::after)。
   上の大きな光の玉は「考え中」の動きになる。 */
.aiw .ai-deep.is-talking .ai-deep__spinner {
	position: relative;
	width: 9px;
	height: 9px;
	margin: 8px auto 16px;
	border: 0;
	border-radius: 50%;
	background: var(--aiw-main);
	animation: aiw-dot 1s ease-in-out infinite .15s;
}

.aiw .ai-deep.is-talking .ai-deep__spinner::before,
.aiw .ai-deep.is-talking .ai-deep__spinner::after {
	content: "";
	position: absolute;
	top: 0;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: inherit;
	animation: aiw-dot 1s ease-in-out infinite;
}

.aiw .ai-deep.is-talking .ai-deep__spinner::before { left: -16px; }
.aiw .ai-deep.is-talking .ai-deep__spinner::after { left: 16px; animation-delay: .3s; }

@keyframes aiw-dot {
	0%, 60%, 100% { transform: translateY(0); opacity: .45; }
	30% { transform: translateY(-6px); opacity: 1; }
}

@keyframes aiw-orb-breathe {
	0%, 100% { filter: brightness(1); transform: scale(1); }
	50% { filter: brightness(1.15); transform: scale(1.06); }
}


.aiw .ai-deep.is-talking .ai-deep__sub,
.aiw .ai-deep.is-talking .ai-deep__multi-hint,
.aiw .ai-deep.is-talking .ai-deep__deep-intro {
	margin-left: 64px;
}

.aiw .ai-deep.is-talking .ai-deep__sub {
	margin-top: 6px;
	margin-bottom: 0;
	font-size: calc(13px * var(--aiw-fs, 1));
}

.aiw .ai-deep.is-talking .ai-deep__multi-hint {
	margin-top: 8px;
	margin-bottom: 0;
	background: var(--aiw-main-soft);
	color: var(--aiw-text);
}

.aiw .ai-deep.is-talking .ai-deep__deep-intro {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: calc(13px * var(--aiw-fs, 1));
	background: var(--aiw-main-soft);
	color: var(--aiw-text);
}

.aiw .ai-deep.is-talking .ai-deep__options {
	gap: 10px;
	margin-top: 20px;
}

.aiw .ai-deep.is-talking .ai-deep__option {
	min-height: 52px;
	padding: 12px 46px 12px 20px;
	border: 1px solid var(--aiw-border);
	border-radius: 14px;
	background: #fff;
	color: var(--aiw-text);
	font-size: calc(15px * var(--aiw-fs, 1));
	line-height: 1.5;
	box-shadow: none;
}

.aiw .ai-deep.is-talking .ai-deep__option:hover {
	border-color: var(--aiw-button);
	background: var(--aiw-main-pale);
	box-shadow: none;
}

.aiw .ai-deep.is-talking .ai-deep__option::after {
	border-color: var(--aiw-button);
}

/* 選んだ選択肢はボタンの色に反転(相談室のネイビーと同じ扱い) */
.aiw .ai-deep.is-talking .ai-deep__option.is-selected,
.aiw .ai-deep.is-talking .ai-deep__option[aria-pressed="true"] {
	background: var(--aiw-button);
	border-color: var(--aiw-button);
	color: var(--aiw-button-text);
}

.aiw .ai-deep.is-talking .ai-deep__option--multi::after {
	border-color: var(--aiw-border);
	background-color: #fff;
}

.aiw .ai-deep.is-talking .ai-deep__option--multi.is-selected::after {
	border-color: #fff;
	background-color: var(--aiw-main);
}

.aiw .ai-deep.is-talking .ai-deep__option--radio.is-selected::after {
	border-color: #fff;
	background-color: var(--aiw-main);
}

.aiw .ai-deep.is-talking .ai-deep__option-group-label {
	margin-top: 12px;
	font-size: 12px;
	color: color-mix(in srgb, var(--aiw-text) 70%, #fff);
}

.aiw .ai-deep.is-talking .ai-deep__free {
	margin-top: 16px;
	padding-top: 16px;
	border-top-color: var(--aiw-main-soft);
}

.aiw .ai-deep.is-talking .ai-deep__label {
	font-size: 13px;
	color: var(--aiw-text);
}

.aiw .ai-deep.is-talking .ai-deep__textarea {
	border: 1px solid var(--aiw-border);
	border-radius: 16px;
	background: #fff;
	color: var(--aiw-text);
}

.aiw .ai-deep.is-talking .ai-deep__btn {
	min-height: 52px;
	padding: 12px 24px;
	font-size: calc(15px * var(--aiw-fs, 1));
}

.aiw .ai-deep.is-talking .ai-deep__btn--primary {
	border-radius: 999px;
	background: var(--aiw-button);
	color: var(--aiw-button-text);
}

.aiw .ai-deep.is-talking .ai-deep__btn--primary:hover {
	background: color-mix(in srgb, var(--aiw-button) 85%, #000);
	box-shadow: none;
}

.aiw .ai-deep.is-talking [data-multi-submit] {
	width: 100%;
}

.aiw .ai-deep.is-talking .ai-deep__summary-head {
	margin-bottom: 10px;
	font-size: 13px;
}

.aiw .ai-deep.is-talking .ai-deep__summary {
	padding: 14px 16px;
	border-left-color: var(--aiw-main);
	background: var(--aiw-main-pale);
	color: var(--aiw-text);
	font-size: calc(14px * var(--aiw-fs, 1));
}

.aiw .ai-deep.is-talking .ai-deep__summary-confirm-question {
	font-size: calc(15px * var(--aiw-fs, 1));
	color: var(--aiw-text);
}

.aiw .ai-deep.is-talking .ai-deep__scale-btn {
	min-height: 44px;
	border-color: var(--aiw-border);
	border-radius: 12px;
	background: #fff;
	color: var(--aiw-text);
}

.aiw .ai-deep.is-talking .ai-deep__scale-btn:hover {
	background: var(--aiw-button);
	border-color: var(--aiw-button);
	color: var(--aiw-button-text);
}

.aiw .ai-deep.is-talking .ai-deep__panel--loading {
	padding: 28px 0;
	text-align: center;
}

.aiw .ai-deep.is-talking .ai-deep__alert {
	max-width: none;
	margin: 0 0 14px;
	font-size: 14px;
}

/* 「前の質問に戻る」「はじめから相談し直す」はカードの下に小さく(「← 街に戻る」は出さない) */
.aiw .ai-deep.is-talking .ai-deep__nav {
	max-width: none;
	justify-content: space-between;
	margin: 14px 0 0;
}

.aiw .ai-deep.is-talking .ai-deep__back {
	min-height: 40px;
	margin: 0;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 400;
	color: color-mix(in srgb, var(--aiw-text) 70%, #fff);
}

.aiw .ai-deep.is-talking .ai-deep__back:hover {
	background: var(--aiw-main-pale);
	color: var(--aiw-text);
}

/* PCは選択肢を2列(見出し・自由記入・次へのボタンは横いっぱい) */
@media (min-width: 768px) {
	.aiw .ai-deep.is-talking .ai-deep__options {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: stretch;
	}

	.aiw .ai-deep.is-talking .ai-deep__options > :not(.ai-deep__option) {
		grid-column: 1 / -1;
	}

	.aiw .ai-deep.is-talking .ai-deep__options .ai-deep__option-group-label {
		margin-bottom: -2px;
	}
}

/* ===== 相談のまとめのコピー(本院以外の予約先) ===== */

.aiw .aiw-copy {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 25, 35, .45);
}

.aiw .aiw-copy__box {
	width: 100%;
	max-width: 440px;
	padding: 24px 22px 20px;
	border-radius: 16px;
	background: #fff;
	color: #33404f;
	font-family: var(--aiw-font-resolved);
	text-align: left;
	box-shadow: 0 16px 40px rgba(15, 25, 35, .25);
}

.aiw .aiw-copy__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
}

.aiw .aiw-copy__text {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.8;
}

.aiw .aiw-copy__summary {
	width: 100%;
	margin-top: 10px;
	padding: 10px;
	border: 1px solid #dde5ee;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.7;
	resize: vertical;
}

.aiw .aiw-copy__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.aiw .aiw-copy__go,
.aiw .aiw-copy__go:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 48px;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--aiw-button);
	color: var(--aiw-button-text);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.aiw .aiw-copy__close {
	min-height: 48px;
	padding: 10px 18px;
	border: 1px solid #dde5ee;
	border-radius: 999px;
	background: #fff;
	color: #33404f;
	font: inherit;
	font-size: 15px;
	cursor: pointer;
}

/* ===== スマホ ===== */

/* スマホでも動く波を見せる(2026-10-10 ユーザー指示「スマホ版は動きつけれないんですか？」)。
   波のファイルのままだと波(640px)がカードの幅より大きく、輪がほとんど画面の外に出て見えないため、スマホでは小さくして
   輪が「1分で…」と題名のまわりに来るようにする(.aiw-card を2つ重ねて、波のファイルより後から効かせる。下の @media)。 */
/* 動く波の円を40px下げる(2026-10-10 ユーザー指示「円の位置下げて」→「少し(40px)」)。波のファイルの値(波 -290px・白い円 -230px)から40px下。
   色(同日ユーザー指示「線の色→塗りに反映、線→白」): 色塗りの波(.aiw-card::after)=メイン、波線(.aiw-entry::before)=白。
   (経緯: ベースの色に寄せる → 塗り=グラデ中央色・線=メイン → 塗りをベース寄りに戻す → 今の形)
   どちらも内側は白で、円の縁に向かって色が出る(切り抜きの形・動きは ai-consultation-window-wave.css)。 */
.aiw .aiw-card.aiw-card::after,
.aiw .aiw-card.aiw-card > .aiw-entry::before {
	top: -250px;
}

.aiw .aiw-card.aiw-card::after {
	background: radial-gradient(closest-side, #fff 0 66%, color-mix(in srgb, var(--aiw-main) 55%, #fff) 78%, var(--aiw-main) 92%);
}

.aiw .aiw-card.aiw-card > .aiw-entry::before {
	background: #fff;
}

/* 重なり順(2026-10-10 ユーザー指示「線は塗りより前」): 後ろの白い円(::before)→ 色塗りの波(::after)→ 波線(.aiw-entry::before)。
   どれも文字・ボタンより後ろ(カードの中でだけ重なり順を持つ。カードは isolation: isolate)。 */
.aiw .aiw-card.aiw-card::before { z-index: -3; }
.aiw .aiw-card.aiw-card::after { z-index: -2; }
.aiw .aiw-card.aiw-card > .aiw-entry::before { z-index: -1; }

/* 円の下半分も消さずに一周すべて出す(2026-10-10 ユーザー指示「消さないでみて」)。
   原本は下側を説明文に重ならないよう縦のグラデーションで薄く消していた。その切り抜きを外し、波の絵だけで切り抜く。 */
.aiw .aiw-card.aiw-card::after {
	-webkit-mask-image: var(--aiw-wave-fill);
	mask-image: var(--aiw-wave-fill);
}

.aiw .aiw-card.aiw-card > .aiw-entry::before {
	-webkit-mask-image: var(--aiw-wave-line);
	mask-image: var(--aiw-wave-line);
}

.aiw .aiw-card.aiw-card::before {
	top: -190px;
}

@media (max-width: 600px) {
	.aiw .aiw-card.aiw-card::after,
	.aiw .aiw-card.aiw-card > .aiw-entry::before {
		width: 400px;
		height: 400px;
		top: -90px;
	}

	.aiw .aiw-card.aiw-card::before {
		width: 330px;
		height: 330px;
		top: -55px;
	}
}

/* 入口・相談中のカードの左右の余白を、ご案内(LP)と同じ 8px にする(LPのCSSと同じ 767px 以下。2026-10-10 ユーザー指示「スマホ版はLPと同じ余白を最初から」) */
@media (max-width: 767px) {
	.aiw .aiw-card,
	.aiw .ai-deep.is-talking {
		width: calc(100% - 16px);
	}
}

@media (max-width: 600px) {
	.aiw .ai-deep {
		padding: 40px 0;
	}

	.aiw .ai-deep.is-talking .ai-deep__panel > .aiw-orb {
		top: 22px;
		width: 38px;
		height: 38px;
	}

	.aiw .ai-deep.is-talking {
		margin: 28px auto 40px;
		padding: 20px 16px 16px;
		border-radius: 20px;
	}

	.aiw .ai-deep.is-talking .ai-deep__panel[data-aiw-qno]:not([data-view="loading"]):not([data-view="summary"])::before {
		margin-left: 48px;
	}

	.aiw .ai-deep.is-talking .ai-deep__question {
		margin-left: 48px;
		padding: 10px 12px;
		border-radius: 4px 14px 14px 14px;
		font-size: calc(16px * var(--aiw-fs, 1));
		line-height: 1.55;
	}

	.aiw .ai-deep.is-talking .ai-deep__sub,
	.aiw .ai-deep.is-talking .ai-deep__multi-hint,
	.aiw .ai-deep.is-talking .ai-deep__deep-intro {
		margin-left: 48px;
	}

	.aiw .ai-deep.is-talking .ai-deep__options {
		gap: 8px;
	}

	.aiw .ai-deep.is-talking .ai-deep__option {
		min-height: 48px;
		border-radius: 12px;
		padding: 10px 42px 10px 16px;
		font-size: calc(15px * var(--aiw-fs, 1));
	}

	/* 入口: 左右にご案内(LP)と同じ余白(8px。各LPのCSSの .ai-lp と同じ)を最初から付ける(2026-10-10 ユーザー指示) */
	.aiw .aiw-card {
		padding: 44px 18px 34px;
		border-radius: min(var(--aiw-radius, 32px), 20px);
	}

	.aiw .aiw-card::before {
		top: -440px;
	}

	.aiw .aiw-title-br { display: inline; }

	.aiw .aiw-actions {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.aiw .aiw-title::before { left: -14px; font-size: 15px; }
	.aiw .aiw-title::after { right: -14px; font-size: 15px; }
	.aiw .aiw-orbit { height: 90px; }

	.aiw .aiw-start {
		min-height: 60px;
		font-size: calc(17px * var(--aiw-fs, 1));
	}

	.aiw .aiw-escape {
		min-height: 52px;
		font-size: calc(14px * var(--aiw-fs, 1));
	}

	.aiw .aiw-others__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.aiw .aiw-title::before,
	.aiw .aiw-title::after {
		animation: none;
	}

	.aiw .aiw-start,
	.aiw .aiw-escape,
	.aiw .aiw-other {
		transition: none;
	}

	.aiw .aiw-start:hover,
	.aiw .aiw-escape:hover {
		transform: none;
	}
}

/* ===== 外部サイトの窓枠の中(貼り付けコード。2026-10-10〜) =====
   窓枠は中身の高さまで伸ばすので、画面に固定する表示(待ち時間の写真・動画の拡大)が窓枠全体の真ん中=画面の外に出やすい。
   窓枠の中では上に寄せて出す(外のページは、待ち時間の画面の上端までスクロールしてある)。 */
.aiw--embed .ai-deep__lightbox {
	align-items: flex-start;
	padding-top: 110px;
}

.aiw--embed .ai-deep {
	padding-top: 24px;
	padding-bottom: 24px;
}

/* 窓枠の中では、まわりの余白(20px・スマホ8px)より大きく広がる影が窓枠の端で切れ、
   うっすら灰色の四角い面に見えていた(2026-10-13 muratsu-dc.jp で指摘「若干周りと色違う」)。
   影を余白の中に収まる小ささにする(入口のカード・相談中のカード・ご案内の外枠)。本院サイトの中の窓口は今のまま。 */
.aiw.aiw--embed .aiw-card.aiw-card {
	box-shadow: 0 3px 10px color-mix(in srgb, var(--aiw-text) 7%, transparent);
}

.aiw.aiw--embed .ai-deep.is-talking {
	box-shadow: 0 3px 10px color-mix(in srgb, var(--aiw-text) 10%, transparent), 0 0 0 1px var(--aiw-border);
}

.aiw.aiw--embed .ai-deep__lp > .ai-lp {
	box-shadow: 0 2px 6px rgba(27, 53, 84, .08);
}

/* 窓枠の中では左右の余白を小さく(2026-10-13 ユーザー「横幅が若干狭い」)。外のページ側にも余白があり、
   窓口の中の余白(PC 20px・スマホ 8px)が重なって狭く見えていた。小さな影が切れない分(4px)だけ残す。 */
.aiw.aiw--embed .aiw-card.aiw-card,
.aiw.aiw--embed .ai-deep.is-talking {
	width: calc(100% - 8px);
}

.aiw.aiw--embed .ai-deep.is-talking {
	max-width: 880px;
}

.aiw.aiw--embed .ai-deep__lp > .ai-lp.ai-lp {
	margin-left: 4px;
	margin-right: 4px;
}

/* 窓口の短い文は、最後の行に1文字だけ残さない・文節で折り返す(2026-10-15。「ご案内しま／す。」「ご利用いただけま／す。」と分かれていた)。
 * テーマの全ページ共通の整え(typography.css)は AI相談の画面(.ai-deep)を対象外にしているため、ここで指定する。ほかのサイトに貼った窓口にも効く */
.aiw .aiw-note,
.aiw .aiw-free,
.aiw .aiw-guide,
.aiw .aiw-others__lead,
.aiw .aiw-notes li {
	text-wrap: pretty;
	word-break: auto-phrase;
}
