*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background: #fafafa;
	color: #111;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
.wrap {
	max-width: 480px;
	margin: 0 auto;
	padding: 24px 20px;
	min-height: 100%;
	display: flex;
	flex-direction: column;
}
header { text-align: center; margin-bottom: 20px; }
header h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
header p { color: #666; font-size: 0.95rem; margin: 0; }
.qr {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 14px;
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.qr canvas { display: block; image-rendering: pixelated; max-width: 100%; height: auto; }
.hint {
	text-align: center;
	font-size: 0.85rem;
	color: #666;
	margin: 16px 0 8px;
}
.hint strong { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: #111; letter-spacing: 0.05em; }
.btn {
	display: block;
	width: 100%;
	padding: 14px;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	background: #111;
	color: #fff;
	text-align: center;
	text-decoration: none;
	margin-top: 10px;
	transition: opacity 0.15s;
}
.btn:hover:not(:disabled) { opacity: 0.9; }
.btn.secondary { background: #fff; color: #111; border: 1px solid #ddd; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.spacer { flex: 1; min-height: 16px; }
.footer { text-align: center; font-size: 0.75rem; color: #999; margin-top: 16px; }
.field { margin: 12px 0; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: #444; }
.field input[type="file"], .field textarea {
	width: 100%;
	padding: 10px 12px;
	font: inherit;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
}
.field textarea { min-height: 100px; resize: vertical; }
.scanner {
	position: relative;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 1;
	margin: 12px 0;
	display: none;
}
.scanner.active { display: block; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.status {
	font-size: 0.85rem;
	color: #444;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 10px 12px;
	margin: 12px 0;
	min-height: 38px;
	word-break: break-word;
}
.status.error { background: #fff5f5; border-color: #ffd0d0; color: #a00; }
.status.ok { background: #f0faf4; border-color: #c7ebd4; color: #196b3a; }
.file-list {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}
.file-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-top: 1px solid #f3f3f3;
	font-size: 0.9rem;
}
.file-list li:first-child { border-top: 0; }
.file-list .name { flex: 1; min-width: 0; word-break: break-all; }
.file-list .size { color: #888; font-size: 0.8rem; flex-shrink: 0; }
.file-list .remove {
	background: transparent;
	border: 0;
	color: #888;
	font-size: 1.1rem;
	line-height: 1;
	padding: 4px 6px;
	cursor: pointer;
	border-radius: 4px;
}
.file-list .remove:hover { background: #f3f3f3; color: #a00; }
