/* トップページ専用スタイル（body.home 配下のみ）
 * ダークトーンで全セクションを統一し、ヒーローの世界観と揃える
 * -----------------------------------------*/

.home {
	--bg:        #050b16;
	--bg-2:      #08111f;
	--surface:   rgba(255, 255, 255, .035);
	--surface-2: rgba(255, 255, 255, .06);
	--line:      rgba(148, 180, 255, .14);
	--text:      #cdd7e6;
	--muted:     #8696b0;
	--heading:   #f2f6ff;
	--accent:    #4cc9ff;
	--accent-2:  #8f7cff;
	--grad:      linear-gradient(90deg, var(--accent), var(--accent-2));
	--radius:    14px;
}

/* Base */
/* -----------------------------------------*/

.home #service,
.home #about,
.home #portfolio,
.home #contact {
	position: relative;
	color: var(--text);
	background: var(--bg);
	padding-top: 120px;
	padding-bottom: 120px;
	letter-spacing: .04em;
}

.home #about,
.home #contact {
	background:
		radial-gradient(ellipse 60% 40% at 85% 0%, rgba(143, 124, 255, .10), transparent 70%),
		var(--bg-2);
}

.home #service,
.home #portfolio {
	background:
		radial-gradient(ellipse 60% 40% at 15% 0%, rgba(76, 201, 255, .08), transparent 70%),
		var(--bg);
}

/* セクション境界のライン */
.home #service::before,
.home #about::before,
.home #portfolio::before,
.home #contact::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: min(1140px, 100% - 3rem);
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

.home small {
	color: var(--muted);
}

.home a {
	color: var(--accent);
}

/* 見出しは文節で改行し、行の長さを揃える */
.home h1,
.home h2,
.home h3,
.home h4,
.home .komidashi,
.home .card-title {
	word-break: auto-phrase;
	text-wrap: balance;
}

/* Headings */
/* -----------------------------------------*/

.home .sec-eyebrow {
	font-family: 'Roboto Mono', monospace;
	font-size: .8rem;
	letter-spacing: .25em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: .75rem;
}

.home h2 {
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: clamp(3rem, 8vw, 6.5rem);
	line-height: 1;
	letter-spacing: -.01em;
	color: var(--heading);
	margin-bottom: 2.5rem;
}

.home h2 span {
	font-size: inherit;
	font-weight: 500;
	animation: none;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.home h3 {
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--heading);
	padding: 0;
	margin: 0 0 3rem;
}

.home h3::after {
	width: 48px;
	height: 2px;
	margin: 1.25rem 0 0;
	background: var(--grad);
}

.home h4 {
	font-size: clamp(1.25rem, 2vw, 1.6rem);
	font-weight: 700;
	color: var(--heading);
}

.home #service h4 span {
	font-family: 'Roboto Mono', monospace;
	font-size: .7rem;
	font-weight: 400;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--muted);
	padding: .75rem 0 0;
}

.home .lead {
	font-size: 1rem;
	line-height: 2;
	letter-spacing: .06em;
	color: var(--text);
	max-width: 760px;
	margin-bottom: 72px;
}

.home .komidashi {
	font-size: clamp(1.4rem, 2vw, 1.75rem);
	line-height: 1.5;
	letter-spacing: .02em;
	color: var(--heading);
	margin-bottom: 1.75rem;
}

/* ヒーロー以外は左揃えで軸を統一 */
.home #service main,
.home #about main,
.home #portfolio main,
.home #contact main {
	text-align: left;
}

/* セクション冒頭：左に大見出し、右にキャッチと本文 */
.home .sec-head {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 2rem 4rem;
	align-items: end;
	margin: 0 0 96px;
	padding-bottom: 56px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.home .sec-head h2 {
	font-size: clamp(3rem, 5.6vw, 5.5rem);
	margin: 0;
}

.home .sec-head .komidashi {
	margin-bottom: 1.25rem;
}

.home .sec-head .lead {
	max-width: none;
	margin: 0;
}

/* Services の人物：ヒーローとの境界にまたがって配置し、横からスライドイン */
.home #service {
	overflow-x: clip;
}

.home .sec-head {
	position: relative;
}

.home .sec-figure {
	position: relative;
	z-index: 5;
	display: block;
	width: min(100%, 380px);
	height: auto;
	margin: -270px 0 2rem -12px;
	pointer-events: none;
	filter: drop-shadow(0 28px 36px rgba(0, 0, 0, .5));
	opacity: 0;
	transform: translateX(-60vw) rotate(-10deg);
	transition: transform 1.3s cubic-bezier(.16, 1, .3, 1), opacity .9s ease;
}

.home .sec-figure.is-in {
	opacity: 1;
	transform: none;
}

@media screen and (max-width: 991px) {
	.home .sec-figure {
		position: absolute;
		top: -150px;
		right: -6px;
		width: clamp(180px, 40vw, 300px);
		margin: 0;
		transform: translateX(60vw) rotate(-10deg);
	}
	.home .sec-figure.is-in {
		transform: rotate(-28deg);
	}
}

@media screen and (max-width: 991px) {
	.home .sec-head {
		grid-template-columns: 1fr;
		gap: 1.75rem;
		margin-bottom: 64px;
		padding-bottom: 40px;
	}
}

@media screen and (max-width: 575px) {
	.home #service,
	.home #about,
	.home #portfolio,
	.home #contact {
		padding-top: 80px;
		padding-bottom: 80px;
	}
	.home .komidashi {
		font-size: 1.35rem;
		text-align: left;
	}
	.home .lead {
		font-size: .95rem;
	}
}

/* Header / Hero */
/* -----------------------------------------*/

/* style.css の写真背景を打ち消す */
body.home {
	background: var(--bg);
	background-attachment: scroll;
}

.home .hero {
	--hero-text: #f2f6ff;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: var(--bg);
	color: var(--hero-text);
	isolation: isolate;
}

/* 背景レイヤー（最奥：静止写真を暗く沈めた色面 → canvas の粒子 → 文字周りの減光） */
.home .hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
	background:
		linear-gradient(180deg, rgba(5, 11, 22, .55) 0%, rgba(5, 11, 22, .45) 50%, rgba(5, 11, 22, .7) 100%),
		radial-gradient(ellipse 80% 70% at 18% 12%, rgba(26, 86, 150, .55), transparent 70%),
		url("../images/bg2.jpg") center 60% / cover no-repeat,
		var(--bg);
}

.home #heroCanvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

/* 文字周辺を落ち着かせ、周辺を締めて次セクションへ溶かす */
.home .hero-vignette {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 46% 36% at 50% 50%, rgba(5, 11, 22, .5), transparent 100%),
		linear-gradient(180deg, rgba(5, 11, 22, .3) 0%, transparent 22%, transparent 72%, var(--bg) 100%),
		radial-gradient(ellipse 95% 95% at 50% 50%, transparent 55%, rgba(5, 11, 22, .5) 100%);
}

@media screen and (max-width: 767px) {
	.home .hero-bg {
		background-position: 0 0, 0 0, 50% 55%, 0 0;
	}
	.home .hero-vignette {
		background:
			radial-gradient(ellipse 80% 42% at 50% 48%, rgba(5, 11, 22, .55), transparent 100%),
			linear-gradient(180deg, rgba(5, 11, 22, .3) 0%, transparent 22%, transparent 72%, var(--bg) 100%);
	}
}

.home .hero > header,
.home .hero > main,
.home .hero > #arrowToBottom {
	position: relative;
	z-index: 1;
}

.home .hero-main {
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.home .hero-eyebrow {
	font-family: 'Roboto Mono', monospace;
	font-size: .8rem;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 1.5rem;
	animation: heroFadeUp .9s ease-out both;
}

.home .hero-eyebrow::before,
.home .hero-eyebrow::after {
	content: '';
	display: inline-block;
	width: 28px;
	height: 1px;
	vertical-align: middle;
	margin: 0 14px;
	background: linear-gradient(90deg, transparent, var(--accent));
	opacity: .7;
}

.home .hero-eyebrow::after {
	background: linear-gradient(90deg, var(--accent), transparent);
}

.home .hero h1 {
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: clamp(3.2rem, 7vw, 6.75rem);
	line-height: 1;
	letter-spacing: -.015em;
	color: var(--heading);
	white-space: normal;
	text-align: center;
	text-shadow: none;
	animation: heroFadeUp .9s ease-out .1s both;
	margin-bottom: 1.5rem;
}

.home .hero h1 span {
	font-weight: 500;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	white-space: nowrap;
}

.home .hero .main-lead {
	font-family: 'Noto Sans JP', sans-serif;
	font-size: clamp(1.05rem, 1.4vw, 1.25rem);
	font-weight: 400;
	letter-spacing: .14em;
	line-height: 2;
	color: var(--text);
	max-width: 720px;
	margin: 0 auto 3rem;
	animation: heroFadeUp .9s ease-out .2s both;
}

/* 3サービス */
.home #threePoint {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	max-width: 920px;
	margin: 0 auto 2.75rem;
	animation: heroFadeUp .9s ease-out .3s both;
}

.home .hero-service {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .4rem;
	padding: 1.35rem 1.5rem 1.25rem;
	border: 1px solid rgba(170, 205, 255, .16);
	border-radius: 12px;
	background:
		radial-gradient(circle 140px at var(--mx, 30%) var(--my, -20%), rgba(255, 255, 255, .10), transparent 70%),
		linear-gradient(160deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .02) 45%, rgba(120, 170, 255, .03) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .14),
		inset 0 -1px 0 rgba(255, 255, 255, .03),
		0 10px 30px rgba(0, 0, 0, .25);
	backdrop-filter: blur(10px) saturate(140%);
	-webkit-backdrop-filter: blur(10px) saturate(140%);
	color: var(--heading);
	text-align: left;
	text-decoration: none;
	overflow: hidden;
	isolation: isolate;
	transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.home .hero-service > span {
	position: relative;
	z-index: 1;
}

/* ガラスの反射：斜めの光が時々スッと走る（3枚で時間をずらす） */
.home .hero-service::before {
	content: '';
	position: absolute;
	top: -50%;
	left: 0;
	width: 45%;
	height: 200%;
	background: linear-gradient(100deg,
		transparent 0%,
		rgba(255, 255, 255, .03) 30%,
		rgba(255, 255, 255, .16) 48%,
		rgba(200, 235, 255, .22) 50%,
		rgba(255, 255, 255, .03) 70%,
		transparent 100%);
	transform: translateX(-160%) skewX(-18deg);
	pointer-events: none;
	animation: glassGlint 7s ease-in-out infinite;
}

.home .hero-service:nth-child(2)::before { animation-delay: 1.6s; }
.home .hero-service:nth-child(3)::before { animation-delay: 3.2s; }

@keyframes glassGlint {
	0%   { transform: translateX(-160%) skewX(-18deg); }
	18%  { transform: translateX(330%)  skewX(-18deg); }
	100% { transform: translateX(330%)  skewX(-18deg); }
}

.home .hero-service::after {
	content: '';
	position: absolute;
	left: 1.25rem;
	right: 1.25rem;
	bottom: 0;
	height: 1px;
	background: var(--grad);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s ease;
	opacity: .9;
}

.home .hero-service:hover,
.home .hero-service:focus-visible {
	color: var(--heading);
	border-color: rgba(120, 210, 255, .45);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .22),
		inset 0 -1px 0 rgba(255, 255, 255, .05),
		0 14px 40px rgba(0, 0, 0, .3),
		0 0 24px rgba(76, 201, 255, .12);
	transform: translateY(-3px);
	outline: none;
}

/* ホバー時は反射がすぐに走る */
.home .hero-service:hover::before,
.home .hero-service:focus-visible::before {
	animation: glassGlintHover .9s ease-out;
}

@keyframes glassGlintHover {
	from { transform: translateX(-160%) skewX(-18deg); }
	to   { transform: translateX(330%)  skewX(-18deg); }
}

.home .hero-service:hover::after,
.home .hero-service:focus-visible::after {
	transform: scaleX(1);
}

.home .hero-service .num {
	font-family: 'Roboto Mono', monospace;
	font-size: .7rem;
	letter-spacing: .2em;
	color: var(--accent);
}

.home .hero-service .ttl {
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.3;
}

.home .hero-service .en {
	font-family: 'Roboto', sans-serif;
	font-size: .72rem;
	letter-spacing: .08em;
	color: var(--muted);
}

/* CTA */
.home .hero-cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 16px;
	animation: heroFadeUp .9s ease-out .4s both;
}

.home .hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	padding: .95rem 2.2rem;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-decoration: none;
	transition: box-shadow .25s ease, transform .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.home .hero-btn-primary {
	position: relative;
	color: #04101f;
	background: var(--grad);
	border: 1px solid transparent;
}

.home .hero-btn-primary:hover,
.home .hero-btn-primary:focus-visible {
	color: #04101f;
	transform: translateY(-1px);
	box-shadow: 0 10px 30px rgba(76, 201, 255, .25);
}

.home .hero-btn-ghost {
	color: var(--heading);
	border: 1px solid rgba(148, 180, 255, .3);
	background: rgba(255, 255, 255, .02);
}

.home .hero-btn-ghost:hover,
.home .hero-btn-ghost:focus-visible {
	color: #fff;
	border-color: rgba(76, 201, 255, .6);
	background: rgba(76, 201, 255, .06);
}

.home .hero-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

@keyframes heroFadeUp {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* スクロール表示 */
.home #arrowToBottom {
	font-size: 1rem;
	font-weight: 400;
	padding-top: 1.5rem;
}

.home #arrowToBottom p {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0;
	animation: none;
}

.home #arrowToBottom .scroll-label {
	font-family: 'Roboto Mono', monospace;
	font-size: .62rem;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--muted);
}

.home #arrowToBottom .scroll-line {
	position: relative;
	display: block;
	width: 1px;
	height: 44px;
	background: rgba(148, 180, 255, .18);
	overflow: hidden;
}

.home #arrowToBottom .scroll-line::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 50%;
	background: linear-gradient(180deg, transparent, var(--accent));
	animation: scrollLine 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}

@keyframes scrollLine {
	0%   { transform: translateY(-100%); }
	100% { transform: translateY(200%); }
}

@media screen and (max-width: 767px) {
	.home .hero-main {
		padding-top: 2rem;
	}
	.home .hero-eyebrow {
		font-size: .6rem;
		letter-spacing: .2em;
		padding: 0 .5rem;
	}
	.home .hero-eyebrow::before,
	.home .hero-eyebrow::after {
		display: none;
	}
	.home .hero h1 {
		font-size: clamp(2.8rem, 13vw, 4rem);
		text-align: center;
		margin-bottom: 1.25rem;
	}
	.home .hero .main-lead {
		font-size: .85rem;
		letter-spacing: .03em;
		line-height: 1.9;
		text-align: center;
		margin-bottom: 2rem;
	}
	.home #threePoint {
		grid-template-columns: 1fr;
		gap: 10px;
		max-width: 420px;
		margin-bottom: 2rem;
	}
	.home .hero-service {
		flex-direction: row;
		align-items: baseline;
		gap: .75rem;
		padding: .85rem 1.1rem;
	}
	.home .hero-service .ttl {
		font-size: .95rem;
	}
	.home .hero-service .en {
		margin-left: auto;
		font-size: .62rem;
	}
	.home .hero-btn {
		min-width: 150px;
		padding: .7rem 1.4rem;
		font-size: .82rem;
	}
	.home #arrowToBottom .scroll-line {
		height: 32px;
	}
}

.home .nav-masthead .nav-link {
	position: relative;
	color: rgba(255, 255, 255, .7);
	letter-spacing: .08em;
	border-bottom: none;
	transition: color .45s ease, text-shadow .45s ease;
}

/* 下線は中央からふわっと伸ばす */
.home .nav-masthead .nav-link::after {
	content: '';
	position: absolute;
	left: 18%;
	right: 18%;
	bottom: 2px;
	height: 1px;
	background: var(--grad);
	opacity: 0;
	transform: scaleX(.2);
	transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .45s ease;
}

.home .nav-masthead .nav-link:hover,
.home .nav-masthead .nav-link:focus-visible {
	color: #fff;
	text-shadow: 0 0 12px rgba(76, 201, 255, .45);
}

.home .nav-masthead .nav-link:hover::after,
.home .nav-masthead .nav-link:focus-visible::after {
	opacity: 1;
	transform: scaleX(1);
}

.home .nav-masthead .nav-link:focus {
	box-shadow: none;
}

.home header.nav-sticky {
	animation: navDrop .5s cubic-bezier(.22, 1, .36, 1);
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	margin: 0;
	padding: 8px 0;
	background: rgba(5, 11, 22, .82);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
	z-index: 1000 !important;
}

/* Services : cards */
/* -----------------------------------------*/

.home #serviceCardsWrap {
	margin-bottom: 120px;
	background: none;
}

.home .card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: none;
	overflow: hidden;
}

.home .card-img-top {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 0;
	filter: saturate(.9) brightness(.88);
}

.home .card-body {
	padding: 1.5rem 1.5rem 1.75rem;
}

.home .card-title {
	color: var(--heading);
	font-size: 1.4rem;
	margin: 0 0 1rem;
}

.home .card-text {
	color: var(--text);
	font-size: .9rem;
	line-height: 1.9;
}

.home .card-body a {
	display: inline-block;
	font-size: .85rem;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

@media screen and (max-width: 575px) {
	.home #serviceCardsWrap {
		margin-bottom: 80px;
	}
	.home #serviceCardsWrap .row .row {
		margin-bottom: 0;
	}
}

/* Services : 代理店・制作会社向け */
/* -----------------------------------------*/

.home #partner h3 {
	margin-bottom: 1.5rem;
}

.home .partner-lead {
	max-width: 760px;
	margin-bottom: 0;
	font-size: 1rem;
	line-height: 2;
}

.home #partner h4 {
	margin: 96px 0 2rem;
}

.home .partner-card h5,
.home .promise h5 {
	color: var(--heading);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.5;
	margin: 0 0 .75rem;
}

.home .partner-card p,
.home .promise p {
	margin: 0;
	font-size: .9rem;
	line-height: 1.9;
}

/* ご依頼のパターン：上段3枚・下段2枚で行を埋める */
.home .partner-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.home .partner-card {
	grid-column: span 2;
	padding: 1.75rem 1.6rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.home .partner-card:nth-child(n+4) {
	grid-column: span 3;
}

.home .partner-card .num {
	display: block;
	margin-bottom: 1rem;
	font-family: 'Roboto Mono', monospace;
	font-size: .8rem;
	letter-spacing: .15em;
	color: var(--accent);
}

/* 約束ごと：事業の継続性を大きく */
.home .promise-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-top: 1px solid var(--line);
}

.home .promise {
	padding: 2rem 2rem 2rem 0;
	border-bottom: 1px solid var(--line);
}

.home .promise:nth-child(odd):not(.promise-main) {
	padding: 2rem 0 2rem 2rem;
	border-left: 1px solid var(--line);
}

.home .promise-main {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 3rem;
	align-items: center;
	padding: 2.5rem 0;
}

.home .promise-main h5 {
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.home .promise-main p {
	max-width: 760px;
	font-size: .95rem;
}

.home .promise-years {
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: clamp(4.5rem, 9vw, 7.5rem);
	line-height: 1;
	letter-spacing: -.02em;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.home .promise-years small {
	display: block;
	margin-top: .5rem;
	font-family: 'Roboto Mono', monospace;
	font-size: .75rem;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--accent);
	-webkit-text-fill-color: var(--accent);
}

/* 対応技術 */
.home .serviceMenu {
	gap: 10px;
	margin: 0;
}

.home .serviceMenu li {
	width: auto;
	margin: 0;
	padding: .45rem 1.1rem;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: #b8c6dd;
	font-size: .85rem;
	font-weight: 500;
}

.home .card-note {
	margin: 1rem 0 .5rem;
	color: var(--muted);
	font-size: .8rem;
	line-height: 1.8;
}

@media screen and (max-width: 991px) {
	.home .partner-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.home .partner-card,
	.home .partner-card:nth-child(n+4) {
		grid-column: span 1;
	}
	.home .partner-card:first-child {
		grid-column: 1 / -1;
	}
}

@media screen and (max-width: 767px) {
	.home #partner h4 {
		margin-top: 72px;
	}
	.home .partner-grid,
	.home .promise-grid {
		grid-template-columns: 1fr;
	}
	.home .promise,
	.home .promise:nth-child(odd):not(.promise-main) {
		padding: 1.75rem 0;
		border-left: none;
	}
	.home .promise-main {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
	.home .serviceMenu {
		justify-content: flex-start;
	}
}

/* Services : flow */
/* -----------------------------------------*/

.home #flows {
	background: none;
}

.home .flowWrap {
	margin-top: 0;
	padding-top: 96px;
}

.home .flowWrap h4 {
	margin-bottom: 1.25rem;
}

@media screen and (max-width: 767px) {
	.home .flowWrap {
		padding-top: 64px;
	}
}

.home .serviceFlow {
	counter-reset: flow;
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0;
	max-width: 1140px;
	margin: 48px auto;
	position: relative;
}

/* 番号をつなぐライン */
.home .serviceFlow::before {
	content: '';
	position: absolute;
	top: 22px;
	left: calc(100% / 14);
	right: calc(100% / 14);
	height: 1px;
	background: var(--grad);
	opacity: .5;
}

.home .serviceFlow li {
	counter-increment: flow;
	text-align: center;
	width: auto;
	margin: 0;
	padding: 0 8px;
}

.home .serviceFlow li::before {
	content: counter(flow, decimal-leading-zero);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 auto 16px;
	border: 1px solid rgba(76, 201, 255, .5);
	border-radius: 50%;
	background: var(--bg);
	font-family: 'Roboto Mono', monospace;
	font-size: .8rem;
	color: var(--accent);
}

.home .serviceFlow li::after {
	content: none;
}

.home .serviceFlow li div {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	box-shadow: none;
	color: var(--heading);
	font-size: .95rem;
	line-height: 1.6;
}

.home .flowWrap > p:last-child {
	display: inline-block;
	font-size: .85rem;
	color: var(--muted);
	padding: .6rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: 999px;
}

@media screen and (max-width: 991px) {
	.home .serviceFlow {
		grid-template-columns: 1fr;
		max-width: 360px;
		gap: 20px;
	}
	.home .serviceFlow::before {
		top: 22px;
		bottom: 22px;
		left: 22px;
		right: auto;
		width: 1px;
		height: auto;
		background: linear-gradient(180deg, var(--accent), var(--accent-2));
	}
	.home .serviceFlow li {
		display: flex;
		align-items: center;
		padding: 0;
	}
	.home .serviceFlow li::before {
		flex: 0 0 44px;
		margin: 0 20px 0 0;
	}
	.home .serviceFlow li div {
		text-align: left;
		font-size: .95rem;
	}
	.home .flowWrap > p:last-child {
		border-radius: 12px;
	}
}

/* About */
/* -----------------------------------------*/

.home .deskImage {
	max-width: none;
	margin: 0 0 56px;
}

.home .deskImage img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.home .deskImage img {
	border-radius: var(--radius);
	border: 1px solid var(--line);
	filter: saturate(.85) brightness(.9);
}

.home #dataTable {
	max-width: none;
	width: 100%;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

.home #dataTable th,
.home #dataTable td {
	background: transparent;
	border-top: 1px solid var(--line);
	padding: 22px 24px;
	font-size: .9rem;
	line-height: 1.9;
	vertical-align: top;
}

.home #dataTable tr:first-child th,
.home #dataTable tr:first-child td {
	border-top: none;
}

.home #dataTable th {
	width: 180px;
	padding-right: 24px;
	color: var(--accent);
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .1em;
}

.home #dataTable td {
	color: var(--heading);
}

@media screen and (max-width: 575px) {
	.home #dataTable th {
		width: 100%;
		padding: 18px 20px 4px;
	}
	.home #dataTable td {
		border-top: none;
		padding: 0 20px 18px;
	}
}

/* Portfolio */
/* -----------------------------------------*/

/* 事例カード */
.home .case-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

@media screen and (max-width: 1199px) {
	.home .case-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 767px) {
	.home .case-grid {
		grid-template-columns: 1fr;
	}
}

.home .case-card {
	display: flex;
	flex-direction: column;
	gap: .9rem;
	padding: 1.6rem 1.6rem 1.4rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--text);
	font: inherit;
	letter-spacing: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .3s ease, background-color .3s ease, transform .3s ease;
}

.home .case-card:hover,
.home .case-card:focus-visible {
	background: var(--surface-2);
	border-color: rgba(76, 201, 255, .45);
	transform: translateY(-3px);
	outline: none;
}

.home .case-area {
	font-family: 'Roboto Mono', 'Noto Sans JP', monospace;
	font-size: .72rem;
	letter-spacing: .2em;
	color: var(--accent);
}

.home .case-title {
	color: var(--heading);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.5;
	word-break: auto-phrase;
	text-wrap: balance;
}

.home .case-excerpt {
	flex: 1;
	color: var(--text);
	font-size: .85rem;
	line-height: 1.9;
}

.home .case-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.home .case-tags span {
	padding: 2px 10px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: #b8c6dd;
	font-size: .7rem;
}

.home .case-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: .9rem;
	border-top: 1px solid var(--line);
}

/* 予算規模：4段階のバー */
.home .case-budget {
	display: inline-flex;
	align-items: flex-end;
	gap: 3px;
}

.home .case-budget i {
	width: 5px;
	border-radius: 1px;
	background: rgba(148, 180, 255, .18);
}

.home .case-budget i:nth-child(1) { height: 6px; }
.home .case-budget i:nth-child(2) { height: 9px; }
.home .case-budget i:nth-child(3) { height: 12px; }
.home .case-budget i:nth-child(4) { height: 15px; }

.home .case-budget i.on {
	background: var(--accent);
}

.home .case-budget em {
	margin-left: .6rem;
	font-style: normal;
	font-size: .72rem;
	color: var(--muted);
}

.home .case-more {
	color: var(--accent);
	font-size: .78rem;
	white-space: nowrap;
}

.home .case-more::after {
	content: '→';
	display: inline-block;
	margin-left: .4rem;
	transition: transform .25s ease;
}

.home .case-card:hover .case-more::after {
	transform: translateX(4px);
}

/* 先頭の事例は2列分の幅で目立たせる */
@media screen and (min-width: 768px) {
	.home .case-grid > .case-card:first-child {
		grid-column: span 2;
	}
	.home .case-grid > .case-card:first-child .case-title {
		font-size: 1.5rem;
	}
}

/* その他の実績（グリッドの最後のマス） */
.home .case-other {
	display: flex;
	flex-direction: column;
	gap: .9rem;
	padding: 1.6rem;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
}

.home .case-other p {
	margin: 0;
	color: var(--muted);
	font-size: .85rem;
	line-height: 1.9;
}

/* Portfolio modal */
.home [id^="portfoliosModal"] .modal-dialog {
	max-width: 640px;
}

.home [id^="portfoliosModal"] .modal-header {
	background: #0c1729;
	border: 1px solid var(--line);
	border-bottom: none;
	border-radius: var(--radius) var(--radius) 0 0;
	padding: 1rem 1.5rem;
}

.home [id^="portfoliosModal"] .modal-title {
	font-family: 'Roboto Mono', monospace;
	font-size: .75rem;
	letter-spacing: .25em;
	text-transform: uppercase;
	color: var(--accent);
}

.home [id^="portfoliosModal"] .btn-close {
	filter: invert(1);
}

.home [id^="portfoliosModal"] .modal-content {
	background: #0c1729;
	color: var(--text);
	border: 1px solid var(--line);
	border-top: none;
	border-radius: 0 0 var(--radius) var(--radius);
}

.home .mc {
	margin: 0;
	padding: .5rem 1.5rem 1.5rem;
	font-size: .92rem;
	line-height: 1.95;
	letter-spacing: .04em;
}

.home .mc .title {
	border-left: none;
	padding: 0;
	color: var(--heading);
	font-size: 1.5rem;
	font-weight: 700;
}

.home .mc .icons ul {
	gap: 6px;
}

.home .mc .icons li {
	margin: 0;
	border-color: var(--line);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: .7rem;
	color: #b8c6dd;
}

.home .mc .area {
	color: var(--muted);
}

.home .mc .budget {
	border-top: 1px solid var(--line);
	font-size: .85rem;
}

.home .mc .budget span {
	display: inline-block;
	margin: 0 4px 4px 0;
	padding: 4px 10px;
	border-color: var(--line);
	border-radius: 6px;
	color: rgba(205, 215, 230, .35);
	font-size: .78rem;
}

.home .mc .budget span.active {
	color: var(--accent);
	border-color: var(--accent);
	background: rgba(76, 201, 255, .08);
}

/* Contact */
/* -----------------------------------------*/

.home #cform {
	max-width: none;
	margin: 0;
	text-align: left;
}

.home #cform .col-form-label {
	color: var(--heading);
	font-size: .85rem;
}

.home #cform .form-control {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--heading);
	padding: .75rem 1rem;
}

.home #cform .form-control::placeholder {
	color: rgba(134, 150, 176, .7);
}

.home #cform .form-control:focus {
	background: var(--surface-2);
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(76, 201, 255, .18);
}

.home #cform select.form-control {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234cc9ff' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
}

.home #cform select.form-control option {
	background: #0c1729;
	color: var(--heading);
}

.home #cform label.valid::after {
	color: #3ee0a1;
}

.home #cform .btn.btn-dark {
	padding: .8rem 3rem;
	border: none;
	border-radius: 999px;
	background: var(--grad);
	color: #04101f;
	font-weight: 700;
	letter-spacing: .15em;
	transition: box-shadow .25s ease, transform .25s ease;
}

.home #cform .btn.btn-dark:hover,
.home #cform .btn.btn-dark:focus {
	box-shadow: 0 8px 28px rgba(76, 201, 255, .3);
	transform: translateY(-1px);
}

@media screen and (min-width: 576px) {
	.home #cform .col-sm-2 {
		width: 25%;
	}
}

/* PCではフォームを見出しの右カラム位置に揃えて縦積み */
@media screen and (min-width: 992px) {
	.home #cform {
		margin-left: calc((100% - 4rem) * 5 / 12 + 4rem);
	}
	.home #cform .form-group > [class*="col-sm-"] {
		width: 100%;
	}
	.home #cform .col-form-label {
		padding-bottom: .5rem;
	}
}

/* Footer */
/* -----------------------------------------*/

.home footer {
	background: #03070f;
	border-top: 1px solid var(--line);
	color: var(--muted) !important;
	font-size: .8rem;
	letter-spacing: .08em;
	padding-top: 2rem !important;
	padding-bottom: 2rem !important;
}

.home .footer-links {
	margin-top: 8px;
}

/* Footer : piano（鍵盤は js/piano.js が生成） */
/* -----------------------------------------*/

.home footer.has-piano {
	--wk: clamp(48px, 5.2vw, 72px);		/* 白鍵の幅 */
	--bk: calc(var(--wk) * .6);			/* 黒鍵の幅 */
	--kh: calc(var(--wk) * 3.1);		/* 白鍵の高さ */
	--piano-black: #0a0b0f;
	--piano-black-2: #15171d;
	padding: 0 !important;
	border-top: none;
	background: #03070f;
	overflow: hidden;
}

.home .piano {
	position: relative;
	background: var(--piano-black);
}

/* 天板：ピアノブラックの鏡面。斜めのハイライトと室内光の映り込み */
.home .piano-top {
	position: relative;
	height: 92px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .03) 18%, transparent 45%),
		linear-gradient(180deg, #1c1f27 0%, #0d0f14 55%, #090a0e 100%);
	border-top: 1px solid rgba(255, 255, 255, .14);
	overflow: hidden;
}

.home .piano-top::before {
	content: '';
	position: absolute;
	inset: -40% -10%;
	background: linear-gradient(104deg, transparent 32%, rgba(255, 255, 255, .07) 44%, rgba(255, 255, 255, .11) 48%, rgba(255, 255, 255, .05) 53%, transparent 62%);
	pointer-events: none;
}

.home .piano-top::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 36px;
	background:
		radial-gradient(ellipse 30% 100% at 30% 100%, rgba(76, 201, 255, .10), transparent 70%),
		radial-gradient(ellipse 30% 100% at 72% 100%, rgba(143, 124, 255, .08), transparent 70%);
	pointer-events: none;
}

.home .piano-brand {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: 1.05rem;
	letter-spacing: .32em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .32);
	text-shadow: 0 1px 0 rgba(0, 0, 0, .8), 0 0 12px rgba(255, 255, 255, .08);
	white-space: nowrap;
}

/* 鍵盤部：蓋と鍵盤 */
.home .piano-case {
	position: relative;
	height: calc(var(--kh) + 22px);
	background: linear-gradient(180deg, #050608 0%, #0b0c10 100%);
	perspective: 1100px;
	perspective-origin: 50% 0%;
	overflow: hidden;
}

/* 鍵盤の上の帯（キーの奥の影） */
.home .piano-case::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 22px;
	background: linear-gradient(180deg, #16181f 0%, #0b0c10 60%, #050608 100%);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .8);
	z-index: 3;
}

.home .piano-keys-wrap {
	position: absolute;
	left: 0;
	right: 0;
	top: 22px;
	bottom: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	touch-action: pan-x pan-y;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.home .piano-keys-wrap::-webkit-scrollbar {
	display: none;
}

.home .piano-keys {
	position: relative;
	height: var(--kh);
	width: calc(var(--wk) * var(--whites, 15));
	margin: 0 auto;
	display: flex;
}

.home .piano-key {
	position: relative;
	cursor: pointer;
}

.home .piano-key.is-white {
	flex: 0 0 var(--wk);
	width: var(--wk);
	height: 100%;
	background: linear-gradient(180deg, #e9e6df 0%, #f6f4ee 6%, #f3f1ea 70%, #dedad1 96%, #b9b4aa 100%);
	border-right: 1px solid rgba(0, 0, 0, .45);
	border-radius: 0 0 4px 4px;
	box-shadow:
		inset 0 -3px 0 rgba(0, 0, 0, .12),
		inset 1px 0 0 rgba(255, 255, 255, .6),
		inset 0 10px 14px -10px rgba(0, 0, 0, .55);
	transition: transform .07s ease, background .07s ease, box-shadow .07s ease;
	transform-origin: 50% 0%;
	z-index: 1;
}

.home .piano-key.is-white:first-child {
	border-radius: 0 0 4px 4px;
}

.home .piano-key.is-black {
	position: absolute;
	top: 0;
	width: var(--bk);
	height: 62%;
	z-index: 2;
	background: linear-gradient(180deg, #3a3d46 0%, #1b1d23 8%, #0c0d11 70%, #202229 94%, #0a0b0e 100%);
	border-radius: 0 0 4px 4px;
	box-shadow:
		0 4px 6px rgba(0, 0, 0, .7),
		inset 1px 0 0 rgba(255, 255, 255, .08),
		inset -1px 0 0 rgba(255, 255, 255, .04);
	transition: transform .07s ease, background .07s ease, box-shadow .07s ease;
	transform-origin: 50% 0%;
}

/* 黒鍵の艶（天面の細いハイライト） */
.home .piano-key.is-black::before {
	content: '';
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 10px;
	height: 42%;
	border-radius: 3px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0));
}

.home .piano-label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	font-family: 'Roboto Mono', monospace;
	font-size: .6rem;
	letter-spacing: .05em;
	color: rgba(0, 0, 0, .32);
	text-align: center;
	pointer-events: none;
}

/* 押下：わずかに沈み、奥からシアンの光 */
.home .piano-key.is-white.is-down {
	transform: rotateX(4deg) translateY(1px);
	background: linear-gradient(180deg, #cfd9e2 0%, #e3eaf0 10%, #dfe7ee 70%, #c6d1db 96%, #a7b2bc 100%);
	box-shadow:
		inset 0 -2px 0 rgba(0, 0, 0, .12),
		inset 0 16px 22px -10px rgba(0, 0, 0, .55),
		inset 0 -24px 24px -18px rgba(76, 201, 255, .55);
}

.home .piano-key.is-black.is-down {
	transform: rotateX(6deg) translateY(1px);
	background: linear-gradient(180deg, #2a2d35 0%, #15171c 8%, #0a0b0e 70%, #1a1c22 94%, #08090b 100%);
	box-shadow:
		0 2px 3px rgba(0, 0, 0, .7),
		inset 0 -18px 18px -14px rgba(76, 201, 255, .6);
}

/* ガイド：次に押す鍵盤の点灯と、鍵盤上のキー表示 */
.home .piano-key-tag {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 26px;
	display: none;
	font-family: 'Roboto Mono', monospace;
	font-size: .78rem;
	font-weight: 500;
	letter-spacing: .02em;
	line-height: 1;
	text-align: center;
	pointer-events: none;
}

.home .piano-key.is-black .piano-key-tag {
	bottom: 12px;
	font-size: .66rem;
}

.home .piano-key.is-guide .piano-key-tag {
	display: block;
	color: #0a6f99;
	animation: pianoTagPulse 1.4s ease-in-out infinite;
}

.home .piano-key.is-black.is-guide .piano-key-tag {
	color: var(--accent);
}

.home .piano-key.is-white.is-guide {
	background: linear-gradient(180deg, #dff3ff 0%, #f0fbff 6%, #e4f6ff 60%, #b9e6fb 96%, #8fd0ef 100%);
	box-shadow:
		inset 0 -3px 0 rgba(0, 0, 0, .1),
		inset 1px 0 0 rgba(255, 255, 255, .7),
		inset 0 10px 14px -10px rgba(0, 0, 0, .45),
		inset 0 -34px 30px -22px rgba(76, 201, 255, .75),
		0 0 18px rgba(76, 201, 255, .35);
}

.home .piano-key.is-black.is-guide {
	background: linear-gradient(180deg, #2b3a48 0%, #15202a 8%, #0b1620 70%, #1b3240 94%, #0a0b0e 100%);
	box-shadow:
		0 4px 6px rgba(0, 0, 0, .7),
		inset 0 -26px 24px -16px rgba(76, 201, 255, .75),
		0 0 16px rgba(76, 201, 255, .4);
}

@keyframes pianoTagPulse {
	0%, 100% { opacity: .65; transform: translateY(0); }
	50%      { opacity: 1;   transform: translateY(-2px); }
}

/* ガイドのバー（ボタン・曲名・歌詞） */
.home .piano-guide {
	position: relative;
	padding: 14px 1rem 18px;
	background: linear-gradient(180deg, #090a0e 0%, #0b0c11 100%);
	border-top: 1px solid rgba(255, 255, 255, .05);
}

.home .piano-guide-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 14px;
	min-height: 36px;
}

.home .piano-btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .5rem 1.15rem;
	border-radius: 999px;
	border: 1px solid rgba(76, 201, 255, .35);
	background: rgba(76, 201, 255, .06);
	color: var(--heading);
	font-family: 'Noto Sans JP', sans-serif;
	font-size: .78rem;
	font-weight: 500;
	letter-spacing: .12em;
	line-height: 1;
	cursor: pointer;
	transition: border-color .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.home .piano-btn span {
	font-family: 'Roboto Mono', monospace;
	font-size: .62rem;
	letter-spacing: .18em;
	color: var(--accent);
}

.home .piano-btn:hover,
.home .piano-btn:focus-visible {
	border-color: rgba(76, 201, 255, .7);
	background: rgba(76, 201, 255, .12);
	box-shadow: 0 0 18px rgba(76, 201, 255, .18);
	color: #fff;
	outline: none;
}

.home .piano-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.home .piano-btn-ghost {
	border-color: rgba(255, 255, 255, .14);
	background: transparent;
	color: var(--muted);
}

.home .piano-btn-ghost:hover,
.home .piano-btn-ghost:focus-visible {
	border-color: rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .04);
	box-shadow: none;
}

.home .piano-guide-title {
	display: none;
	font-family: 'Roboto Mono', monospace;
	font-size: .66rem;
	letter-spacing: .28em;
	color: var(--accent);
}

.home .piano-guide-title::before {
	content: '\266A  ';
}

/* 結果表示（Bravo! / タイム・ミス / 解放） */
.home .piano-guide-result {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.home .piano.is-done .piano-guide-result {
	display: flex;
}

.home .piano-guide-done {
	display: none;
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: 2rem;
	line-height: 1.1;
	letter-spacing: .3em;
	padding-left: .3em;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 0 14px rgba(76, 201, 255, .35));
	animation: pianoBravo 1.1s cubic-bezier(.2, 1.4, .3, 1) both;
}

.home .piano.is-grand .piano-guide-done {
	font-size: 2.3rem;
	letter-spacing: .18em;
	padding-left: .18em;
	background: linear-gradient(90deg, #4cc9ff, #ffd56b 50%, #8f7cff);
	-webkit-background-clip: text;
	background-clip: text;
	filter: drop-shadow(0 0 18px rgba(255, 213, 107, .35));
}

@keyframes pianoBravo {
	0%   { opacity: 0; transform: scale(2.4) translateY(10px); }
	60%  { opacity: 1; transform: scale(.94) translateY(0); }
	100% { opacity: 1; transform: scale(1) translateY(0); }
}

.home .piano-guide-stats {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px 18px;
	font-family: 'Roboto Mono', monospace;
	font-size: .68rem;
	letter-spacing: .22em;
	color: var(--muted);
	animation: pianoFadeUp .6s ease .5s both;
}

.home .piano-stat-perfect {
	display: none;
	padding: .2em .9em;
	border-radius: 999px;
	border: 1px solid rgba(255, 213, 107, .55);
	color: #ffd56b;
	background: rgba(255, 213, 107, .08);
	letter-spacing: .18em;
	animation: pianoPerfect .8s cubic-bezier(.2, 1.5, .3, 1) .7s both;
}

.home .piano.is-perfect .piano-stat-perfect {
	display: inline-block;
}

@keyframes pianoPerfect {
	from { opacity: 0; transform: scale(1.8) rotate(-6deg); }
	to   { opacity: 1; transform: scale(1) rotate(0); }
}

.home .piano-unlock {
	display: none;
	padding: .45em 1.1em;
	border-radius: 999px;
	border: 1px solid rgba(143, 124, 255, .5);
	background: linear-gradient(90deg, rgba(76, 201, 255, .12), rgba(143, 124, 255, .16));
	color: var(--heading);
	font-family: 'Noto Sans JP', sans-serif;
	font-size: .78rem;
	letter-spacing: .1em;
	animation: pianoUnlock .9s cubic-bezier(.2, 1.4, .3, 1) 1s both;
}

.home .piano.is-just-unlocked .piano-unlock {
	display: inline-block;
}

@keyframes pianoUnlock {
	from { opacity: 0; transform: translateY(10px) scale(.9); box-shadow: 0 0 0 rgba(143, 124, 255, 0); }
	60%  { box-shadow: 0 0 28px rgba(143, 124, 255, .45); }
	to   { opacity: 1; transform: translateY(0) scale(1); box-shadow: 0 0 12px rgba(143, 124, 255, .2); }
}

@keyframes pianoFadeUp {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* 両手モードのボタンと NEW バッジ */
.home .piano-btn-both {
	display: none;
	position: relative;
}

.home .piano-new {
	position: absolute;
	top: -9px;
	right: -6px;
	padding: 2px 7px;
	border-radius: 999px;
	background: linear-gradient(90deg, #ffd56b, #ff9f6b);
	color: #2a1a05;
	font-family: 'Roboto Mono', monospace;
	font-style: normal;
	font-size: .52rem;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.3;
	box-shadow: 0 2px 8px rgba(255, 213, 107, .35);
	animation: pianoNew 1.6s ease-in-out infinite;
}

.home .piano.is-both-cleared .piano-new {
	display: none;
}

@keyframes pianoNew {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-2px); }
}

.home .piano-guide-mode {
	color: var(--muted);
	letter-spacing: .12em;
}

/* 運指の案内 */
.home .piano-guide-tip {
	display: none;
	width: 100%;
	text-align: center;
	font-family: 'Noto Sans JP', sans-serif;
	font-size: .78rem;
	letter-spacing: .06em;
	color: #bfe8ff;
	opacity: 0;
	transition: opacity .4s ease;
}

.home .piano.is-guiding:not(.is-done) .piano-guide-tip.is-show {
	display: block;
	opacity: 1;
}

.home .piano-key-finger {
	position: absolute;
	left: 50%;
	bottom: calc(100% - 22px);
	transform: translateX(-50%);
	display: none;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--accent);
	color: #04101f;
	font-family: 'Noto Sans JP', sans-serif;
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.3;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(76, 201, 255, .45);
	pointer-events: none;
	z-index: 5;
}

.home .piano-key-finger::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: var(--accent);
}

.home .piano-key.is-finger .piano-key-finger {
	display: block;
	animation: pianoFingerPop .6s cubic-bezier(.2, 1.4, .3, 1) both;
}

@keyframes pianoFingerPop {
	from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.8); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* クリア時：鍵盤が左から右へ光るウェーブ */
.home .piano-key.is-white.is-wave {
	background: linear-gradient(180deg, #e8f8ff 0%, #ffffff 8%, #f0fbff 60%, #bfe9fb 96%, #8fd0ef 100%);
	box-shadow:
		inset 0 -3px 0 rgba(0, 0, 0, .1),
		inset 0 -40px 34px -22px rgba(143, 124, 255, .7),
		0 0 22px rgba(76, 201, 255, .5);
	transition: background .12s ease, box-shadow .12s ease;
}

.home .piano-key.is-black.is-wave {
	background: linear-gradient(180deg, #3d3560 0%, #1b1a33 8%, #0f1228 70%, #2a2550 94%, #0a0b0e 100%);
	box-shadow:
		0 4px 6px rgba(0, 0, 0, .7),
		inset 0 -26px 24px -16px rgba(143, 124, 255, .8),
		0 0 18px rgba(143, 124, 255, .5);
	transition: background .12s ease, box-shadow .12s ease;
}

/* 紙吹雪の canvas（ピアノの範囲だけ、操作は透過） */
.home .piano-fx {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 6;
}

@keyframes pianoBravoFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes pianoBravoSoft {
	from { opacity: 0; transform: scale(1.25); }
	to   { opacity: 1; transform: scale(1); }
}

.home .piano-guide-actions {
	display: none;
	gap: 8px;
}

.home .piano-lyrics {
	display: none;
	margin-top: 14px;
	font-family: 'Noto Sans JP', sans-serif;
	font-size: .9rem;
	line-height: 1.6;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .28);
}

.home .piano-lyrics-line {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2px 0;
	opacity: .55;
	transition: opacity .4s ease;
}

.home .piano-lyrics-line.is-now {
	opacity: 1;
}

.home .piano-lyrics-line span {
	display: inline-block;
	min-width: 1.6em;
	padding: 0 .25em;
	border-radius: 4px;
	text-align: center;
	transition: color .25s ease, background-color .25s ease, transform .25s ease;
}

.home .piano-lyrics-line span.is-done {
	color: rgba(205, 215, 230, .7);
}

.home .piano-lyrics-line span.is-now {
	color: #fff;
	background: rgba(76, 201, 255, .16);
	box-shadow: inset 0 -2px 0 var(--accent);
	transform: translateY(-1px);
}

/* 状態：ガイド中 / 完了 */
.home .piano.is-guiding .piano-btn-start { display: none; }
.home .piano.is-guiding .piano-guide-title,
.home .piano.is-guiding .piano-lyrics { display: block; }
.home .piano.is-guiding .piano-lyrics-line { display: flex; }
.home .piano.is-guiding .piano-guide-actions { display: inline-flex; }
.home .piano.is-guiding .piano-btn-again { display: none; }
.home .piano.is-done .piano-guide-title { display: none; }
.home .piano.is-done .piano-guide-done { display: inline-block; }
.home .piano.is-done .piano-btn-again { display: inline-flex; }
.home .piano.is-done .piano-app-link { display: inline-block; }
/* 両手モード：メロディを1回クリアした PC 利用者だけに表示（ガイド中は隠す、両手クリア直後も隠す） */
.home .piano.is-unlocked .piano-btn-both { display: inline-flex; }
.home .piano.is-unlocked.is-guiding:not(.is-done) .piano-btn-both { display: none; }
.home .piano.is-unlocked.is-done.mode-both .piano-btn-both { display: none; }

/* 完了画面の整理：結果 → 次の一手 → もう一度・やめる → アプリへの導線 */
.home .piano.is-done .piano-lyrics { display: none; }
.home .piano.is-done .piano-guide-bar {
	flex-direction: column;
	gap: 18px;
}
.home .piano.is-done .piano-btn-both { order: 1; }
.home .piano.is-done .piano-guide-actions {
	order: 2;
	gap: 8px;
}
.home .piano.is-done .piano-app-link {
	order: 3;
	margin-top: 10px;
	padding-top: 18px;
	border-bottom: none;
	border-top: 1px solid rgba(255, 255, 255, .08);
	color: var(--muted);
	font-size: .75rem;
}
.home .piano.is-done .piano-app-link:hover {
	color: var(--accent);
}

/* 解放の帯は控えめな一文に（主役は下の大きなボタン） */
.home .piano.is-done .piano-unlock {
	padding: 0;
	border: none;
	background: none;
	color: var(--accent);
	font-size: .75rem;
}

/* 両手モードへの誘導は一番目立つボタンに */
.home .piano.is-done .piano-btn-both {
	padding: .85em 2em;
	border: none;
	background: var(--grad);
	color: #04101f;
	font-size: .95rem;
	font-weight: 700;
	box-shadow: 0 8px 28px rgba(76, 201, 255, .25);
}
.home .piano.is-done .piano-btn-both span {
	color: rgba(4, 16, 31, .7);
}

/* もう一度・やめる は小さな脇役に */
.home .piano.is-done .piano-btn-again,
.home .piano.is-done .piano-btn-stop {
	padding: .45em 1.2em;
	font-size: .78rem;
}

/* 両手モードを出さない場合（両手クリア後・タッチ端末）は「もう一度」を主役に */
.home .piano.is-done:not(.is-unlocked) .piano-btn-again,
.home .piano.is-done.mode-both .piano-btn-again {
	padding: .75em 2em;
	font-size: .9rem;
}

/* ピアノの下：App Store へのボタン */
.home .piano-store {
	padding: 96px 1rem 72px;
	background: var(--piano-black);
	text-align: center;
}

.home .piano-store-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .15rem;
	padding: .75rem 1.6rem .8rem;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 12px;
	background: #000;
	color: #fff;
	text-decoration: none;
	transition: border-color .3s ease, box-shadow .3s ease;
}

.home .piano-store-btn:hover {
	color: #fff;
	border-color: rgba(76, 201, 255, .6);
	box-shadow: 0 0 24px rgba(76, 201, 255, .18);
}

.home .piano-store-label {
	font-family: 'Roboto', sans-serif;
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: .02em;
	line-height: 1.1;
}

.home .piano-store-text {
	font-size: .72rem;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .7);
}

/* 弾き終えた人を音楽学習アプリへ案内 */
.home .piano-app-link {
	display: none;
	color: var(--accent);
	font-size: .8rem;
	letter-spacing: .08em;
	text-decoration: none;
	border-bottom: 1px solid rgba(76, 201, 255, .35);
	animation: pianoBravo .9s ease-out .4s both;
}

.home .piano-app-link:hover {
	color: var(--heading);
	border-bottom-color: var(--accent);
}

/* 鍵盤蓋（fallboard）：閉じた状態で鍵盤を覆い、開くと奥へ倒れる */
.home .piano-fall {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 100%;
	z-index: 4;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 25%, transparent 50%),
		linear-gradient(180deg, #1a1d25 0%, #0c0e13 50%, #07080b 100%);
	border-top: 1px solid rgba(255, 255, 255, .12);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .6);
	transform-origin: 50% 0%;
	transform: rotateX(0deg);
	transition: transform 1.6s cubic-bezier(.4, 0, .15, 1), opacity .6s ease 1s;
	will-change: transform;
}

.home .piano-fall::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, .06) 47%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 54%, transparent 64%);
}

.home .piano-fall-line {
	position: absolute;
	left: 50%;
	bottom: 18px;
	width: 120px;
	height: 1px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}

.home footer.is-open .piano-fall {
	transform: rotateX(-96deg);
	opacity: 0;
	pointer-events: none;
}

/* 鍵盤の下：映り込みとコピーライト */
.home .piano-hint {
	position: relative;
	padding: 10px 1rem 0;
	font-family: 'Roboto Mono', monospace;
	font-size: .62rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .28);
	background: linear-gradient(180deg, #0f1116 0%, #090a0e 100%);
	border-top: 1px solid rgba(255, 255, 255, .06);
	opacity: 0;
	transition: opacity .8s ease 1.4s;
}

.home footer.is-open .piano-hint {
	opacity: 1;
}

.home .piano-slip {
	position: relative;
	padding: 2rem 1rem;
	background: #03070f;
	border-top: 1px solid var(--line);
}

/* フッターの下に大きく余白を取り、その先にピアノを隠しておく */
.home .piano-gap {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	height: 70vh;
	padding: 0 1rem 64px;
	background: linear-gradient(180deg, #03070f 0%, #03070f 55%, var(--piano-black) 100%);
	text-align: center;
}

/* 鍵盤の上のチャレンジ文 */
.home .piano-eyebrow {
	margin: 0 0 1.1rem;
	font-family: 'Roboto Mono', monospace;
	font-size: .72rem;
	letter-spacing: .3em;
	color: var(--accent);
}

.home .piano-catch {
	margin: 0;
	font-size: clamp(1.25rem, 2.6vw, 2rem);
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: .06em;
	color: var(--heading);
}

.home .piano-catch-sub {
	margin: 1.25rem 0 0;
	font-family: 'Roboto Mono', 'Noto Sans JP', monospace;
	font-size: .75rem;
	letter-spacing: .12em;
	color: var(--muted);
}

@media (pointer: coarse) {
	.home .piano-catch-sub {
		display: none;
	}
}

@media screen and (max-width: 575px) {
	.home .piano-catch {
		font-size: 1.05rem;
		letter-spacing: .02em;
	}
}

.home .piano-slip > div:first-child {
	color: rgba(255, 255, 255, .5);
}

@media screen and (max-width: 767px) {
	.home footer.has-piano {
		--wk: 42px;
		--bk: 26px;
		--kh: 124px;
	}
	.home .piano-top {
		height: 72px;
	}
	.home .piano-brand {
		font-size: .85rem;
		letter-spacing: .26em;
	}
	.home .piano-keys {
		margin: 0;
		padding-right: 0;
	}
	.home .piano-hint {
		font-size: .56rem;
		letter-spacing: .12em;
	}
	.home .piano-hint-pc {
		display: none;
	}
}

@media screen and (min-width: 768px) {
	.home .piano-hint-sp {
		display: none;
	}
}

.home .footer-links a,
.home footer a {
	margin: 0 8px;
	color: var(--muted);
	text-decoration: none;
	transition: color .3s ease;
}

.home .footer-links a:hover,
.home footer a:hover {
	color: var(--heading);
}

/* フォーム下の注記（プライバシーポリシー・reCAPTCHA） */
.home .form-note {
	margin: 1rem 0 0;
	color: var(--muted);
	font-size: .8rem;
	line-height: 1.8;
}

.home .form-note.recaptcha-note {
	margin-top: .25rem;
	font-size: .72rem;
}

.home .form-note a {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid rgba(76, 201, 255, .35);
}

/* 動きを減らす設定の利用者向け */
@media (prefers-reduced-motion: reduce) {
	.home *,
	.home *::before,
	.home *::after {
		animation: none !important;
		transition: none !important;
	}
	/* ピアノの蓋は回転させず、ゆっくり薄れながら奥へ引く */
	.home .piano-fall {
		transition: transform 2s ease, opacity 1.6s ease .3s !important;
	}
	.home footer.is-open .piano-fall {
		transform: translateY(-14px);
	}
	.home .piano-hint {
		transition: opacity 1s ease 1s !important;
	}
	.home .piano-key {
		transition: background .07s ease, box-shadow .07s ease !important;
	}
	/* ガイドの点滅は止め、完了表示はフェードのみ */
	.home .piano-key.is-guide .piano-key-tag {
		animation: none !important;
		opacity: 1;
	}
	/* お祝いは一度きりなので残す（動きは控えめに） */
	.home .piano-guide-done {
		animation: pianoBravoSoft 1s ease-out both !important;
	}
	.home .piano-guide-stats,
	.home .piano-stat-perfect,
	.home .piano-unlock,
	.home .piano-key.is-finger .piano-key-finger {
		animation: pianoBravoFade .8s ease .4s both !important;
	}
	.home .piano-new {
		animation: none !important;
	}
	.home .piano-key.is-wave {
		transition: background .2s ease, box-shadow .2s ease !important;
	}
	.home .piano-lyrics-line,
	.home .piano-lyrics-line span,
	.home .piano-btn,
	.home .piano-guide-tip {
		transition: color .3s ease, background-color .3s ease, opacity .4s ease !important;
	}
	/* ナビは色と不透明度だけなめらかに */
	.home .nav-masthead .nav-link,
	.home .nav-masthead .nav-link::after {
		transition: color .45s ease, text-shadow .45s ease, opacity .45s ease !important;
	}
	.home .nav-masthead .nav-link::after {
		transform: none;
	}
	.home header.nav-sticky {
		animation: navFade .4s ease !important;
	}
	/* 人物のスライドインは一度きりの登場演出なので残す */
	.home .sec-figure {
		transition: transform 1.3s cubic-bezier(.16, 1, .3, 1), opacity .9s ease !important;
	}
	/* ガラスの反射は控えめな間隔で残す */
	.home .hero-service::before {
		animation: glassGlint 12s ease-in-out infinite !important;
	}
	.home .hero-service:nth-child(2)::before { animation-delay: 4s !important; }
	.home .hero-service:nth-child(3)::before { animation-delay: 8s !important; }
	.home .hero-service:hover::before,
	.home .hero-service:focus-visible::before {
		animation: glassGlintHover .9s ease-out !important;
	}
	.home .hero-service {
		transition: border-color .3s ease, box-shadow .3s ease !important;
	}
}

@keyframes navDrop {
	from { transform: translateY(-100%); opacity: 0; }
	to   { transform: translateY(0);     opacity: 1; }
}

@keyframes navFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
