/* Mobile article layout corrections and persistent table-of-contents control. */
@media (max-width: 767px) {
	body.single-post {
		border-left: 0;
	}

	body.single-post .entry-header.mw-thin,
	body.single-post .post-inner.mw-thin {
		box-sizing: border-box;
		width: auto !important;
		max-width: none !important;
		margin-right: 16px !important;
		margin-left: 16px !important;
	}

	body.single-post #site-header .header-titles .site-title {
		margin-left: 4px !important;
	}

	body.single-post .chills-breadcrumbs {
		max-width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	body.single-post .chills-breadcrumbs::-webkit-scrollbar {
		display: none;
	}

	body.single-post .chills-breadcrumbs-list {
		width: max-content;
		min-width: 100%;
		max-width: none;
		flex-wrap: nowrap;
		align-items: center;
	}

	body.single-post .chills-breadcrumbs-item,
	body.single-post .chills-breadcrumbs-current {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	body.single-post .chills-cover .media-wrapper {
		width: 100% !important;
		margin-left: 0 !important;
	}

	body.single-post .chills-cover img {
		display: block;
		width: 100%;
		height: auto;
	}

	body.single-post .chills-article-body .entry-content .chills-fact {
		box-sizing: border-box;
		width: 100%;
		padding: 16px;
	}

	/* Keep the share control distinct while bringing the article tags closer. */
	body.single-post .chills-share {
		margin-bottom: 12px;
	}

	body.single-post .chills-post-tags {
		gap: 8px;
		margin-top: 32px;
	}

	/* Reserve room for the fixed mobile contents control and device safe area. */
	body.single-post {
		padding-bottom: calc(68px + env(safe-area-inset-bottom));
	}

	body.single-post .chills-post-meta {
		flex-wrap: wrap;
		align-items: center;
		column-gap: 24px;
		row-gap: 14px;
		font-size: 13px;
	}

	body.single-post .chills-post-meta > * {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	body.single-post .chills-post-meta .chills-meta-author {
		flex-basis: 100%;
	}

	body.single-post .chills-post-meta > span + span::before {
		left: -13px;
		height: 16px;
	}
}

@media (max-width: 1199px) {
	body.single-post {
		padding-bottom: calc(68px + env(safe-area-inset-bottom));
	}

	.chills-mobile-actions-bar[hidden],
	.chills-toc-backdrop[hidden],
	.chills-mobile-toc-sheet[hidden] {
		display: none !important;
	}

	.chills-mobile-actions-bar {
		position: fixed;
		z-index: 10051;
		inset: auto 0 0;
		box-sizing: border-box;
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
		width: 100%;
		min-height: 56px;
		margin: 0;
		padding: 4px 12px max(4px, env(safe-area-inset-bottom));
		border: 0;
		border-top: 2px solid #e83b50;
		border-radius: 0;
		background: #f1f2f2;
		box-shadow: 0 -5px 18px rgb(32 45 49 / 9%);
	}

	.chills-toc-trigger {
		position: static;
		z-index: auto;
		inset: auto;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 8px;
		width: 100%;
		min-width: 0;
		min-height: 44px;
		margin: 0;
		padding: 8px;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		color: #202d31;
		font: 500 14px/1.35 'Golos Text', Arial, sans-serif;
		text-align: left;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.chills-toc-trigger svg {
		flex: 0 0 22px;
		width: 22px;
		height: 22px;
		color: #e83b50;
	}

	body.single-post .chills-mobile-actions-bar .chills-share {
		position: relative;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		min-width: 0;
		min-height: 44px;
		margin: 0 !important;
		padding: 0 0 0 8px;
		border: 0;
		border-left: 1px solid #ddcdd0;
	}

	body.single-post .chills-mobile-actions-bar .chills-share-button {
		justify-content: center;
		min-height: 44px;
		padding: 8px;
		border: 0;
		background: transparent;
		color: #202d31;
		font-size: 14px;
		white-space: nowrap;
	}

	body.single-post .chills-mobile-actions-bar .chills-share-button:hover,
	body.single-post .chills-mobile-actions-bar .chills-share-button:focus-visible {
		border: 0;
		background: transparent;
		color: #e83b50;
	}

	body.single-post .chills-mobile-actions-bar .chills-share-feedback {
		position: absolute;
		right: 0;
		bottom: calc(100% + 8px);
		z-index: 10052;
		max-width: calc(100vw - 32px);
		padding: 8px 12px;
		border: 1px solid #46535a;
		background: #202d31;
		color: #fff;
		font-size: 12px;
		white-space: nowrap;
		box-shadow: 0 4px 16px rgb(32 45 49 / 14%);
	}

	body.single-post .chills-mobile-actions-bar .chills-share-feedback:empty {
		display: none;
	}

	.chills-toc-trigger:focus-visible,
	.chills-toc-close:focus-visible,
	.chills-toc-backdrop:focus-visible {
		outline: 2px solid #e83b50;
		outline-offset: -3px;
	}

	.chills-toc-backdrop {
		position: fixed;
		z-index: 10049;
		inset: 0;
		width: 100%;
		height: 100%;
		padding: 0;
		border: 0;
		background: rgb(17 25 28 / 46%);
		cursor: pointer;
	}

	.chills-mobile-toc-sheet {
		position: fixed;
		z-index: 10050;
		inset: auto 0 0;
		box-sizing: border-box;
		max-height: min(82dvh, 720px);
		padding: 0 20px calc(18px + env(safe-area-inset-bottom));
		border-top: 3px solid #e83b50;
		background: #fff;
		box-shadow: 0 -12px 32px rgb(17 25 28 / 14%);
	}

	.chills-mobile-toc-heading {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 18px 0 14px;
		background: #fff;
	}

	body.single-post .chills-mobile-toc-heading .chills-toc-title {
		margin: 0;
		padding: 0;
		font-size: 20px;
	}

	.chills-toc-close {
		flex: 0 0 auto;
		min-height: 40px;
		padding: 8px 0 8px 12px;
		border: 0;
		background: transparent;
		color: #687078;
		font: 500 14px/1.3 'Golos Text', Arial, sans-serif;
		cursor: pointer;
	}

	body.single-post .chills-mobile-toc-sheet .chills-toc {
		position: static;
		display: flex !important;
		flex-direction: column;
		width: auto;
		max-height: min(82dvh, 720px);
		margin: 0;
		padding: 0;
		border: 0;
		overflow: hidden;
	}

	body.single-post .chills-mobile-toc-sheet .chills-toc-title {
		position: static;
		flex: 0 0 auto;
	}

	body.single-post .chills-mobile-toc-sheet .chills-toc ul {
		flex: 1 1 auto;
		min-height: 0;
		margin: 0;
		padding: 0 0 8px;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	body.single-post .chills-mobile-toc-sheet .chills-toc li {
		margin: 0;
		border-top: 1px solid #ececed;
	}

	body.single-post .chills-mobile-toc-sheet .chills-toc li a {
		min-height: 48px;
		padding: 12px 0;
		font-size: 15px;
	}

	body.single-post .chills-article-body h2,
	body.single-post .chills-article-body h3 {
		scroll-margin-top: 96px;
	}

	body.single-post .chills-mobile-toc-sheet .chills-share-desktop {
		display: none !important;
	}

	body.chills-toc-open {
		overflow: hidden;
	}

	body.chills-toc-open .chills-mobile-actions-bar {
		visibility: hidden;
	}
}

@media (max-width: 380px) {
	body.single-post .chills-post-meta {
		column-gap: 24px;
		font-size: 12px;
	}

	body.single-post .chills-meta-author {
		gap: 8px;
	}

	body.single-post .chills-author-avatar {
		width: 26px;
		height: 26px;
		flex-basis: 26px;
	}
}

@media (max-width: 340px) {
	body.single-post #site-header .header-titles .site-title {
		margin-left: 12px !important;
	}

	body.single-post .chills-post-meta {
		column-gap: 24px;
		font-size: 12px;
	}

	body.single-post .chills-post-meta > span + span::before {
		left: -13px;
	}

	body.single-post .chills-meta-author {
		gap: 8px;
	}

	body.single-post .chills-author-avatar {
		width: 26px;
		height: 26px;
		flex-basis: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .chills-breadcrumbs {
		scroll-behavior: auto;
	}
}
