/*
 * Dental World — 相談フォームの最初の画面(2026-10-06〜)。
 *
 * 数値はデザインハンドオフ(デザインハンドオフ/AIプラグイン入り口.zip の HTML)の値をそのまま使う。
 * 位置・不透明度などスクロールに合わせて変わる値は entry.js が直接書き込む。
 * 中身(HTML)は includes/class-ai-consultation-dental-world.php。
 *
 * テーマの見出し・ボタンの指定に負けないよう、すべて .dw から書き始める。
 */

.ai-deep:has(> .ai-deep__intro:not([hidden])) {
	padding: 0;
}

/*
 * トップページ(テーマの template-top.php)に埋め込んだときの枠の調整。
 * この画面を出している間は、920px幅の枠と角丸の外枠を外して画面の横幅いっぱいに出す
 * (外枠の overflow:hidden があると、街がスクロールに合わせて画面に貼り付く動きも効かない)。
 * 区画の見出し・説明文は街の中に同じ役割の見出しがあるので隠し、上下の余白も詰める。
 * 【テーマ側ではなくここに書く理由】テーマのCSSは版の番号が固定(0.1.25)で、ブラウザに古いものが
 * 残り続け、変更が届かなかった(2026-10-06)。このCSSはファイルの更新時刻つきで必ず読み直される。
 */
.ai-widget-section:has(.ai-deep__intro:not([hidden])) {
	padding-top: 0;
	padding-bottom: clamp(40px, 6vw, 70px);
}

.ai-widget-inner:has(.ai-deep__intro:not([hidden])) {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.ai-widget-inner:has(.ai-deep__intro:not([hidden])) > .sec-eyebrow,
.ai-widget-inner:has(.ai-deep__intro:not([hidden])) > .sec-heading,
.ai-widget-inner:has(.ai-deep__intro:not([hidden])) > .sec-lead {
	display: none;
}

.webapp-panel:has(.ai-deep__intro:not([hidden])) {
	overflow: visible;
	border-radius: 0;
	padding: 0;
}

.dw {
	--dw-navy: #183B5D;
	--dw-ink: #EAF6FF;
	--dw-cyan: #7FE7FF;
	/* 上下の境目の色。前後の区画の背景色に合わせて、置き場所ごとに上書きしてよい(テーマ側で指定) */
	--dw-edge-top: #F7FBFC;
	--dw-edge-bottom: #F7FBFC;
	/* 追従ヘッダー(テーマが高さを実測して --tf-header-h に入れている)とログイン中の管理バーの下に止める */
	--dw-top: calc(var(--tf-header-h, 0px) + var(--wp-admin--admin-bar--height, 0px));
	/* スマホで画面の下端に貼り付くもの(テーマの予約バー等)の高さ。テーマ側で指定する */
	--dw-bottom: 0px;

	position: relative;
	height: 250vh;
	font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
	color: var(--dw-navy);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-align: left;
}

/* テーマの「.site-content section { padding: … }」(区画ごとの上下の余白)を打ち消す */
section.dw.dw {
	margin: 0;
	padding: 0;
}

/* トップの区画の背景(白)に、上下の境目のぼかしを合わせる */
body .ai-widget-section .dw {
	--dw-edge-top: #FFFFFF;
	--dw-edge-bottom: #FFFFFF;
}

/* スマホでテーマの予約バー(画面下端・高さ58px)が出ている間は、その分だけ画面の高さを減らす */
@media (max-width: 640px) {
	body:has(.sticky-reserve) .dw {
		--dw-bottom: 58px;
	}
}

@media (max-width: 600px) {
	/* 幅600px以下では管理バーがページと一緒に流れるので足さない(テーマのヘッダーと同じ考え方) */
	.dw {
		--dw-top: var(--tf-header-h, 0px);
	}
}

.dw .dw__stage {
	position: sticky;
	top: var(--dw-top);
	height: calc(100vh - var(--dw-top));
	height: calc(100svh - var(--dw-top));
	overflow: hidden;
}

/* ===== 背景(空)・3D・霧・境目 ===== */

.dw .dw__sky {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 55% at 82% 18%, rgba(140, 100, 230, .6) 0%, rgba(124, 82, 214, 0) 70%),
		radial-gradient(55% 50% at 10% 85%, rgba(30, 170, 160, .55) 0%, rgba(20, 150, 140, 0) 70%),
		radial-gradient(45% 40% at 40% 10%, rgba(40, 110, 200, .35) 0%, rgba(40, 110, 200, 0) 70%),
		linear-gradient(160deg, #1A2E5C 0%, #142A4C 45%, #0F2A3C 100%);
}

.dw .dw__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.dw .dw__host {
	position: absolute;
	inset: 0;
}

.dw.is-pointer .dw__host {
	cursor: pointer;
}

.dw .dw__still,
.dw .dw__still img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

/* 手前の霧。スクロールの前半で上へ抜けて消える(動きは entry.js) */
.dw .dw__puffs {
	position: absolute;
	inset: -20%;
	pointer-events: none;
}

.dw .dw__puffs span {
	position: absolute;
	background: radial-gradient(closest-side, rgba(8, 20, 36, .96) 40%, rgba(8, 20, 36, 0));
}

.dw .dw__puffs span:nth-child(1) { left: -10%; top: 40%; width: 560px; height: 392px; }
.dw .dw__puffs span:nth-child(2) { left: 55%; top: 55%; width: 640px; height: 448px; }
.dw .dw__puffs span:nth-child(3) { left: 20%; top: 70%; width: 520px; height: 364px; }
.dw .dw__puffs span:nth-child(4) { left: 72%; top: 6%; width: 460px; height: 322px; }
.dw .dw__puffs span:nth-child(5) { left: 2%; top: -4%; width: 420px; height: 294px; }
/* デザインの6つ目(left:40% top:20% 480px)は街の真上に黒い丸として残って見えたので外した(2026-10-06 ユーザー指示「中央だけ削除」) */

.dw .dw__edge {
	position: absolute;
	left: 0;
	right: 0;
	height: 18vh;
	pointer-events: none;
}

.dw .dw__edge--top {
	top: 0;
	background: linear-gradient(var(--dw-edge-top), rgba(247, 251, 252, 0));
	background: linear-gradient(var(--dw-edge-top), color-mix(in srgb, var(--dw-edge-top) 0%, transparent));
}

.dw .dw__edge--bottom {
	bottom: 0;
	background: linear-gradient(rgba(247, 251, 252, 0), var(--dw-edge-bottom));
	background: linear-gradient(color-mix(in srgb, var(--dw-edge-bottom) 0%, transparent), var(--dw-edge-bottom));
}

/* 選んだエリアの周りだけを残して、外側をエリア色で薄く覆う(位置と色は entry.js) */
.dw .dw__tint {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity .9s;
}

.dw .dw__loading {
	position: absolute;
	inset: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: rgba(234, 246, 255, .75);
	pointer-events: none;
}

/* 3Dの準備中は街を隠し(背景と文字だけ)、準備ができたら街をふわっと出す(2026-10-07。動きは entry.js) */
.dw .dw__host canvas,
.dw .dw__orb-layer canvas {
	transition: opacity 1s ease;
}

.dw.is-warming .dw__host canvas,
.dw.is-warming .dw__orb-layer canvas {
	opacity: 0;
}

.dw[data-dw-state="ready"] .dw__loading,
.dw.is-warming .dw__loading,
.dw.is-fallback .dw__loading,
.dw.is-fallback .dw__puffs {
	display: none;
}

/* ===== 左上のコピーと6項目リスト(PC) ===== */

.dw .dw__copy {
	position: absolute;
	left: clamp(24px, 5vw, 72px);
	top: clamp(56px, 9vh, 120px);
	max-width: 560px;
	color: var(--dw-ink);
	pointer-events: none;
	transition: opacity .6s;
}

.dw.is-selected .dw__copy {
	opacity: 0;
}

.dw.is-selected .dw__copy * {
	pointer-events: none !important;
}

.dw .dw__label {
	margin: 0 0 min(18px, 1.8vh);
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: "Jost", sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .32em;
	line-height: 1.4;
	color: inherit;
}

.dw .dw__label span {
	width: 28px;
	height: 1px;
	background: var(--dw-cyan);
}

.dw .dw__title {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: clamp(26px, min(3.4vw, 5vh), 48px);
	line-height: 1.35;
	font-weight: 700;
	letter-spacing: .02em;
	color: inherit;
	text-align: left;
}

.dw .dw__title::before,
.dw .dw__title::after {
	content: none;
}

.dw .dw__sub {
	margin: min(18px, 1.6vh) 0 0;
	font-size: clamp(13px, 1.9vh, 16px);
	line-height: 1.8;
	font-weight: 400;
	color: inherit;
}

.dw .dw__list {
	margin: min(24px, 2.4vh) 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: min(8px, .8vh);
	width: min(300px, 100%);
	pointer-events: auto;
}

.dw .dw__list li {
	margin: 0;
	padding: 0;
}

.dw .dw__list li::before {
	content: none;
}

.dw .dw__item {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: min(6px, .6vh) 6px;
	border-radius: 999px;
	border: 1px solid rgba(127, 231, 255, .3);
	background: rgba(10, 27, 48, .72);
	color: var(--dw-ink);
	box-shadow: 0 4px 14px rgba(24, 59, 93, .08);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transform: translateX(0);
	transition: background .2s, color .2s, transform .25s, border-color .2s;
}

.dw .dw__item.is-hover,
.dw .dw__item:focus-visible {
	background: var(--dw-cyan);
	border-color: var(--dw-cyan);
	color: var(--dw-navy);
	transform: translateX(6px);
	outline: none;
}

.dw .dw__item:focus-visible {
	box-shadow: 0 0 0 3px #FFFFFF;
}

.dw .dw__no {
	width: min(30px, 3.6vh);
	height: min(30px, 3.6vh);
	flex: none;
	border-radius: 50%;
	background: var(--dw-accent);
	color: var(--dw-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Jost", sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
}

.dw .dw__name {
	flex: 1;
	font-size: clamp(13px, 1.8vh, 15px);
	font-weight: 700;
	line-height: 1.4;
}

.dw .dw__arrow {
	width: min(28px, 3.4vh);
	height: min(28px, 3.4vh);
	flex: none;
	border-radius: 50%;
	border: 1px solid rgba(127, 231, 255, .3);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 1;
}

.dw .dw__item.is-hover .dw__arrow,
.dw .dw__item:focus-visible .dw__arrow {
	border-color: var(--dw-cyan);
}

/* 「その他・まだ分からない」は6項目の下に、少し控えめな行で置く(デザインに無い追加項目のため) */
.dw .dw__list-other {
	margin-top: min(4px, .4vh);
}

.dw .dw__item--other {
	background: rgba(10, 27, 48, .5);
	border-style: dashed;
}

.dw .dw__item--other .dw__name {
	font-size: clamp(12px, 1.7vh, 14px);
}

/* ===== 街の数字ピン(PC) ===== */

.dw .dw__pins {
	position: absolute;
	inset: 0;
	z-index: 4; /* 相談室のカード(5)より下。ピンごとの重なり順はこの中だけで決まる */
	pointer-events: none;
}

.dw .dw__pin {
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0;
	transition: opacity .4s;
	will-change: transform;
}

.dw .dw__pin-btn {
	position: absolute;
	left: 0;
	bottom: 0;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--dw-navy);
	font: inherit;
	cursor: pointer;
}

.dw .dw__pin-dot {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #FFFFFF;
	box-shadow: 0 0 0 3px var(--dw-accent), 0 8px 22px rgba(24, 59, 93, .2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Jost", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	transition: width .25s, height .25s;
}

.dw .dw__pin.is-hover .dw__pin-dot {
	width: 44px;
	height: 44px;
}

/* 吹き出し。1行7文字で折り返す(デザイン指定) */
.dw .dw__pin-desc {
	display: none;
	position: absolute;
	left: calc(50% + 32px);
	top: 4px;
	width: calc(7em + 28px);
	padding: 9px 14px;
	border-radius: 12px;
	background: #FFFFFF;
	box-shadow: 0 8px 22px rgba(24, 59, 93, .18);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.6;
	text-align: left;
	word-break: break-all;
	line-break: anywhere;
}

.dw .dw__pin.is-hover .dw__pin-desc {
	display: block;
}

.dw .dw__pin-stem {
	width: 1px;
	height: 22px;
	background: rgba(24, 59, 93, .4);
}

.dw .dw__pin-foot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--dw-navy);
	margin-top: -3px;
}

/* ===== スマホ(幅768px未満) ===== */

@media (max-width: 767px) {
	.dw {
		height: auto;
	}

	.dw .dw__stage {
		position: relative;
		top: auto;
		height: calc(100vh - var(--dw-top) - var(--dw-bottom));
		height: calc(100svh - var(--dw-top) - var(--dw-bottom));
		min-height: 560px;
	}

	.dw .dw__copy {
		inset: 0;
		left: 0;
		top: 0;
		max-width: none;
		padding: 56px 24px 0;
	}

	.dw .dw__label {
		margin-bottom: 14px;
		font-size: 11px;
		letter-spacing: .3em;
	}

	.dw .dw__label span {
		display: none;
	}

	.dw .dw__title {
		font-size: 28px;
		line-height: 1.4;
	}

	.dw .dw__sub {
		margin-top: 12px;
		font-size: 14px;
	}

	/* 6ボタンを2列×3段で画面の下に(その他は最下段に横長で1つ) */
	.dw .dw__list {
		position: absolute;
		left: 16px;
		right: 16px;
		bottom: 20px;
		width: auto;
		margin: 0;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.dw .dw__item {
		min-height: 52px;
		gap: 8px;
		padding: 6px 10px 6px 6px;
		border-color: rgba(24, 59, 93, .14);
		background: rgba(10, 27, 48, .82);
		box-shadow: 0 4px 14px rgba(24, 59, 93, .1);
		font-size: 13px;
		line-height: 1.3;
	}

	.dw .dw__item.is-hover,
	.dw .dw__item:focus-visible {
		transform: none;
	}

	.dw .dw__no {
		width: 30px;
		height: 30px;
		font-size: 11px;
	}

	.dw .dw__name {
		font-size: 13px;
		line-height: 1.3;
	}

	.dw .dw__arrow {
		display: none;
	}

	.dw .dw__list-other {
		grid-column: 1 / -1;
		margin-top: 0;
	}

	.dw .dw__item--other {
		min-height: 44px;
		border-color: rgba(127, 231, 255, .35);
	}

	.dw .dw__pins {
		display: none;
	}
}

/* 動きを減らす設定の人には、色や位置の切り替えのアニメーションも付けない */
@media (prefers-reduced-motion: reduce) {
	.dw .dw__item,
	.dw .dw__pin,
	.dw .dw__pin-dot,
	.dw .dw__copy,
	.dw .dw__tint {
		transition: none;
	}
}

/* =====================================================================
 * 相談室(段階②。2026-10-06〜)
 * 選んだエリアへカメラが寄ったあと、左に相談室の説明、右に質問のカードを出す。
 * 質問のカードの中身は相談フォームの既存の画面(entry.js が [data-dw-slot] へ移す)なので、
 * ここではデザインに合わせて見た目だけを上書きする(.dw__card の中だけに効く)。
 * ===================================================================== */

.dw .dw__room {
	position: absolute;
	inset: 0;
	z-index: 5;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear .9s;
}

.dw.is-room .dw__room {
	visibility: visible;
	transition: none;
}

/* 光の玉だけを描く層。相談室のカード(z-index 5)より手前。押す操作は下へ素通りさせる */
.dw .dw__orb-layer {
	position: absolute;
	inset: 0;
	z-index: 7;
	pointer-events: none;
}

/* --- 左: 相談室の説明(暗い半透明+ぼかし) --- */
.dw .dw__info {
	position: absolute;
	left: clamp(20px, 3vw, 48px);
	top: 50%;
	width: min(400px, 32vw);
	max-height: calc(100% - 100px);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 22px 24px;
	color: var(--dw-ink);
	background: rgba(8, 22, 40, .55);
	-webkit-backdrop-filter: blur(18px) saturate(1.2);
	backdrop-filter: blur(18px) saturate(1.2);
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 24px;
	box-shadow: 0 30px 80px rgba(24, 59, 93, .12);
	opacity: 0;
	transform: translate(-40px, -50%);
	transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}

.dw .dw__chip {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	color: inherit;
}

.dw .dw__chip-dot {
	width: 10px;
	height: 10px;
	flex: none;
	border-radius: 50%;
	background: var(--dw-room-accent, var(--dw-cyan));
}

.dw .dw__info-title {
	margin: -4px 0 0;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 24px;
	line-height: 1.4;
	font-weight: 700;
	color: inherit;
}

.dw .dw__info-title::before,
.dw .dw__info-title::after {
	content: none;
}

.dw .dw__info-lead {
	margin: -4px 0 0;
	font-size: 14px;
	line-height: 1.8;
	color: inherit;
}

.dw .dw__badges {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.dw .dw__badge {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: #F7FBFC;
	color: var(--dw-navy);
	line-height: 1.4;
}

.dw .dw__badge span {
	font-size: 12px;
}

.dw .dw__badge strong {
	font-size: 20px;
	font-weight: 700;
}

.dw .dw__free {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
}

.dw .dw__flow {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px solid #EAF8FA;
}

.dw .dw__flow-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.dw .dw__flow-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
}

.dw .dw__flow-stamp {
	width: 76px;
	height: 76px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	border-radius: 50%;
	background: color-mix(in oklch, var(--dw-room-accent, var(--dw-cyan)) 30%, #FFFFFF);
	color: var(--dw-navy);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	transform: rotate(-8deg);
}

.dw .dw__flow-steps {
	display: flex;
	align-items: stretch;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dw .dw__flow-steps li {
	flex: 1;
	margin: 0;
	padding: 10px;
	border-radius: 12px;
	background: #F7FBFC;
	color: var(--dw-navy);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
}

.dw .dw__flow-steps li::before {
	content: none;
}

.dw .dw__flow-steps .dw__flow-sep {
	flex: none;
	display: flex;
	align-items: center;
	padding: 0;
	background: none;
	color: inherit;
	opacity: .5;
}

.dw .dw__notes {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 11px;
	line-height: 1.6;
}

.dw .dw__notes li {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 0;
}

.dw .dw__notes li::before {
	content: none;
}

.dw .dw__note-icon {
	width: 16px;
	height: 16px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-family: "Jost", sans-serif;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
}

.dw .dw__notes--sp {
	display: none;
}

/* --- 右: 質問のカード(白) --- */
.dw .dw__card {
	position: absolute;
	right: clamp(20px, 3vw, 48px);
	top: 50%;
	width: min(420px, 34vw);
	max-height: calc(100% - 100px);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px 24px;
	background: #FFFFFF;
	color: var(--dw-navy);
	border-radius: 24px;
	box-shadow: 0 30px 80px rgba(24, 59, 93, .2);
	opacity: 0;
	transform: translate(40px, -50%);
	transition: opacity .7s ease .1s, transform .9s cubic-bezier(.2, .8, .2, 1) .1s;
	outline: none;
}

.dw.is-room .dw__info,
.dw.is-room .dw__card {
	opacity: 1;
	transform: translate(0, -50%);
	pointer-events: auto;
}

.dw .dw__card-head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

/* エリア名=切り替えボタン */
.dw .dw__chip--switch {
	flex: none;
	white-space: nowrap;
	margin: 0;
	padding: 6px 10px 6px 8px;
	border: 1px solid #D6E6EB;
	border-radius: 999px;
	background: #FFFFFF;
	color: var(--dw-navy);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.dw .dw__chip--switch:hover,
.dw .dw__chip--switch[aria-expanded="true"] {
	border-color: var(--dw-navy);
}

.dw .dw__chip-caret {
	font-size: 10px;
	opacity: .6;
}

.dw .dw__switch-menu {
	position: absolute;
	left: 0;
	top: calc(100% + 6px);
	z-index: 3;
	width: min(260px, 100%);
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #FFFFFF;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(24, 59, 93, .22);
}

.dw .dw__switch-menu li {
	margin: 0;
	padding: 0;
}

.dw .dw__switch-menu li::before {
	content: none;
}

.dw .dw__switch-title {
	padding: 4px 8px 6px !important;
	font-size: 11px;
	color: #4A6A85;
}

.dw .dw__switch-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 6px 8px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--dw-navy);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.dw .dw__switch-item:hover,
.dw .dw__switch-item:focus-visible {
	background: #F7FBFC;
	outline: none;
}

.dw .dw__switch-item.is-current {
	display: none;
}

.dw .dw__switch-item .dw__no {
	width: 26px;
	height: 26px;
	font-size: 11px;
}

.dw .dw__back {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
	padding: 7px 14px;
	border: 0;
	border-radius: 999px;
	background: #F7FBFC;
	color: var(--dw-navy);
	font: inherit;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
}

.dw .dw__back:hover,
.dw .dw__back:focus-visible {
	background: #EAF8FA;
}

/* --- カードの中の既存の画面(質問・要約・スケール・読み込み中)をデザインに合わせる --- */
.dw .dw__slot {
	display: flex;
	flex-direction: column;
	gap: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__panel {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	max-width: none;
}

.dw .dw__slot .ai-deep__progress {
	margin: 0 0 14px;
}

.dw .dw__slot .ai-deep__progress-bar {
	height: 4px;
	background: #EAF8FA;
}

.dw .dw__slot .ai-deep__progress-bar > span {
	background: var(--dw-room-accent, var(--dw-cyan));
}

/* 「質問 N」+ 丸いアイコン(エリア色)+ 吹き出し */
.dw .dw__slot .ai-deep__panel[data-dw-qno]:not([data-view="loading"]):not([data-view="summary"])::before {
	content: attr(data-dw-qno);
	display: block;
	margin: 0 0 6px 42px;
	font-size: 11px;
	line-height: 1.4;
	color: #4A6A85;
}

.dw .dw__slot .ai-deep__question {
	position: relative;
	margin: 0 0 4px 42px;
	padding: 12px 14px;
	border-radius: 4px 16px 16px 16px;
	background: #F7FBFC;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__question::before {
	content: "";
	position: absolute;
	left: -42px;
	top: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--dw-room-accent, var(--dw-cyan));
}

.dw .dw__slot .ai-deep__sub,
.dw .dw__slot .ai-deep__multi-hint,
.dw .dw__slot .ai-deep__deep-intro {
	margin-left: 42px;
}

.dw .dw__slot .ai-deep__sub {
	margin-top: 6px;
	margin-bottom: 0;
	font-size: 13px;
}

.dw .dw__slot .ai-deep__multi-hint {
	margin-top: 8px;
	margin-bottom: 0;
	background: #EAF8FA;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__deep-intro {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 13px;
	background: #EAF8FA;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__options {
	gap: 8px;
	margin-top: 16px;
}

.dw .dw__slot .ai-deep__option {
	min-height: 48px;
	padding: 10px 44px 10px 18px;
	border: 1px solid #D6E6EB;
	border-radius: 14px;
	background: #FFFFFF;
	color: var(--dw-navy);
	font-size: 15px;
	line-height: 1.5;
	box-shadow: none;
}

.dw .dw__slot .ai-deep__option:hover {
	border-color: var(--dw-navy);
	background: #F7FBFC;
	box-shadow: none;
}

.dw .dw__slot .ai-deep__option::after {
	border-color: var(--dw-navy);
}

/* 選んだ選択肢はネイビーに反転(デザインどおり) */
.dw .dw__slot .ai-deep__option.is-selected,
.dw .dw__slot .ai-deep__option[aria-pressed="true"] {
	background: var(--dw-navy);
	border-color: var(--dw-navy);
	color: #FFFFFF;
}

.dw .dw__slot .ai-deep__option--multi::after {
	border-color: #D6E6EB;
	background-color: #FFFFFF;
}

.dw .dw__slot .ai-deep__option--multi.is-selected::after {
	border-color: #FFFFFF;
	background-color: var(--dw-room-accent, var(--dw-cyan));
}

.dw .dw__slot .ai-deep__option-group-label {
	margin-top: 12px;
	font-size: 12px;
	color: #4A6A85;
}

.dw .dw__slot .ai-deep__free {
	margin-top: 14px;
	padding-top: 14px;
	border-top-color: #EAF8FA;
}

.dw .dw__slot .ai-deep__label {
	font-size: 13px;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__textarea {
	border: 1px solid #D6E6EB;
	border-radius: 16px;
	background: #FFFFFF;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__btn {
	min-height: 46px;
	padding: 10px 24px;
	font-size: 14px;
}

.dw .dw__slot .ai-deep__btn--primary {
	background: var(--dw-navy);
}

.dw .dw__slot .ai-deep__btn--primary:hover {
	background: #2B5A85;
	box-shadow: none;
}

.dw .dw__slot [data-multi-submit] {
	width: 100%;
}

.dw .dw__slot .ai-deep__summary-head {
	margin-bottom: 10px;
	font-size: 13px;
}

.dw .dw__slot .ai-deep__summary {
	padding: 14px 16px;
	border-left-color: var(--dw-room-accent, var(--dw-cyan));
	background: #F7FBFC;
	color: var(--dw-navy);
	font-size: 14px;
}

.dw .dw__slot .ai-deep__summary-confirm-question {
	font-size: 15px;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__scale-buttons {
	grid-template-columns: repeat(6, 1fr);
}

.dw .dw__slot .ai-deep__scale-btn {
	min-height: 44px;
	border-color: #D6E6EB;
	border-radius: 12px;
	background: #FFFFFF;
	color: var(--dw-navy);
}

.dw .dw__slot .ai-deep__scale-btn:hover {
	background: var(--dw-navy);
	border-color: var(--dw-navy);
	color: #FFFFFF;
}

.dw .dw__slot .ai-deep__panel--loading {
	padding: 28px 0;
	text-align: center;
}

.dw .dw__slot .ai-deep__spinner {
	border-color: #EAF8FA;
	border-top-color: var(--dw-room-accent, var(--dw-cyan));
}

.dw .dw__slot .ai-deep__alert {
	margin: 0 0 14px;
	font-size: 14px;
}

/* 「はじめから相談し直す」はカード上の「← 街に戻る」と同じなので、カードの中では出さない */
.dw .dw__slot .ai-deep__nav [data-restart] {
	display: none !important;
}

.dw .dw__slot .ai-deep__nav {
	margin-top: 12px;
}

.dw .dw__slot .ai-deep__back {
	min-height: 40px;
	margin: 0;
	font-size: 13px;
	color: #4A6A85;
}

.dw .dw__slot .ai-deep__back:hover {
	background: #F7FBFC;
	color: var(--dw-navy);
}

/* --- スマホ: 上部約100pxは街と光の玉、その下を白い面にした1列 --- */
@media (max-width: 767px) {
	.dw .dw__room {
		display: flex;
		flex-direction: column;
		gap: 12px;
		overflow-y: auto;
			padding: 150px 16px 20px;
		background: linear-gradient(180deg, rgba(4, 19, 34, 0) 0, rgba(4, 19, 34, 0) 104px, #F7FBFC 146px, #FFFFFF 40%);
		opacity: 0;
		transition: opacity .6s, visibility 0s linear .6s;
	}

	.dw.is-room .dw__room {
		opacity: 1;
		pointer-events: auto;
		transition: opacity .6s;
	}

	/* カードの枠は外し、見出し行 → 説明 → 質問 → 注意書き の順に並べる */
	.dw .dw__card {
		display: contents;
	}

	.dw .dw__card-head {
		order: 1;
	}

	.dw .dw__info {
		order: 2;
	}

	.dw .dw__slot {
		order: 3;
	}

	.dw .dw__notes--sp {
		order: 4;
		display: flex;
		gap: 2px;
		font-size: 10px;
		line-height: 1.5;
	}

	.dw .dw__info,
	.dw.is-room .dw__info {
		position: static;
		width: auto;
		max-height: none;
		overflow: visible;
		gap: 6px;
		padding: 12px 14px;
		color: var(--dw-navy);
		background: rgba(255, 255, 255, .85);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		border: 0;
		border-radius: 14px;
		box-shadow: none;
		opacity: 1;
		transform: none;
		transition: none;
	}

	.dw .dw__info > .dw__chip,
	.dw .dw__info .dw__notes,
	.dw .dw__flow-stamp {
		display: none;
	}

	.dw .dw__info-title {
		margin: 0;
		font-size: 17px;
	}

	.dw .dw__info-lead {
		margin: 0;
		font-size: 12px;
		line-height: 1.65;
	}

	.dw .dw__badges {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 12px;
	}

	.dw .dw__badge {
		flex-direction: row;
		align-items: baseline;
		gap: 4px;
		padding: 0;
		background: none;
		font-size: 11px;
		white-space: nowrap;
	}

	.dw .dw__badge span {
		font-size: 11px;
	}

	.dw .dw__badge strong {
		font-size: 13px;
	}

	.dw .dw__free {
		font-size: 10px;
		line-height: 1.5;
	}

	.dw .dw__flow {
		flex-direction: row;
		align-items: center;
		gap: 4px;
		padding-top: 6px;
	}

	.dw .dw__flow-title {
		font-size: 10px;
		white-space: nowrap;
	}

	.dw .dw__flow-steps {
		flex: 1;
		align-items: center;
		gap: 4px;
	}

	.dw .dw__flow-steps li {
		padding: 0;
		background: none;
		font-size: 10px;
		line-height: 1.4;
	}

	.dw .dw__card-head .dw__chip {
		font-size: 12px;
	}

	.dw .dw__card-head .dw__chip-dot {
		width: 8px;
		height: 8px;
	}

	.dw .dw__back {
		padding: 6px 10px;
		background: #FFFFFF;
		font-size: 11px;
	}

	.dw .dw__slot .ai-deep__panel[data-dw-qno]:not([data-view="loading"]):not([data-view="summary"])::before {
		margin-left: 34px;
	}

	.dw .dw__slot .ai-deep__question {
		margin-left: 34px;
		padding: 10px 12px;
		border-radius: 4px 14px 14px 14px;
		font-size: 15px;
		line-height: 1.55;
	}

	.dw .dw__slot .ai-deep__question::before {
		left: -34px;
		width: 26px;
		height: 26px;
	}

	.dw .dw__slot .ai-deep__sub,
	.dw .dw__slot .ai-deep__multi-hint,
	.dw .dw__slot .ai-deep__deep-intro {
		margin-left: 34px;
	}

	.dw .dw__slot .ai-deep__options {
		gap: 6px;
	}

	.dw .dw__slot .ai-deep__option {
		min-height: 44px;
		border-radius: 12px;
		padding: 8px 40px 8px 16px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dw .dw__info,
	.dw .dw__card,
	.dw .dw__room {
		transition: none;
	}
}

/* =====================================================================
 * ご案内(LP)を作っている間(段階③。2026-10-06〜。A案)
 * 質問カードを画面の大部分を使う大きなパネルに広げ、街を暗くぼかす。
 * 光の玉はパネル上部の真ん中で「考え中」の動き(entry.js / world.js)。
 * 中身は相談フォームの既存の待機画面(進み具合のバー・院内写真・コラボ動画)のまま。
 * 写真の拡大表示(position: fixed)が画面全体に出るよう、パネルには transform を付けない。
 * ===================================================================== */

.dw .dw__room::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(8, 22, 40, .5);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity .6s;
	pointer-events: none;
}

.dw.is-waiting .dw__room::before {
	opacity: 1;
}

.dw.is-waiting .dw__info {
	opacity: 0;
	pointer-events: none;
}

.dw.is-waiting .dw__card {
	top: 24px;
	bottom: 24px;
	left: max(16px, calc((100% - 1080px) / 2));
	right: max(16px, calc((100% - 1080px) / 2));
	width: auto;
	max-height: none;
	padding: 140px clamp(20px, 4vw, 56px) 32px;
	transform: none;
	transition: opacity .5s ease;
}

.dw.is-waiting .dw__card-head,
.dw.is-waiting .dw__slot .ai-deep__progress,
.dw.is-waiting .dw__slot .ai-deep__nav,
.dw.is-waiting .dw__pins {
	display: none;
}

.dw.is-waiting .dw__slot .ai-deep__panel--loading {
	padding: 0;
}

.dw.is-waiting .dw__slot .ai-deep__waiting-extra {
	max-width: 880px;
}

.dw.is-waiting .dw__slot .ai-deep__loading-text {
	color: var(--dw-navy);
	font-size: 15px;
}

@media (max-width: 767px) {
	/* スマホは相談室の白い面のまま。説明・見出し行・注意書きを隠し、待機画面だけにする */
	.dw .dw__room::before {
		display: none;
	}

	.dw.is-waiting .dw__info,
	.dw.is-waiting .dw__card-head,
	.dw.is-waiting .dw__notes--sp {
		display: none;
	}
}

/* =====================================================================
 * 「AIが話している」感じ(2026-10-06 ユーザー指示)
 * 質問の文は1文字ずつ出し(entry.js の typeQuestion)、出し終わってから選択肢を出す。
 * 次の質問を待つ間は、くるくる回る印の代わりに「…」(3つの点が弾む)。
 * ===================================================================== */

.dw .dw__slot .ai-deep__question .dw__ch {
	opacity: 0;
	animation: dw-ch .08s linear forwards;
}

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

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

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

/* 「…」: 真ん中の点が本体、左右の点は ::before / ::after */
.dw .dw__slot .ai-deep__spinner {
	position: relative;
	width: 9px;
	height: 9px;
	margin: 8px auto 16px;
	border: 0;
	border-radius: 50%;
	background: var(--dw-room-accent, var(--dw-cyan));
	animation: dw-dot 1s ease-in-out infinite .15s;
}

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

.dw .dw__slot .ai-deep__spinner::before {
	left: -16px;
}

.dw .dw__slot .ai-deep__spinner::after {
	left: 16px;
	animation-delay: .3s;
}

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

@media (prefers-reduced-motion: reduce) {
	.dw .dw__slot .ai-deep__spinner,
	.dw .dw__slot .ai-deep__spinner::before,
	.dw .dw__slot .ai-deep__spinner::after {
		animation: none;
		opacity: .7;
	}
}

/* =====================================================================
 * スマホ: 相談室を開いたら、区画の高さを中身に合わせて伸ばす(2026-10-06 ユーザー指示)
 * 以前は画面1つ分の高さに固定し、質問や待機画面は相談室の中でスクロールしていた。
 * 3Dの街・光の玉・空は画面1つ分の高さのまま上に置き(引き伸ばさない)、その下へ白い面が続く。
 * ===================================================================== */
@media (max-width: 767px) {
	.dw.is-room .dw__stage {
		height: auto;
		min-height: max(560px, calc(100svh - var(--dw-top) - var(--dw-bottom)));
	}

	.dw.is-room .dw__room {
		position: relative;
		inset: auto;
		overflow: visible;
		min-height: inherit;
	}

	.dw.is-room .dw__sky,
	.dw.is-room .dw__host,
	.dw.is-room .dw__orb-layer,
	.dw.is-room .dw__still {
		bottom: auto;
		height: max(560px, calc(100svh - var(--dw-top) - var(--dw-bottom)));
	}
}

@media (max-width: 767px) {
	/* 2問目からは相談室の説明をたたむ(質問を光の玉のすぐ下に出すため。entry.js が is-later-q を付ける) */
	.dw.is-later-q .dw__info {
		display: none;
	}
}
