@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=DotGothic16&display=swap');

/* ゆういぬ。オープニング全体
-------------------------------------------------- */
#yi-splash {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #fff;
	transition: opacity .45s ease;
	overflow: hidden;
}

#yi-splash.yi-gone {
	opacity: 0;
	pointer-events: none;
}

html.yi-lock,
html.yi-lock body {
	overflow: hidden;
}

.yi-stage {
	position: absolute;
	inset: 0;
}

/* START / CONTINUE画面
-------------------------------------------------- */
#yi-start-screen {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #001b9b;
	color: #fff;
	cursor: pointer;
}

.yi-start-menu {
	display: grid;
	grid-template-columns: 1.2em auto;
	column-gap: .35em;
	row-gap: .28em;
	align-items: center;
	font-family: "Courier New", "Hiragino Kaku Gothic ProN",
		"Yu Gothic", monospace;
	font-size: clamp(20px, 3vw, 34px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: .06em;
	text-shadow: 2px 2px 0 #000;
}

.yi-start-arrow {
	grid-column: 1;
	grid-row: 1;
}

/* START横の▶は点滅させない */
.yi-start-label {
	grid-column: 2;
	grid-row: 1;
}

.yi-continue-label {
	grid-column: 2;
	grid-row: 2;
}

/* 名前入力画面
-------------------------------------------------- */
#yi-name-screen {
	display: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 4vh 3vw;
	background: #000;
	color: #fff;
}

#yi-name-screen.yi-active {
	display: flex;
}

.yi-name-ui {
	width: min(92vw, 760px);
	font-family: "Courier New", "Hiragino Kaku Gothic ProN",
		"Yu Gothic", monospace;
	font-weight: 700;
	text-shadow: 2px 2px 0 #222;
}

.yi-name-box,
.yi-keyboard-box {
	position: relative;
	box-sizing: border-box;
	border: clamp(3px, .55vw, 6px) solid #fff;
	background: #000;
	box-shadow:
		inset 0 0 0 2px #555,
		0 0 0 2px #000;
}

.yi-name-box {
	width: 68%;
	min-height: 150px;
	margin: 0 auto -3px;
	padding: 2.8rem 1.2rem 1.4rem;
	text-align: center;
}

.yi-name-title {
	position: absolute;
	top: 0;
	left: 50%;
	padding: 0 .55em;
	background: #000;
	font-size: clamp(15px, 2.5vw, 25px);
	line-height: 1.15;
	white-space: nowrap;
	transform: translate(-50%, -58%);
}

.yi-name-value {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: .38em;
	margin-top: .7rem;
	font-size: clamp(24px, 4.2vw, 42px);
	letter-spacing: .04em;
}

.yi-name-slot {
	display: inline-block;
	min-width: 1em;
	text-align: center;
}

.yi-name-slot.yi-empty {
	font-size: .88em;
}

/* 文字盤
-------------------------------------------------- */
.yi-keyboard-box {
	padding: clamp(18px, 3vw, 34px);
}

.yi-kana-grid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: clamp(6px, 1.5vw, 18px) clamp(8px, 2vw, 22px);
	align-items: center;
}

.yi-key {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	height: 1.35em;
	font-size: clamp(17px, 3vw, 31px);
	line-height: 1;
	white-space: nowrap;
}

.yi-key-empty {
	visibility: hidden;
}

/* 文字の左に出る選択カーソル */
.yi-key-cursor {
	position: absolute;
	top: 50%;
	right: calc(100% + .05em);
	font-size: .68em;
	line-height: 1;
	transform: translateY(-50%);
}

/* 1秒間に2回点滅＝0.5秒で1周期 */
.yi-key-cursor.yi-blink {
	animation: yi-cursor-blink .5s steps(1, end) infinite;
}

@keyframes yi-cursor-blink {
	0%,
	49.99% {
		opacity: 1;
	}

	50%,
	100% {
		opacity: 0;
	}
}

.yi-tap-guide {
	margin: 1rem 0 0;
	text-align: center;
	font-size: clamp(11px, 1.8vw, 16px);
	letter-spacing: .08em;
	opacity: 0;
	transition: opacity .25s ease;
}

#yi-name-screen.yi-ready {
	cursor: pointer;
}

#yi-name-screen.yi-ready .yi-tap-guide {
	opacity: .75;
}

/* 既存ロゴアニメ
-------------------------------------------------- */
#yi-logo-stage {
	display: none;
	background: #fff;
}

#yi-logo-stage.yi-active {
	display: block;
}

#yi-logo {
	position: absolute;
	transform-origin: 0 0;
}

.yi-part {
	position: absolute;
	opacity: 0;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	will-change: transform, opacity;
}

.yi-in {
	animation: yi-pop 360ms cubic-bezier(.34, 1.5, .64, 1) both;
}

@keyframes yi-pop {
	from {
		opacity: 0;
		transform:
			translate(var(--jx, 0), var(--jy, 0))
			scale(var(--js, .4))
			rotate(var(--jr, 0));
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yi-in {
		animation: yi-fade 260ms ease both;
	}

	@keyframes yi-fade {
		from { opacity: 0; }
		to { opacity: 1; }
	}
}

/* ロゴ画像
-------------------------------------------------- */
.yi-b-t1_wa    { background-image: url(img/t1_wa.png); }
.yi-b-t1_ta    { background-image: url(img/t1_ta.png); }
.yi-b-t1_shi   { background-image: url(img/t1_shi.png); }
.yi-b-t1_c1    { background-image: url(img/t1_c1.png); }
.yi-b-t1_ken   { background-image: url(img/t1_ken.png); }
.yi-b-t1_c2    { background-image: url(img/t1_c2.png); }
.yi-b-t1_i     { background-image: url(img/t1_i.png); }
.yi-b-t1_nu    { background-image: url(img/t1_nu.png); }
.yi-b-t2_yu    { background-image: url(img/t2_yu.png); }
.yi-b-t2_u     { background-image: url(img/t2_u.png); }
.yi-b-t2_i     { background-image: url(img/t2_i.png); }
.yi-b-t2_nu    { background-image: url(img/t2_nu.png); }
.yi-b-t2_paw   { background-image: url(img/t2_paw.png); }
.yi-b-badge    { background-image: url(img/badge.png); }

.yi-p-t1_wa  { left:12.3542%; top:15.3416%; width:7%;       height:19.016%; }
.yi-p-t1_ta  { left:20.063%;  top:15.4614%; width:5.9573%;  height:18.8967%; }
.yi-p-t1_shi { left:27.2715%; top:16.4245%; width:4.7903%;  height:18.1738%; }
.yi-p-t1_c1  { left:32.7292%; top:29.5387%; width:2.3333%;  height:7.2282%; }
.yi-p-t1_ken { left:36.8946%; top:11.9709%; width:7.7941%;  height:23.5913%; }
.yi-p-t1_c2  { left:46.4821%; top:30.7319%; width:1.619%;   height:5.8045%; }
.yi-p-t1_i   { left:49.354%;  top:19.7934%; width:6.667%;   height:13.1209%; }
.yi-p-t1_nu  { left:57.1876%; top:16.3066%; width:7.0414%;  height:17.9282%; }
.yi-p-t2_yu  { left:8.0205%;  top:47.714%;  width:13.7924%; height:38.9883%; }
.yi-p-t2_u   { left:25.3966%; top:46.1473%; width:9.9152%;  height:41.0387%; }
.yi-p-t2_i   { left:38.9373%; top:56.2554%; width:12.7088%; height:25.3952%; }
.yi-p-t2_nu  { left:54.7703%; top:49.0361%; width:14.001%;  height:34.7799%; }
.yi-p-t2_paw { left:70.6463%; top:71.059%;  width:5.0408%;  height:12.6354%; }
.yi-p-badge  { left:71.0833%; top:13.1729%; width:19.0417%; height:36.5904%; }

/* スマホ調整
-------------------------------------------------- */
@media (max-width: 600px) {
	#yi-name-screen {
		padding: 3vh 10px;
	}

	.yi-name-ui {
		width: 96vw;
	}

	.yi-name-box {
		width: 78%;
		min-height: 112px;
		padding: 2.2rem .7rem 1rem;
	}

	.yi-keyboard-box {
		padding: 20px 12px 16px;
	}

	.yi-kana-grid {
		column-gap: 5px;
		row-gap: 11px;
	}

	.yi-key-cursor {
		right: calc(100% - .08em);
	}

	.yi-start-menu {
		font-size: 22px;
	}
}

@media (max-height: 560px) {
	.yi-name-box {
		min-height: 92px;
		padding-top: 1.7rem;
	}

	.yi-keyboard-box {
		padding-top: 13px;
		padding-bottom: 12px;
	}

	.yi-kana-grid {
		row-gap: 6px;
	}

	.yi-tap-guide {
		margin-top: .45rem;
	}
}
/* ドット文字とデジタル式カーソル移動 */
.yi-start-menu,
.yi-name-ui {
	font-family: "DotGothic16", monospace !important;
	font-weight: 400 !important;
}

.yi-key-cursor {
	transition: none !important;
}
/* 入力された名前を文字盤と同じ大きさに */
.yi-name-value {
	font-size: clamp(17px, 3vw, 31px);
}

/* 本家に近い最下段 */
.yi-key-action {
	grid-column: span 2;
	font-size: clamp(15px, 2.3vw, 24px);
	white-space: nowrap;
}

/* 本家にない操作説明は消す */
.yi-tap-guide {
	display: none;
}

/* START横の▶も1秒に2回点滅 */
.yi-start-arrow {
	animation: yi-cursor-blink .5s steps(1, end) infinite;
}

/* 最後に確定した「ぬ」 */
.yi-final-nu {
	color: #ff4040;
}

/* 名前入力画面のSKIPボタン */
#yi-skip-btn {
	position: absolute;
	top: 16px;
	right: 18px;
	z-index: 20;
	padding: 4px 9px;
	border: 1px solid #777;
	background: #000;
	color: #aaa;
	font-family: "DotGothic16", monospace;
	font-size: 12px;
	letter-spacing: .08em;
	line-height: 1.4;
	cursor: pointer;
	opacity: .75;
}

#yi-skip-btn:hover {
	color: #fff;
	border-color: #fff;
	opacity: 1;
}

@media (max-width: 600px) {
	#yi-skip-btn {
		top: 10px;
		right: 10px;
		font-size: 11px;
	}
}