:root {
	--start-ink: #151515;
	--start-paper: #fffdf6;
	--start-card: #ffffff;
	--start-line: #e7dfc1;
	--start-yellow: #F2C500;
	--start-muted: #77736b;
}

body.start-page {
	margin: 0;
	padding: 0;
	background: var(--start-paper);
	color: var(--start-ink);
	font: 15px/1.45 Arial, Helvetica, sans-serif;
}

.start-shell {
	max-width: var(--sirka);
	margin: 0 auto;
	padding: 16px;
}

.start-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"brand user"
		"filters logout";
	align-items: center;
	column-gap: 18px;
	row-gap: 10px;
	min-height: 60px;
	padding: 12px 18px;
	background: var(--start-ink);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.start-brand {
	grid-area: brand;
	display: inline-flex;
	align-items: center;
	gap: 11px;
	color: #fff;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: .12em;
	text-decoration: none;
}

.start-brand img {
	display: block;
	border-radius: 8px;
}

.start-login-button,
.start-login-form button {
	border: 0;
	border-radius: 8px;
	background: var(--start-yellow);
	color: var(--start-ink);
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: 10px 15px;
}

.start-login-button {
	grid-area: user;
	justify-self: end;
}

.start-menu-toggle,
.start-menu-backdrop {
	display: none;
}

.start-login-button:hover,
.start-login-form button:hover {
	background: #ffe060;
}

.start-user-area {
	grid-area: user;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 12px;
}

.start-user-name {
	color: #fff;
	font-weight: 700;
}

.start-logout-button {
	grid-area: logout;
	justify-self: end;
	align-self: start;
	border: 0;
	border-radius: 8px;
	background: var(--start-yellow);
	color: var(--start-ink);
	padding: 10px 15px;
	font-weight: 700;
	text-decoration: none;
}

.start-logout-button:hover {
	background: #ffe060;
}

.start-private-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	color: #fff;
	text-decoration: none;
}

.start-private-toggle img {
	display: block;
	width: 18px;
	height: 18px;
}

.start-private-toggle:hover img {
	filter: sepia(1) saturate(8) hue-rotate(2deg) brightness(1.1);
}

.start-settings-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.start-settings-toggle img {
	display: block;
	width: 18px;
	height: 18px;
	filter: invert(1);
}

.start-settings-toggle:hover img {
	filter: invert(83%) sepia(85%) saturate(862%) hue-rotate(2deg) brightness(106%) contrast(103%);
}

.start-auth-button img {
	display: none;
}

.start-main {
	margin-top: 10px;
}

.start-box-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.start-filter-section {
	grid-area: filters;
	min-width: 0;
}

.start-header:not(.is-logged) .start-filter-section {
	grid-column: 1 / -1;
}

.start-box-filter {
	min-width: 150px;
	min-height: 30px;
	padding: 4px 12px;
	border: 1px solid #e0ae00;
	border-radius: 7px;
	background: var(--start-yellow);
	color: var(--start-ink);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
}

.start-box-filter:hover,
.start-box-filter.is-active {
	border-color: #a97d00;
	background: #ffe46a;
}

.start-link-box.is-filter-hidden,
.start-rss-box.is-filter-hidden {
	display: none;
}

.start-tooltip {
	position: fixed;
	z-index: 2000;
	box-sizing: border-box;
	max-width: min(300px, calc(100vw - 24px));
	padding: 8px 14px;
	border: 1px solid #d7a900;
	border-radius: 8px;
	background: #ffe477;
	box-shadow: 0 5px 13px rgba(0, 0, 0, .25);
	color: var(--start-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, calc(-100% + 5px));
	transition: opacity .12s ease, transform .12s ease;
}

.start-tooltip::after {
	position: absolute;
	bottom: -6px;
	left: 50%;
	width: 10px;
	height: 10px;
	border-right: 1px solid #d7a900;
	border-bottom: 1px solid #d7a900;
	background: #ffe477;
	content: '';
	transform: translateX(-50%) rotate(45deg);
}

.start-tooltip.is-visible {
	opacity: 1;
	transform: translate(-50%, -100%);
}

.favorites {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 15px;
	background: var(--start-card);
	border: 1px solid var(--start-line);
	border-radius: 14px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .04);
}


.favorites-links {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	gap: 8px;
}

.favorites-links.is-measuring {
	display: flex;
	visibility: hidden;
}

.favorites-links.is-measuring .favorite-link {
	flex: 0 0 auto;
	width: auto;
}

.favorites-row {
	display: grid;
	gap: 8px;
}

.favorite-link {
	display: inline-grid;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	grid-template-columns: 14px minmax(0, 1fr) 14px;
	column-gap: 8px;
	min-height: 30px;
	padding: 4px 10px;
	border: 1px solid #e0ae00;
	border-radius: 7px;
	background: var(--start-yellow);
	color: var(--start-ink);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
}

.favorite-link:hover {
	border-color: #a97d00;
	background: #ffe46a;
}

.link-icon {
	width: 14px;
	height: 14px;
	justify-self: end;
}

.link-picture,
.link-activity,
.link-private {
	width: 14px;
	height: 14px;
}

.link-picture {
	object-fit: contain;
}

.link-activity {
	position: relative;
	box-sizing: border-box;
	border: 1.5px solid rgba(21, 21, 21, .9);
	border-radius: 50%;
	overflow: hidden;
}

.link-activity::before {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: var(--click-fill);
	background: #171717;
}

.link-activity.is-neutral {
	border-color: rgba(21, 21, 21, .55);
	background: rgba(21, 21, 21, .13);
}

.link-activity.is-neutral::before {
	display: none;
}

.link-label {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.favorite-link .link-label {
	text-align: center;
}

.favorite-spacer {
	justify-self: start;
	width: 14px;
	height: 1px;
}

.start-legacy-content {
	margin-top: 5px;
	display: grid;
	grid-template-columns: repeat(var(--sloupcu), minmax(0, 1fr));
	gap: var(--start-gap);
	align-items: start;
}

.start-legacy-content > div {
	box-sizing: border-box;
	max-width: none;
	border: 1px solid var(--start-yellow);
	border-radius: 10px;
	overflow: hidden;
	background: var(--start-card);
}

.start-legacy-content .li_header {
	box-sizing: border-box;
	min-height: 38px;
	height: auto;
	padding: 10px 13px 10px 45px;
	margin-bottom: 4px;
	background-image: url('../../favicon/favicon-32x32.png');
	background-repeat: no-repeat;
	background-position: 12px center;
	background-size: 25px 25px;
	background-color: var(--start-ink);
	color: #fff;
	font-size: 12px;
	line-height: 18px;
	letter-spacing: .045em;
	text-align: left;
}

.start-legacy-content .li_header a {
	color: #fff;
}

.start-legacy-content .li_body {
	box-sizing: border-box;
	height: auto;
	padding: 1px 6px;
	line-height: normal;
}

.start-legacy-content .li_body a {
	display: grid;
	align-items: center;
	grid-template-columns: 14px minmax(0, 1fr) 14px;
	column-gap: 8px;
	box-sizing: border-box;
	min-height: 31px;
	height: auto;
	border: 1px solid #e0ae00;
	border-radius: 4px;
	background: var(--start-yellow);
	color: var(--start-ink);
	padding: 5px 8px;
	line-height: 16px;
}

.start-legacy-content .li_body a:hover {
	background: #ffe46a;
	color: var(--start-ink);
}

.start-legacy-content .li_spacer {
	display: block;
	height: 7px;
	line-height: 7px;
}

.start-legacy-content .start-rss-box .li_header,
.start-legacy-content .start-rss-box .li_header a {
	background-color: #252566;
	color: #fff;
}

.start-legacy-content > .pocasi {
	grid-column: 1 / -1;
	border: 0;
	border-radius: 0;
	background: transparent;
}


@media (max-width: 539px) {
	body.start-menu-open {
		overflow: hidden;
	}

	.start-header {
		grid-template-areas:
			"brand user"
			"menu logout";
	}

	.start-menu-toggle {
		grid-area: menu;
		justify-self: start;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 34px;
		padding: 7px 9px;
		border: 1px solid rgba(255, 255, 255, .45);
		border-radius: 7px;
		background: transparent;
		cursor: pointer;
	}

	.start-menu-toggle img {
		display: block;
		width: 20px;
		height: 20px;
		filter: invert(1);
	}

	.start-menu-backdrop {
		display: block;
		position: fixed;
		z-index: 1500;
		inset: 0;
		visibility: hidden;
		background: rgba(0, 0, 0, .48);
		opacity: 0;
		transition: opacity .22s ease, visibility 0s linear .22s;
	}

	body.start-menu-open .start-menu-backdrop {
		visibility: visible;
		opacity: 1;
		transition-delay: 0s;
	}

	.start-filter-section {
		position: fixed;
		z-index: 1600;
		top: 0;
		bottom: 0;
		left: 0;
		box-sizing: border-box;
		width: min(82vw, 320px);
		padding: 22px 16px;
		background: var(--start-ink);
		box-shadow: 5px 0 18px rgba(0, 0, 0, .3);
		overflow-y: auto;
		transform: translateX(-100%);
		transition: transform .22s ease;
	}

	body.start-menu-open .start-filter-section {
		transform: translateX(0);
	}

	.start-box-filters {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.start-box-filter {
		display: block;
		width: 100%;
		min-width: 0;
		min-height: 36px;
		text-align: left;
	}

	.start-user-area {
		gap: 8px;
	}

	.start-user-prefix {
		display: none;
	}

	.start-auth-label {
/*		display: none; */
	}

	.start-auth-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 40px;
		min-height: 0px;
		padding: 5px 10px;
	}

	.start-auth-button img {
		display: block;
		width: 20px;
		height: 20px;
		padding-left: 5px;
	}
}

.login-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.login-modal.is-open {
	display: flex;
}

.login-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .56);
}

.login-modal-dialog {
	position: relative;
	width: min(100%, 360px);
	padding: 27px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.login-modal-dialog h2 {
	margin: 0 28px 20px 0;
	font-size: 21px;
}

.start-settings-dialog {
	width: min(100%, 760px);
	max-height: calc(100vh - 32px);
	overflow: auto;
}

.start-settings-message {
	min-height: 18px;
	margin: -10px 28px 14px 0;
	color: #287333;
	font-size: 13px;
	font-weight: 700;
}

.start-settings-message.is-error {
	color: #a40000;
}

.start-settings-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.start-settings-table th,
.start-settings-table td {
	padding: 8px 10px;
	border: 1px solid var(--start-line);
	text-align: left;
}

.start-settings-table th:last-child,
.start-settings-table td:last-child {
	width: 44px;
	text-align: center;
}

.start-settings-table th {
	background: #f4edcf;
}

.start-settings-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: var(--start-yellow);
	cursor: pointer;
}

.start-settings-action:hover {
	background: #ffe060;
}

.start-settings-action img {
	display: block;
	width: 16px;
	height: 16px;
}

.start-settings-value-input {
	box-sizing: border-box;
	width: 100%;
	min-width: 70px;
	padding: 5px 7px;
	border: 1px solid #a97d00;
	border-radius: 4px;
	font: inherit;
}

.login-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: transparent;
	color: #555;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
}

.start-login-form {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
}

.start-login-form label {
	font-size: 13px;
	font-weight: 700;
}

.start-login-error {
	margin: 0 0 6px;
	color: #a40000;
	font-size: 13px;
	font-weight: 700;
}

.start-logout-link {
	display: inline-block;
	margin-top: 8px;
	color: var(--start-ink);
	font-weight: 700;
}

.start-login-form input {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 8px;
	padding: 10px;
	border: 1px solid #bdb8ad;
	border-radius: 7px;
	background: #fff;
	font: inherit;
}

.start-login-form input:focus {
	outline: 3px solid rgba(247, 207, 38, .35);
	border-color: #a78600;
}

.start-login-form button {
	margin-top: 5px;
}

body.login-open {
	overflow: hidden;
}
