/* Jelenlét (jelenlet.szelence.eu): one stylesheet for the four pages. No inline style anywhere (CSP: default-src 'self'),
   so every look is a class here. Works from 320 px up; light / dark follows the phone. */

:root {
	color-scheme: light dark;
	--bg: #f3f5f4;
	--card: #ffffff;
	--text: #14201a;
	--muted: #5a6a62;
	--line: #d5ddd9;
	--accent: #0b6e4f;
	--accent-text: #ffffff;
	--in: #0b6e4f;
	--out: #9a3412;
	--danger: #b42318;
	--ok-bg: #e3f4ec;
	--warn-bg: #fff4e0;
	--focus: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1613;
		--card: #18221d;
		--text: #e8efeb;
		--muted: #9bb0a5;
		--line: #2c3a33;
		--accent: #34b58a;
		--accent-text: #06231a;
		--in: #34b58a;
		--out: #f0925a;
		--danger: #ff8a80;
		--ok-bg: #13342a;
		--warn-bg: #3a2c12;
		--focus: #7aa2ff;
	}
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.page {
	max-width: 30rem;
	margin: 0 auto;
	padding: 1rem 0.875rem 2rem;
	min-height: 100vh;
}

.brand {
	margin: 0.5rem 0 1rem;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--accent);
}

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 1rem;
	padding: 1.125rem 1rem;
	margin-bottom: 1rem;
}

h2 { margin: 0 0 0.25rem; font-size: 1.375rem; line-height: 1.25; }
h3 { margin: 1rem 0 0.25rem; font-size: 1rem; }
p { margin: 0.5rem 0; }

.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.msg { font-size: 1.125rem; overflow-wrap: anywhere; }

.btn {
	display: block;
	width: 100%;
	min-height: 3.75rem;
	margin: 0.75rem 0 0;
	padding: 0.75rem 1rem;
	border: 2px solid transparent;
	border-radius: 0.875rem;
	font: inherit;
	font-size: 1.25rem;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	color: var(--accent-text);
	background: var(--accent);
	-webkit-tap-highlight-color: transparent;
}

.btn:disabled { opacity: 0.55; cursor: progress; }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.btn-in { background: var(--in); }
.btn-out { background: var(--out); color: #ffffff; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line); }

.station { margin-bottom: 0.5rem; }
.station-name { font-size: 1.375rem; font-weight: 700; }
.station-place { color: var(--muted); }

.note {
	margin-top: 0.75rem;
	padding: 0.625rem 0.75rem;
	border-radius: 0.625rem;
	background: var(--warn-bg);
	font-size: 0.9375rem;
}

.note-error { color: var(--danger); }

.done { text-align: center; }
.done-check {
	width: 4.5rem;
	height: 4.5rem;
	margin: 0 auto 0.5rem;
	border-radius: 50%;
	background: var(--ok-bg);
	color: var(--accent);
	font-size: 2.75rem;
	line-height: 4.5rem;
	font-weight: 700;
}
.done-name { font-size: 1.5rem; font-weight: 700; overflow-wrap: anywhere; }
.done-what { font-size: 1.375rem; margin: 0.25rem 0; }
.done-time { font-size: 2.5rem; font-weight: 700; color: var(--accent); }

.list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.list li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	padding: 0.5rem 0;
	border-top: 1px solid var(--line);
	font-size: 0.9375rem;
}
.list .dir-in { color: var(--in); font-weight: 700; }
.list .dir-out { color: var(--out); font-weight: 700; }

.mark {
	display: inline-block;
	padding: 0 0.4rem;
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	font-size: 0.8125rem;
	color: var(--muted);
}

.day { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.day:first-of-type { border-top: 0; }
.day h3 { margin-top: 0.25rem; }

.foot { margin-top: 1.5rem; text-align: center; }
.foot a { color: var(--accent); font-weight: 600; padding: 0.75rem; display: inline-block; }

.spinner {
	width: 1.5rem;
	height: 1.5rem;
	margin: 0 auto 0.5rem;
	border: 3px solid var(--line);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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