.site-root {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	box-sizing: border-box;
}

:root {
	color-scheme: light dark;
	--bg: #ffffff;
	--surface: #fbfbfd;
	--muted: #6b7280;
	--text: #0f172a;
	--accent: #0066cc;
	--accent-contrast: #ffffff;
	--radius: 12px;
	--shadow: 0 8px 30px rgba(15,23,42,0.08);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b1220;
		--surface: #071022;
		--muted: #9aa4b2;
		--text: #e6eef8;
		--accent: #4aa3ff;
		--accent-contrast: #012040;
		--shadow: 0 10px 40px rgba(2,6,23,0.6);
	}
}

body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
	background: linear-gradient(180deg, var(--bg), var(--surface));
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.card {
	width: 100%;
	max-width: 880px;
	background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
	box-sizing: border-box;
}

.card h1 {
	margin: 0 0 0.5rem 0;
	font-size: 1.6rem;
}

.form-row {
	margin-bottom: 0.75rem;
}

label {
	display: block;
	font-size: 0.9rem;
	color: var(--muted);
	margin-bottom: 0.35rem;
}

input[type="text"],
textarea,
input[type="file"],
input[type="number"] {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border-radius: 10px;
	border: 1px solid rgba(15,23,42,0.08);
	background: linear-gradient(180deg, rgba(250,250,255,0.02), rgba(0,0,0,0));
	color: var(--text);
	box-sizing: border-box;
}

textarea { min-height: 120px; resize: vertical; }

.geo-status { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--accent);
	color: var(--accent-contrast);
	border: none;
	padding: 0.6rem 1rem;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 600;
}

.btn:active { transform: translateY(1px); }

.btn.secondary {
	background: transparent;
	color: var(--accent);
	border: 1px solid rgba(74,163,255,0.16);
	padding: 0.5rem 0.75rem;
}

.btn.secondary:hover { background: rgba(74,163,255,0.06); }

.banner {
	border-radius: 10px;
	padding: 0.6rem 0.9rem;
	margin-bottom: 0.75rem;
}
.banner.success {
	background: rgba(34,197,94,0.12);
	color: #0f5132;
	border: 1px solid rgba(34,197,94,0.18);
}

.missy-image {
	max-width: 160px;
	height: auto;
	border-radius: 18px;
	box-shadow: 0 12px 30px rgba(2,6,23,0.08);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.missy-image:hover, .missy-image:focus { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(2,6,23,0.12); }

.debug {
	background: rgba(0,0,0,0.6);
	color: #e6eef8;
	border-radius: 10px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 9999;
	max-width: 420px;
	max-height: 45vh;
	overflow: auto;
	padding: 0.75rem 1rem;
	/* don't block touches on the page behind the overlay; only inner elements receive pointer events */
	pointer-events: none;
	box-shadow: 0 18px 48px rgba(2,6,23,0.6);
}

.debug > div,
.debug > span,
.debug > p,
.debug > pre,
.debug > code,
.debug > button,
.debug > input,
.debug > textarea,
.debug > label,
.debug > a {
	pointer-events: auto;
}

.debug-handle {
	position: absolute;
	left: 8px;
	top: 6px;
	width: 36px;
	height: 6px;
	border-radius: 4px;
	background: rgba(255,255,255,0.08);
	pointer-events: auto;
}

@media (max-width: 680px) {
	.card { padding: 1rem; }
	.missy-image { max-width: 120px; }
	.debug { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; max-height: 35vh; }
}

.centered { display: flex; gap: 1.25rem; align-items: center; }

.meta { color: var(--muted); font-size: 0.9rem; }

.container { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }

.form-actions { margin-top: 1rem; }

.photos-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1rem;
	align-items: start; /* ensure grid items align to top */
}

.photo-item { display: flex; gap: 1rem; align-items: flex-start; background: rgba(255,255,255,0.02); padding: 0.75rem; border-radius: 10px; min-width: 0; }
.photo-media { flex: 0 0 240px; max-width: 240px; height: 160px; overflow: hidden; border-radius: 8px; }
.photo-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-meta { flex: 1 1 auto; min-width: 0; }
.comment { border-top: 1px dashed rgba(0,0,0,0.06); padding-top: 0.5rem; margin-top: 0.5rem; }
.message { margin-top: 0.25rem; }

@media (max-width: 520px) {
	.photo-item { flex-direction: column; align-items: center; }
	.photo-media { flex: 0 0 auto; max-width: 100%; }
	.photo-meta { width: 100%; }
}

.disclaimer {
	margin-top: 1rem;
	padding: 0.5rem;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	font-size: 0.85rem;
	color: var(--muted);
	text-align: center;
}
