:root {
	--color-banner-bg: #3288ff;
	--color-banner-text: #ffffff;
	--color-footer-text: #ffffff;
	--color-content-bg: #ffffff;
	--color-content-title: #444;
	--color-anchor: #00b7ff;
	--color-anchor-hover: #c0c0c0;
	--color-text: #444;
	--color-selection: #c4c4c4;
	--color-border: #ddd;
	--color-nav-link: #ccc;
	--color-nav-link-active: #333;
	--color-nav-link-hover: #666;
	--color-code-bg: #f1f3f5;
	--color-code-text: #1a1a1a;
	--color-code-border: #dee2e6;
	--color-pre-bg: #f8f9fa;
	--color-pre-text: #333;
	--color-pre-bg-hover: #f0f2f4;
	--color-pre-line-hover: rgba(0, 0, 0, 0.05);
	--color-pre-highlight: rgba(0, 150, 255, 0.1);
	--color-pre-tag-bg: #d8d8d8;
	--color-pre-tag-text: #666;
	--color-pre-tag-text-hover: #ffffff;
	--color-step-active-bg: #ffffff;
	--color-scroller-bg: #ffffff;
	--color-dialog-border: #9eaec0;
	--color-shadow: rgba(0, 0, 0, 0.15);
	--color-dialog-header-bg: #f0f2f4;
}

html .dark {
	--color-banner-bg: #000000;
	--color-banner-text: #ffffff;
	--color-footer-text: #ffffff;
	--color-content-bg: #363636;
	--color-content-title: #ffffff;
	--color-anchor: #00ffbb;
	--color-text: #ffffff;
	--color-selection: #444;
	--color-border: #5a7080;
	--color-nav-link: #666;
	--color-nav-link-active: #ffffff;
	--color-nav-link-hover: #cccccc;
	--color-code-bg: #343a40;
	--color-code-text: #f8f9fa;
	--color-code-border: #495057;
	--color-pre-bg: #181818;
	--color-pre-text: #ffffff;
	--color-pre-bg-hover: #222222;
	--color-pre-line-hover: rgba(255, 255, 255, 0.1);
	--color-pre-highlight: rgba(0, 150, 255, 0.2);
	--color-pre-tag-bg: #282828;
	--color-pre-tag-text: #bbb;
	--color-pre-tag-text-hover: #ffffff;
	--color-step-active-bg: #1a1a1a;
	--color-scroller-bg: #181818;
	--color-dialog-border: #5a7080;
	--color-shadow: rgba(0, 0, 0, 0.5);
	--color-dialog-header-bg: #2a2a2a;
}

html,
body {
	background: var(--color-content-bg);
	color: var(--color-text);
	font-size: 16pt;
	line-height: 1.5;
	word-wrap: break-word;
	scroll-behavior: smooth;
	font-family: "Noto Sans JP", "Lato", Arial, sans-serif;
}

body.lang-en,
body.lang-de {
	font-family: 'Rokkitt', serif;
}

body.lang-ja {
	font-family: 'IBM Plex Sans JP', sans-serif;
}

::selection {
	background-color: var(--color-selection);
}

.lang-en .banner h1,
.lang-de .banner h1 {
	font-family: 'Abril Fatface', serif;
}

body.lang-ja .banner h1 {
	font-family: 'Rokkitt', serif;
}

.banner h1 {
	font-size: 65px;
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.banner {
	padding: 1rem;
}

.sosial a {
	text-decoration: none;
	justify-content: center;
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.post_metadata {
	font-weight: bold;
	margin-left: 0.3rem;
}

.post_title {
	width: 85%;
}

.lang-en .post_title h1,
.lang-de .post_title h1,
.lang-en h2,
.lang-de h2,
.lang-en h3,
.lang-de h3,
.lang-en h4,
.lang-de h4,
.lang-en h5,
.lang-de h5,
.lang-en h6,
.lang-de h6 {
	font-family: 'Abril Fatface', serif;
}

.post_title h1 a {
	text-decoration: none;
}

.lead {
	font-size: 1.1em;
	font-weight: 300;
	margin-top: 0;
	margin-bottom: 1rem;
}

hr {
	position: relative;
	margin: 1.2rem 0;
	border: 0;
	border-top: 2px solid var(--color-border);
}

.banner-nav {
	text-align: center;
}

.banner-nav a {
	font-size: 0.9rem;
	text-decoration: none;
}

.section-nav {
	margin-bottom: 1rem;
	font-size: 1.0rem;
	max-height: calc(100vh - 30rem);
	overflow-y: auto;
}

.section-nav a {
	text-decoration: none;
	margin-bottom: 0.1rem;
	display: block;
	color: var(--color-nav-link);
}

.section-nav a.active {
	color: var(--color-nav-link-active);
	font-weight: bold;
}

.section-nav a:hover,
.section-nav a:focus {
	color: var(--color-nav-link-hover);
}

.section-nav li.active>a {
	color: var(--color-nav-link-active);
	font-weight: 500;
}

ul,
ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

li {
	margin-left: 1rem;
}


.content {
	max-width: 38rem;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}

.container {
	margin-right: auto;
	margin-left: auto;
}

.post {
	z-index: 3;
}

a:link,
a:visited,
a:active {
	text-decoration-color: var(--color-anchor);
	color: var(--color-text);
}

p a {
	text-decoration-thickness: .25ex;
	text-underline-offset: 0.1em;
}

a:hover {
	color: var(--color-anchor-hover);
}

pre,
code {
	font-family: 'Spline Sans Mono', monospace;
}


p code,
li code,
.side_footer code,
.footer code {
	padding: .125em .25em;
	font-size: 74%;
	color: var(--color-code-text);
	background-color: var(--color-code-bg);
	border: 1px solid var(--color-code-border);
	border-radius: 3px;
	font-style: normal;
}

pre {
	padding: 1rem;
	background-color: var(--color-pre-bg) !important;
	color: var(--color-pre-text);
	border: .2em solid transparent;
	border-radius: 10px;
	margin-bottom: 1rem;
	overflow-x: auto;
	font-size: 16px;
	position: relative;
	min-width: 50%;
	max-width: 100%;
	width: fit-content;
	box-sizing: border-box;
	transition: all 0.2s ease;
}

pre:hover {
	border-color: var(--color-anchor);
	background-color: var(--color-pre-bg-hover) !important;
}

pre>code>span {
	display: inline-block;
	min-width: 100%;
	transition: background-color 0.2s ease, opacity 0.3s ease;
}

.code-scroller-code pre>code>span {
	opacity: 0.5;
}

pre>code>span:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

html .dark pre>code>span:hover {
	background-color: rgba(255, 255, 255, 0.1);
}


pre>code>span.highlighted {
	background-color: rgba(0, 150, 255, 0.1);
	border-left: 3px solid var(--color-anchor);
	opacity: 1 !important;
}

html .dark pre>code>span.highlighted {
	background-color: rgba(0, 150, 255, 0.2);
}


pre>code>span>span[class$="-ln"] {
	margin-right: 0.8rem;
}


.code-scroller {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 2rem 0;
}

.code-scroller-steps {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 50vh;
	padding: 50vh 0;
}

.code-scroller-step {
	padding: 1rem;
	border-left: 3px solid transparent;
	opacity: 0.5;
	transition: all 0.3s ease;
}

.code-scroller-step.active {
	border-left-color: var(--color-anchor);
	opacity: 1;
	background-color: var(--color-step-active-bg);
}

.code-scroller-code {
	flex: 1;
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
}

.code-scroller-code::before {
	content: "";
	flex: 1;
}

.code-scroller-code::after {
	content: "";
	flex: 1;
}

.code-scroller-code pre {
	margin: 0;
	width: 100%;
	max-width: none;
	max-height: 100vh;
	overflow-y: hidden;
	background-color: var(--color-scroller-bg) !important;
	border: none !important;
	border-radius: 0;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.code-scroller-code pre::-webkit-scrollbar {
	display: none;
}

pre > code[data-lang]::before {
	content: attr(data-lang);
	display: block;
	position: absolute;
	right: .5em;
	bottom: .5em;
	z-index: 3;
	font-size: .6rem;
	color: var(--color-pre-tag-text);
	background-color: var(--color-pre-tag-bg);
	padding: 2px 5px;
	border-radius: 5px;
	text-transform: capitalize;
	pointer-events: none;
	transition: all 0.2s ease;
}

pre:hover > code[data-lang]::before {
	background-color: var(--color-anchor);
	color: var(--color-pre-tag-text-hover);
}

.copy-badge {
	position: absolute;
	top: .5em;
	right: .5em;
	z-index: 3;
	font-size: .6rem;
	color: var(--color-pre-tag-text);
	background-color: var(--color-pre-tag-bg);
	padding: 2px 5px;
	border-radius: 5px;
	border: none;
	cursor: pointer;
	font-family: inherit;
	opacity: 0;
	transition: all 0.2s ease;
}

pre:hover .copy-badge {
	opacity: 1;
}

pre:hover .copy-badge:hover {
	background-color: var(--color-anchor);
	color: var(--color-pre-tag-text-hover);
}

@media (max-width: 768px) {
	.copy-badge {
		opacity: 1;
	}
}


p {
	margin-top: 0;
	margin-left: 0.5rem;
	margin-bottom: 1rem;
}

body.lang-ja .post_title h1 {
	font-size: 32px;
	font-weight: 700;
}

body.lang-ja h2 {
	font-size: 26px;
	font-weight: 700;
}

body.lang-ja h3 {
	font-size: 22px;
}

body.lang-ja h4 {
	font-size: 19px;
}

body.lang-ja h5 {
	font-size: 18px;
}

body.lang-ja h6 {
	font-size: 17px;
}

body.lang-ja p {
	font-size: 18px;
	line-height: 2.25rem;
}

body.lang-ja .post_footer p {
	line-height: 1.5;
}

body.lang-ja p code,
body.lang-ja li code {
	position: relative;
	top: -0.2em;
}

body.lang-ja p,
body.lang-ja .post_metadata,
body.lang-ja .post .post_preview {
	margin-left: 0;
}

.side_footer {
	margin-top: auto;
}

.side_footer a {
	text-decoration: none;
}

.footer {
	margin-top: auto;
}

.footer a {
	text-decoration: none;
}

h1 .hanchor,
h2 .hanchor,
h3 .hanchor {
	text-decoration: none;
}

.hanchor-copied {
	font-size: .6rem;
	color: var(--color-pre-tag-text);
	background-color: var(--color-pre-tag-bg);
	padding: 2px 5px;
	border-radius: 5px;
	margin-left: .4em;
	vertical-align: middle;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	font-weight: normal;
}

.hanchor-copied.visible {
	opacity: 1;
}

p a::after {
	content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" height="12px" viewBox="0 -960 960 960" width="12px" fill="%235f6368"%3E%3Cpath d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z" /%3E%3C/svg%3E');
	display: inline-block;
	margin-left: 4px;
	vertical-align: middle;
}

.post .post_preview {
	max-height: 26rem;
	position: relative;
	overflow: hidden;
	margin-left: 0.5rem;
	margin-bottom: 4rem;
}

.post_preview {
	position: absolute;
	width: 100%;
	-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.post_footer h2 a {
	text-decoration: none;
}

.lang-toggle-button {
	all: unset;
	display: inline-block;
	cursor: pointer;
	justify-content: center;
}

@keyframes fadeSlideIn {
	0% {
		opacity: 0;
		transform: translateX(-10px);
	}

	100% {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fadeSlideOut {
	0% {
		opacity: 1;
		transform: translateX(0);
	}

	100% {
		opacity: 0;
		transform: translateX(-10px);
	}
}

.language-menu {
	display: none !important;
}

.language-menu.show {
	display: inline-block !important;
	animation: fadeSlideIn 0.5s ease forwards;
}

@keyframes fadeSlideInRight {
	0% {
		opacity: 0;
		transform: translateX(10px);
	}

	100% {
		opacity: 1;
		transform: translateX(0);
	}
}

.word-card-desktop {
	animation: fadeSlideInRight 0.4s ease forwards;
}

.word-expl {
	cursor: pointer;
	text-decoration-color: var(--color-anchor);
	color: var(--color-text);
	text-decoration-line: underline;
	text-decoration-thickness: .25ex;
	text-underline-offset: 0.1em;
}

.word-expl:hover {
	color: var(--color-anchor-hover);
}

.word-expl::after {
	content: none !important;
}

.word-dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--color-content-bg);
	border: 2px dashed var(--color-dialog-border);
	box-shadow: 0 4px 12px var(--color-shadow);
	border-radius: 4px;
	z-index: 1000;
	width: 90%;
	max-width: 400px;
	display: flex;
	flex-direction: column;
}

.word-dialog-header {
	padding: 0.3rem 0.75rem;
	background: var(--color-dialog-header-bg);
	cursor: grab;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px dashed var(--color-dialog-border);
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	user-select: none;
}

.word-dialog-header:active {
	cursor: grabbing;
}

.word-dialog-title {
	font-weight: bold;
	font-size: 0.8rem;
	color: var(--color-text);
}

.word-dialog-close {
	cursor: pointer;
	background: none;
	border: none;
	font-size: 1.5rem;
	color: var(--color-text);
	padding: 0;
	line-height: 1;
}

.word-dialog-content {
	padding: 0.5rem 0.75rem;
	font-size: 0.8rem;
	color: var(--color-text);
}