/* ==========================================================================
   DengeCudi modals: Share, Bookmarks, Calendar event, History event.
   One visual language: quiet surfaces, clear hierarchy, left-aligned text,
   real labels under icons, bottom sheets on phones.
   Loaded last from head_custom so it wins over older theme rules.
   ========================================================================== */

:root {
	--km-bg: #ffffff;
	--km-text: #16171c;
	--km-body: #3b3e47;
	--km-muted: #6c707c;
	--km-line: #ebecf0;
	--km-soft: #f4f5f7;
	--km-soft-2: #eceef2;
	--km-accent: #e5405e;
	--km-accent-soft: rgba(229, 64, 94, .1);
	--km-shadow: 0 24px 64px rgba(16, 18, 27, .22), 0 2px 6px rgba(16, 18, 27, .06);
	--km-radius: 18px;
}
html.king-night {
	--km-bg: #1b1c22;
	--km-text: #f2f3f6;
	--km-body: #cfd2da;
	--km-muted: #969aa6;
	--km-line: #2d2f38;
	--km-soft: #24262e;
	--km-soft-2: #2c2e37;
	--km-accent-soft: rgba(229, 64, 94, .16);
	--km-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}

/* Shared close button */
#sharemodal .king-share-close,
#king-history-share-sheet .king-share-close,
.king-share-popup .king-share-close,
#rlatermodal .king-modal-close,
.king-calendar-modal .king-calendar-modal-close,
.king-history-modal .king-history-modal-close {
	width: 34px;
	height: 34px;
	min-width: 34px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--km-soft);
	color: var(--km-muted);
	font-size: 15px;
	line-height: 1;
	box-shadow: none;
	opacity: 1;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
#sharemodal .king-share-close:hover,
#king-history-share-sheet .king-share-close:hover,
#rlatermodal .king-modal-close:hover,
.king-calendar-modal .king-calendar-modal-close:hover,
.king-history-modal .king-history-modal-close:hover {
	background: var(--km-soft-2);
	color: var(--km-text);
}
#sharemodal .king-share-close:focus-visible,
#rlatermodal .king-modal-close:focus-visible,
.king-calendar-modal .king-calendar-modal-close:focus-visible,
.king-history-modal .king-history-modal-close:focus-visible {
	outline: 2px solid var(--km-accent);
	outline-offset: 2px;
}

/* ==========================================================================
   Share
   ========================================================================== */
#sharemodal .king-modal-content.king-share-sheet,
#king-history-share-sheet .king-modal-content.king-share-sheet,
#sharemodal .king-modal-content {
	width: min(420px, calc(100vw - 24px));
	max-width: 420px;
	padding: 0;
	background: var(--km-bg);
	border: 1px solid var(--km-line);
	border-radius: var(--km-radius);
	box-shadow: var(--km-shadow);
	overflow: hidden;
}
:is(.king-share-sheet, .king-share-popup) .social-share { padding: 0; background: transparent; }
:is(.king-share-sheet, .king-share-popup) .social-share-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 6px 22px;
	border: 0;
}
:is(.king-share-sheet, .king-share-popup) .social-share-title {
	margin: 0;
	color: var(--km-text);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.01em;
}
:is(.king-share-sheet, .king-share-popup) .social-share-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px;
	padding: 10px 14px 6px;
}
:is(.king-share-sheet, .king-share-popup) .social-share-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	min-width: 0;
	height: auto;
	padding: 10px 4px 8px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	color: var(--km-body);
	box-shadow: none;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s;
}
:is(.king-share-sheet, .king-share-popup) .social-share-btn[hidden] { display: none; }
:is(.king-share-sheet, .king-share-popup) .social-share-btn:hover { background: var(--km-soft); transform: none; }
:is(.king-share-sheet, .king-share-popup) .social-share-btn:focus-visible { outline: 2px solid var(--km-accent); outline-offset: 0; }
:is(.king-share-sheet, .king-share-popup) .social-share-btn > i {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--km-brand, #5b5f6b);
	color: #fff;
	font-size: 19px;
	margin: 0;
	transition: transform .15s;
}
:is(.king-share-sheet, .king-share-popup) .social-share-btn:hover > i { transform: translateY(-1px); }
:is(.king-share-sheet, .king-share-popup) .social-share-btn::after {
	content: attr(aria-label);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--km-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}
:is(.king-share-sheet, .king-share-popup) .share-system   { --km-brand: #3d4150; }
:is(.king-share-sheet, .king-share-popup) .share-system::after { content: "More"; }
:is(.king-share-sheet, .king-share-popup) .share-fb       { --km-brand: #1877f2; }
:is(.king-share-sheet, .king-share-popup) .share-tw       { --km-brand: #111; }
:is(.king-share-sheet, .king-share-popup) .share-pin      { --km-brand: #e60023; }
:is(.king-share-sheet, .king-share-popup) .share-em       { --km-brand: #6b7280; }
:is(.king-share-sheet, .king-share-popup) .share-telegram { --km-brand: #229ed9; }
:is(.king-share-sheet, .king-share-popup) .share-vk       { --km-brand: #0077ff; }
:is(.king-share-sheet, .king-share-popup) .share-wapp     { --km-brand: #25d366; }
html.king-night :is(.king-share-sheet, .king-share-popup) .share-tw { --km-brand: #000; box-shadow: none; }
html.king-night :is(.king-share-sheet, .king-share-popup) .share-tw > i { box-shadow: inset 0 0 0 1px #3a3c46; }

:is(.king-share-sheet, .king-share-popup) .social-share-section {
	margin: 0;
	padding: 14px 18px 18px;
	border-top: 1px solid var(--km-line);
	background: transparent;
}
:is(.king-share-sheet, .king-share-popup) .social-share-label {
	margin: 0 0 8px 2px;
	color: var(--km-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}
:is(.king-share-sheet, .king-share-popup) .social-share-copy {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 5px 5px 14px;
	border: 1px solid var(--km-line);
	border-radius: 12px;
	background: var(--km-soft);
}
:is(.king-share-sheet, .king-share-popup) .king-share-url-field {
	flex: 1 1 auto;
	min-width: 0;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--km-body);
	font-size: 13.5px;
	box-shadow: none;
	outline: none;
	text-overflow: ellipsis;
}
:is(.king-share-sheet, .king-share-popup) .king-share-copy-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 36px;
	width: auto;
	padding: 0 14px;
	border: 0;
	border-radius: 9px;
	background: var(--km-text);
	color: var(--km-bg);
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
:is(.king-share-sheet, .king-share-popup) .king-share-copy-btn::after { content: "Copy"; }
:is(.king-share-sheet, .king-share-popup) .king-share-copy-btn i { font-size: 13px; }
:is(.king-share-sheet, .king-share-popup) .social-share-section:has(.copied:not([hidden])) .king-share-copy-btn {
	background: #16a34a;
	color: #fff;
}
:is(.king-share-sheet, .king-share-popup) .social-share-section:has(.copied:not([hidden])) .king-share-copy-btn::after { content: "Copied"; }
:is(.king-share-sheet, .king-share-popup) .social-share-section .copied {
	display: block;
	margin: 8px 2px 0;
	color: #16a34a;
	font-size: 12.5px;
	font-weight: 600;
	position: static;
	background: none;
	padding: 0;
	opacity: 1;
	transform: none;
}
:is(.king-share-sheet, .king-share-popup) .social-share-section .copied[hidden] { display: none; }

/* Share popup opened from listing cards (Magnific Popup): same card as the post page */
.king-share-popup.mfp-bg,
.mfp-bg.king-share-popup { background: rgba(12, 13, 18, .55); opacity: 1; }
.king-share-popup .mfp-content > .social-share {
	position: relative;
	width: min(420px, calc(100vw - 24px));
	max-width: 420px;
	margin: 0 auto;
	padding: 0;
	background: var(--km-bg);
	border: 1px solid var(--km-line);
	border-radius: var(--km-radius);
	box-shadow: var(--km-shadow);
	overflow: hidden;
	text-align: left;
}
.king-share-popup .mfp-close { display: none; }
/* The phone tab bar would sit on top of bottom sheets; hide it while one is open. */
body:has(.mfp-wrap.king-share-popup, #sharemodal.in, #rlatermodal.in, #king-history-share-sheet:not([hidden]), .king-calendar-modal:not([hidden])) .kn-tabbar { display: none; }

/* ==========================================================================
   Bookmarks
   ========================================================================== */
#rlatermodal .king-modal-content {
	width: min(560px, calc(100vw - 24px));
	max-width: 560px;
	padding: 0;
	background: var(--km-bg);
	border: 1px solid var(--km-line);
	border-radius: var(--km-radius);
	box-shadow: var(--km-shadow);
	overflow: hidden;
}
#rlatermodal .king-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 14px 22px;
	border-bottom: 1px solid var(--km-line);
}
#rlatermodal .king-modal-header .modal-title {
	margin: 0;
	color: var(--km-text);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.01em;
}
#rlatermodal .king-modal-body {
	padding: 0;
	min-height: 0;
	max-height: min(70vh, 620px);
	overflow-y: auto;
	overscroll-behavior: contain;
}
#rlatermodal .bm-toolbar {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px 8px;
	background: var(--km-bg);
}
#rlatermodal .bm-search {
	position: relative;
	flex: 1 1 auto;
}
#rlatermodal .bm-search i {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--km-muted);
	font-size: 13px;
	pointer-events: none;
}
#rlatermodal .bm-search input {
	width: 100%;
	height: 38px;
	padding: 0 12px 0 34px;
	border: 1px solid var(--km-line);
	border-radius: 10px;
	background: var(--km-soft);
	color: var(--km-text);
	font-size: 14px;
	box-shadow: none;
	outline: none;
}
#rlatermodal .bm-search input:focus { border-color: var(--km-accent); background: var(--km-bg); }
#rlatermodal .bm-count {
	flex: 0 0 auto;
	color: var(--km-muted);
	font-size: 12.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
#rlatermodal .bm-posts {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 4px 8px 10px;
	margin: 0;
	grid-template-columns: none;
}
#rlatermodal .bm-post {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	box-shadow: none;
	transform: none;
	transition: background-color .15s, opacity .2s;
}
#rlatermodal .bm-post:hover { background: var(--km-soft); box-shadow: none; transform: none; }
#rlatermodal .bm-post[hidden] { display: none; }
#rlatermodal .bm-thumb,
#rlatermodal .bm-bg {
	position: relative;
	flex: 0 0 auto;
	width: 72px;
	height: 54px;
	border-radius: 9px;
	background-color: var(--km-soft-2);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
#rlatermodal .bm-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
#rlatermodal .bm-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
	color: var(--km-text);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}
/* The whole row opens the post; the remove button sits above that link. */
#rlatermodal .bm-title::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
}
#rlatermodal .bm-meta {
	color: var(--km-muted);
	font-size: 12.5px;
	line-height: 1.3;
}
#rlatermodal .bm-post .modalbook,
#rlatermodal .bm-remove {
	position: relative;
	z-index: 1;
	top: auto;
	right: auto;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--km-muted);
	font-size: 15px;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	transform: none;
	transition: background-color .15s, color .15s;
}
#rlatermodal .bm-remove:hover { background: var(--km-accent-soft); color: var(--km-accent); transform: none; }
#rlatermodal .bm-remove .bm-undo { display: none; }
/* Removed (toggled off) but still on screen so it can be undone. */
#rlatermodal .bm-remove:not(.selected) {
	width: auto;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--km-soft-2);
	color: var(--km-text);
	font-size: 12.5px;
	font-weight: 700;
}
#rlatermodal .bm-remove:not(.selected) i { display: none; }
#rlatermodal .bm-remove:not(.selected) .bm-undo { display: inline; }
#rlatermodal .bm-post:has(.bm-remove:not(.selected)) .bm-thumb,
#rlatermodal .bm-post:has(.bm-remove:not(.selected)) .bm-content { opacity: .45; }
#rlatermodal .bm-post:has(.bm-remove:not(.selected)) .bm-title { text-decoration: line-through; }
#rlatermodal .bm-noresults {
	padding: 28px 16px 36px;
	color: var(--km-muted);
	font-size: 14px;
	text-align: center;
}
#rlatermodal .king-bookmarks-empty {
	min-height: 220px;
	padding: 40px 24px;
	color: var(--km-muted);
}
#rlatermodal .king-bookmarks-empty i {
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	border-radius: 50%;
	background: var(--km-soft);
	color: var(--km-muted);
	font-size: 24px;
}
#rlatermodal .king-bookmarks-empty p { font-size: 15px; font-weight: 600; color: var(--km-body); }
#rlatermodal .king-bookmarks-empty small { display: block; margin-top: 4px; font-size: 13px; color: var(--km-muted); }

/* ==========================================================================
   Calendar event
   ========================================================================== */
.king-calendar-modal {
	background: rgba(12, 13, 18, .5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
body .king-calendar-modal .king-calendar-modal-panel {
	--kcm-tone: #6b7280;
	position: relative;
	width: min(460px, calc(100vw - 24px));
	padding: 18px 20px 20px;
	background: var(--km-bg);
	border: 1px solid var(--km-line);
	border-radius: var(--km-radius);
	box-shadow: var(--km-shadow);
	text-align: left;
	overflow: hidden;
}
body .king-calendar-modal .king-calendar-modal-panel::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--kcm-tone);
}
body .king-calendar-modal .king-calendar-modal-panel[data-tone="cultural"] { --kcm-tone: #2f9e6e; }
body .king-calendar-modal .king-calendar-modal-panel[data-tone="memorial"] { --kcm-tone: #d63e3d; }
body .king-calendar-modal .king-calendar-modal-panel[data-tone="islamic"]  { --kcm-tone: #0f8a7a; }
body .king-calendar-modal .king-calendar-modal-panel[data-tone="yazidi"]   { --kcm-tone: #d59a12; }
body .king-calendar-modal .king-calendar-modal-panel[data-tone="christian"]{ --kcm-tone: #4f6bd8; }
.king-calendar-modal .kcm-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 2px 0 14px;
}
body .king-calendar-modal .king-calendar-modal-close {
	position: static;
}
.king-calendar-modal .king-calendar-modal-meta { display: contents; }
body .king-calendar-modal #king-calendar-modal-type.king-calendar-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: color-mix(in srgb, var(--kcm-tone) 13%, transparent);
	color: var(--kcm-tone);
	font-size: 12px;
	font-weight: 700;
	box-shadow: none;
}
body .king-calendar-modal #king-calendar-modal-type.king-calendar-chip::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}
.king-calendar-modal .kcm-main {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}
.king-calendar-modal .kcm-tile {
	flex: 0 0 auto;
	width: 56px;
	overflow: hidden;
	border: 1px solid var(--km-line);
	border-radius: 12px;
	background: var(--km-bg);
	text-align: center;
	line-height: 1;
}
.king-calendar-modal .kcm-tile-month {
	display: block;
	padding: 5px 0 4px;
	background: var(--kcm-tone);
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.king-calendar-modal .kcm-tile-day {
	display: block;
	padding: 7px 0 8px;
	color: var(--km-text);
	font-size: 22px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.king-calendar-modal .kcm-heading { min-width: 0; }
body .king-calendar-modal .king-calendar-modal-date {
	margin: 2px 0 4px;
	color: var(--km-muted);
	font-size: 13px;
	font-weight: 600;
}
body .king-calendar-modal .king-calendar-modal-panel h3 {
	margin: 0;
	color: var(--km-text);
	font-size: 20px;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -.015em;
	text-align: left;
}
body .king-calendar-modal #king-calendar-modal-notes {
	margin: 14px 0 0;
	color: var(--km-body);
	font-size: 15px;
	line-height: 1.6;
	text-align: left;
}
body .king-calendar-modal #king-calendar-modal-notes:empty { display: none; }
.king-calendar-modal .kcm-when {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 12px 0 0;
	color: var(--km-muted);
	font-size: 13px;
	font-weight: 600;
}
.king-calendar-modal .kcm-when:empty { display: none; }
.king-calendar-modal .kcm-when.is-today { color: var(--kcm-tone); }
.king-calendar-modal .kcm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--km-line);
}
.king-calendar-modal .kcm-btn,
body .king-calendar-modal .king-calendar-modal-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 38px;
	min-height: 0;
	line-height: 1;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--km-line);
	border-radius: 10px;
	background: var(--km-bg);
	color: var(--km-text);
	font-size: 13.5px;
	font-weight: 650;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
.king-calendar-modal .kcm-btn:hover,
body .king-calendar-modal .king-calendar-modal-action:hover { background: var(--km-soft); }
.king-calendar-modal .kcm-btn.is-primary {
	background: var(--km-text);
	border-color: var(--km-text);
	color: var(--km-bg);
}
.king-calendar-modal .kcm-btn.is-primary:hover { opacity: .9; background: var(--km-text); }
.king-calendar-modal .kcm-btn.is-done { color: #16a34a; }
body .king-calendar-modal .king-calendar-modal-action { width: auto; flex: 0 0 auto; margin-left: auto; }

/* ==========================================================================
   History event
   ========================================================================== */
body .king-history-modal .king-history-modal-panel {
	width: min(720px, calc(100vw - 24px));
	max-width: 720px;
	background: var(--km-bg);
	border: 1px solid var(--km-line);
	border-radius: var(--km-radius);
	box-shadow: var(--km-shadow);
}
body .king-history-modal .king-history-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 20px 14px 24px;
	border-bottom: 1px solid var(--km-line);
	text-align: left;
}
body .king-history-modal .king-history-modal-date {
	display: inline-block;
	margin: 0 0 6px;
	color: var(--km-accent);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .01em;
}
body .king-history-modal .king-history-modal-title-row { display: flex; align-items: center; gap: 8px; }
body .king-history-modal .king-history-modal-header h3,
body .king-history-modal .king-history-modal-title {
	margin: 0;
	color: var(--km-text);
	font-size: clamp(20px, 1rem + .9vw, 26px);
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: -.02em;
	text-align: left;
}
body .king-history-modal .king-history-title-media { display: none; }
body .king-history-modal .king-history-modal-content {
	padding: 20px 24px 8px;
	text-align: left;
}
body .king-history-modal .king-history-modal-image { margin: 0 0 18px; }
body .king-history-modal .king-history-modal-image img {
	display: block;
	width: 100%;
	max-height: 360px;
	object-fit: cover;
	border-radius: 12px;
}
body .king-history-modal .king-history-modal-summary {
	margin: 0 0 14px;
	color: var(--km-text);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
	text-align: left;
}
body .king-history-modal .king-history-modal-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 18px;
	justify-content: flex-start;
}
body .king-history-modal .king-history-modal-meta .king-history-chip,
body .king-history-modal .king-history-modal-meta .king-history-region,
body .king-history-modal .king-history-modal-meta a,
body .king-history-modal .king-history-modal-meta span:not(.king-history-meta-tags) {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 10px;
	border: 0;
	border-radius: 999px;
	background: var(--km-soft);
	color: var(--km-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
}
body .king-history-modal .king-history-modal-meta .king-history-meta-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	height: auto;
	padding: 0;
	background: none;
	overflow: visible;
}
body .king-history-modal .king-history-modal-body,
body .king-history-modal .king-history-modal-body p {
	color: var(--km-body);
	font-size: 16px;
	line-height: 1.75;
	text-align: left;
}
body .king-history-modal .king-history-modal-body p { margin: 0 0 14px; }
body .king-history-modal .king-history-modal-footer {
	padding: 14px 24px 18px;
	border-top: 1px solid var(--km-line);
	background: var(--km-bg);
}
body .king-history-modal .king-history-modal-stepper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0 0 12px;
}
body .king-history-modal .king-history-modal-step,
body .king-history-modal .king-history-modal-step.has-thumb {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px 14px;
	border: 1px solid var(--km-line);
	border-radius: 12px;
	background-color: var(--km-bg);
	background-repeat: no-repeat;
	background-size: 44px 44px;
	background-position: 7px center;
	color: var(--km-text);
	text-align: left;
	box-shadow: none;
	overflow: hidden;
	transition: background-color .15s, border-color .15s;
}
body .king-history-modal .king-history-modal-step.has-thumb::before { display: none; }
body .king-history-modal .king-history-modal-step:not(.has-thumb) { background-image: none; }
body .king-history-modal #king-history-modal-prev.has-thumb { padding-left: 62px; }
body .king-history-modal #king-history-modal-next.has-thumb { padding-right: 62px; background-position: right 7px center; }
body .king-history-modal .king-history-modal-step:hover:not([disabled]) {
	background-color: var(--km-soft);
	border-color: var(--km-soft-2);
	transform: none;
	box-shadow: none;
}
body .king-history-modal #king-history-modal-next { justify-content: flex-end; text-align: right; grid-column: 2; }
body .king-history-modal .king-history-modal-step-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body .king-history-modal .king-history-modal-step-label,
body .king-history-modal .king-history-modal-step.has-thumb .king-history-modal-step-label {
	color: var(--km-muted);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	text-shadow: none;
}
body .king-history-modal .king-history-modal-step-title,
body .king-history-modal .king-history-modal-step.has-thumb .king-history-modal-step-title {
	overflow: hidden;
	color: var(--km-text);
	font-size: 14px;
	font-weight: 650;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-shadow: none;
}
body .king-history-modal .king-history-modal-step i,
body .king-history-modal .king-history-modal-step.has-thumb i {
	flex: 0 0 auto;
	color: var(--km-muted);
	text-shadow: none;
}
body .king-history-modal .king-history-modal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
body .king-history-modal .king-history-modal-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--km-line);
	border-radius: 10px;
	background: var(--km-bg);
	color: var(--km-text);
	font-size: 13.5px;
	font-weight: 650;
	text-decoration: none;
	box-shadow: none;
	transition: background-color .15s;
}
body .king-history-modal .king-history-modal-link:hover { background: var(--km-soft); color: var(--km-text); transform: none; }
body .king-history-modal .king-history-modal-link i { color: var(--km-muted); font-size: 13px; }
body .king-history-modal #king-history-modal-share {
	margin-left: auto;
	background: var(--km-text);
	border-color: var(--km-text);
	color: var(--km-bg);
}
body .king-history-modal #king-history-modal-share i { color: inherit; }
body .king-history-modal #king-history-modal-share:hover { opacity: .9; }

/* ==========================================================================
   Phones: bottom sheets
   ========================================================================== */
@media (max-width: 560px) {
	#sharemodal.in,
	#rlatermodal.in,
	#king-history-share-sheet:not([hidden]) {
		display: flex !important;
		align-items: flex-end;
		justify-content: center;
	}
	#sharemodal .king-modal-content,
	#king-history-share-sheet .king-modal-content,
	#rlatermodal .king-modal-content {
		width: 100%;
		max-width: none;
		margin: 0 !important;
		border-radius: 20px 20px 0 0;
		border-bottom: 0;
		padding-bottom: env(safe-area-inset-bottom);
		animation: km-sheet-up .22s ease-out;
	}
	#sharemodal .king-modal-content::before,
	#king-history-share-sheet .king-modal-content::before,
	#rlatermodal .king-modal-content::before {
		content: "";
		display: block;
		width: 38px;
		height: 4px;
		margin: 8px auto 0;
		border-radius: 4px;
		background: var(--km-soft-2);
	}
	#rlatermodal .king-modal-body { max-height: 72vh; }
	:is(.king-share-sheet, .king-share-popup) .social-share-btn > i { width: 46px; height: 46px; font-size: 18px; }
	.king-share-popup .mfp-container { display: flex; align-items: flex-end; justify-content: center; padding: 0; }
	.king-share-popup .mfp-container::before { display: none; }
	.king-share-popup .mfp-content { width: 100%; vertical-align: bottom; }
	.king-share-popup .mfp-content > .social-share {
		width: 100%;
		max-width: none;
		border-radius: 20px 20px 0 0;
		border-bottom: 0;
		padding-bottom: env(safe-area-inset-bottom);
		animation: km-sheet-up .22s ease-out;
	}
	.king-share-popup .mfp-content > .social-share::before {
		content: "";
		display: block;
		width: 38px;
		height: 4px;
		margin: 8px auto 0;
		border-radius: 4px;
		background: var(--km-soft-2);
	}

	.king-calendar-modal:not([hidden]) { align-items: flex-end; padding: 0; }
	body .king-calendar-modal .king-calendar-modal-panel {
		width: 100%;
		border-radius: 20px 20px 0 0;
		padding-bottom: calc(20px + env(safe-area-inset-bottom));
		animation: km-sheet-up .22s ease-out;
	}
	.king-calendar-modal .kcm-btn,
	body .king-calendar-modal .king-calendar-modal-action { flex: 1 1 auto; }
	body .king-calendar-modal .king-calendar-modal-action { margin-left: 0; }

	body .king-history-modal .king-history-modal-header { padding: 16px 16px 12px 18px; }
	body .king-history-modal .king-history-modal-content { padding: 16px 18px 4px; }
	body .king-history-modal .king-history-modal-footer { padding: 12px 16px 16px; }
	body .king-history-modal .king-history-modal-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	body .king-history-modal .king-history-modal-link { flex: 0 0 auto; }
}
@keyframes km-sheet-up {
	from { transform: translateY(24px); opacity: .6; }
	to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	#sharemodal .king-modal-content,
	#rlatermodal .king-modal-content,
	body .king-calendar-modal .king-calendar-modal-panel { animation: none; }
}

/* ==========================================================================
   "Admin panel" entry in the avatar menu and the phone drawer
   ========================================================================== */
.king-dropdown .king-dropdown-admin {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 8px 0 4px;
	padding: 9px 12px;
	border-radius: 10px;
	background: var(--km-soft);
	color: var(--km-text);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}
.king-dropdown .king-dropdown-admin:hover { background: var(--km-soft-2); color: var(--km-text); }
.king-dropdown .king-dropdown-admin i { width: 16px; color: var(--km-muted); font-size: 13px; text-align: center; }
.king-dropdown .king-dropdown-admin .king-dropdown-admin-go { width: auto; margin-left: auto; font-size: 11px; }
.kn-drawer-admin {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 6px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--km-text);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.kn-drawer-admin:hover { background: var(--km-soft); color: var(--km-text); }
.kn-drawer-admin i { width: 20px; color: var(--km-muted); text-align: center; }
