/**
 * SMART LIFE — モバイルファースト・レスポンシブ補正
 * レイアウト崩れ・テキスト折返し・タッチターゲットをサイト全体で統一
 */

:root {
	--sla-inline-min: clamp(1.25rem, 5.5vw, 1.75rem);
	--sla-gutter: clamp(2.5rem, 11vw, 3.5rem);
	--sla-gutter-wide: clamp(2.5rem, 11vw, 3.5rem);
}

/* ---- ベース ---- */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.smartlife-branded,
body.smartlife-active-front {
	overflow-x: clip;
}

body.smartlife-branded .wp-site-blocks,
body.smartlife-active-front .wp-site-blocks {
	overflow-x: clip;
	max-width: 100%;
}

body.smartlife-branded .container,
body.smartlife-branded .sla-footer__shell,
body.smartlife-active-front .container {
	width: min(1100px, 100% - var(--sla-gutter-wide));
}

body.smartlife-branded .container--narrow {
	width: min(720px, 100% - var(--sla-gutter-wide));
}

/* 長い見出し・URLの折返し */
body.smartlife-branded h1,
body.smartlife-branded h2,
body.smartlife-branded h3,
body.smartlife-branded h4,
body.smartlife-branded .page-head__title,
body.smartlife-branded .guide-section__title-text,
body.smartlife-branded .course-section__title,
body.smartlife-branded .faq-item__q-text {
	overflow-wrap: anywhere;
	word-break: break-word;
}

@supports (text-wrap: balance) {
	body.smartlife-branded .page-head__title,
	body.smartlife-branded .guide-section__title-text,
	body.smartlife-branded .hero-fv__title {
		text-wrap: balance;
	}
}

/* ---- モバイル横余白（サイト共通） ---- */
@media (max-width: 782px) {
	body.smartlife-branded {
		--home-container: min(68rem, 100% - var(--sla-gutter-wide));
	}

	body.smartlife-branded .page-head__inner.container,
	body.smartlife-branded .page-head__toolbar.container {
		width: var(--home-container);
	}

	body.smartlife-branded :is(.smartlife-home-main, .smartlife-page-shell) .page-head--full .page-head__inner {
		padding-inline: var(--sla-inline-min);
	}
}

/* ---- タイポグラフィ（小画面） ---- */
@media (max-width: 480px) {
	body.smartlife-branded {
		font-size: 14px;
		line-height: 1.75;
	}

	body.smartlife-branded .page-head {
		padding-top: var(--sla-page-head-pad-top, clamp(6.5rem, 18vw, 8.5rem));
		padding-bottom: clamp(1.75rem, 5vw, 2.25rem);
	}

	body.smartlife-branded .page-head__title {
		font-size: clamp(1.55rem, 7vw, 2rem);
		line-height: 1.35;
	}

	body.smartlife-branded .page-head__lead,
	body.smartlife-branded .page-head__note {
		font-size: 0.92rem;
		line-height: 1.75;
	}

	body.smartlife-branded .page-head__kicker,
	body.smartlife-branded [class*="__kicker"] {
		letter-spacing: 0.18em;
		font-size: 0.68rem;
	}

	body.smartlife-branded .section {
		padding-block: clamp(2.5rem, 7vw, 3.5rem);
	}
}

/* ---- ガイド 3カラム ---- */
@media (max-width: 900px) {
	body.smartlife-branded .guide-grid--cols-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	body.smartlife-branded .guide-grid--cols-3 {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- 学び方 4ステップ ---- */
@media (max-width: 1024px) {
	body.smartlife-branded .guide-section--journey .guide-card:not(.guide-card--link) {
		text-align: left;
		align-items: flex-start;
	}

	body.smartlife-branded .guide-section--journey .guide-card:not(.guide-card--link) .guide-card__arrow {
		align-self: flex-end;
	}
}

/* ---- ガイド・CTA ---- */
@media (max-width: 640px) {
	body.smartlife-branded .guide-section__title {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	body.smartlife-branded .guide-section__optional {
		align-self: flex-start;
		margin-top: 0;
	}

	body.smartlife-branded .guide-section__lead,
	body.smartlife-branded .outcomes-section__lead,
	body.smartlife-branded .faq-section__title {
		font-size: clamp(1.35rem, 5.5vw, 1.75rem);
	}

	body.smartlife-branded .line-invite__title,
	body.smartlife-branded .line-final__title {
		font-size: clamp(1.05rem, 4.5vw, 1.25rem);
		line-height: 1.45;
	}

	body.smartlife-branded .line-invite__btn,
	body.smartlife-branded .line-final__btn,
	body.smartlife-branded .line-invite__btn {
		white-space: normal;
		text-align: center;
		min-height: 48px;
		padding-inline: 1.25rem;
	}

	body.smartlife-branded .line-final__panel {
		grid-template-columns: 1fr;
		gap: 1.25rem;
		padding: 1.35rem var(--sla-inline-min);
	}

	body.smartlife-branded .line-final__actions {
		align-items: stretch;
		width: 100%;
	}

	body.smartlife-branded .line-final__btn {
		width: 100%;
		justify-content: center;
	}

	body.smartlife-branded .outcomes-grid {
		grid-template-columns: 1fr;
	}
}

/* ---- お申し込みフロー ---- */
@media (max-width: 767px) {
	body.smartlife-branded .line-enroll-flow__steps {
		grid-template-columns: 1fr;
	}

	body.smartlife-branded .line-enroll-flow__step {
		padding: 1.15rem var(--sla-inline-min);
	}
}

/* ---- 講座一覧 ---- */
@media (max-width: 640px) {
	body.smartlife-branded .workshops-grid {
		gap: 0.75rem;
	}

	body.smartlife-branded .workshops-filter {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		gap: 0.45rem;
		padding-bottom: 0.35rem;
		scrollbar-width: none;
	}

	body.smartlife-branded .workshops-filter::-webkit-scrollbar {
		display: none;
	}

	body.smartlife-branded .workshops-filter__btn {
		flex-shrink: 0;
		white-space: nowrap;
	}

	body.smartlife-branded .workshop-card {
		grid-template-columns: 1fr;
		gap: 0.65rem;
		padding: 0.75rem;
	}

	body.smartlife-branded .workshop-card__body {
		height: auto;
	}

	body.smartlife-branded .workshop-card__content {
		gap: 0.375rem;
	}

	body.smartlife-branded .workshop-card__head {
		gap: 0.3rem 0.4rem;
	}

	body.smartlife-branded .workshop-card__media {
		width: 100%;
		max-width: min(100%, 15.5rem);
		margin-inline: auto;
	}

	body.smartlife-branded .workshop-card__thumb {
		width: 100%;
		height: auto;
		max-width: 100%;
	}

	body.smartlife-branded .workshop-card__date {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		gap: 0.35rem 0.65rem;
		width: fit-content;
		min-width: 0;
		padding: 0.45rem 0.75rem;
	}

	body.smartlife-branded .workshop-card__day {
		font-size: 1.1rem;
	}

	body.smartlife-branded .workshop-card__title {
		font-size: 1.0625rem;
		line-height: 1.35;
	}

	body.smartlife-branded .workshop-card__badge {
		font-size: 0.625rem;
		padding: 0.1rem 0.4rem;
	}

	body.smartlife-branded .workshop-card__audience {
		font-size: 0.8125rem;
		line-height: 1.5;
	}

	body.smartlife-branded .workshop-card__desc {
		font-size: 0.875rem;
		line-height: 1.6;
	}

	body.smartlife-branded .workshop-card__meta {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.25rem 0.75rem;
		font-size: 0.8125rem;
		line-height: 1.45;
	}

	body.smartlife-branded .workshop-card__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		margin-top: 0.5rem;
		padding-top: 0.5rem;
	}

	body.smartlife-branded .workshop-card__detail,
	body.smartlife-branded .workshop-card__line,
	body.smartlife-branded .workshop-card__line--primary {
		width: 100%;
		min-height: 44px;
		padding: 0.55rem 1rem;
		font-size: 0.875rem;
		justify-content: center;
		text-align: center;
	}
}

/* ---- 学びの流れバナー ---- */
@media (max-width: 859px) {
	.learning-flow-banner__heading {
		font-size: clamp(1rem, 4.2vw, 1.15rem);
	}

	.learning-flow-banner__pitch,
	.learning-flow-banner__purpose {
		font-size: 0.9rem;
		line-height: 1.7;
		text-align: left;
	}

	.learning-flow-banner__cta-btn {
		width: 100%;
		justify-content: center;
	}
}

/* ---- トップ FV ---- */
@media (max-width: 900px) {
	.hero-fv__inner {
		box-sizing: border-box;
		width: 100% !important;
		max-width: 40rem;
		margin-inline: auto;
		padding-inline: var(--sla-inline-min) !important;
		padding-top: clamp(2rem, 5.5vw, 2.75rem) !important;
		padding-bottom: clamp(2.5rem, 6.5vw, 3.5rem) !important;
	}

	.hero-fv__copy {
		padding-inline: 0;
	}
}

@media (max-width: 480px) {
	.hero-fv__inner {
		padding-top: clamp(2rem, 6vw, 2.75rem) !important;
		padding-bottom: clamp(2.75rem, 7vw, 3.5rem) !important;
	}

	.hero-fv__title {
		font-size: clamp(1.75rem, 8.5vw, 2.35rem) !important;
		line-height: 1.38 !important;
	}

	.hero-fv__lead {
		font-size: 0.92rem !important;
		line-height: 1.75 !important;
	}

	.hero-fv__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
	}

	.hero-fv__actions .btn,
	.hero-fv__actions a {
		width: 100%;
		justify-content: center;
	}
}

/* ---- 4講座フィーチャー ---- */
@media (max-width: 480px) {
	body.smartlife-branded .course-section__title {
		font-size: clamp(1.55rem, 7vw, 2rem);
	}

	body.smartlife-branded .course-feature__name {
		font-size: clamp(1.25rem, 5.5vw, 1.55rem);
	}

	body.smartlife-branded .course-feature__actions .btn {
		width: 100%;
		justify-content: center;
	}
}

/* ---- 診断カード（#audience-guide） ---- */
@media (max-width: 782px) {
	body.smartlife-branded #audience-guide .choice-card {
		flex-direction: row;
		align-items: center;
		gap: clamp(0.75rem, 3vw, 1rem);
		padding: clamp(0.85rem, 2.5vw, 1rem);
		min-height: 5.25rem;
	}

	body.smartlife-branded #audience-guide .choice-card__thumb {
		flex: 0 0 clamp(4.25rem, 17vw, 5rem);
		width: clamp(4.25rem, 17vw, 5rem);
		height: clamp(4.25rem, 17vw, 5rem);
	}

	body.smartlife-branded #audience-guide .choice-card__body {
		flex: 1 1 auto;
		min-width: 0;
		gap: 0.35rem;
	}

	body.smartlife-branded #audience-guide .choice-card__q {
		margin: 0;
		font-size: 0.8125rem;
		line-height: 1.45;
	}

	body.smartlife-branded #audience-guide .choice-card__course {
		display: inline-flex;
		align-items: center;
		flex-wrap: nowrap;
		gap: 0.4rem;
		font-size: clamp(0.9375rem, 4.2vw, 1.0625rem);
		line-height: 1.35;
	}

	body.smartlife-branded #audience-guide .choice-card__course-name {
		min-width: 0;
		overflow-wrap: anywhere;
	}

	body.smartlife-branded #audience-guide .choice-card__arrow {
		flex-shrink: 0;
	}
}

/* ---- FAQ ---- */
@media (max-width: 480px) {
	body.smartlife-branded .faq-item__q {
		padding: 0.95rem var(--sla-inline-min);
		font-size: 0.92rem;
		gap: 0.65rem;
	}

	body.smartlife-branded .faq-item__panel-inner {
		padding: 0 var(--sla-inline-min) 1.15rem;
	}

	body.smartlife-branded .faq-item__a {
		font-size: 0.9rem;
		line-height: 1.75;
	}
}

/* ---- 沿革 ---- */
@media (max-width: 480px) {
	body.smartlife-branded .history-section__title {
		font-size: clamp(1.45rem, 6vw, 1.85rem);
	}

	body.smartlife-branded .history-milestone__title {
		font-size: 1rem;
		line-height: 1.45;
	}
}

/* ---- お知らせ ---- */
@media (max-width: 640px) {
	body.smartlife-branded .news-card {
		padding: 1rem;
	}

	body.smartlife-branded .news-card__title {
		font-size: 0.95rem;
		line-height: 1.5;
	}
}

/* ---- お問い合わせ ---- */
@media (max-width: 640px) {
	body.smartlife-branded .contact-section input[type="text"],
	body.smartlife-branded .contact-section input[type="email"],
	body.smartlife-branded .contact-section textarea,
	body.smartlife-branded .contact-section select {
		font-size: 16px;
	}
}

/* ---- フッター ---- */
@media (max-width: 640px) {
	.sla-footer {
		padding-top: 2.25rem;
	}

	.sla-footer__shell {
		width: min(1100px, 100% - var(--sla-gutter));
	}

	.sla-footer__tagline,
	.sla-footer__line-note {
		font-size: 0.92rem;
		line-height: 1.75;
	}

	.sla-footer__link {
		white-space: normal;
		word-break: break-word;
		line-height: 1.55;
	}

	.sla-footer__copy {
		font-size: 0.72rem;
		padding-inline: 0.5rem;
	}
}

/* ---- 追従 LINE バー ---- */
@media (max-width: 782px) {
	.smartlife-line-float__inner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.smartlife-line-float__actions {
		justify-content: center;
		width: 100%;
	}

	.smartlife-line-float__btn {
		flex: 1 1 auto;
		min-height: 44px;
	}

	.smartlife-line-float {
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
	}
}

/* ---- 管理バー ---- */
@media screen and (max-width: 782px) {
	body.admin-bar .sla-header-bar {
		top: 46px;
	}

	body.admin-bar.sla-nav-open #sla-header-nav-panel.sla-header-nav {
		padding-top: calc(env(safe-area-inset-top, 0px) + 3.5rem);
	}
}

/* ---- 講座詳細 ABOUT 2カラム ---- */
@media (max-width: 768px) {
	body.smartlife-branded .workshop-detail-body--has-media .workshop-detail-body__layout {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- 講座詳細 page-head ツールバー ---- */
@media (max-width: 480px) {
	body.smartlife-branded .page-head--workshop .page-head__toolbar {
		margin-bottom: 0.85rem;
	}

	body.smartlife-branded .page-head--workshop .workshop-detail-topbar__bar {
		padding-bottom: 0.75rem;
	}

	body.smartlife-branded .workshop-detail-topbar__back {
		padding-inline: 0.78rem 0.88rem;
		font-size: 0.78rem;
	}

	body.smartlife-branded .workshop-detail-topbar__badge {
		min-height: 1.85rem;
		padding-inline: 0.75rem;
		font-size: 0.65rem;
	}
}

/* ---- TT5 ブロック余白 ---- */
@media (max-width: 782px) {
	body.smartlife-branded .alignwide,
	body.smartlife-branded .alignfull {
		max-width: 100%;
	}

	body.smartlife-branded .wp-block-group.alignfull {
		padding-left: 0;
		padding-right: 0;
	}
}

/* ---- タブレット（900px 以下） ---- */
@media (max-width: 900px) {
	body.smartlife-branded .hero-fv__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
	}

	body.smartlife-branded .hero-fv__actions .btn,
	body.smartlife-branded .hero-fv__actions a {
		width: 100%;
		justify-content: center;
		min-height: 48px;
	}

	body.smartlife-branded .line-final.line-final--site-cv .line-final__actions {
		border-left: none !important;
		padding-left: 0 !important;
		border-top: 1px solid rgba(38, 31, 25, 0.12) !important;
		padding-top: clamp(1.25rem, 3vw, 1.75rem);
	}

	body.smartlife-branded .line-final.line-final--site-cv .line-final__panel {
		padding: 0 !important;
	}

	body.smartlife-branded .entry-course-card__body {
		padding: 0.875rem 1rem 1rem;
	}

	body.smartlife-branded .entry-course-card__title {
		font-size: clamp(1rem, 4vw, 1.125rem);
		line-height: 1.45;
	}
}

/* ---- タッチターゲット ---- */
@media (max-width: 782px) {
	body.smartlife-branded .line-final__qr {
		display: none !important;
	}

	body.smartlife-branded .sla-btn,
	body.smartlife-branded .btn,
	body.smartlife-branded .sla-header-nav__toggle {
		min-height: 44px;
	}

	body.smartlife-branded .sla-header-nav__link,
	body.smartlife-branded .sla-header-nav__trigger {
		min-height: 44px;
		display: flex;
		align-items: center;
	}
}
