main {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.grid {
	display: grid;
	margin-top: 20px;
	grid-template-rows: repeat(2, 300px);
	grid-template-columns: repeat(4, 300px);
	grid-template-areas:
		'b b t t'
		'b b s set';
	justify-content: center;
	opacity: 0.8;
	cursor: pointer;
}

.grid div{
	border: solid 1px #000912;
	transition: 0.3s;
	background: #06111c;
}

.grid div h2 {
	margin: 5px 20px;
	font-size: 40px;
	font-weight: 100;
}

.grid p {
	margin: 0px 20px;
	font-size: 12px;
}

.grid:has(:hover) > div:not(:hover){
	background: #000a13;
}

.setting p {
	color: red;
}

/* ===== SETTING 패널 ===== */
.settingSection {
	position: absolute;
	background-color: rgba(0, 6, 12, 0.6);
	backdrop-filter: blur(3px);
	width: 100%;
	height: 100%;
	z-index: 10;
	align-items: center;
	justify-content: center;
	display: none; /* openSettingPanel()에서 flex로 전환 */
}

.settingPanel {
	box-sizing: border-box;
	width: 420px;
	padding: 36px 40px 32px;
	background-color: #06111c;
	border: 1px solid #1b2a3a;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.settingTitle {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
}

.settingDesc {
	margin: -12px 0 4px;
	font-size: 13px;
	color: #8a9bb0;
	line-height: 1.5;
}

.settingField {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.settingLabel {
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	color: #c9d3de;
}

.textbox {
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	padding: 0 14px;
	background: #000d18;
	border: 1px solid #2a3a4c;
	border-radius: 10px;
	color: #ffffff;
	font-family: inherit;
	font-size: 16px;
	outline: none;
	transition: border-color 0.2s;
}

.textbox::placeholder {
	color: #4f6176;
}

.textbox:focus {
	border-color: #ffd27a;
}

/* 접속 대기 여부: 두 칸짜리 토글 */
.segmented {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	background: #000d18;
	border: 1px solid #2a3a4c;
	border-radius: 10px;
}

.segmented label {
	cursor: pointer;
}

.segmented input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.segmented span {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	border-radius: 7px;
	font-size: 14px;
	color: #8a9bb0;
	transition: background 0.2s, color 0.2s;
}

.segmented input:checked + span {
	background: #1c2d40;
	color: #ffffff;
	font-weight: 700;
}

.segmented input:focus-visible + span {
	outline: 2px solid #ffd27a;
}

.settingActions {
	display: flex;
	gap: 10px;
	margin-top: 8px;
}

.settingActions button {
	flex: 1;
	height: 46px;
	border: 0;
	border-radius: 10px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.2s;
}

.settingActions button:hover {
	opacity: 0.85;
}

.settingCancel {
	background: #1c2d40;
	color: #c9d3de;
}

.settingButton {
	background: #ffd27a;
	color: #000d18;
}

@media (max-width: 1450px) or (max-height: 900px) {
	.grid{
		grid-template-rows: repeat(2, 250px);
		grid-template-columns: repeat(4, 250px);
	}
	
}

@media (max-width: 1000px) {
	.grid{
		grid-template-rows: repeat(3, 200px);
		grid-template-columns: repeat(2, 200px);
		grid-template-areas:
			'b b'
			's t'
			'set t';
	}
	
	.grid div h2 {
		font-size: 36px;
	}
	
	.grid p {
		display: none;
	}
}
