@import url("./styles/capture.css");
@import url("./styles/planner.css");
@import url("./styles/forms.css");
:root {
	--paper: #faf9f7;
	--ink: #292b26;
	--soft: #f1f0ec;
	--muted: #72746e;
	--line: #dfdfd8;
	--warm: #ede9df;
	--cool: #e8eef0;
	--radius: 9px;
	color: var(--ink);
	background: var(--paper);
	font:
		15px / 1.5 -apple-system,
		BlinkMacSystemFont,
		"PingFang SC",
		"Noto Sans SC",
		sans-serif;
	font-variant-numeric: tabular-nums;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
button {
	background: none;
	border: 0;
	cursor: pointer;
	touch-action: manipulation;
}
button:focus-visible,
input:focus-visible {
	outline: 2px solid #79887c;
}
button:disabled {
	cursor: default;
}
h1,
h2,
p {
	margin: 0;
}
h1 {
	font-size: 32px;
	letter-spacing: -0.04em;
	font-weight: 650;
}
h2 {
	font-size: 21px;
}
small {
	color: var(--muted);
}
.solid {
	background: var(--ink);
	color: white;
	border-radius: var(--radius);
	padding: 9px 16px;
}
#app {
	display: flex;
	height: 100vh;
	height: 100dvh;
}
aside {
	width: 192px;
	flex: none;
	display: flex;
	flex-direction: column;
	padding: 32px 18px;
	background: #f3f2ed;
	border-right: 1px solid var(--line);
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 23px;
	letter-spacing: 0.08em;
	padding-left: 12px;
}
.mark {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	transform: skewY(-8deg);
}
.mark i {
	width: 10px;
	height: 22px;
	background: #717b70;
	border-radius: 2px;
}
.mark i + i {
	background: #b1b6a9;
	transform: translateY(3px);
}
nav {
	display: grid;
	gap: 6px;
	margin-top: 52px;
}
nav button,
.prefs {
	display: flex;
	gap: 15px;
	align-items: center;
	padding: 12px 16px;
	border-radius: 8px;
	color: #62665e;
}
nav .selected {
	color: #2e352c;
	background: #e5e7de;
	font-weight: 600;
}
.prefs {
	margin-top: auto;
}
#view {
	min-width: 0;
	flex: 1;
	overflow: auto;
	padding: 32px clamp(20px, 5vw, 80px);
	max-width: 1500px;
	margin: auto;
	height: 100%;
}
label {
	display: grid;
	gap: 5px;
	font-size: 14px;
}
input,
textarea,
select {
	width: 100%;
	background: white;
	border: 1px solid var(--line);
	border-radius: 7px;
	padding: 9px;
	font-size: 16px;
}
dialog {
	border: none;
	border-radius: 14px;
	background: var(--paper);
	color: var(--ink);
	padding: 0;
	width: min(92vw, 410px);
	box-shadow: 0 16px 80px #252a2222;
}
dialog::backdrop {
	background: #26282335;
}
.sheet {
	padding: 22px;
	display: grid;
	gap: 15px;
}
.sheet header,
.sheet footer,
.pair {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.pair > * {
	flex: 1;
	min-width: 0;
}
.sheet footer {
	justify-content: flex-end;
}
.month,
.weekpick {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
}
.month button {
	height: 36px;
}
.month .active {
	background: var(--ink);
	color: white;
	border-radius: 8px;
}
[hidden] {
	display: none !important;
}
#toast {
	position: fixed;
	bottom: 90px;
	left: 50%;
	transform: translateX(-50%);
	padding: 9px 16px;
	background: var(--ink);
	color: white;
	border-radius: 8px;
	opacity: 0;
	pointer-events: none;
	z-index: 30;
}
#toast.show {
	opacity: 1;
}
@media (max-width: 700px) {
	#app {
		flex-direction: column;
	}
	aside {
		order: 2;
		width: 100%;
		padding: 0 10px env(safe-area-inset-bottom);
		border: 0;
		border-top: 1px solid var(--line);
		background: var(--paper);
	}
	aside .brand {
		display: none;
	}
	nav {
		margin: 0;
		display: flex;
		justify-content: space-around;
		gap: 0;
	}
	nav button {
		min-height: 53px;
		flex: 1;
		flex-direction: column;
		gap: 1px;
		font-size: 11px;
		padding: 5px;
	}
	nav .selected {
		background: none;
	}
	nav .selected svg {
		stroke-width: 2.2;
	}
	.prefs {
		position: absolute;
		right: 10px;
		top: max(6px, env(safe-area-inset-top));
		padding: 8px;
		z-index: 2;
	}
	.prefs span {
		display: none;
	}
	#view {
		margin: 0;
		padding: calc(14px + env(safe-area-inset-top)) 16px 0;
		width: 100%;
		height: 0;
	}
	h1 {
		font-size: 27px;
	}
	dialog {
		max-height: 82dvh;
	}
	.sheet {
		gap: 12px;
	}
}
@media (min-width: 701px) {
	#app > aside nav {
		position: relative;
		isolation: isolate;
		gap: 5px;
	}
	nav button {
		position: relative;
		min-height: 45px;
		transition:
			background 0.18s,
			color 0.18s;
	}
	nav button:hover {
		background: #eaece4;
	}
	nav button.selected {
		background: transparent;
		color: #354031;
	}
	.nav-glass {
		position: absolute;
		pointer-events: none;
		z-index: -1;
		border-radius: 10px;
		background: linear-gradient(115deg, #dce4d5d9, #edf0e5a8 65%, #dfe6d8b8);
		border: 1px solid #798b6a2e;
		box-shadow:
			inset 0 1px 0 #ffffffc4,
			0 2px 6px #45523a09;
		backdrop-filter: blur(7px);
	}
	.nav-glass::before {
		content: "";
		position: absolute;
		left: 4px;
		top: 50%;
		transform: translateY(-50%);
		width: 2px;
		height: 16px;
		background: #75846c;
		border-radius: 2px;
	}
	nav svg {
		width: 19px;
		height: 19px;
	}
}
@media (max-width: 700px) {
	#app > aside {
		flex-direction: row;
		align-items: center;
		padding-inline: 8px;
	}
	#app > aside nav {
		flex: 1;
		min-width: 0;
	}
	#app > aside .prefs {
		position: static;
		margin: 0 0 0 3px;
		display: grid;
		place-items: center;
		border-radius: 0;
		border-left: 1px solid var(--line);
		width: 43px;
		min-height: 44px;
		padding: 6px;
		color: var(--muted);
	}
	#app > aside .prefs svg {
		width: 17px;
	}
}

#app nav button:disabled {
	color: #a7aaa1;
	background: transparent;
	cursor: default;
}
