:root {
	--bg: #f7f7f5;
	--fg: #1b1b1a;
	--muted: #6b6b66;
	--line: #d6d6d0;
	--accent: #2d5bd7;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #161615;
		--fg: #ececea;
		--muted: #9a9a94;
		--line: #3a3a37;
		--accent: #7f9ef5;
	}
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body { font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; display: flex; flex-direction: column; }
header { position: relative; display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
#bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: sp-load 8s cubic-bezier(.1,.7,.2,1) forwards; }
#bar[hidden] { display: none; }
#bar.done { animation: none; transform: scaleX(1); opacity: 0; transition: opacity .25s .1s; }
@keyframes sp-load { from { transform: scaleX(0); } to { transform: scaleX(.9); } }
@media (prefers-reduced-motion: reduce) { #bar { animation: none; transform: scaleX(.5); } }
header form { flex: 1; min-width: 0; }
#link, #cloak { flex: none; }
body.bar-off header { display: none; }
#showbar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 10; min-width: 0; padding: 0 14px; line-height: 14px; font-size: 12px; border-top: 0; border-radius: 0 0 7px 7px; background: var(--bg); opacity: .35; transition: opacity .15s; }
#showbar:hover, #showbar:focus-visible { opacity: 1; }
#showbar[hidden] { display: none; }
form { display: flex; gap: 6px; }
form[hidden] { display: none; }
input { flex: 1; min-width: 0; font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: inherit; }
input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
button { font: inherit; min-width: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: inherit; cursor: pointer; }
#login button { background: var(--accent); color: #fff; border-color: var(--accent); }
main { flex: 1; display: grid; place-content: center; text-align: center; padding: 16px; }
main[hidden] { display: none; }
h1 { font-weight: 600; font-size: 1.4rem; margin: 0 0 0.5rem; }
#status { color: var(--muted); margin: 0; }
iframe { flex: 1; width: 100%; border: 0; background: #fff; }
iframe[hidden] { display: none; }
