@charset "UTF-8";

/******************/
/* RESET CSS */

@font-face {
	font-family: "Outfit";
	src: url("../assets/fonts/Outfit-Light.woff2") format("woff2"),
	url("../assets/fonts/Outfit-Light.woff") format("woff"),
	url("../assets/fonts/Outfit-Light.ttf") format("truetype");
	font-display: swap;
	font-weight: 300;
	font-style: normal;
}
@font-face {
	font-family: "Outfit";
	src: url("../assets/fonts/Outfit-Medium.woff2") format("woff2"),
	url("../assets/fonts/Outfit-Medium.woff") format("woff"),
	url("../assets/fonts/Outfit-Medium.ttf") format("truetype");
	font-display: swap;
	font-weight: 500;
	font-style: normal;
}

/* Thin 100
ExtraLight 200
Light 300
Regular 400
Medium 500
SemiBold 600
Bold 700
ExtraBold 800
Black 900 */

:root {
	--background-color: #0F0F0F;
	--color-white: #fafafa;
	--border-color: #303030;
	--color-black: rgba(34, 34, 34, 0.8);
	--color-red: #ff0055;
	--color-yellow: #f5d900;
	--gradient-color: linear-gradient(80deg, #00EAFF, #661FFF, #FF00FF);

	--font-family: "Outfit", sans-serif;
	--font-light: 300;
	--font-bold: 500;
}

/* 全体設定 */
*,*::before,*::after{box-sizing:border-box}*{border:0;margin:0;outline:0;padding:0;font:inherit;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;text-decoration:none;vertical-align:baseline}article,aside,footer,header,main,nav,article,section{display:block}img,picture,audio,canvas,video,svg{display:block;max-width:100%;height:auto;width:100%}br,hr{display:block}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}input,select{vertical-align:middle}body{line-height:1;line-break:strict;overflow-wrap:break-word;overflow-wrap:anywhere;word-break:normal;font-feature-settings:"palt";-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased}a{-webkit-tap-highlight-color:transparent}button{all:unset;display:inline-block;cursor:pointer;background:none;border:none;padding:0;margin:0;text-decoration:none;appearance:none;-webkit-appearance:none}


/******************/
/******************/
/* html format ****/

html {
	font-size: 2.5vw;
	overflow: hidden;
}
/* 1rem = 10px */

* {
	-ms-overflow-style: none;
	scrollbar-width: none;
    user-select: none;
}

*, *::before, *::after {
    -webkit-user-select: none; /* Safari, Chrome, iOS */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;         /* Standard */
    -webkit-touch-callout: none; /* iOS Safariで長押しメニューを禁止する */
}


* ::-webkit-scrollbar{
	display: none;
}

@media screen and (min-aspect-ratio: 2 / 3) {
	html {
		font-size: 1.68dvh;
	}
}


body {
	background-color: var(--background-color);
	color: var(--color-white);
	font-family: var(--font-family);
	font-weight: var(--font-bold);
	font-size:1.7rem;
	letter-spacing: 0.15em;
	line-height: 1;
	position:relative;
	text-align:left;
	text-size-adjust:100%;
	font-feature-settings:"palt";
	-webkit-font-smoothing:antialiased;
	font-smoothing:antialiased;
	-webkit-tap-highlight-color:transparent;
	width: 100%;
	height: auto;
	margin: 0 auto;
    user-select: none;
    -webkit-touch-callout: none;
}


/******************/
/* shortcodes *****/

/* 共通スタイル */
br[data-break] {
	display: none;
}
.image-wrapper{
	height: fit-content;
	width: 100%;
	display: block;
	line-height: 1;
}
.image-wrapper img {
	width: 100%;
	height: auto;
	line-height: 0;
	user-select: none;
}
.button {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.6rem 0 1.7rem 0;
	border: 0.1rem solid var(--border-color);
	background-color: var(--color-black);
	border-radius: 999px;
	color: var(--color-white);
	cursor: pointer;
}
.button.gradient {
	background-image: var(--gradient-color);
	border: none;
}
.button.icon {
	column-gap: 1.2rem;
}
.button.icon .image-wrapper {
	width: 2rem;
	height: 2rem;
}
.button.back {
	padding: 1.2rem 1.6rem;
	position: fixed;
	top: 3.2rem;
	left: 1.6rem;
	cursor: pointer;
}
.button.icon.back .image-wrapper {
	width: 2rem;
	height: 2rem;
}
@media screen and (min-aspect-ratio: 2 / 3) {
	.button.back {
		left: calc(50vw - 33.3dvh + 1.6rem);
	}
}

/* 固有スタイル */
body {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 100dvh;
	overflow: hidden;
	touch-action: none;
	user-select: none;
	box-sizing: border-box;
}

.device {
	width: 100vw;
	height: auto;
	aspect-ratio: 2 / 3;
	position: relative;
}
.device::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	background-image: url("../assets/images/background.jpg");
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
}
@media screen and (min-aspect-ratio: 2 / 3) {
	.device {
		height: 100dvh;
		width: auto;
	}
	.device::before {
		background-image: url("../assets/images/background-wide.jpg");
	}
}


.screen {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 4rem 1.6rem 0 1.6rem;
}

.screen.active {
	display: block;
}

#screen-home .title-logo {
	font-size: 4rem;
	text-align: center;
	background-image: var(--gradient-color);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
#screen-home .subtitle {
	color: #929292;
	font-size: 1.7rem;
	font-weight: var(--font-light);
	display: block;
	margin-top: 1rem;
	text-align: center;
	letter-spacing: 0.28em;
}
#screen-home .mode-selection {
	margin-top: 6.2rem;
}
#screen-home .mode-selection {
	margin-top: 6.2rem;
}

#screen-home .mode-selection .mode-button {
	padding: 1.6rem;
	border-radius: 1.6rem;
	width: 100%;
	margin-top: 1.6rem;
	cursor: pointer;
}
#screen-home .mode-selection .mode-button.mode-4 {
	background-image: linear-gradient(80deg, #00EAFF, #006AFF);
	box-shadow: 0 0 0.8rem 0 rgba(0, 234, 255, 0.3);
}
#screen-home .mode-selection .mode-button.mode-5 {
	background-image: linear-gradient(80deg, #501FFF, #9A1FFF);
	box-shadow: 0 0 0.8rem 0 rgba(80, 31, 255, 0.3);
}
#screen-home .mode-selection .mode-button.mode-6 {
	background-image: linear-gradient(80deg, #FF00FF, #FF0048);
	box-shadow: 0 0 0.8rem 0 rgba(255, 0, 255, 0.3);
}
#screen-home .mode-selection .mode-button:first-of-type {
	margin-top: 0;
}
#screen-home .mode-selection .mode-button .button-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 0.1rem solid rgba(250, 250, 250, 0.5);
	padding-bottom: 1.2rem;
	margin-bottom: 1.2rem;
}
#screen-home .mode-selection .mode-button .button-label .play {
	font-size: 1.7rem;
	display: flex;
	align-items: center;
	column-gap: 1.2rem;
}
#screen-home .mode-selection .mode-button .button-label .play .icon {
	width: 2.4rem;
	height: 2.4rem;
}
#screen-home .mode-selection .mode-button .stats {
	font-size: 1.3rem;
	display: flex;
	align-items: center;
}
#screen-home .mode-selection .mode-button .space {
	display: block;
	width: 1.2rem;
}
#screen-home .collection-button {
	margin-top: 2.8rem;
	width: 80%;
	margin: 2.8rem auto 0 auto;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
}
#screen-home .developer-button {
	font-size: 1rem;
	width: fit-content;
	position: absolute;
	top: 0.5rem;
	right: 1.6rem;
	padding: 1rem 1rem 1rem 1.3rem;
	cursor: pointer;
	display: none;
}

#screen-home .buttons {
	display: flex;
	align-items: center;
	justify-content: space-between;
	column-gap: 2rem;
}

#screen-howPlay {
	position: absolute;
	z-index: 100;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	opacity: 0;
	pointer-events: none;
	transition: 0.5s;
}
#screen-howPlay.active {
	opacity: 1;
	pointer-events: all;
	backdrop-filter: blur(4rem);
}
#screen-howPlay .close-button {
	position: absolute;
	top: 2rem;
	right: 2rem;
	font-size: 7rem;
	line-height: 0.6;
	cursor: pointer;
}
#screen-howPlay .modal-content {
	overflow-x: hidden;
	overflow-y: auto;
	max-height: 100%;
}
#screen-howPlay .modal-content .content {
	padding: 8rem 2rem;
	min-height: fit-content;
}




#screen-collection {
	overflow-x: hidden;
	overflow-y: auto;
	position: fixed;
	top: 0;
	left: 0;
	height: 100dvh;
	padding-top: 0;
	padding-bottom: 0;
}
#screen-collection .inner {
	height: fit-content;
	padding-top: 12rem;
	padding-bottom: 6rem;
}
#screen-collection .title {
	font-size: 3.2rem;
	text-align: center;
}
#screen-collection .collection-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
	column-gap: 1.5rem;
	row-gap: 1.5rem;
	margin-top: 4.8rem;
}
#screen-collection .collection-list .collection-card {
	background-color: var(--color-black);
	border-radius: 0.8rem;
	border: 0.1rem solid var(--border-color);
	padding: 0.8rem 0.8rem 1.2rem 0.8rem;
	cursor: pointer;
}
#screen-collection .collection-list .collection-card .preview-grid {
	width: 100%;
	aspect-ratio: 1/1;
	margin: 0 auto 1.2rem auto;
	display: grid;
	gap: 0.2rem;
}
#screen-collection .collection-list .collection-card .preview-cell {
	width: 100%;
	height: 100%;
	border-radius: 0.2rem;
}
#screen-collection .collection-list .collection-card .level {
	font-size: 1.3rem;
	text-align: center;
}
@media screen and (min-aspect-ratio: 2 / 3) {
	#screen-collection {
		width: 66.6dvh;
		left: calc(50vw - 33.3dvh);
	}
}


#screen-developer {
	padding-top: 12rem;
}
#screen-developer .developer-grid-layout {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(2, 1fr);
	column-gap: 1rem;
	row-gap: 1rem;
	width: fit-content;
}
#screen-developer input,
#screen-developer select {
	display: block;
}
#screen-developer h2 {
	margin-bottom: 2rem;
}
#screen-developer label {
	margin-bottom: 1rem;
	display: block;
}
#screen-developer .setting-group {
	margin-bottom: 2rem;
}
#screen-developer .button {
	cursor: pointer;
}



#screen-game {
	padding-top: 10rem;
}
#screen-game .game-indicator {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 1.2rem;
	pointer-events: none;
}
#screen-game .game-indicator .level-indicator {
	font-size: 2rem;
}
#screen-game .game-indicator .level-indicator .large {
	font-size: 1.5em;
}
#screen-game .game-indicator .combo-indicator {
	font-size: 2rem;
}
#screen-game .mana-bar-container {
	width: 100%;
	height: 1.6rem;
	background-color: var(--color-black);
	border: 0.1rem solid var(--border-color);
	margin-bottom: 4rem;
	border-radius: 999px;
	overflow: hidden;
}
#screen-game .mana-bar-container .mana-bar-fill {
	height: 100%;
	width: 100%;
	background: var(--gradient-color);
	transition: width 0.3s cubic-bezier(0.2, 1, 0.4, 1);
}

#screen-game .puzzle-grid {
	display: grid;
	gap: 0.8rem;
	position: relative;
	user-select: none;
}

#screen-game .puzzle-grid .puzzle-tile {
	aspect-ratio: 1 / 1;
	border-radius: 0.4rem;
	position: relative;
	transition: filter 0.1s ease, box-shadow 0.3s ease;
	cursor: pointer;
	touch-action: none;
	will-change: transform;
}
#screen-game .puzzle-grid .puzzle-tile::after {
	user-select: none;
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: block;
	width: calc(100% + 0.8rem);
	height: calc(100% + 0.8rem);
}
#screen-game .puzzle-grid .puzzle-tile.correct {
	border: 0.2rem solid var(--color-white);
	box-shadow: 0 0 2rem currentColor;
}
#screen-game .puzzle-grid .puzzle-tile.cleared-animation {
	transform: scale(0.9) !important;
	filter: brightness(1.5) saturate(1.2);
	z-index: 2;
}
#screen-game .puzzle-grid .puzzle-tile.fixed {
	cursor: default;
}
#screen-game .puzzle-grid .puzzle-tile.fixed::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: block;
	width: 35%;
	height: 35%;
	background-image: url("../assets/images/icon-lock.svg");
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	opacity: 0.5;
}
#screen-game .puzzle-grid .puzzle-tile.dragging {
	z-index: 100 !important;
	box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.7);
	pointer-events: none;
}

#visual-effects-layer {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 5000;
}

#combo-notification {
	position: fixed;
	top: 40%;
	left: 50%;
	pointer-events: none;
	color: var(--color-yellow);
	font-size: 4rem;
	z-index: 6000;
	opacity: 0;
	text-shadow: 0 0 2rem rgba(221, 232, 0, 0.9);
	white-space: nowrap;
	width: fit-content;
}
#combo-notification.animate-combo-notification {
	animation: combo-floating-animation 0.6s ease-out forwards;
}
@keyframes combo-floating-animation {
	0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
	30% { opacity: 1; transform: translate(-50%, -5rem) scale(1.2); }
	100% { opacity: 0; transform: translate(-50%, -10rem) scale(1); }
}

.overlay-screen {
	z-index: 10000;
	pointer-events: none;
	display: block;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 0;
}
.overlay-screen.is-show {
	pointer-events: all;
}
.overlay-screen .overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.5s;
	backdrop-filter: blur(4rem);
	background-color: rgba(0, 0, 0, 0.7);
}
.overlay-screen.is-show .overlay {
	opacity: 1;
}
.overlay-screen .inner {
	position: relative;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.7s;
	width: 100%;
}
.overlay-screen.is-show .inner {
	opacity: 1;
	height: fit-content;
}
#fail-overlay h2 {
	color: var(--color-red);
	font-size: 4rem;
	margin-bottom: 4rem;
	text-align: center;
}
#fail-overlay .button.icon.gradient {
	margin-bottom: 1.6rem;
}

#win-overlay h2 {
	font-size: 4rem;
	margin-bottom: 4rem;
	text-align: center;
}
#win-overlay .button.icon.gradient {
	margin-bottom: 1.6rem;
}
