:root {
	--bg: #f5f6f8;
	--surface: #ffffff;
	--border: #e2e5ea;
	--text: #1f2430;
	--muted: #6b7280;
	--accent: #f6821f;
	--accent-dark: #d96a08;
	--danger: #dc2626;
	--ok: #16a34a;
	--radius: 12px;
	--shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

* {
	box-sizing: border-box;
}

/* hidden 속성이 flex 등 author 스타일에 덮이지 않도록 */
[hidden] {
	display: none !important;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family:
		"Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system,
		"Segoe UI", sans-serif;
	line-height: 1.5;
}

.container {
	max-width: 760px;
	margin: 0 auto;
	padding: 32px 16px 64px;
}

.auth-view {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 16px;
}

.auth-card {
	max-width: 420px;
	width: 100%;
	text-align: center;
	margin-top: 0;
	padding: 40px 32px;
}

.auth-card h2 {
	font-size: 22px;
	margin-bottom: 8px;
}

.auth-card .subtitle {
	margin-bottom: 28px;
}

.google-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 22px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--shadow);
	transition: background 0.15s, box-shadow 0.15s;
}

.google-btn:hover {
	background: #f0f2f5;
	box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}

.google-btn svg {
	width: 20px;
	height: 20px;
}

#auth-error {
	margin-top: 16px;
}

.page-header h1 {
	margin: 0;
	font-size: 28px;
}

.page-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.user-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--muted);
	white-space: nowrap;
}

#user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--border);
}

.subtitle {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 20px;
	margin-top: 24px;
}

.card h2 {
	margin: 0 0 12px;
	font-size: 16px;
}

.form-row {
	display: flex;
	gap: 8px;
}

.form-row input[type="text"] {
	flex: 1;
}

input,
button {
	font: inherit;
}

input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
	color: var(--text);
}

input:focus {
	outline: 2px solid var(--accent);
	outline-offset: -1px;
	border-color: var(--accent);
}

#task-form input {
	margin-bottom: 8px;
}

#task-form .form-row {
	margin-bottom: 8px;
}

button {
	cursor: pointer;
	border: 1px solid var(--border);
	background: var(--surface);
	border-radius: 8px;
	padding: 9px 14px;
	color: var(--text);
	transition: background 0.15s, border-color 0.15s;
}

button:hover {
	background: #f0f2f5;
}

button.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
}

button.primary:hover {
	background: var(--accent-dark);
	border-color: var(--accent-dark);
}

.toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
}

.filters {
	display: flex;
	gap: 6px;
}

.chip {
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 14px;
}

.chip.active {
	background: var(--text);
	border-color: var(--text);
	color: #fff;
}

#search {
	width: 220px;
}

.status {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
}

.status.error {
	background: #fef2f2;
	color: var(--danger);
	border: 1px solid #fecaca;
}

.status.info {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.task-list {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.task {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 14px 16px;
}

.task input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	accent-color: var(--ok);
	flex: none;
}

.task .body {
	flex: 1;
	min-width: 0;
}

.task .name {
	font-weight: 600;
	word-break: break-word;
}

.task.completed .name {
	color: var(--muted);
	text-decoration: line-through;
}

.task .description {
	margin: 2px 0 0;
	color: var(--muted);
	font-size: 14px;
	word-break: break-word;
}

.task .meta {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--muted);
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 12px;
	background: #fef3c7;
	color: #92400e;
}

.task .actions {
	display: flex;
	gap: 6px;
	flex: none;
}

.task .actions button {
	padding: 6px 10px;
	font-size: 13px;
}

.task .actions button.danger {
	color: var(--danger);
	border-color: #fecaca;
}

.task .actions button.danger:hover {
	background: #fef2f2;
}

.task-edit {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.task-edit .form-row {
	display: flex;
	gap: 8px;
}

.task-edit .form-row input[type="text"] {
	flex: 1;
}

.empty {
	text-align: center;
	color: var(--muted);
	padding: 40px 0;
	margin: 0;
}

.page-footer {
	margin-top: 20px;
	text-align: center;
	color: var(--muted);
	font-size: 13px;
}

@media (max-width: 560px) {
	.form-row {
		flex-wrap: wrap;
	}

	.toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	#search {
		width: 100%;
	}

	.task {
		flex-wrap: wrap;
	}

	.task .actions {
		width: 100%;
		justify-content: flex-end;
	}
}
