/* =========================================================
   Article body (.kb-entry)
   Put on the element that directly wraps the_content() (area articles,
   item guides). The class itself adds no box styling. Stored post content
   carries its own class names (box29, memo, tl-content, ...); those are
   styled here, always under .kb-entry so nothing leaks into page layouts.
   Icon glyphs come from the Font Awesome webfont (v6, with v5 as fallback).
   ========================================================= */

.kb-entry {
	--kb-entry-accent: #3969a6;
	--kb-entry-icons: "Font Awesome 6 Free", "Font Awesome 5 Free";
}

/* ---------- Text ---------- */
.kb-entry p {
	padding: 10px 0;
	font-size: 18px;
}

.kb-entry h2 {
	position: relative;
	margin: 30px auto;
	padding: .75em 1em;
	background: var(--kb-entry-accent);
	color: #fff;
	font-size: 2em;
	text-align: left;
}
/* thin double rule above and below the filled heading */
.kb-entry h2::before {
	content: "";
	display: block;
	position: absolute;
	top: -4px;
	left: 0;
	box-sizing: content-box;
	width: 100%;
	height: calc(100% + 4px);
	border-top: 2px solid var(--kb-entry-accent);
	border-bottom: 2px solid var(--kb-entry-accent);
	pointer-events: none;
}

.kb-entry h3 {
	position: relative;
	margin-top: 50px;
	border-bottom: 3px solid #cce4ff;
	font-size: 2em;
	font-weight: 600;
}
.kb-entry h3::after {
	content: " ";
	display: block;
	position: absolute;
	bottom: -3px;
	width: 20%;
	border-bottom: 3px solid var(--kb-entry-accent);
}

.kb-entry h4 {
	margin-top: 50px;
	padding: 10px;
	border-left: 4px solid var(--kb-entry-accent);
	background: transparent;
	color: #494949;
	font-size: 1.6em;
	font-weight: 600;
}

/* marker highlight + heavy weight used for key phrases */
.kb-entry .strong { font-weight: 900; }
.kb-entry .keiko_blue { background: linear-gradient(transparent 50%, rgba(255, 252, 107, .69) 50%); }

/* ---------- Lists ---------- */
.kb-entry ul {
	display: block;
	width: 95%;
	margin: 0 auto 20px;
}
.kb-entry li {
	margin-left: 10px;
	line-height: 2rem;
	list-style: disc;
}
.kb-entry li::marker { color: var(--kb-entry-accent); }

/* ---------- Tables (scroll sideways when wider than the column) ---------- */
.kb-entry table {
	display: block;
	width: 100%;
	margin-top: 20px;
	overflow-x: scroll;
	border: 1px solid var(--kb-entry-accent);
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
}
.kb-entry table tbody {
	display: table;
	width: 100%;
}
.kb-entry table tr { border: 1px solid var(--kb-entry-accent); }
.kb-entry table th {
	padding: 10px;
	border: 1px solid #fff;
	background: var(--kb-entry-accent);
	color: #fff;
	font-weight: 900;
}
.kb-entry table td {
	padding: 10px;
	border: 1px solid var(--kb-entry-accent);
}

/* ---------- Framed box with a title bar (sng-box / box29) ---------- */
.kb-entry .box29 {
	margin: 2em 0;
	border: 3px solid var(--kb-entry-accent);
}
.kb-entry .box29 .box-title {
	display: inline-block;
	position: relative;
	top: -2px;
	width: 100%;
	padding: 12px 0;
	background: var(--kb-entry-accent);
	color: #fff;
	font-size: 20px;
	line-height: 1.5;
	text-align: center;
}
.kb-entry .box29 .box-title::before {
	content: "\f1b8";
	padding-right: 8px;
	font-family: var(--kb-entry-icons) !important;
	font-weight: 900;
}
.kb-entry .box29 .box-content { padding: 15px; }
.kb-entry .sng-box ul {
	margin: 5px 0;
	padding: 0 0 0 1.4em;
	border: 0;
	background: transparent;
	box-shadow: none;
}

/* check-mark list */
.kb-entry .li-check li {
	position: relative;
	padding: .5em 0;
	font-size: 18px;
	line-height: 1.5;
	list-style-type: none !important;
}
.kb-entry .li-check li::before {
	content: "\f138";
	position: absolute;
	left: -26px;
	color: skyblue;
	font-family: var(--kb-entry-icons) !important;
	font-weight: 900;
}
.kb-entry .box29 li::before { color: var(--kb-entry-accent) !important; }

/* merit / demerit boxes with a tab-shaped title */
.kb-entry .meritto,
.kb-entry .demeritto {
	position: relative;
	margin: 4em 0 2em;
	padding: .8em 1em;
}
.kb-entry .meritto { border: 3px solid var(--kb-entry-accent); }
.kb-entry .demeritto { border: 3px solid #cf2e2e; }
.kb-entry .meritto .box-title,
.kb-entry .demeritto .box-title {
	position: absolute;
	top: -44px;
	left: -3px;
	padding: 5px 13px 3px;
	border-radius: 10px 10px 0 0;
	color: #fff;
	font-weight: 700;
	line-height: 32px;
}
.kb-entry .meritto .box-title { background: var(--kb-entry-accent); }
.kb-entry .demeritto .box-title { background: #cf2e2e; }
.kb-entry .meritto .box-title::before,
.kb-entry .demeritto .box-title::before {
	margin-right: 10px;
	font-family: var(--kb-entry-icons);
	font-size: 1.2em;
	font-weight: 900;
}
.kb-entry .meritto .box-title::before { content: "\f599"; }
.kb-entry .demeritto .box-title::before { content: "\f119"; }
.kb-entry .meritto ul,
.kb-entry .demeritto ul { list-style: none; }
.kb-entry .meritto li,
.kb-entry .demeritto li { padding: .5em 0; }
.kb-entry .demeritto ul li { list-style: none !important; }
.kb-entry .meritto li::before,
.kb-entry .demeritto li::before {
	margin-left: -20px;
	margin-right: 10px;
	font-family: var(--kb-entry-icons);
	font-weight: 900;
}
.kb-entry .meritto li::before {
	content: "\f164";
	color: var(--kb-entry-accent) !important;
}
.kb-entry .demeritto li::before {
	content: "\f165";
	color: #cf2e2e !important;
}

/* ---------- Note boxes (memo / memo alert) ---------- */
.kb-entry .memo {
	margin-top: 20px;
	margin-bottom: 1.5em;
	padding: 1em;
	background: #fff9e5;
	color: #545454;
}
.kb-entry .memo.alert { background: #ffebeb; }
.kb-entry .memo p {
	margin-bottom: 5px;
	font-size: 16px;
	text-align: left !important;
}
.kb-entry .memo_ttl {
	margin-bottom: 5px;
	color: #ffb36b;
	font-size: 1.2em;
	font-weight: 700;
}
.kb-entry .memo.alert .memo_ttl { color: #ff8376; }
.kb-entry .memo_ttl::before {
	content: "\f303";
	display: inline-block;
	width: 30px;
	height: 30px;
	margin: 0 3px 0 0;
	border-radius: 50%;
	background: #ffb36b;
	color: #fff;
	font-family: var(--kb-entry-icons) !important;
	font-weight: 900;
	line-height: 30px;
	text-align: center;
	vertical-align: middle;
}
.kb-entry .memo.alert .memo_ttl::before {
	content: "\f12a";
	background: #ff8376;
}

/* ---------- Step timeline (tl) ---------- */
.kb-entry .tl { margin: 1em 0; }
.kb-entry .tl-content {
	position: relative;
	padding: 0 0 1.5em 1.8em;
}
/* connecting line between markers; the last step has none */
.kb-entry .tl-content::before {
	content: "";
	display: block;
	position: absolute;
	top: 24px;
	bottom: 0;
	left: 6px;
	width: 3px;
	background: #ccd5db;
}
.kb-entry .tl-content:last-of-type::before { content: none; }
.kb-entry .tl_marker {
	display: block;
	position: absolute;
	top: 6px;
	left: 0;
	width: 14px;
	height: 14px;
	border: 3px solid;
	border-radius: 50%;
}
.kb-entry .main-bc { background: var(--kb-entry-accent); }
.kb-entry .tl_marker.main-bdr.main-bc { border-color: var(--kb-entry-accent); }
.kb-entry .tl-content:not(:first-of-type):not(:last-of-type) .tl_marker { background: transparent; }
.kb-entry .tl_label {
	padding-top: 2px;
	color: #90969a;
	font-size: 14px;
	font-weight: 700;
}
.kb-entry .tl_title {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.5;
}
.kb-entry .tl_main {
	margin-top: .5em;
	padding: 0 0 1.5em;
	border-bottom: 1px dashed #ccd5db;
	font-size: 16px;
	line-height: 1.6;
}
.kb-entry .tl_main > * { margin: .7em 0 0; }
.kb-entry .tl_main > ul,
.kb-entry .tl_main > ol {
	margin: 0;
	padding: .3em 0 .3em 1.3em;
	border: 0;
}
.kb-entry .tl_main .sng-box { margin-top: 1em; }

/* ---------- Chat bubble (say / faceicon / chatting / sc) ---------- */
.kb-entry .say {
	display: table;
	width: 100%;
	margin: 1.5em 0;
	overflow: hidden;
}
.kb-entry .faceicon {
	display: table-cell;
	width: 130px;
	padding-right: 20px;
	text-align: center;
	vertical-align: top;
}
.kb-entry .faceicon img {
	width: 100%;
	height: auto;
	border: 3px solid #eaedf2;
	border-radius: 50%;
}
.kb-entry .faceicon span {
	display: block;
	margin-top: 8px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
}
.kb-entry .chatting {
	display: table-cell;
	position: relative;
	width: calc(100% - 130px);
	padding-top: 15px;
	font-size: .95em;
	vertical-align: top;
}
.kb-entry .sc {
	display: inline-block;
	padding: 20px;
	border: 2px solid #f4f4f4;
	border-radius: 12px;
	background: #f4f4f4;
	color: #000;
	text-align: left;
	word-break: break-word;
}
/* bubble tail: two stacked triangles pointing at the face */
.kb-entry .sc::before,
.kb-entry .sc::after {
	content: "";
	display: inline-block;
	position: absolute;
	top: 30px;
	border: 12px solid transparent;
	border-right: 12px solid #f4f4f4;
}
.kb-entry .sc::before { left: -23px; }
.kb-entry .sc::after { left: -20px; }
.kb-entry .right { text-align: right; }
.kb-entry .right .faceicon { padding: 0 0 0 20px; }
.kb-entry .right .sc::before,
.kb-entry .right .sc::after {
	left: auto;
	border: 12px solid transparent;
	border-left: 12px solid #f4f4f4 !important;
}
.kb-entry .right .sc::before { right: -23px; }
.kb-entry .right .sc::after { right: -20px; }

/* ---------- Review cards in a sideways strip (horizontal_scroll / kuchicomi) ---------- */
.kb-entry .horizontal_scroll {
	display: flex !important;
	width: 100% !important;
	margin-top: 20px !important;
	padding: 0 !important;
	overflow-x: scroll;
	overflow-y: hidden;
	border: 0;
	background-color: #d5e4e9;
	-webkit-overflow-scrolling: touch;
}
.kb-entry .horizontal_scroll li {
	display: block;
	position: relative;
	min-width: 230px;
	height: 270px;
	background: #fff;
	list-style: none !important;
}
.kb-entry .horizontal_scroll > li { margin: 7px; }
.kb-entry .horizontal_scroll > li:last-child { padding-right: 5px; }
.kb-entry .horizontal_scroll img {
	width: 100px;
	margin-left: 10px;
	border: 1px solid #e5e5e5;
	border-radius: 50%;
	background: #fff;
	vertical-align: bottom;
}
.kb-entry .kuchicomi {
	display: flex;
	margin-top: 5px;
}
.kb-entry .kuchicomi-image { width: 37%; }
.kb-entry .kuchimomi-name {
	width: 64%;
	padding-left: 9px;
	font-size: 14px;
	font-weight: 700;
}
.kb-entry .people-name,
.kb-entry .people-career {
	display: block;
	width: 100%;
	line-height: 1.8;
}
.kb-entry .people-name { margin-top: 4px; }
.kb-entry .people-star {
	display: block;
	margin-top: -7px;
}
.kb-entry .icon-star-full {
	color: #ffb500;
	font-size: 19px;
	font-style: normal;
	letter-spacing: 3px;
}
.kb-entry .icon-star-full::before {
	content: "\f005";
	font-family: var(--kb-entry-icons);
	font-weight: 900;
}
.kb-entry .people-star .icon-star-full {
	display: inline-block;
	font-size: 13px;
}
.kb-entry .kuchicomi-text {
	display: block;
	width: 89%;
	max-height: 150px;
	margin: 10px auto 0;
	overflow-y: hidden;
	font-size: 12px;
	line-height: 20px;
}

/* ---------- Area table of contents (area-toc-wrap) ---------- */
.kb-entry .area-toc-wrap {
	border: 2px solid #111;
	border-radius: 8px 8px 0 0;
}
.kb-entry .toc-header-title {
	margin-bottom: 2px;
	padding: 1rem;
	border-radius: 8px 8px 0 0;
	background-color: #fbc500;
	color: #fff;
	font-size: 1.2rem;
	text-align: center;
}
.kb-entry .toc-menu-item {
	display: flex;
	align-items: center;
	padding: 1rem;
	border-bottom: 1px solid #e0e0e0;
	background-color: #fff;
	transition: background-color .3s;
}
.kb-entry .toc-menu-item:nth-child(odd) { border-right: 1px solid #e0e0e0; }
.kb-entry .toc-menu-item:hover {
	background-color: #f5f5f5;
	cursor: pointer;
}
.kb-entry .toc-menu-item img {
	width: 30px;
	height: 30px;
	margin-right: 15px;
}
.kb-entry .toc-menu-item a {
	flex-grow: 1;
	color: #4e98d9;
	text-decoration: none;
}
.kb-entry .toc-menu-arrow {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background-color: #4e98d9;
}
.kb-entry .toc-menu-arrow::after {
	content: "▼";
	color: #fff;
	font-size: 10px;
}
@media (min-width: 768px) {
	.kb-entry .toc-menu-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Collection record embedded in an item guide (case-*) ---------- */
.kb-entry .case-wrap {
	display: flex;
	justify-content: space-around;
	width: 100%;
	padding: 15px;
	background-color: #fff;
}
.kb-entry .case-wrap img {
	width: auto;
	max-height: 300px;
}
.kb-entry .case-left { width: 40%; }
.kb-entry .case-right {
	display: flex;
	width: 40%;
}
.kb-entry .case-right tr { border-bottom: 1px solid #eee; }
.kb-entry .case-right p { margin-bottom: 0; }
.kb-entry .case-wrap table,
.kb-entry .case-wrap table td { border: 0 !important; }
.kb-entry .case-right table { border-collapse: separate; }
.kb-entry .case-wrap table th {
	min-width: 100px;
	background: none !important;
	color: var(--kb-entry-accent) !important;
	text-align: left !important;
}
.kb-entry .box-title.case-title { font-size: 1rem; }
.kb-entry .case-title.box-title::before { display: none; }
.kb-entry div.case-comment {
	padding: 15px;
	border: 1px solid #eee;
	background-color: #fff;
}
.kb-entry .case-comment span {
	display: block;
	color: var(--kb-entry-accent);
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 3rem;
	text-align: center;
}
.kb-entry .case-comment p {
	font-weight: 500;
	line-height: 2rem;
}
.kb-entry .case-comment time { margin-top: 10px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 768px) {
	.kb-entry ul { width: 90%; }
	.kb-entry .people-star { margin-top: 0; }
	.kb-entry .horizontal_scroll img { width: 75px; }
}
@media (min-width: 768px) {
	.kb-entry .horizontal_scroll > li:last-child { padding-right: 0; }
}
@media (max-width: 767.98px) {
	.kb-entry .toc-menu-container { padding: 0; }
	.kb-entry .toc-header-title {
		padding: .75rem;
		font-size: 1rem;
	}
	.kb-entry .toc-menu-item {
		margin: 0;
		border-left: 0;
		border-right: 0;
	}
}
@media (max-width: 576px) {
	.kb-entry .case-wrap {
		display: block;
		font-size: 2.1rem;
	}
	.kb-entry .case-wrap img { width: 100%; }
	.kb-entry .case-left {
		width: 100%;
		margin-bottom: -30px;
	}
	.kb-entry .case-right { width: 100%; }
	.kb-entry .case-right table {
		margin-top: 30px;
		padding: 0;
		overflow: hidden;
		border-spacing: 0;
		background: #fff;
		font-size: 15px;
	}
}
