.dialog-backdrop {
	position: fixed;
	inset: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(3, 6, 20, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: dialog-fade 0.25s ease;
}

.dialog-backdrop[hidden] {
	display: none;
}

.dialog {
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: min(720px, 100%);
	padding: 8px;
	border-radius: 22px;
	background: repeating-linear-gradient(-45deg, var(--red) 0 14px, #fff 14px 28px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 211, 92, 0.18);
	animation: dialog-rise 0.3s ease;
}

.dialog-inner {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-radius: 15px;
	background: linear-gradient(180deg, #0c1745 0%, #14235a 100%);
	overflow: hidden;
}

.dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 14px 12px 20px;
	border-bottom: 1px solid rgba(255, 211, 92, 0.3);
}

.dialog-header h2 {
	margin: 0;
	font-family: var(--heading-font);
	font-size: 2rem;
	line-height: 1.1;
	color: var(--gold);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.dialog-close {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.dialog-close:hover,
.dialog-close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.dialog-body {
	overflow-y: auto;
	padding: 16px 20px 22px;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.dialog-body::-webkit-scrollbar {
	width: 8px;
}

.dialog-body::-webkit-scrollbar-track {
	background: transparent;
}

.dialog-body::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
}

.dialog-body::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.4);
}

.attributions-intro {
	margin: 0 0 18px;
	color: rgba(255, 255, 255, 0.85);
}

.attribution-group {
	margin-bottom: 20px;
}

.attribution-group:last-child {
	margin-bottom: 0;
}

.attribution-group-title {
	margin: 0 0 10px;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 1rem;
	color: var(--gold);
}

.attribution-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.attribution-entry {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.attribution-icon {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	padding: 6px;
	border-radius: 12px;
	background: #ececec;
	object-fit: contain;
}

.attribution-emoji {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 1.6rem;
	line-height: 1;
}

.attribution-title {
	font-weight: 700;
	color: #fff;
}

.attribution-creator,
.attribution-detail {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.7);
}

.attribution-link {
	display: inline-block;
	margin-top: 4px;
	padding: 2px 12px;
	border-radius: 999px;
	background: rgba(255, 211, 92, 0.14);
	font-size: 0.85rem;
	color: var(--gold);
	text-decoration: none;
	transition: background 0.2s ease;
}

.attribution-link:hover,
.attribution-link:focus-visible {
	background: rgba(255, 211, 92, 0.3);
}

.menu-link {
	width: 100%;
	margin-top: 6px;
	padding: 8px 0 2px;
	border: none;
	border-top: 1px solid rgba(0, 0, 0, 0.14);
	background: none;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	color: #222;
	text-align: left;
	cursor: pointer;
}

.menu-link:hover,
.menu-link:focus-visible {
	text-decoration: underline;
}

@keyframes dialog-fade {
	from {
		opacity: 0;
	}
}

@keyframes dialog-rise {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
}

@media (max-width: 480px) {
	.dialog {
		padding: 6px;
		border-radius: 18px;
	}

	.dialog-inner {
		border-radius: 13px;
	}

	.dialog-header h2 {
		font-size: 1.7rem;
	}

	.dialog-body {
		padding: 14px 16px 20px;
	}

	.attribution-icon {
		width: 40px;
		height: 40px;
		padding: 5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dialog-backdrop,
	.dialog {
		animation: none;
	}
}
