.wjStoryRoot,
.wjStoryRoot *,
.wjStoryPlayer,
.wjStoryPlayer *,
.wjStoryComposer,
.wjStoryComposer *,
.wjStoryAddPage,
.wjStoryAddPage * {
	box-sizing: border-box;
}

.wjStoryDashboardSlot,
.wjStoryRoot {
	margin: 0 0 16px;
}

.boxesTop > .boxContainer:has(> .wjStoryDashboardBox) {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wcfLayoutMaxWidth, 90%);
	margin: 16px auto 0;
	padding: 0 20px;
}

@media screen and (min-width: 1025px) {
	.boxesTop > .boxContainer:has(> .wjStoryDashboardBox) {
		min-width: var(--wcfLayoutMinWidth, 980px);
	}
}

@media screen and (max-width: 1024px) {
	.boxesTop > .boxContainer:has(> .wjStoryDashboardBox) {
		min-width: 0;
		padding: 0 10px;
	}
}

.box.wjStoryDashboardBox > .boxContent {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.wjStoryRoot--page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 16px;
	align-items: start;
	margin: 0;
}

@media screen and (max-width: 800px) {
	.wjStoryRoot--page {
		grid-template-columns: 1fr;
	}
}

.wjStoryCard,
.wjStoryInbox,
.wjStoryComposerCard {
	background: #fff;
	border: 1px solid #e6e8ec;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.wjStoryCard {
	padding: 14px 16px 8px;
}

.wjStoryCardHead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.wjStoryCardHead h2,
.wjStoryComposerHead h2,
.wjStoryInbox h3 {
	margin: 0;
	color: #1e293b;
	font-size: 16px;
	font-weight: 800;
}

.wjStoryLead,
.wjStoryHint,
.wjStoryEmpty {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 14px;
	line-height: 1.4;
}

.wjStoryOpen,
.wjStoryCreate,
.wjStoryBack {
	color: #2563eb;
	font-weight: 700;
	text-decoration: none;
}

.wjStoryCreate,
.wjStoryShare,
.wjStoryPlus,
.wjStoryClose,
.wjStoryLike,
.wjStoryViews,
.wjStoryDelete,
.wjStoryReplyForm button,
.wjStoryViewersClose,
.wjStoryPlayerBackdrop {
	font: inherit;
}

.wjStoryCreate {
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0;
}

.wjStoryRail {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding: 4px 2px 12px;
}

.wjStorySelf {
	position: relative;
	width: 92px;
	flex: 0 0 auto;
}

.wjStoryItem {
	display: block;
	width: 92px;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	font: inherit;
}

.wjStorySelf .wjStoryItem {
	width: 100%;
}

.wjStoryItem:focus-visible,
.wjStoryPlus:focus-visible,
.wjStoryCreate:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 3px;
	border-radius: 12px;
}

.wjStoryRing {
	width: 86px;
	height: 86px;
	margin: 0 auto;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #fff;
}

.wjStoryRing--empty {
	border: 2.5px dashed #2563eb;
}

.wjStoryRing--live {
	border: 2.5px solid transparent;
	background:
		linear-gradient(#fff, #fff) padding-box,
		linear-gradient(135deg, #f59e0b, #ef4444 40%, #a855f7 72%, #3b82f6) border-box;
}

.wjStoryRing--seen {
	border: 2.5px solid #d6d3d1;
}

.wjStoryAvatar {
	width: 74px;
	height: 74px;
	border-radius: 50%;
	overflow: hidden;
	background: #e2e8f0;
	display: grid;
	place-items: center;
}

.wjStoryAvatar img,
.wjStoryAvatar .userAvatarImage {
	width: 74px !important;
	height: 74px !important;
	max-width: none;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.wjStoryInitial {
	color: #334155;
	font-weight: 800;
	font-size: 22px;
}

.wjStoryName {
	display: block;
	margin-top: 8px;
	color: #334155;
	font-size: 13px;
	font-weight: 650;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wjStoryItem--self .wjStoryName {
	color: #2563eb;
	font-weight: 700;
}

.wjStoryItem.isUnseen .wjStoryName {
	font-weight: 800;
}

.wjStoryPlus {
	position: absolute;
	top: 60px;
	right: 2px;
	z-index: 2;
	width: 22px;
	height: 22px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	padding: 0;
	cursor: pointer;
	font-size: 16px;
	line-height: 16px;
}

.wjStoryInbox {
	padding: 14px 16px;
}

.wjStoryInbox ul {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.wjStoryInbox li {
	padding-bottom: 10px;
	border-bottom: 1px solid #f1f5f9;
}

.wjStoryInbox strong {
	color: #1e293b;
}

.wjStoryInbox span,
.wjStoryInbox p {
	color: #64748b;
	font-size: 13px;
}

.wjStoryInbox p {
	margin: 4px 0 0;
	color: #334155;
	font-size: 14px;
}

.wjStoryPlayer,
.wjStoryComposer {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: grid;
	place-items: center;
	padding: 16px;
}

.wjStoryPlayer[hidden],
.wjStoryComposer[hidden],
.wjStoryCaption[hidden],
.wjStoryViewers[hidden],
.wjStoryToast[hidden],
.wjStoryViews[hidden],
.wjStoryDelete[hidden],
.wjStoryReplyForm[hidden],
.wjStoryColors[hidden],
.wjStoryField[hidden] {
	display: none !important;
}

.wjStoryPlayerBackdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(15, 23, 42, .78);
	cursor: pointer;
}

.wjStoryStage {
	position: relative;
	z-index: 1;
	width: min(420px, 100%);
	height: min(760px, calc(100dvh - 24px));
	background: #111827;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

@media screen and (max-width: 700px) {
	.wjStoryPlayer,
	.wjStoryComposer {
		padding: 0;
	}

	.wjStoryStage {
		width: 100vw;
		height: 100dvh;
		border-radius: 0;
	}
}

.wjStoryProgress {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	z-index: 4;
	display: flex;
	gap: 4px;
}

.wjStoryProgress span {
	flex: 1;
	height: 4px;
	border-radius: 99px;
	background: rgba(255, 255, 255, .45);
	overflow: hidden;
}

.wjStoryProgress i {
	display: block;
	height: 100%;
	width: 100%;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left center;
}

.wjStoryPlayerHead,
.wjStoryPlayerFoot,
.wjStoryCaption {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 3;
}

.wjStoryPlayerHead {
	top: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 28px 12px 24px;
	background: linear-gradient(rgba(0, 0, 0, .45), transparent);
	color: #fff;
}

.wjStoryPlayerAvatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 255, 255, .2);
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}

.wjStoryPlayerAvatar img {
	width: 36px !important;
	height: 36px !important;
	max-width: none;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.wjStoryPlayerMeta {
	display: grid;
	min-width: 0;
}

.wjStoryPlayerName,
.wjStoryPlayerTime {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wjStoryPlayerTime {
	font-size: 12px;
	opacity: .85;
}

.wjStoryClose {
	margin-left: auto;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.wjStoryHit {
	position: absolute;
	top: 78px;
	bottom: 92px;
	z-index: 2;
	width: 32%;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.wjStoryHit--next {
	right: 0;
	width: 68%;
}

.wjStoryFrame {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 72px 22px 110px;
	text-align: center;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.25;
	white-space: pre-wrap;
	word-break: break-word;
}

.wjStoryFrame img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wjStoryCaption {
	bottom: 84px;
	margin: 0;
	padding: 0 16px;
	color: #fff;
	font-weight: 700;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
	pointer-events: none;
}

.wjStoryPlayerFoot {
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 12px 14px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}

.wjStoryReplyForm {
	display: flex;
	flex: 1;
	gap: 6px;
	min-width: 0;
}

.wjStoryReplyForm input {
	flex: 1;
	min-width: 0;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	padding: 8px 12px;
}

.wjStoryReplyForm input::placeholder {
	color: rgba(255, 255, 255, .75);
}

.wjStoryReplyForm button,
.wjStoryLike,
.wjStoryViews,
.wjStoryDelete {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-weight: 700;
}

.wjStoryLike.isLiked {
	color: #fb7185;
}

.wjStoryViewers {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	max-height: 55%;
	overflow: auto;
	background: #fff;
	color: #1e293b;
	border-radius: 16px 16px 0 0;
	padding: 12px 14px 16px;
}

.wjStoryViewersHead {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wjStoryViewersClose {
	border: 0;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
}

.wjStoryViewersList {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.wjStoryToast {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 86px;
	z-index: 6;
	margin: 0;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(15, 23, 42, .9);
	color: #fff;
	text-align: center;
}

.wjStoryComposerCard {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	padding: 14px 16px 16px;
}

.wjStoryComposerHead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.wjStoryComposer .wjStoryClose {
	color: #334155;
}

.wjStoryComposerBody {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

@media screen and (max-width: 700px) {
	.wjStoryComposerBody {
		grid-template-columns: 1fr;
	}

	.wjStoryPreview {
		margin: 0 auto;
	}
}

.wjStoryPreview {
	position: relative;
	width: 100%;
	height: 360px;
	border-radius: 16px;
	overflow: hidden;
	display: grid;
	place-items: center;
	padding: 16px;
	text-align: center;
	font-weight: 800;
	font-size: 22px;
	line-height: 1.25;
}

.wjStoryPreview img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wjStoryPreview p {
	position: relative;
	z-index: 1;
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

.wjStoryPreview.isPhoto p {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
}

.wjStoryKind {
	display: flex;
	gap: 6px;
	padding: 4px;
	margin-bottom: 12px;
	background: #f3f4f6;
	border-radius: 10px;
}

.wjStoryKindBtn {
	position: relative;
	flex: 1;
	text-align: center;
	padding: 8px;
	border-radius: 8px;
	cursor: pointer;
	color: #4b5563;
}

.wjStoryKindBtn input,
.wjStorySwatch input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wjStoryKindBtn:has(input:checked) {
	background: #fff;
	color: #111827;
	font-weight: 700;
}

.wjStoryField {
	display: grid;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 13px;
	color: #334155;
}

.wjStoryField textarea,
.wjStoryField input[type="file"] {
	width: 100%;
	font: inherit;
}

.wjStoryField textarea {
	min-height: 84px;
	resize: vertical;
}

.wjStoryColors {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.wjStorySwatch {
	position: relative;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
	cursor: pointer;
	overflow: hidden;
}

.wjStorySwatch--custom {
	background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444);
}

.wjStorySwatch:has(input[type="radio"]:checked) {
	box-shadow: 0 0 0 2px #111827;
}

.wjStoryColor {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	border: 0;
	padding: 0;
}

.wjStoryShare {
	border: 0;
	border-radius: 999px;
	background: #2563eb;
	color: #fff;
	padding: 10px 18px;
	font-weight: 700;
	cursor: pointer;
}

.wjStoryAddPage {
	max-width: 760px;
	margin: 0 auto;
}

.wjStoryBg--blue { background: #1d4ed8; color: #fff; }
.wjStoryBg--magenta { background: #ec4899; color: #fff; }
.wjStoryBg--sunset { background: linear-gradient(135deg, #c026d3, #fb7185); color: #fff; }
.wjStoryBg--dawn { background: linear-gradient(135deg, #fb923c, #fde047); color: #111827; }
.wjStoryBg--teal { background: #0f766e; color: #fff; }
.wjStoryBg--night { background: #111827; color: #fff; }
.wjStoryBg--glitter {
	background-color: #7f1d1d;
	background-image:
		radial-gradient(circle, rgba(255, 255, 255, .9) 1px, transparent 1.4px),
		radial-gradient(circle, rgba(253, 224, 171, .8) 1px, transparent 1.4px);
	background-size: 14px 14px, 22px 22px;
	background-position: 0 0, 7px 11px;
	color: #fff;
}

html.wjStoryLock,
html.wjStoryLock body {
	overflow: hidden;
}
