body {
	font-family: Arial, sans-serif;
	background-color: #f9f9f9;
	display: flex;
	justify-content: center;
}
.container {
	max-width: 1200px;
	width: 100%;
}
h1 {
	text-align: center;
}
h1 a {
	color: black;
	text-decoration: none;
}
.search-container {
	text-align: center;
	margin-bottom: 20px;
}
.search-input {
	padding: 10px;
	width: 80%;
	font-size: 1.1em;
	max-width: 1200px;
	margin-bottom: 10px;
}
.tag-list {
	text-align: center;
	margin-bottom: 20px;
	max-width: 1200px;
	overflow-x: auto;
	white-space: nowrap;
}
.tag-list span {
	display: inline-block;
	margin: 0 3px;
	padding: 5px 5px;
	background-color: #eee;
	border-radius: 3px;
	cursor: pointer;
	font-size: 0.8em;
	white-space: normal;
}
.tag-list span:hover {
	background-color: #ddd;
}
.tag-list .selected {
	background-color: #F29FA4;
	color: white;
}
.tag-list .selected:hover {
	background-color: #c7777c;
	color: white; 
}
.tag-list span:hover {
	background-color: #ddd; 
}
.entry {
	margin: 10px 0;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 5px;
	background-color: #fff;
	max-width: 1200px;
}
.word-container {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}
.word {
	font-weight: bold;
	font-size: 1.2em;
}
.same-names {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	font-size: 0.75em;
	color: #888;
}
.same-name {
	display: inline-block;
	padding: 2px 6px;
	background-color: #f5f5f5;
	border-radius: 3px;
	cursor: help;
	transition: all 0.2s;
	position: relative;
}
.same-name:hover {
	background-color: #e8e8e8;
	color: #333;
}
.same-tags {
	font-size: 0.9em;
	color: #999;
	margin-left: 3px;
}
.same-name[title]:not([title=""])::after {
	content: attr(title);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 10px;
	background-color: rgba(0, 0, 0, 0.85);
	color: white;
	border-radius: 4px;
	font-size: 0.9em;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
	margin-bottom: 5px;
	z-index: 1000;
}
.same-name:hover[title]:not([title=""])::after,
.same-name.active[title]:not([title=""])::after {
	opacity: 1;
}
.meaning {
	margin-top: 5px;
	font-size: 0.9em;
	color: #555;
}
.tags {
	margin-top: 10px;
	font-size: 0.8em;
	color: #777;
}
.tags span {
	margin-right: 5px;
	margin-top: 5px;
	background-color: #eee;
	padding: 3px 5px;
	border-radius: 3px;
}
a {
	color: blue;
	text-decoration: underline;
}
.paiimage {
	white-space: nowrap;
	width: 40px;
	height: auto;
	margin-right: 5px;
	max-width: 100%;
	box-sizing: border-box;
}
.paiimage.horizontal {
	transform: rotate(-90deg);
	display: inline-block;
	margin: 0 15px;
	vertical-align: middle;
	position: relative;
	top: -15px;
}
.tag-row {
	margin-top: 5px;
}
.small-tag {
	font-size: 0.8em !important;
	margin: 0 2px !important;
	padding: 2px 2px !important;
}
@media (max-width: 790px) {
	body {
		margin: 5px;
		padding: 5px;
	}
	.search-input {
		padding: 5px;
	}
	.tag-list {
		margin-bottom: 10px;
	}
	.entry {
		margin: 5px 0;
		padding: 5px;
	}
	.paiimage {
		width: 5vw;
		margin-right: 2px;
	}
	.paiimage.horizontal {
		margin: 0 2vw;
	}
	.small-tag {
		font-size: 0.8em !important;
		margin: 0 2px !important;
		padding: 2px 2px !important;
	}
	/* 모바일에서 대체 명칭 스타일 */
	.word-container {
		gap: 8px;
	}
	.same-names {
		font-size: 0.7em;
		gap: 3px;
	}
	.same-name {
		padding: 1px 4px;
		font-size: 0.95em;
	}
	/* 모바일에서는 툴팁을 위로 너무 멀리 두지 않음 */
	.same-name::after {
		font-size: 0.85em;
		white-space: normal;
		max-width: 200px;
		text-align: center;
	}
}