/* =========================================================
   document-answer.css
   3ページ共通CSS整理版
   - 共通部品は先頭に集約
   - 同名クラスの衝突を避けるため、ページ別に .top-page / .catalog-page / .mobile-page でスコープ化
   ========================================================= */

:root {
	--color1: #f5f5f5;
	--color2: #eff8f9;
	--color3: #22c9dc;
	--color4: #cdd8db;
	--color5: #ffd448;
	--color6: #414141;

	--color7: #bdeff5;
	--color8: #2369db;
	--color9: #00ae7e;
	--color10: #fabf00;
	--color11: #46a6de;
	--color12: #e94d24;

	--border-radius: 1rem;
	--keyword-color: #cdd8db;
	/* === レスポンシブフォントサイズ (大 → 小) === */
	--size1:  clamp(2.6rem, calc(2.5vw + 2rem), 5rem);
	--size2:  clamp(2.2rem, calc(2vw + 1.6rem), 4rem);
	--size3:  clamp(1.5rem, calc(1.5vw + 1.4rem), 3rem);
	--size4:  clamp(1.3rem, calc(1vw + 1.2rem), 2.2rem);
	--size5:  clamp(1.2rem, calc(0.8vw + 1rem), 1.8rem);
	--size6:  clamp(1rem,  calc(0.6vw + 0.9rem), 1.6rem);
	--size7:  clamp(0.9rem, calc(0.5vw + 0.8rem), 1.4rem);
	--size8:  clamp(0.8rem, calc(0.4vw + 0.7rem), 1.2rem);
	--size9:  clamp(0.7rem, calc(0.35vw + 0.6rem), 1.1rem);
	--size10: clamp(0.6rem, calc(0.3vw + 0.55rem), 1rem);
	--size11: clamp(0.55rem, calc(0.25vw + 0.5rem), 0.9rem);
	--size12: clamp(0.5rem, calc(0.25vw + 0.45rem), 0.85rem);
	--size13: clamp(0.45rem, calc(0.2vw + 0.4rem), 0.8rem);
	--size14: clamp(0.4rem, calc(0.2vw + 0.35rem), 0.7rem);
	--size15: clamp(0.35rem, calc(0.15vw + 0.3rem), 0.6rem);
}

/* ---------- Base ---------- */
* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100dvh;
	font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
	color: #fff;
	display: flex;
	flex-direction: column;
}

button,
input {
	font-family: inherit;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Search result panel / animation common ---------- */
.scope-block,
.scope-panel {
	position: relative;
	overflow: hidden;
}

.scope-block.is-hidden,
.scope-panel.is-hidden {
	display: none;
}

.scope-close-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 30;
	width: 34px;
	height: 34px;
	border: 2px solid #063f56;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	color: #063f56;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.scope-close-btn:hover {
	filter: brightness(1.08);
}

.scope-close-btn:focus-visible {
	outline: 3px solid rgba(255, 255, 255, .8);
	outline-offset: 2px;
}

.scope-reveal-mask-container {
	position: absolute;
	inset: 0;
	z-index: 20;
	pointer-events: none;
	overflow: hidden;
}

.scope-reveal-mask-container.is-finished {
	display: none;
}

.scope-reveal-mask,
.scope-hide-mask {
	position: absolute;
	width: 5%;
	height: 5%;
	background: #fff;
}

.scope-reveal-mask {
	opacity: 1;
	animation: scopeRevealDisappear .35s forwards;
}

.scope-hide-mask {
	opacity: 0;
	animation: scopeHideAppear .35s forwards;
}

@keyframes scopeRevealDisappear {
	to {
		opacity: 0;
	}
}

@keyframes scopeHideAppear {
	to {
		opacity: 1;
	}
}

/* =========================================================
   TOP page
   ========================================================= */
.top-page {
	position: relative;
	width: 100%;
	height: 100dvh;
	margin: 0 auto;
	overflow: hidden;
	background-image: url("https://www.logicalmind.jp/wp-content/themes/logicalmind/assets/img/document_answer/top_backimage.png");
	background-size: cover;
	background-position: center;
	flex: 1;
}
.top-page #header {
	display: flex;
	flex-direction: row-reverse;
}
.top-page #header .brand {
	position: absolute;
	top: 10px;
	right: 10px;
	width: fit-content;
	font-size: clamp(42px, 5.2vw, 72px);
	line-height: .9;
	font-weight: 700;
	color: rgba(95, 174, 219, .9);
	letter-spacing: .01em;
	text-shadow: 0 2px 4px rgba(255, 255, 255, .2);
}
.brand .brand_link {
	color: unset;
	text-decoration: unset;
}
.top-page #header .main_text {
	margin: 10px;
	margin-right: auto;
	width: fit-content;
	font-size: var(--size4);
	font-weight: 700;
	color: #fff;
	background-color: #0b769f;
	letter-spacing: .05em;
	line-height: 2.4rem;
	text-shadow: 0 2px 4px rgba(255, 255, 255, .2);
	opacity: 0.75;
    padding: 5px 10px;
}

.top-page .top-block {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(20px, 3vw, 56px);
	width: calc(100% - 32px);
	margin: 0 auto;
}

.top-page .scope-block {
	flex: 1 1 0;
	min-width: 0;
	max-width: 700px;
	height: auto;
	min-height: 500px;
	overflow-y: auto;
}

.top-page .bot_space {
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, .92);
}

.top-page .search-block {
	flex: 0 0 clamp(300px, 32vw, 350px);
	display: flex;
	flex-direction: column;
	gap: clamp(88px, 18vh, 100px);
	margin-left: auto;
	min-width: 0;
}

.top-page .search-area {
	position: static;
	width: 100%;
	display: flex;
	z-index: auto;
}

.top-page .search-input {
	width: 100%;
	height: 50px;
	border: 2px solid #08394a;
	border-right: 0;
	background: #fff;
	color: #111;
	font-size: 18px;
	padding: 0 12px;
	border-radius: 10px 0 0 10px;
}

.top-page .search-btn {
	width: 80px;
	height: 50px;
	border: 2px solid #08394a;
	background: #0b73a5;
	color: #fff;
	font: inherit;
	font-size: 20px;
	cursor: pointer;
	border-radius: 0 10px 10px 0;
}

.top-page .side-menu {
	position: static;
	width: 100%;
	display: grid;
	gap: clamp(10px, 1.4vh, 14px);
	z-index: auto;
}
.side-menu1 {
	display: grid !important;
}
.side-menu2 {
	display: none !important;
}

.top-page .menu-btn {
	--fold-size: 20px;
	position: relative;
	width: 100%;
	min-height: 56px;
	padding: 8px 16px;
	border: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: clamp(18px, 2vw, 28px);
	line-height: 1.1;
	cursor: pointer;
	overflow: hidden;
	isolation: isolate;
}

.top-page .menu-btn.small {
	--fold-size: 15px;
	width: 80%;
	margin-left: auto;
	min-height: 29px;
	font-size: clamp(14px, 1.35vw, 19px);
	padding: 2px 12px;
}

.top-page .menu-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(10, 38, 86, .72);
	border: 2px solid #fff;
	box-shadow: inset 0 0 18px rgba(0, 0, 0, .16);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--fold-size)), calc(100% - var(--fold-size)) 100%, 0 100%);
	pointer-events: none;
}

.top-page .menu-btn::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: calc(var(--fold-size) - 2px);
	height: calc(var(--fold-size) - 2px);
	z-index: 1;
	background: linear-gradient(135deg, transparent 0 calc(50% - 1px), rgba(255, 255, 255, .98) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px) 100%);
	border-top: 2px solid #fff;
	border-left: 2px solid #fff;
	pointer-events: none;
}

.top-page .search-btn:hover,
.top-page .menu-btn:hover {
	filter: brightness(1.16);
}

.top-page .search-input:focus,
.top-page .search-btn:focus-visible,
.top-page .menu-btn:focus-visible {
	outline: 3px solid rgba(255, 255, 255, .9);
	outline-offset: 2px;
}

.top-page .sub_text {
	width: fit-content;
	font-size: var(--size6);
	font-weight: 700;
	color: #fff;
	letter-spacing: .05em;
	line-height: 1.8rem;
	text-shadow: 0 2px 4px rgba(255, 255, 255, .2);
    padding: 5px 10px;
    z-index: 2;
}

.header_title {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	gap: 10px;
}

.header_contents {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: calc(100% - 20px);
	gap: 20px;
	margin-left: 10px;
}

/* 左端：SCOPEボタン */
.header_contents .menu-btn {
	flex: 0 0 auto;
	width: auto;
	min-width: 300px;
	margin: 0;
}

/* 右端：説明文 */
.header_contents .sub_text {
	flex: 0 0 auto;
	margin: 0;
	margin-right: 10px;
}

.top-page .sub2_text {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: fit-content;
	font-size: var(--size8);
	line-height: .9;
	font-weight: 700;
	color: #fff;
	letter-spacing: .05em;
	line-height: 1.8rem;
    padding: 5px 10px;
    z-index: 1;
}

.logicalmind_logo {
	max-width: 50%;
	display: inline;
}
/* === 文字色 === */
.blue_text { color: var(--color3); }
.yellow_text { color: var(--color5); }
.yellow_back { background: var(--color5); }

/* === トライアル === */
.traial_block {
	display: flex;
	align-items: center;
	gap: var(--size10);
	margin: var(--size10) var(--size11) var(--size10) var(--size6);
}
.traial {
	width: 100%;
	padding: var(--size10) var(--size11) var(--size10) var(--size6);
	font-size: var(--size5);
	font-weight: bold;
	text-align: center;
	paint-order: stroke;
	-webkit-text-stroke: 5px #FFF;
	text-stroke: 1px #FFF;
	color: var(--color6);
	background-color: #f5f5f5;
	border: 1px solid #96dcf8;
	text-decoration: none;
}

/* === フッター === */
footer {
	background-color: white;
	text-align: center;
	padding: var(--size12) 0;
	width: 100%;
	margin-top: auto;
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--size10);
}

.footer-logo {
}

.footer-logo img {
	height: 50px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--size10);
	padding-right: var(--size10);
}

.footer-links a {
	color: var(--color6);
	text-decoration: none;
	position: relative;
	font-size: var(--size8);
}

.footer-links a:hover {
	color: var(--color3);
}

.footer-links a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	width: 100%;
	height: var(--size11);
	background-color: var(--color3);
	transform: scaleX(0);
	transition: transform 0.2s ease;
	transform-origin: left;
}

.footer-links a:hover::after {
	transform: scaleX(1);
}

.contact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 254px;
	height: 70px;
	padding: 0 24px;
	border: 3px solid #00b9f2;
	border-radius: 13px;
	background-color: #062b70;
	color: #fff;
	font-size: 32px;
	font-weight: 400;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition:
		background-color 0.2s ease,
		filter 0.2s ease;
}

.contact-btn:hover {
	background-color: #0a3b8c;
}

.contact-btn:active {
	filter: brightness(0.9);
}

.contact-btn:focus-visible {
	outline: 3px solid rgba(0, 185, 242, 0.4);
	outline-offset: 3px;
}
@media (max-width: 860px) {
	html,
	body {
		height: auto;
		min-height: 100dvh;
	}

	.top-page {
		height: auto;
		min-height: 760px;
		max-height: none;
		overflow: visible;
		background-position: 42% center;
	}
	.top-page #header {
		display: block;
	}
	.top-page #header .brand {
		font-size: 44px;
		right: auto;
		margin: 0;
		margin-left: auto;
		padding-top: 10px;
	}
	.top-page #header .main_text {
		margin: 1px;
	}

	.top-page .top-block {
		flex-direction: column;
		width: calc(100% - 32px);
		gap: 24px;
	}

	.top-page .search-block {
		order: 1;
		flex: none;
		width: 100%;
		max-width: 420px;
		margin-left: auto;
		gap: 32px;
	}
	.side-menu1 {
		display: none !important;
	}
	.side-menu2 {
		display: grid !important;
		width: calc(100% - 32px) !important;
		margin: 10px auto;
	}
	.top-page .scope-block {
		order: 2;
		width: 100%;
		max-width: none;
		min-height: 600px;
		max-height: none;
	}

	.top-page .bot_space {
		margin: 0;
	}

	.top-page .search-area,
	.top-page .side-menu {
		width: 100%;
		max-width: none;
	}
	.top-page .sub2_text {
		position: unset;
		margin: 10px;
	}

	.header_contents {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		width: 100%;
		margin: 0 0 10px 0;
	}

	.header_contents .menu-btn {
		width: 100%;
		min-width: 0;
		margin: 0;
	}

	.header_contents .sub_text {
		width: auto;
		margin: 0;
	}
	.traial_block ,.footer-links {
		margin: 0 auto;
	}
}

/* =========================================================
   Catalog page
   ========================================================= */
.catalog-page {
	position: relative;
	width: 100%;
	height: 100dvh;
	margin: 0 auto;
	overflow: hidden;
	background-image: url("https://www.logicalmind.jp/wp-content/themes/logicalmind/assets/img/document_answer/catalog_backimage.png");
	background-size: cover;
	background-position: center;
}

.catalog-page::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 58% 36%, transparent 0 34%, rgba(0, 0, 0, .18) 82%);
	pointer-events: none;
}

.catalog-page .hero-title {
	position: relative;
	z-index: 1;
	margin: 2rem auto;
	text-align: center;
	font-size: clamp(28px, 3.1vw, 40px);
	line-height: 1.35;
	font-weight: 400;
	letter-spacing: .03em;
	text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.catalog-page .catalog-panel {
	display: flex;
	gap: 2rem;
	max-width: 1500px;
	margin: auto;
}

.catalog-page .scope-panel {
	flex: 1 1 0;
	min-width: 0;
	max-width: 700px;
	height: auto;
	min-height: 500px;
	overflow-y: auto;
}

.catalog-page .bot_space {
	width: calc(100% - 20px);
	height: 100%;
	margin: 10px;
	background: rgba(255, 255, 255, .92);
}

.catalog-page .search-panel {
	position: relative;
	z-index: 2;
	width: min(45vw, 690px);
	height: 100%;
	display: grid;
	grid-template-columns: 190px 1fr 1fr;
	gap: 10px 14px;
	align-items: start;
	margin-left: auto;
	margin-right: 20px;
}

.catalog-page .mode-row {
	grid-column: 1 / 3;
	display: flex;
	gap: 6px;
}

.catalog-page .keyword-list {
	display: grid;
	gap: 10px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.catalog-page .keyword-list.is-active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.catalog-page .keyword-btn,
.catalog-page .mode-btn,
.catalog-page .search-btn {
	min-height: 34px;
	border: 2px solid #19a9de;
	background: rgba(39, 96, 112, .68);
	color: #fff;
	font: inherit;
	font-size: clamp(15px, 1.45vw, 19px);
	line-height: 1.15;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.catalog-page .keyword-btn {
	padding: 4px 12px;
	text-align: left;
}

.catalog-page .mode-btn {
	min-width: 160px;
	padding: 4px 12px;
}

.catalog-page .mode-btn.is-active {
	background: rgba(68, 156, 187, .95);
	border-color: #fff;
}

.catalog-page .keyword-btn:hover,
.catalog-page .mode-btn:hover,
.catalog-page .search-btn:hover {
	background: rgba(68, 156, 187, .85);
}

.catalog-page .keyword-btn:focus-visible,
.catalog-page .mode-btn:focus-visible,
.catalog-page .search-btn:focus-visible,
.catalog-page .search-input:focus {
	outline: 3px solid rgba(255, 255, 255, .8);
	outline-offset: 2px;
}

.catalog-page .lead-text {
	grid-column: 1 / 4;
	margin: -2px 0 0;
	font-size: clamp(12px, 1.3vw, 16px);
	white-space: nowrap;
	text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

.catalog-page .query-row {
	grid-column: 1 / 4;
	display: flex;
	align-items: stretch;
}

.catalog-page .search-input {
	width: 100%;
	height: 58px;
	border: 2px solid #063f56;
	border-radius: 10px 0 0 10px;
	padding: 0 16px;
	font-size: 20px;
	background: #fff;
	color: #111;
}

.catalog-page .search-btn {
	width: 74px;
	min-height: 58px;
	border-color: #063f56;
	border-left: 0;
	border-radius: 0 10px 10px 0;
	background: #73c6e8;
	color: #fff;
	font-size: 22px;
}

.catalog-page .sp_show {
	display: none;
}

@media (max-width: 880px) {
	html,
	body {
		height: auto;
		min-height: 100dvh;
	}

	.catalog-page {
		height: auto;
		min-height: 760px;
		max-height: none;
		overflow: visible;
		background-position: 42% center;
	}

	.catalog-page .hero-title {
		margin-top: 0;
		padding-top: 2rem;
		font-size: clamp(24px, 6vw, 34px);
	}

	.catalog-page .catalog-panel {
		flex-direction: column-reverse;
		gap: 20px;
		margin-bottom: 10px;
	}

	.catalog-page .search-panel {
		width: calc(100% - 32px);
		max-width: none;
		margin: 0 16px;
		grid-template-columns: 1fr;
		gap: 10px;
		overflow: hidden;
	}

	.catalog-page .mode-row {
		grid-column: 1;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
		width: 100%;
	}

	.catalog-page .mode-btn {
		min-width: 0;
		width: 100%;
		font-size: 15px;
		padding: 6px 8px;
	}

	.catalog-page .keyword-list {
		grid-column: 1;
		width: 100%;
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.catalog-page .keyword-btn {
		width: 100%;
		min-width: 0;
		text-align: center;
		font-size: 14px;
		padding: 7px 8px;
	}

	.catalog-page .lead-text {
		grid-column: 1;
		white-space: normal;
		overflow-wrap: anywhere;
		line-height: 1.5;
	}

	.catalog-page .query-row {
		grid-column: 1;
		width: 100%;
		min-width: 0;
	}

	.catalog-page .search-input {
		min-width: 0;
		font-size: 16px;
		height: 48px;
	}

	.catalog-page .search-btn {
		flex: 0 0 66px;
		width: 66px;
		min-height: 48px;
		font-size: 17px;
	}

	.catalog-page .sp_show {
		display: block;
	}
}

/* =========================================================
   Kenchiku mobile page
   ========================================================= */
.mobile-page {
	position: relative;
	width: 100%;
	min-height: 100dvh;
	overflow: hidden;
	padding: 5px;
	background-image: url("https://www.logicalmind.jp/wp-content/themes/logicalmind/assets/img/document_answer/kenchiku_backimage.png");
	background-size: cover;
	background-position: center;
}

.mobile-page .mobile-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
}

.mobile-page .search-box {
	display: flex;
	width: 100%;
	min-height: 72px;
	margin-bottom: 18px;
	overflow: hidden;
}

.mobile-page .search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	border-radius: 10px 0 0 10px;
	padding: 0 14px;
	font-size: 18px;
	color: #111;
	outline: none;
}

.mobile-page .search-input::placeholder {
	color: #aaa;
}

.mobile-page .search-btn {
	flex: 0 0 80px;
	border: 0;
	border-left: 1.5px solid #0b2638;
	border-radius: 0 10px 10px 0;
	background: #17677f;
	color: #fff;
	font-size: 30px;
	font-weight: 700;
	cursor: pointer;
}

.mobile-page .guide-text {
	margin: 0 0 14px;
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 700;
	text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

.mobile-page .result-area {
	position: relative;
}

.mobile-page .keyword-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(10, auto);
	grid-auto-flow: column;
	gap: 5px;
}

.mobile-page .keyword-btn {
	width: 100%;
	min-height: 64px;
	padding: 6px;
	border: 1.5px solid #0b2638;
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .20);
}

.mobile-page .keyword-btn.pink {
	background: rgba(255, 143, 148, .96);
}

.mobile-page .keyword-btn.blue {
	background: rgba(78, 154, 216, .96);
}

.mobile-page .keyword-btn.dark {
	background: rgba(14, 75, 96, .98);
}

.mobile-page .scope-block {
	position: absolute;
	inset: 0;
	z-index: 10;
	width: 100%;
	max-width: none;
	height: 100%;
	min-height: 500px;
	overflow-y: auto;
	background: rgba(255, 255, 255, .92);
}

.mobile-page .bot_space {
	width: 100%;
	height: 100%;
	margin: 0;
	background: rgba(255, 255, 255, .92);
}
