* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #222;
	line-height: 1.6;
	background: #f5f7fa;
}

.site-header,
header {
	background: #1e3a5f;
	color: white;
	padding: 1.5rem 1rem;
}

.site-header .brand {
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: 1100px;
	margin: 0 auto;
}

.site-logo {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: contain;
	flex: 0 0 auto;
}

.brand-copy h1,
header h1 {
	margin: 0;
	font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.tagline,
.tagling {
	margin: 0.25rem 0 0;
	opacity: 0.85;
}

main {
	max-width: 800px;
	margin: 2rem auto;
	padding: 0 1rem;
}

section {
	margin-bottom: 1.5rem;
	padding: 2rem;
	background: white;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

section h2 {
	margin: 0 0 1rem;
	color: #1e3a5f;
}

section p + h2 {
	margin-top: 1.5rem;
}

section ul {
	margin-top: 1rem;
	padding-left: 1.5rem;
}

section li {
	margin-bottom: 0.5rem;
}

a {
	color: #1e3a5f;
}

footer {
	padding: 2rem 1rem;
	color: #666;
	font-size: 0.9rem;
	text-align: center;
}

.upload-page > header {
	text-align: center;
}

.upload-main {
	max-width: 860px;
}

.upload-panel {
	margin-bottom: 1.25rem;
	padding: 1.5rem;
	border: 1px solid #d9e0e8;
	border-radius: 6px;
	background: white;
}

.upload-panel h2 {
	margin-bottom: 1rem;
	color: #1e3a5f;
	font-size: 1.35rem;
}

.upload-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.upload-form {
	display: grid;
	gap: 0.75rem;
}

.upload-form label {
	font-weight: 600;
}

.upload-form input[type="password"],
.upload-form input[type="file"] {
	width: 100%;
	padding: 0.7rem;
	border: 1px solid #aeb9c6;
	border-radius: 4px;
	font: inherit;
}

.upload-form button,
.secondary-button {
	width: fit-content;
	padding: 0.65rem 1rem;
	border: 0;
	border-radius: 4px;
	background: #1e3a5f;
	color: white;
	font: inherit;
	cursor: pointer;
}

.upload-form button:hover,
.secondary-button:hover {
	background: #294d77;
}

.secondary-button {
	background: #526579;
}

.upload-hint,
.upload-back {
	color: #596675;
	font-size: 0.92rem;
}

.upload-message {
	margin-bottom: 1rem;
}

.upload-message.error {
	color: #a42121;
}

.upload-message.success {
	color: #17653a;
}

.icon-preview {
	display: block;
	width: 96px;
	height: 96px;
	margin: 1rem 0;
	object-fit: contain;
	border: 1px solid #d9e0e8;
	border-radius: 4px;
	background-color: #f0f3f6;
	background-image: linear-gradient(45deg, #e1e6eb 25%, transparent 25%),
		linear-gradient(-45deg, #e1e6eb 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #e1e6eb 75%),
		linear-gradient(-45deg, transparent 75%, #e1e6eb 75%);
	background-size: 16px 16px;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.image-count {
	color: #596675;
	font-size: 0.95rem;
}

.image-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
}

.image-grid figure {
	min-width: 0;
	margin: 0;
}

.image-grid img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: contain;
	background: #f0f3f6;
	border: 1px solid #d9e0e8;
	border-radius: 4px;
}

.image-grid figcaption {
	margin-top: 0.4rem;
	font-size: 0.82rem;
	word-break: break-word;
}

.upload-back {
	margin: 1.5rem 0;
}

@media (max-width: 520px) {
	.site-header .brand {
		align-items: flex-start;
	}

	.site-logo {
		width: 56px;
		height: 56px;
	}

	section {
		padding: 1.25rem;
	}

	.upload-heading {
		align-items: flex-start;
	}
}
