/* --------------------  popup common */
.outerall {
	height: 90%;
	padding: .625em;
	border-radius: .25em;
	border: 2px white solid;
	font-family: TaiwanPearl-Regular;
}
.all {
	color: #64463C;
	font-size: 1.25em;
	font-weight: bold;
	height: 100%;
	overflow: auto;
}


/* --------------------  scrollbar */
.c3htmlwrap {
	--scrollbar-width: 2em;
	--scrollbar-radius: calc(var(--scrollbar-width) *.25);
	--scrollbar-col-0: #C8B17B;
	--scrollbar-col-1: #CBCD97;
	--scrollbar-col-2: #E2D5A1;
}
@-moz-document url-prefix() { * { scrollbar-color: var(--scrollbar-col-0) var(--scrollbar-col-1); } }
::-webkit-scrollbar {
	width: var(--scrollbar-width);
	height: var(--scrollbar-width);
}
::-webkit-scrollbar-track {
	background: var(--scrollbar-col-1);
	border-radius: var(--scrollbar-radius);
	border: 2px white solid;
}
::-webkit-scrollbar-thumb {
	background: linear-gradient(var(--scrollbar-col-2), var(--scrollbar-col-0));
	border: 2px white solid;
	border-radius: var(--scrollbar-radius);
}



.logout {
	text-align: center;
	background-image: url(/popupButton4.png);
	font-weight: bold;
	margin: 5px;
	height: 30px;
	width: 50px;
	color: #000;
}


.eachTask {
	border: 4px solid #ddd;
	padding: 10px;
	border-radius: 25px;
	/*margin: 20px;*/
	background: white;
}

.headings {
	font-size: 3em;
	line-height: 0.2em;
}

.corner-br {
	text-align: end;
}

.eachgift,
.eachlist {
	margin: .75em;
	min-height: 6em;
}

.inline {
	display: inline-block;
	/* border: 1px solid red; */
}

.itembox {
	float: right;
	height: 30px;
	margin-right: 1em;
}

.itemicon {
	height: 30px;
}


.headbox {
	position: relative;
	/* 	height:10vw; */
	margin-right: 1em;
}

.onlineicon {
	position: absolute;
	z-index: 10;
	left: 1.9vw;
	top: 1.9vw;
	width: 1vw;
	height: 1vw;
}

.headicon {
	position: relative;
	z-index: 1;
	width: 5vw;
	height: 5vw;
}

.username {
	font-size: 2vw;
	height: 5vw;
	margin-left: 1em;
	text-align: center;
	vertical-align: top;
	line-height: 5vw;
}

.removebox,
.addbox {
	float: right;
	height: 5vw;
	margin-right: 5em;
	position: relative;
}

.removeicon,
.addicon {
	height: 3vw;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.rankbox {
	width: 30px;
	height: 30px;
}

.rankname {
	font-size: 2em;
	height: 30px;
	margin-left: 1em;
	text-align: center;
	vertical-align: top;
	line-height: 30px;
}


/* --------------------  notification */
.eachNotification {
	position: relative;
	padding-left: 0.7vw;
	padding-right: 0.7vw;
	padding-top: 0.5vw;
	padding-bottom: 0.5vw;
	border-radius: 0.5vw;
	background: white;
	margin: 0.5vw;
	min-height: 0.7vw;
}

.NotificationHeadings {
	font-size: 1.3vw;
}
.NotificationNoNew {
	font-size: 1.3vw;
	display: flex; 
	place-content: center; 
	align-items: center; 
}

.Notificationbox {
	float: right;
	position: absolute;
	bottom: 0.2vw;
	right: 0.3vw;
}

.NotificationDate {
	font-size: 0.8vw;
	padding: 0.3vw;
}

.indent {
	margin-left: 3em;
}

.container {
	text-align: center;
	vertical-align: top;
}


.eachMessage {
	padding: 0.5vw;
	position: relative;
	font-family: "DFPYuanMedium-B5";
	height: 100%;
	width: 100%;
}

.MessageImageBox {
	padding: 0.5vw;
	position: absolute;
	height: 95%;
	width: 30%;
	left: 0px;
	top: 0px;
}

.MessageAreaBox {
	padding-left: 0.55vw;
	padding-right: 0.55vw;
	padding-top: 0.5vw;
	padding-bottom: 0.5vw;
	position: absolute;
	height: 95%;
	width: 70%;
	right: 0px;
	top: 0px;
}

.MessageContentBox {
	height: 85%;
	overflow: auto;
}

.MessagenDate {
	padding: 0.1vw;
}

.MessageHeadings {
	padding: 0.1vw;
}

.MessageBody {
	position: relative;
	padding: 0.1vw;
}

.MessageButtonBox {
	padding: 0.5vw;
	position: absolute;
	right: 0.5vw;
}

.redeem {
	font-family: "DFPYuanMedium-B5";
	font-size: 2em;
	/*3em;*/
	padding: .5em;
	/*18px;*/

	--scrollbar-width: .75em;
}

.searchBox {
	border: none;
	font-size: 1.3rem;
}

.invisible {
	visibility: hidden;
}


/* -------------------- button gradiance */
.btn-grad {
	color: white;
	text-align: center;
	font-size: 1.25em;
	padding: .25em;
	border: .15em solid white;
	border-radius: .6em;

	box-shadow: 0 1px 2px rgba(0, 0, 0, .25);

	cursor: pointer;
}
.grad-red { background: linear-gradient(#F15722, #B83725); }
.grad-green { background: linear-gradient(#66A38C, #2E877C); }
.grad-blue { background: linear-gradient(#77A0DB, #2E68A5); }
.grad-salmon { background: linear-gradient(#FFD698, #FFBC8C); }


/* --------------------  msg layout */
.outerall:has(.msglayout) {
	border: none;
}

.msglayout {
	width: 100%;
	height: 100%;
	max-height: 360px;

	display: grid;
	grid-template-columns: 4fr 6fr;
	gap: 2em;
}
.msglayout .con {
	display: flex;
	flex-flow: column nowrap;
	gap: .5em;
}
.msglayout .l {
	grid-column: 1;

	background: white;
	background-image: url(/ui_boy.png);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 75%;

	padding: .5em;
}
.msglayout .l .name { font-size: 1.25em; }
.msglayout .l .level {
	display: flex;
	align-items: center;
}
.msglayout .l .level::before {
	content: '';
	background-image: url(/ui_avatar_lv.png);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	width: 1.5em;
	height: 1.5em;
	display: block;
}
.msglayout .l .online {
	--col: #00CC99;

	color: var(--col);

	font-size: 1em;
	padding: .25em .5em;
	border: 2px solid var(--col);
	border-radius: 4px 0 4px 0;
	align-self: end;
	margin-top: auto;

	position: relative;
}
.msglayout .l .online::before {
	content: "";
	background: var(--col);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	position: absolute;
	top: -1px;
	right: -1px;
	transform: translate(50%, -50%);
}

.msglayout .r { grid-column: 2; }
.msglayout .r .time { font-size: .75em; }
/* .msglayout .r .content {} */
.msglayout .r .btn-grad {
	align-self: end;
	width: 10em;
}
.msglayout .r .go { margin-top: auto; }
/* .msglayout .r .no {} */


/* --------------------  game layout */
.outerall:has(.gamelayout) {
	border: none;
}

.gamelayout {
	width: 100%;
	height: 100%;
	max-height: 22em;
	display: grid;
	grid-template-rows: 1fr 5fr 1fr;
	grid-template-columns: 2fr 5fr;
	grid-template-areas: 't t' 'l r' 'b b';
	gap: .5em;
}

.gamelayout .con {
	display: flex;
	align-items: center;
	gap: .5em;
}

.gamelayout .t {
	grid-area: t;
	text-align: center;
	font-size: 2em;
	font-weight: bold;
}

.gamelayout .l {
	grid-area: l;
}

.gamelayout .r {
	grid-area: r;
}

.gamelayout .l img,
.gamelayout .r img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gamelayout .b {
	grid-area: b;
	justify-content: flex-end;
}

.gamelayout .b .btn-grad {
	width: 5em;
	font-size: .8em;
}


/* --------------------  game layout */
.outerall:has(.scorelayout) {
	border: none;
}

.all:has(.scorelayout) {
	overflow: visible;
}

/** !! IMPORTANT NOTE !!
	Due to the '.player.r' element is flipped, we need to cater the problem of any asymmetrical object when generating image for placing in there.
 */
.scorelayout {
	width: 100%;
	height: 100%;
	display: grid;
	grid-template-rows: 1fr 5fr 1fr;
	grid-template-columns: 2fr 3fr 2fr;
	grid-template-areas: 't t t' 'l m r' 'b b b';
	gap: .5em;
}

.scorelayout .t {
	grid-area: t;
	font-size: 1.5em;
	max-height: 1em;
	background: #FFCC00;
	border: 4px solid #FF9900;
	border-radius: .4em;
	justify-content: space-around;
	position: relative;
}

.scorelayout .l {
	grid-area: l;
}

.scorelayout .r {
	grid-area: r;
}

.scorelayout .m {
	grid-area: m;
}

.scorelayout .b {
	grid-area: b;
	justify-content: center;
}

.scorelayout .con {
	display: flex;
	align-items: center;
	gap: .5em;
}

.scorelayout .t::before {
	content: attr(text);
	color: #990000;
	font-size: 1.25em;
	-webkit-text-stroke: .1em yellow;
	paint-order: stroke fill;
	position: absolute;
	align-self: end;
	left: 50%;
	transform: translate(-50%);
}

.scorelayout .t .score {
	display: block;
	width: 5em;
	height: 1em;
}

.scorelayout .t .num {
	color: #CC0000;
}

.scorelayout .t .tag.win {
	position: relative;
}

.scorelayout .t .tag.win::before {
	content: '';
	background-image: url(/ui_game_win.png);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	width: 4em;
	height: 4em;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	transform: translate(-2em, -2em);
}

.scorelayout .player {
	width: 100%;
	height: 100%;
}

.scorelayout .player img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(1.25);
}

.scorelayout .player.win {
	position: relative;
}

.scorelayout .player.win::before {
	content: '';
	background: url(/ui_game_cup.png);
	background-repeat: no-repeat;
	background-size: 40%;
	width: 100%;
	height: 100%;
	display: block;
	position: absolute;
	top: 45%;
	left: 60%;
	z-index: 10;
}

.scorelayout .player.win::after {
	content: '';
	background: url(/ui_game_confetti.png);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	width: 100%;
	height: 100%;
	display: block;
	position: relative;
	top: -100%;
	z-index: 10;
}

.scorelayout .player.r {
	transform: scaleX(-1);
}

.scorelayout .b .btn-grad {
	width: 5em;
	font-size: .8em;
}


/* -------------------- tabs */
.all:has(.tabcon) {
	overflow: visible;
}

.tabcon {
	--col-con: lightgrey;
	--col-tab: grey;

	--r: .5em;

	width: 100%;
	height: 100%;
	display: flex;
	flex-flow: column nowrap;
	align-items: center;

}

.tabcon .tabs {
	width: 100%;
	min-height: 2em;
	display: flex;
	flex-flow: row nowrap;
	place-content: center;
	align-items: start;

	gap: 1em;
}

.tabcon .tab {
	background: var(--col-tab);
	padding: .25em 1em;

	border-radius: var(--r);
	border: .1em solid var(--col-con);

	color: var(--col-con);
	text-align: center;

	cursor: pointer;
}

.tabcon .tab:has(input[name='tab'][checked]),
.tabcon .tab:has(input[type='radio']:checked) {
	background: var(--col-con);
	color: var(--col-tab);

	align-self: stretch;
	border-radius: var(--r) var(--r) 0 0;
}

.tabcon .tab.new {
	position: relative;
}

.tabcon .tab.new::after {
	background: url(/iconMissionNew.png) no-repeat center;
	background-size: contain;
	content: '';
	width: 2em;
	height: 2em;
	display: block;
	position: absolute;
	top: -.75em;
	right: 0;
	padding: 0;
}

.tabcon .tab input {
	display: none;
}

.tabcon .con {
	background: var(--col-con);
	flex: 1;
	align-self: stretch;
	padding: 1em;

	overflow: auto;
}

.tabcon .con .tab-pane {
	display: none;
}

.tabcon .con .tab-pane:empty {
	border: dotted .5em #FFF;
	border-radius: 1em;
}

.tabcon .con .tab-pane:empty::after {
	content: attr(empty);
	color: white;
	font-size: 1.5em;
	width: 100%;
	text-align: center;
}

/* switch tab */
.tabs:has(#tab-0:checked)~.con>#con-0,
.tabs:has(#tab-1:checked)~.con>#con-1,
.tabs:has(#tab-2:checked)~.con>#con-2,
.tabs:has(#tab-3:checked)~.con>#con-3,
.tabs:has(#tab-0[checked])~.con>#con-0,
.tabs:has(#tab-1[checked])~.con>#con-1,
.tabs:has(#tab-2[checked])~.con>#con-2,
.tabs:has(#tab-3[checked])~.con>#con-3 {
	display: flex;
}

.list {
	display: flex;
	flex-flow: column nowrap;
	align-items: stretch;
	gap: .5em;
}


/* -------------------- pet fx */
.petfx.petfx-mark {
	display: flex;
}

.petfx-mark.icoitem {
	position: absolute;
	display: none;
}

.petfx-mark.icoitem::before {
	background-image: url(/ui_icon_pet_energyA.png);
	width: 2.5em;
	height: 2.5em;
}


/* ---------- storybook */
.storybookTitle {
	display: flex;
	flex-flow: column;
	place-content: center;
	align-items: center;
	font-size: 1.5em !important;
	font-weight: bold;
}

.storybookContent {
	padding: 2em !important;
	overflow: auto;
}

.storybookContent > img { width: 100%; }

.gobig {
	padding: 1em !important;
	position: absolute;
	width: auto !important;
	height: auto !important;
	font-size: 2em !important;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

.storybookContent.fullscreen {
	font-size: 1em !important;
	padding: 2em !important;
	display: flex;
}
.storybookContent.fullscreen img {
	width: 100%;
	height: 100%;
}

.gobig.fullscreen {
	padding: 1em !important;
	position: absolute;
	width: auto !important;
	height: auto !important;
	font-size: 2em !important;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}
.gobig.fullscreen img {
	width: 100%;
	height: 100%;
}

.fullscreen {
	width: auto !important;
	height: auto !important;
	position: absolute;
	padding: 1em !important;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}
.fullscreen img {
	width: 100% !important;
	height: 100% !important;
}

.unread.badge {
	background: red;
	color: white;

	--wh: 1.5em;
	width: var(--wh);
	height: var(--wh);

	font-family: sans-serif;
	font-size: 2em;
	border-radius: 3em;

	display: flex;
	place-content: center;
	align-items: center;

	margin: -.75em;
}

.unread.badge:empty {
	display: none;
}