:root {
	--ink: #12202a;
	--muted: #5a6b76;
	--paper: #f3f7f5;
	--panel: rgba(255, 255, 255, 0.72);
	--line: rgba(18, 32, 42, 0.12);
	--accent: #0f766e;
	--accent-ink: #043f3a;
	--danger: #b42318;
	--danger-soft: #fef3f2;
	--shadow: 0 18px 50px rgba(18, 32, 42, 0.08);
	--radius: 18px;
	--font: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	font-family: var(--font);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.45;
}

.atmosphere {
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(900px 480px at 12% -10%, rgba(15, 118, 110, 0.18), transparent 60%),
		radial-gradient(700px 420px at 90% 8%, rgba(14, 70, 92, 0.14), transparent 55%),
		linear-gradient(180deg, #e8f1ef 0%, #f6f8f7 42%, #eef2f4 100%);
	animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
	from {
		transform: scale(1) translateY(0);
	}
	to {
		transform: scale(1.04) translateY(-12px);
	}
}

.shell {
	width: min(760px, calc(100% - 2rem));
	margin: 0 auto;
	padding: 3.5rem 0 4rem;
}

.brand {
	margin-bottom: 2rem;
	animation: rise 0.7s ease both;
}

.brand-actions {
	margin: 1rem 0 0;
}

.login-shell {
	padding-top: 4.5rem;
}

.login-card {
	display: grid;
	gap: 0.75rem;
	padding: 1.5rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	backdrop-filter: blur(10px);
	max-width: 26rem;
}

.login-label {
	font-weight: 600;
	font-size: 0.95rem;
}

.login-card input[type="password"] {
	width: 100%;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	font: inherit;
	background: #fff;
	color: var(--ink);
}

.login-card input[type="password"]:focus {
	outline: 2px solid rgba(15, 118, 110, 0.35);
	border-color: var(--accent);
}

.login-card .btn {
	justify-self: start;
}

.login-card code {
	font-family: var(--mono);
	font-size: 0.85em;
}

.mark {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.lede {
	margin: 0.75rem 0 0;
	max-width: 36rem;
	color: var(--muted);
	font-size: 1.05rem;
}

.upload,
.library {
	animation: rise 0.8s ease both;
	animation-delay: 0.08s;
}

.dropzone {
	background: var(--panel);
	backdrop-filter: blur(10px);
	border: 1.5px dashed rgba(15, 118, 110, 0.35);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.75rem;
	transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dropzone.is-dragging {
	border-color: var(--accent);
	background: rgba(15, 118, 110, 0.08);
	transform: translateY(-2px);
}

.dropzone-inner {
	display: grid;
	gap: 0.5rem;
	justify-items: start;
}

.dropzone-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
}

.dropzone-hint {
	margin: 0 0 0.5rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.btn {
	appearance: none;
	border: 0;
	border-radius: 10px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	padding: 0.65rem 1rem;
	transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

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

.btn.primary {
	background: var(--accent);
	color: #fff;
}

.btn.primary:hover {
	background: var(--accent-ink);
}

.btn.ghost {
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--line);
}

.btn.ghost:hover {
	color: var(--ink);
	border-color: rgba(18, 32, 42, 0.25);
}

.btn.danger {
	background: var(--danger-soft);
	color: var(--danger);
}

.btn.danger:hover {
	background: #fce8e6;
}

.status {
	min-height: 1.25rem;
	margin-top: 1rem;
	color: var(--muted);
	font-size: 0.92rem;
}

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

.status.ok {
	color: var(--accent-ink);
}

.library {
	margin-top: 2rem;
}

.library-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.85rem;
}

.library-head h2 {
	margin: 0;
	font-size: 1.15rem;
	letter-spacing: -0.02em;
}

.object-list {
	display: grid;
	gap: 0.65rem;
}

.object-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.85rem;
	align-items: center;
	padding: 0.95rem 1rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(18, 32, 42, 0.04);
	animation: rise 0.45s ease both;
}

.object-meta {
	min-width: 0;
}

.object-key {
	margin: 0;
	font-family: var(--mono);
	font-size: 0.9rem;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.object-key a {
	color: inherit;
	text-decoration: none;
}

.object-key a:hover {
	color: var(--accent);
	text-decoration: underline;
}

.object-sub {
	margin: 0.25rem 0 0;
	color: var(--muted);
	font-size: 0.85rem;
}

.object-actions {
	display: flex;
	gap: 0.45rem;
}

.empty {
	margin: 1rem 0 0;
	color: var(--muted);
}

.hidden {
	display: none !important;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pill {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: rgba(15, 118, 110, 0.12);
	color: var(--accent-ink);
	font-size: 0.85rem;
	font-weight: 600;
	margin-right: 0.5rem;
}

.section-hint {
	margin: 0 0 1rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.friends {
	margin-top: 2.5rem;
	animation: rise 0.85s ease both;
}

.friend-list {
	display: grid;
	gap: 0.65rem;
}

.friend-card,
.friend-form {
	padding: 1rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(18, 32, 42, 0.04);
}

.friend-card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.85rem;
	align-items: center;
}

.friend-name {
	margin: 0;
	font-weight: 600;
}

.friend-form {
	display: grid;
	gap: 0.65rem;
	margin-top: 1rem;
}

.friend-form h3 {
	margin: 0;
}

.friend-form input[type="text"],
.friend-form input[type="password"] {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	font: inherit;
	background: #fff;
}

.field-hint {
	margin: 0;
	color: var(--muted);
	font-size: 0.85rem;
}

.file-picks {
	display: grid;
	gap: 0.4rem;
	max-height: 220px;
	overflow: auto;
	padding: 0.5rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.65);
}

.pick {
	display: flex;
	gap: 0.55rem;
	align-items: flex-start;
	font-family: var(--mono);
	font-size: 0.85rem;
}

.form-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 560px) {
	.shell {
		padding-top: 2rem;
	}

	.object-row {
		grid-template-columns: 1fr;
	}

	.object-actions,
	.friend-card {
		grid-template-columns: 1fr;
	}

	.object-actions {
		justify-content: flex-start;
	}
}
